Improved the export feature to allow bulk custom overide, and dynamic behaviour towards larger sets. Added function name to custom buttons as a class for CSS styling.

This commit is contained in:
Llewellyn van der Merwe 2020-07-24 06:11:38 +02:00
parent 27de9a83a5
commit 6bb23fc6ee
Signed by untrusted user: Llewellyn
GPG Key ID: EFC0C720A240551C
41 changed files with 527 additions and 115 deletions

View File

@ -144,11 +144,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 16th July, 2020
+ *Last Build*: 24th July, 2020
+ *Version*: 2.11.2
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **282693**
+ *Line count*: **283043**
+ *Field count*: **1525**
+ *File count*: **1785**
+ *Folder count*: **295**

View File

@ -144,11 +144,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 16th July, 2020
+ *Last Build*: 24th July, 2020
+ *Version*: 2.11.2
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **282693**
+ *Line count*: **283043**
+ *Field count*: **1525**
+ *File count*: **1785**
+ *Folder count*: **295**

View File

@ -1637,6 +1637,9 @@ class Interpretation extends Fields
$exel[] = $this->_t(3) . "->setLastModifiedBy(\$modified)";
$exel[] = $this->_t(3) . "->setTitle(\$title)";
$exel[] = $this->_t(3) . "->setSubject(\$subjectTab);";
$exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " The file type";
$exel[] = $this->_t(2) . "\$file_type = 'Xls';";
$exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " set description";
$exel[] = $this->_t(2) . "if (\$description)";
@ -1682,27 +1685,52 @@ class Interpretation extends Fields
$exel[] = $this->_t(2) . "));";
$exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
. " Add some data";
$exel[] = $this->_t(2) . "if (self::checkArray(\$rows))";
$exel[] = $this->_t(2) . "if ((\$size = self::checkArray(\$rows)) !== false)";
$exel[] = $this->_t(2) . "{";
$exel[] = $this->_t(3) . "\$i = 1;";
$exel[] = $this->_t(3) . "foreach (\$rows as \$array){";
$exel[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Based on data size we adapt the behaviour.";
$exel[] = $this->_t(3) . "\$xls_mode = 1;";
$exel[] = $this->_t(3) . "if (\$size > 3000)";
$exel[] = $this->_t(3) . "{";
$exel[] = $this->_t(4) . "\$xls_mode = 3;";
$exel[] = $this->_t(4) . "\$file_type = 'Csv';";
$exel[] = $this->_t(3) . "}";
$exel[] = $this->_t(3) . "elseif (\$size > 2000)";
$exel[] = $this->_t(3) . "{";
$exel[] = $this->_t(4) . "\$xls_mode = 2;";
$exel[] = $this->_t(3) . "}";
$exel[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Set active sheet and get it.";
$exel[] = $this->_t(3) . "\$active_sheet = \$spreadsheet->setActiveSheetIndex(0);";
$exel[] = $this->_t(3) . "foreach (\$rows as \$array)";
$exel[] = $this->_t(3) . "{";
$exel[] = $this->_t(4) . "\$a = 'A';";
$exel[] = $this->_t(4) . "foreach (\$array as \$value){";
$exel[] = $this->_t(4) . "foreach (\$array as \$value)";
$exel[] = $this->_t(4) . "{";
$exel[] = $this->_t(5)
. "\$spreadsheet->setActiveSheetIndex(0)->setCellValue(\$a.\$i, \$value);";
$exel[] = $this->_t(5) . "if (\$i == 1){";
$exel[] = $this->_t(6)
. "\$spreadsheet->getActiveSheet()->getColumnDimension(\$a)->setAutoSize(true);";
$exel[] = $this->_t(6)
. "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->applyFromArray(\$headerStyles);";
$exel[] = $this->_t(6)
. "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);";
$exel[] = $this->_t(5) . "} elseif (\$a === 'A'){";
$exel[] = $this->_t(6)
. "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->applyFromArray(\$sideStyles);";
$exel[] = $this->_t(5) . "} else {";
$exel[] = $this->_t(6)
. "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->applyFromArray(\$normalStyles);";
. "\$active_sheet->setCellValue(\$a.\$i, \$value);";
$exel[] = $this->_t(5) . "if (\$xls_mode != 3)";
$exel[] = $this->_t(5) . "{";
$exel[] = $this->_t(6) . "if (\$i == 1)";
$exel[] = $this->_t(6) . "{";
$exel[] = $this->_t(7)
. "\$active_sheet->getColumnDimension(\$a)->setAutoSize(true);";
$exel[] = $this->_t(7)
. "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$headerStyles);";
$exel[] = $this->_t(7)
. "\$active_sheet->getStyle(\$a.\$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);";
$exel[] = $this->_t(6) . "}";
$exel[] = $this->_t(6) . "elseif (\$a === 'A')";
$exel[] = $this->_t(6) . "{";
$exel[] = $this->_t(7)
. "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$sideStyles);";
$exel[] = $this->_t(6) . "}";
$exel[] = $this->_t(6) . "elseif (\$xls_mode == 1)";
$exel[] = $this->_t(6) . "{";
$exel[] = $this->_t(7)
. "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$normalStyles);";
$exel[] = $this->_t(6) . "}";
$exel[] = $this->_t(5) . "}";
$exel[] = $this->_t(5) . "\$a++;";
$exel[] = $this->_t(4) . "}";
@ -1725,7 +1753,7 @@ class Interpretation extends Fields
$exel[] = $this->_t(2)
. "header('Content-Type: application/vnd.ms-excel');";
$exel[] = $this->_t(2)
. "header('Content-Disposition: attachment;filename=\"'.\$fileName.'.xls\"');";
. "header('Content-Disposition: attachment;filename=\"' . \$fileName . '.' . strtolower(\$file_type) .'\"');";
$exel[] = $this->_t(2) . "header('Cache-Control: max-age=0');";
$exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " If you're serving to IE 9, then the following may be needed";
@ -1744,7 +1772,7 @@ class Interpretation extends Fields
$exel[] = $this->_t(2) . "header ('Pragma: public'); //"
. $this->setLine(__LINE__) . " HTTP/1.0";
$exel[] = PHP_EOL . $this->_t(2)
. "\$writer = IOFactory::createWriter(\$spreadsheet, 'Xls');";
. "\$writer = IOFactory::createWriter(\$spreadsheet, \$file_type);";
$exel[] = $this->_t(2) . "\$writer->save('php://output');";
$exel[] = $this->_t(2) . "jexit();";
$exel[] = $this->_t(1) . "}";
@ -5631,7 +5659,8 @@ class Interpretation extends Fields
$buttons[] = $this->_t(1) . $tab . $this->_t(2)
. "JToolBarHelper::custom('" . $viewName . "."
. $custom_button['method'] . "', '"
. $custom_button['icomoon'] . "', '', '" . $keyLang
. $custom_button['icomoon'] . " custom-button-"
. strtolower($custom_button['method']) . "', '', '" . $keyLang
. "', false);";
$buttons[] = $this->_t(1) . $tab . $this->_t(1) . "}";
}
@ -5665,7 +5694,8 @@ class Interpretation extends Fields
) . $tab . $this->_t(1)
. "JToolBarHelper::custom('" . $viewsName . "."
. $custom_button['method'] . "', '"
. $custom_button['icomoon'] . "', '', '"
. $custom_button['icomoon'] . " custom-button-"
. strtolower($custom_button['method']) . "', '', '"
. $keyLang . "', false);";
$this->onlyFunctionButton[$viewsName][] = $this->_t(
1
@ -5685,7 +5715,8 @@ class Interpretation extends Fields
$buttons[] = $this->_t(1) . $tab . $this->_t(2)
. "JToolBarHelper::custom('" . $viewsName . "."
. $custom_button['method'] . "', '"
. $custom_button['icomoon'] . "', '', '"
. $custom_button['icomoon'] . " custom-button-"
. strtolower($custom_button['method']) . "', '', '"
. $keyLang . "', '" . $validateSelection
. "');";
$buttons[] = $this->_t(1) . $tab . $this->_t(1)
@ -14365,9 +14396,9 @@ class Interpretation extends Fields
$query .= PHP_EOL . $this->_t(1) . "{";
$query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
. " setup the query";
$query .= PHP_EOL . $this->_t(2) . "if ("
$query .= PHP_EOL . $this->_t(2) . "if ((\$pks_size = "
. $this->fileContentStatic[$this->hhh . 'Component'
. $this->hhh] . "Helper::checkArray(\$pks))";
. $this->hhh] . "Helper::checkArray(\$pks)) !== false || 'bulk' === \$pks)";
$query .= PHP_EOL . $this->_t(2) . "{";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Set a value to know this is " . $config['type']
@ -14399,8 +14430,39 @@ class Interpretation extends Fields
. "\$query->from(\$db->quoteName('#__"
. $this->componentCodeName . "_" . $viewName_single
. "', 'a'));";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " The bulk export path";
$query .= PHP_EOL . $this->_t(3) . "if ('bulk' === \$pks)";
$query .= PHP_EOL . $this->_t(3)
. "{";
$query .= PHP_EOL . $this->_t(4)
. "\$query->where('a.id > 0');";
$query .= PHP_EOL . $this->_t(3)
. "}";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " A large array of ID's will not work out well";
$query .= PHP_EOL . $this->_t(3) . "elseif (\$pks_size > 500)";
$query .= PHP_EOL . $this->_t(3)
. "{";
$query .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
. " Use lowest ID";
$query .= PHP_EOL . $this->_t(4)
. "\$query->where('a.id >= ' . (int) min(\$pks));";
$query .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
. " Use highest ID";
$query .= PHP_EOL . $this->_t(4)
. "\$query->where('a.id <= ' . (int) max(\$pks));";
$query .= PHP_EOL . $this->_t(3)
. "}";
$query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " The normal default path";
$query .= PHP_EOL . $this->_t(3) . "else";
$query .= PHP_EOL . $this->_t(3)
. "{";
$query .= PHP_EOL . $this->_t(4)
. "\$query->where('a.id IN (' . implode(',',\$pks) . ')');";
$query .= PHP_EOL . $this->_t(3)
. "}";
// add custom filtering php
$query .= $this->getCustomScriptBuilder(
'php_getlistquery', $viewName_single,

View File

@ -6309,6 +6309,8 @@ abstract class ComponentbuilderHelper
->setLastModifiedBy($modified)
->setTitle($title)
->setSubject($subjectTab);
// The file type
$file_type = 'Xls';
// set description
if ($description)
{
@ -6348,21 +6350,46 @@ abstract class ComponentbuilderHelper
));
// Add some data
if (self::checkArray($rows))
if (($size = self::checkArray($rows)) !== false)
{
$i = 1;
foreach ($rows as $array){
// Based on data size we adapt the behaviour.
$xls_mode = 1;
if ($size > 3000)
{
$xls_mode = 3;
$file_type = 'Csv';
}
elseif ($size > 2000)
{
$xls_mode = 2;
}
// Set active sheet and get it.
$active_sheet = $spreadsheet->setActiveSheetIndex(0);
foreach ($rows as $array)
{
$a = 'A';
foreach ($array as $value){
$spreadsheet->setActiveSheetIndex(0)->setCellValue($a.$i, $value);
if ($i == 1){
$spreadsheet->getActiveSheet()->getColumnDimension($a)->setAutoSize(true);
$spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($headerStyles);
$spreadsheet->getActiveSheet()->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
} elseif ($a === 'A'){
$spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($sideStyles);
} else {
$spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($normalStyles);
foreach ($array as $value)
{
$active_sheet->setCellValue($a.$i, $value);
if ($xls_mode != 3)
{
if ($i == 1)
{
$active_sheet->getColumnDimension($a)->setAutoSize(true);
$active_sheet->getStyle($a.$i)->applyFromArray($headerStyles);
$active_sheet->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
}
elseif ($a === 'A')
{
$active_sheet->getStyle($a.$i)->applyFromArray($sideStyles);
}
elseif ($xls_mode == 1)
{
$active_sheet->getStyle($a.$i)->applyFromArray($normalStyles);
}
}
$a++;
}
@ -6382,7 +6409,7 @@ abstract class ComponentbuilderHelper
// Redirect output to a client's web browser (Excel5)
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="'.$fileName.'.xls"');
header('Content-Disposition: attachment;filename="' . $fileName . '.' . strtolower($file_type) .'"');
header('Cache-Control: max-age=0');
// If you're serving to IE 9, then the following may be needed
header('Cache-Control: max-age=1');
@ -6393,7 +6420,7 @@ abstract class ComponentbuilderHelper
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header ('Pragma: public'); // HTTP/1.0
$writer = IOFactory::createWriter($spreadsheet, 'Xls');
$writer = IOFactory::createWriter($spreadsheet, $file_type);
$writer->save('php://output');
jexit();
}

View File

@ -342,7 +342,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -360,7 +360,24 @@ class ComponentbuilderModelAdmin_views extends JModelList
// From the componentbuilder_admin_view table
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -269,7 +269,7 @@ class ComponentbuilderModelClass_methods extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -287,7 +287,24 @@ class ComponentbuilderModelClass_methods extends JModelList
// From the componentbuilder_class_method table
$query->from($db->quoteName('#__componentbuilder_class_method', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -269,7 +269,7 @@ class ComponentbuilderModelClass_properties extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -287,7 +287,24 @@ class ComponentbuilderModelClass_properties extends JModelList
// From the componentbuilder_class_property table
$query->from($db->quoteName('#__componentbuilder_class_property', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -283,7 +283,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -301,7 +301,24 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
// From the componentbuilder_custom_admin_view table
$query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -316,7 +316,7 @@ class ComponentbuilderModelCustom_codes extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -334,7 +334,24 @@ class ComponentbuilderModelCustom_codes extends JModelList
// From the componentbuilder_custom_code table
$query->from($db->quoteName('#__componentbuilder_custom_code', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -266,7 +266,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -284,7 +284,24 @@ class ComponentbuilderModelDynamic_gets extends JModelList
// From the componentbuilder_dynamic_get table
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -382,7 +382,7 @@ class ComponentbuilderModelFields extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -400,7 +400,24 @@ class ComponentbuilderModelFields extends JModelList
// From the componentbuilder_field table
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -235,7 +235,7 @@ class ComponentbuilderModelFieldtypes extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -253,7 +253,24 @@ class ComponentbuilderModelFieldtypes extends JModelList
// From the componentbuilder_fieldtype table
$query->from($db->quoteName('#__componentbuilder_fieldtype', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -278,7 +278,7 @@ class ComponentbuilderModelHelp_documents extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -296,7 +296,24 @@ class ComponentbuilderModelHelp_documents extends JModelList
// From the componentbuilder_help_document table
$query->from($db->quoteName('#__componentbuilder_help_document', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Order the results by ordering
$query->order('a.ordering ASC');

View File

@ -2252,7 +2252,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -2270,7 +2270,24 @@ class ComponentbuilderModelJoomla_components extends JModelList
// From the componentbuilder_joomla_component table
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -249,7 +249,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -267,7 +267,24 @@ class ComponentbuilderModelLanguage_translations extends JModelList
// From the componentbuilder_language_translation table
$query->from($db->quoteName('#__componentbuilder_language_translation', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -322,7 +322,7 @@ class ComponentbuilderModelLanguages extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -340,7 +340,24 @@ class ComponentbuilderModelLanguages extends JModelList
// From the componentbuilder_language table
$query->from($db->quoteName('#__componentbuilder_language', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -255,7 +255,7 @@ class ComponentbuilderModelLayouts extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -273,7 +273,24 @@ class ComponentbuilderModelLayouts extends JModelList
// From the componentbuilder_layout table
$query->from($db->quoteName('#__componentbuilder_layout', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -201,7 +201,7 @@ class ComponentbuilderModelPlaceholders extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -219,7 +219,24 @@ class ComponentbuilderModelPlaceholders extends JModelList
// From the componentbuilder_placeholder table
$query->from($db->quoteName('#__componentbuilder_placeholder', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -244,7 +244,7 @@ class ComponentbuilderModelServers extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -262,7 +262,24 @@ class ComponentbuilderModelServers extends JModelList
// From the componentbuilder_server table
$query->from($db->quoteName('#__componentbuilder_server', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -287,7 +287,7 @@ class ComponentbuilderModelSite_views extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -305,7 +305,24 @@ class ComponentbuilderModelSite_views extends JModelList
// From the componentbuilder_site_view table
$query->from($db->quoteName('#__componentbuilder_site_view', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -343,7 +343,7 @@ class ComponentbuilderModelSnippets extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -361,7 +361,24 @@ class ComponentbuilderModelSnippets extends JModelList
// From the componentbuilder_snippet table
$query->from($db->quoteName('#__componentbuilder_snippet', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -255,7 +255,7 @@ class ComponentbuilderModelTemplates extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -273,7 +273,24 @@ class ComponentbuilderModelTemplates extends JModelList
// From the componentbuilder_template table
$query->from($db->quoteName('#__componentbuilder_template', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -199,7 +199,7 @@ class ComponentbuilderModelValidation_rules extends JModelList
public function getExportData($pks, $user = null)
{
// setup the query
if (ComponentbuilderHelper::checkArray($pks))
if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true;
@ -217,7 +217,24 @@ class ComponentbuilderModelValidation_rules extends JModelList
// From the componentbuilder_validation_rule table
$query->from($db->quoteName('#__componentbuilder_validation_rule', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
if ($this->user->authorise('admin_view.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('admin_views.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('admin_views.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('admin_view.import'))

View File

@ -339,17 +339,17 @@ class ComponentbuilderViewCompiler extends JViewLegacy
if ($this->canDo->get('compiler.run_expansion'))
{
// add Run Expansion button.
JToolBarHelper::custom('compiler.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('compiler.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('compiler.translate'))
{
// add Translate button.
JToolBarHelper::custom('compiler.runTranslator', 'comments-2', '', 'COM_COMPONENTBUILDER_TRANSLATE', false);
JToolBarHelper::custom('compiler.runTranslator', 'comments-2 custom-button-runtranslator', '', 'COM_COMPONENTBUILDER_TRANSLATE', false);
}
if ($this->canDo->get('compiler.clear_tmp'))
{
// add Clear tmp button.
JToolBarHelper::custom('compiler.clearTmp', 'purge', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
JToolBarHelper::custom('compiler.clearTmp', 'purge custom-button-cleartmp', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
}
// set help url for this view if found

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
if ($this->user->authorise('custom_admin_view.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('custom_admin_views.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
JToolBarHelper::custom('custom_admin_views.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('custom_admin_view.import'))

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
if ($this->user->authorise('custom_code.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('custom_code.import'))

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
if ($this->user->authorise('dynamic_get.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('dynamic_gets.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('dynamic_gets.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('dynamic_get.import'))

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewFields extends JViewLegacy
if ($this->user->authorise('field.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('fields.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('fields.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('field.import'))

View File

@ -257,32 +257,32 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
if ($this->canDo->get('get_snippets.custom_admin_views'))
{
// add Custom Admin Views button.
JToolBarHelper::custom('get_snippets.openCustomAdminViews', 'screen', '', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS', false);
JToolBarHelper::custom('get_snippets.openCustomAdminViews', 'screen custom-button-opencustomadminviews', '', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS', false);
}
if ($this->canDo->get('get_snippets.site_views'))
{
// add Site Views button.
JToolBarHelper::custom('get_snippets.openSiteViews', 'palette', '', 'COM_COMPONENTBUILDER_SITE_VIEWS', false);
JToolBarHelper::custom('get_snippets.openSiteViews', 'palette custom-button-opensiteviews', '', 'COM_COMPONENTBUILDER_SITE_VIEWS', false);
}
if ($this->canDo->get('get_snippets.templates'))
{
// add Templates button.
JToolBarHelper::custom('get_snippets.openTemplates', 'brush', '', 'COM_COMPONENTBUILDER_TEMPLATES', false);
JToolBarHelper::custom('get_snippets.openTemplates', 'brush custom-button-opentemplates', '', 'COM_COMPONENTBUILDER_TEMPLATES', false);
}
if ($this->canDo->get('get_snippets.layouts'))
{
// add Layouts button.
JToolBarHelper::custom('get_snippets.openLayouts', 'brush', '', 'COM_COMPONENTBUILDER_LAYOUTS', false);
JToolBarHelper::custom('get_snippets.openLayouts', 'brush custom-button-openlayouts', '', 'COM_COMPONENTBUILDER_LAYOUTS', false);
}
if ($this->canDo->get('get_snippets.snippets'))
{
// add Snippets button.
JToolBarHelper::custom('get_snippets.openSnippets', 'pin', '', 'COM_COMPONENTBUILDER_SNIPPETS', false);
JToolBarHelper::custom('get_snippets.openSnippets', 'pin custom-button-opensnippets', '', 'COM_COMPONENTBUILDER_SNIPPETS', false);
}
if ($this->canDo->get('get_snippets.libraries'))
{
// add Libraries button.
JToolBarHelper::custom('get_snippets.openLibraries', 'puzzle', '', 'COM_COMPONENTBUILDER_LIBRARIES', false);
JToolBarHelper::custom('get_snippets.openLibraries', 'puzzle custom-button-openlibraries', '', 'COM_COMPONENTBUILDER_LIBRARIES', false);
}
// set help url for this view if found

View File

@ -123,12 +123,12 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
if ($this->user->authorise('joomla_component.clone', 'com_componentbuilder'))
{
// add Clone button.
JToolBarHelper::custom('joomla_components.cloner', 'save-copy', '', 'COM_COMPONENTBUILDER_CLONE', 'true');
JToolBarHelper::custom('joomla_components.cloner', 'save-copy custom-button-cloner', '', 'COM_COMPONENTBUILDER_CLONE', 'true');
}
if ($this->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder'))
{
// add Export JCB Packages button.
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true');
JToolBarHelper::custom('joomla_components.smartExport', 'download custom-button-smartexport', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true');
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
@ -148,22 +148,22 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
if ($this->user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder'))
{
// add Import JCB Packages button.
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
JToolBarHelper::custom('joomla_components.smartImport', 'upload custom-button-smartimport', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
}
if ($this->user->authorise('joomla_component.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('joomla_components.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('joomla_components.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder'))
{
// add Backup button.
JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false);
JToolBarHelper::custom('joomla_components.backup', 'archive custom-button-backup', '', 'COM_COMPONENTBUILDER_BACKUP', false);
}
if ($this->user->authorise('joomla_component.clear_tmp', 'com_componentbuilder'))
{
// add Clear tmp button.
JToolBarHelper::custom('joomla_components.clearTmp', 'purge', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
JToolBarHelper::custom('joomla_components.clearTmp', 'purge custom-button-cleartmp', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import'))

View File

@ -133,12 +133,12 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy
if ($this->user->authorise('joomla_module.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('joomla_modules.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
JToolBarHelper::custom('joomla_modules.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
if ($this->user->authorise('joomla_module.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('joomla_modules.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('joomla_modules.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
// set help url for this view if found

View File

@ -133,22 +133,22 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy
if ($this->user->authorise('joomla_plugin.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('joomla_plugins.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('joomla_plugins.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->user->authorise('joomla_plugin.get_boilerplate', 'com_componentbuilder'))
{
// add Get Boilerplate button.
JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false);
JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla custom-button-getboilerplate', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false);
}
if ($this->user->authorise('joomla_plugin.methods', 'com_componentbuilder'))
{
// add Methods button.
JToolBarHelper::custom('joomla_plugins.openClassMethods', 'joomla', '', 'COM_COMPONENTBUILDER_METHODS', false);
JToolBarHelper::custom('joomla_plugins.openClassMethods', 'joomla custom-button-openclassmethods', '', 'COM_COMPONENTBUILDER_METHODS', false);
}
if ($this->user->authorise('joomla_plugin.properties', 'com_componentbuilder'))
{
// add Properties button.
JToolBarHelper::custom('joomla_plugins.openClassProperties', 'joomla', '', 'COM_COMPONENTBUILDER_PROPERTIES', false);
JToolBarHelper::custom('joomla_plugins.openClassProperties', 'joomla custom-button-openclassproperties', '', 'COM_COMPONENTBUILDER_PROPERTIES', false);
}
// set help url for this view if found

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy
if ($this->user->authorise('language.build', 'com_componentbuilder'))
{
// add Build button.
JToolBarHelper::custom('languages.buildLanguages', 'joomla', '', 'COM_COMPONENTBUILDER_BUILD', false);
JToolBarHelper::custom('languages.buildLanguages', 'joomla custom-button-buildlanguages', '', 'COM_COMPONENTBUILDER_BUILD', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('language.import'))

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy
if ($this->user->authorise('layout.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('layouts.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
JToolBarHelper::custom('layouts.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('layout.import'))

View File

@ -133,7 +133,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy
if ($this->user->authorise('library.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('libraries.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
JToolBarHelper::custom('libraries.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
// set help url for this view if found

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy
if ($this->user->authorise('site_view.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('site_views.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
JToolBarHelper::custom('site_views.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('site_view.import'))

View File

@ -123,7 +123,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy
if ($this->user->authorise('snippet.share_snippets', 'com_componentbuilder'))
{
// add Share Snippets button.
JToolBarHelper::custom('snippets.shareSnippets', 'share', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', 'true');
JToolBarHelper::custom('snippets.shareSnippets', 'share custom-button-sharesnippets', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', 'true');
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
@ -143,7 +143,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy
if ($this->user->authorise('snippet.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('snippets.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
JToolBarHelper::custom('snippets.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('snippet.import'))

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy
if ($this->user->authorise('template.get_snippets', 'com_componentbuilder'))
{
// add Get Snippets button.
JToolBarHelper::custom('templates.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
JToolBarHelper::custom('templates.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('template.import'))

View File

@ -138,7 +138,7 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy
if ($this->user->authorise('validation_rule.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('validation_rules.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
JToolBarHelper::custom('validation_rules.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('validation_rule.import'))

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>16th July, 2020</creationDate>
<creationDate>24th July, 2020</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>