Compare commits

...

50 Commits

Author SHA1 Message Date
d66fd2a83b Stable Release 2.11.7 2020-10-29 15:49:04 +02:00
54e4f96edf Added the needed changes to the core compiler to manage dynamic headers per/controller via pro-member-plugin. gh-548 2020-10-26 22:30:51 +02:00
2ea64446af Added the needed changes to the core compiler to manage dynamic headers per/model via pro-member-plugin. gh-548 2020-10-21 05:10:19 +02:00
3d5ff09969 Added more placeholder options for the pagination area in site views. gh-578 2020-10-11 05:26:51 +02:00
8190e72902 Resolved gh-600 so that the SQL set in the Admin view will exported with the JCB package. 2020-10-11 04:02:00 +02:00
8a87d8977a Resolved gh-603 to make sure the code has HTML placholder style, in round trip development. 2020-10-07 00:54:33 +02:00
ac86c8c56b Update the user updater helper method to all password change, since Joomla changed the user save method in the user class. 2020-09-18 07:18:04 +02:00
2fa1d15939 Resolved gh-596 so that the language strings needed for publishing failure is also added. 2020-09-15 19:15:36 +02:00
dd3aaddf62 added the database update scripts for the new changes. 2020-09-15 19:02:49 +02:00
68769604dd Resolved gh-598 to allow empty prefix as default. 2020-09-15 18:59:20 +02:00
d062e03a04 Added the overide option to the linked admin views. Added the option to remove line breaks in all langguage strings. Increased the field size to MEDIUMTEXT for the default input in joomla_module custom_admin_view and site_view. 2020-08-19 02:54:09 +02:00
c32baff933 Update e_Interpretation.php 2020-08-13 09:02:14 -05:00
3c5928caa9 Update e_Interpretation.php
When field default is DATETIME or CURRENT_TIMESTAMP, the SQL is constructed out of order.  The default gets inserted before the NULL/NOT NULL string.  One line fix - YAY!
2020-08-13 08:53:57 -05:00
861347318d Fixed the Categories link on the dashboard to follow the new single list view naming convention. 2020-08-13 03:03:56 +02:00
3ca4c3c3d6 Fixed gh-583 spelling mistake in JError::raiseWaring(..) 2020-08-08 17:06:42 +02:00
3fa87a2ccc Added the SAFEHTML filter to the copyright textarea of the Joomla components. 2020-08-08 15:29:51 +02:00
98f1821914 Added the option to exclude language strings from JCB package exports. 2020-07-28 06:14:49 +02:00
53f0abc0e2 Added the security policy. 2020-07-26 18:35:19 +02:00
05da68f1ae Resolved gh-576 to allow empty filter options. 2020-07-26 18:21:08 +02:00
6bb23fc6ee 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. 2020-07-24 06:11:38 +02:00
27de9a83a5 Removed the fallback for empty description on title field.Improved the createUser method to allow custom methodd registerUser to create a user. Fixed the empty not_required field issue. 2020-07-18 21:36:05 +02:00
3a5681ce43 Added option to dynamicly set the sub-form layout from global options. Fixed bug in compiler that caused index warning. 2020-07-13 04:52:06 +02:00
25afc31e7f fixed greateUser logic to use the admin and site creation modes in correct way. Fixed language import issue that cause header mismatching. Added the option to add header values to the custom-custom fields. 2020-07-11 03:35:13 +02:00
a394638aff Fixed gh-570 to add the correct custom field placeholder type, which is PHP and not HTML. 2020-07-07 21:42:43 +02:00
354565d96a Major improment to user helper methods. Fixed custom field building options to allow options to be set. Fixed gh-569 to use correct paths in module custom fields and rules. Imporved the fancy date helper methods. Added the new Text::_() languange string search for language strings. Add the option to add header custom code to custom fields. 2020-07-07 17:13:04 +02:00
e86ab88f5c Fixed gh-571 compiler path errors. 2020-06-25 21:22:30 +02:00
90f48bd5fa Updated paypal donation link in readme note. 2020-06-02 00:49:30 +02:00
70635ff6f0 Added notice to the compiler where it detects mismatching category view target names. Added the update script for categories in JCB. Made adjustments all across JCB to act according to gh-561 implementation. 2020-05-30 20:49:13 +02:00
f2b2228dd7 Fixed gh-565 by removing the old PHPExcel_IOFactory and adding the new. Updated the subform layout for verious subforms in JCB for beter display. Change the helper category naming conventions for better integration with Joomla fields. gh-561 2020-05-29 03:01:07 +02:00
691aa81981 Quick fix update. 2020-05-25 20:55:53 +02:00
bb73fe044e Fixed missing ArrayHelper class on export. Updated the table class to also use StringHelper instead of JString. 2020-05-25 18:17:00 +02:00
5f1d17bfb3 Fixed GUID duplication issue. 2020-05-25 02:38:16 +02:00
eda4d594d6 Impoved the update server naming ability. 2020-05-24 23:59:55 +02:00
3a2b8497e3 Changed main views in JCB to sort id descending. 2020-05-22 02:32:58 +02:00
2564b75e5d Changed JArrayHelper to use ArrayHelper and added the use namespace to the files needed. Changed JString to use StringHelper and added the use namespace to the files needed. Fixed the spelling mistake of uniqe. Made changes to compiler to accomidate the new pro member feature that added viewsDefaultOrdering options. Fixed the moving of custom fields found in subforms of a plugin or module. Improved the sorting options to correctly map for custom fields and the category field. 2020-05-22 01:38:20 +02:00
f314464575 Small fixes concerning the sorting list and the column headers/arrows. Now both are synchronized. 2020-05-19 12:09:56 +02:00
477609886a Fixed gh-541 that the target client value for admin area is correctly set as administrator. 2020-04-23 23:19:14 +02:00
e83319635a Fixed gh-529 so that the custom admin view does not hidemainmenu when it is selected as the default view (dashboard) 2020-04-23 23:15:07 +02:00
b078d7f01f Fixed gh-540 to allow for html in the translation field. 2020-04-22 00:42:51 +02:00
f309e2e727 Resolved gh-518 to allow DECIMAL values as the Other Data Length value. 2020-04-19 02:56:30 +02:00
ddd940e968 Resolved gh-444 by adding the new phpspreadsheet library, and removing the old PHPExcel library. 2020-04-19 02:48:23 +02:00
c006572674 fixed the downloading url for the update server. 2020-04-05 02:16:50 +02:00
ad8717a47d Added events to the new module and plugin translation areas. Updated the fieldtypes to have more info on the showon property. 2020-04-03 20:45:48 +02:00
230834057a Formatted compiler classes with the Joomla standards in PHPstorm. Added translation for plugin and module areas. Resolve gh-503 gh-493 2020-03-28 15:34:14 +02:00
e051134a79 Fixed gh-534 so that the correct comment is made in the module area with the GUI placeholders. First steps towards adding multi languages for both modules and plugins gh-503 gh-493 in JCB. Other small improvments to the date helper methods. Add the otpion to target the admin area with modules. 2020-03-24 03:11:43 +02:00
86f671c87c Added module area target client switch. Added the custom code placeholder search to modules. Improved the JCB backup feature to only move the zip package to the backup location. 2020-03-13 04:45:08 +02:00
aae9ffb6e0 Added the option to use advance field modeling to store data in other tables in combination with the field being set to not be stored in the view/table in the admin view. Fixed gh-487 yet once again to allow the datalength to be stored everytime, and not get dropped. Imporved the JCB way of conditions field behavior. 2020-02-27 23:05:28 +02:00
a2db06fb43 Fixed gh-514 that table ordering in the admin list views will work again. 2020-02-22 11:56:01 +02:00
b8c9f964e2 Fixed gh-522 so that file in assets/js/ containing the added code. 2020-02-21 03:20:50 +02:00
290fe5dfd6 added git ignore 2020-02-21 03:16:22 +02:00
1539 changed files with 147689 additions and 235290 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.11) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.7) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ 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*: 17th February, 2020
+ *Version*: 2.10.11
+ *Last Build*: 29th October, 2020
+ *Version*: 2.11.7
+ *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*: **278479**
+ *Field count*: **1505**
+ *File count*: **1756**
+ *Folder count*: **278**
+ *Line count*: **283847**
+ *Field count*: **1536**
+ *File count*: **1799**
+ *Folder count*: **304**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

7
SECURITY.md Normal file
View File

@ -0,0 +1,7 @@
# Security Policy
## Reporting a Vulnerability
Report all security issues on the JCB website, and not on GitHub.
### [joomlacomponentbuilder.com/report-security-issues](http://joomlacomponentbuilder.com/report-security-issues)

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.11) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.7) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ 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*: 17th February, 2020
+ *Version*: 2.10.11
+ *Last Build*: 29th October, 2020
+ *Version*: 2.11.7
+ *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*: **278479**
+ *Field count*: **1505**
+ *File count*: **1756**
+ *Folder count*: **278**
+ *Line count*: **283847**
+ *Field count*: **1536**
+ *File count*: **1799**
+ *Folder count*: **304**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -13,6 +13,7 @@
pointer-events: none;
}
.fieldMedium { width: 120px; }
.fieldLarge { width: 320px; }
.fieldMid { width: 80px; }
.fieldFull { width: 100%; }
.fieldSmall { width: 60px; }

View File

@ -51,8 +51,8 @@ class ###Component###Model###Component### extends JModelList
$viewName = $name;
$alt = $name;
$url = $url;
$image = $name.'.'.$type;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U');
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U');
}
}
// internal views
@ -74,17 +74,27 @@ class ###Component###Model###Component### extends JModelList
switch($action)
{
case 'add':
$url = 'index.php?option=com_###component###&view='.$name.'&layout=edit';
$image = $name.'_'.$action.'.'.$type;
$alt = $name.' '.$action;
$url = 'index.php?option=com_###component###&view=' . $name . '&layout=edit';
$image = $name . '_' . $action. '.' . $type;
$alt = $name . ' ' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_ADD';
$add = true;
break;
default:
$url = 'index.php?option=com_categories&view=categories&extension=com_###component###.'.$name;
$image = $name.'_'.$action.'.'.$type;
$alt = $name.' '.$action;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U').'_'.###Component###Helper::safeString($action,'U');
// check for new convention (more stable)
if (strpos($action, '_qpo0O0oqp_') !== false)
{
list($action, $extension) = (array) explode('_qpo0O0oqp_', $action);
$extension = str_replace('_po0O0oq_', '.', $extension);
}
else
{
$extension = 'com_###component###.' . $name;
}
$url = 'index.php?option=com_categories&view=categories&extension=' . $extension;
$image = $name . '_' . $action . '.' . $type;
$alt = $viewName . ' ' . $action;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U') . '_' . ###Component###Helper::safeString($action,'U');
break;
}
}
@ -92,9 +102,9 @@ class ###Component###Model###Component### extends JModelList
{
$viewName = $name;
$alt = $name;
$url = 'index.php?option=com_###component###&view='.$name;
$image = $name.'.'.$type;
$name = 'COM_###COMPONENT###_DASHBOARD_'.###Component###Helper::safeString($name,'U');
$url = 'index.php?option=com_###component###&view=' . $name;
$image = $name . '.' . $type;
$name = 'COM_###COMPONENT###_DASHBOARD_' . ###Component###Helper::safeString($name,'U');
$hover = false;
}
}
@ -102,8 +112,8 @@ class ###Component###Model###Component### extends JModelList
{
$viewName = $view;
$alt = $view;
$url = 'index.php?option=com_###component###&view='.$view;
$image = $view.'.png';
$url = 'index.php?option=com_###component###&view=' . $view;
$image = $view . '.png';
$name = ucwords($view).'<br /><br />';
$hover = false;
}
@ -115,7 +125,7 @@ class ###Component###Model###Component### extends JModelList
$dashboard_list = false;
$accessTo = '';
$accessAdd = '';
// acces checking start
// access checking start
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.create']):false;
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? ###Component###Helper::checkString($viewAccess[$viewName.'.access']):false;
// set main controllers
@ -130,7 +140,7 @@ class ###Component###Model###Component### extends JModelList
{
$accessAdd = 'core.create';
}
// check if acces to view is set
// check if access to view is set
if ($accessAccess)
{
$accessTo = $viewAccess[$viewName.'.access'];

View File

@ -18,14 +18,22 @@ defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\Utilities\ArrayHelper;###ADMIN_HELPER_CLASS_HEADER###
/**
* ###Component### component helper.
*/
abstract class ###Component###Helper
{
/**
* Composer Switch
*
* @var array
*/
protected static $composer = array();
/**
* The Main Active Language
*
@ -34,8 +42,28 @@ abstract class ###Component###Helper
public static $langTag;###ADMIN_GLOBAL_EVENT_HELPER######CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT###
/**
* Load the Component xml manifest.
**/
* Load the Composer Vendors
*/
public static function composerAutoload($target)
{
// insure we load the composer vendor only once
if (!isset(self::$composer[$target]))
{
// get the function name
$functionName = self::safeString('compose' . $target);
// check if method exist
if (method_exists(__CLASS__, $functionName))
{
return self::{$functionName}();
}
return false;
}
return self::$composer[$target];
}
/**
* Load the Component xml manifest.
*/
public static function manifest()
{
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
@ -43,13 +71,13 @@ abstract class ###Component###Helper
}
/**
* Joomla version object
**/
* Joomla version object
*/
protected static $JVersion;
/**
* set/get Joomla version
**/
* set/get Joomla version
*/
public static function jVersion()
{
// check if set
@ -61,8 +89,8 @@ abstract class ###Component###Helper
}
/**
* Load the Contributors details.
**/
* Load the Contributors details.
*/
public static function getContributors()
{
// get params
@ -99,8 +127,8 @@ abstract class ###Component###Helper
}###HELP###
/**
* Configure the Linkbar.
**/
* Configure the Linkbar.
*/
public static function addSubmenu($submenu)
{
// load user for access menus
@ -320,18 +348,18 @@ abstract class ###Component###Helper
}
/**
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
* @param object $user The user whose permissions we are loading
*
* @return object The JObject of permission/authorised actions
*
**/
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
* @param object $user The user whose permissions we are loading
*
* @return object The JObject of permission/authorised actions
*
*/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
{
// load the user if not given
@ -495,14 +523,14 @@ abstract class ###Component###Helper
}
/**
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
**/
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
*/
protected static function filterActions(&$view, &$action, &$targets)
{
foreach ($targets as $target)
@ -518,8 +546,8 @@ abstract class ###Component###Helper
}
/**
* Get any component's model
**/
* Get any component's model
*/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = '###Component###', $config = array())
{
// fix the name
@ -566,8 +594,8 @@ abstract class ###Component###Helper
}
/**
* Add to asset Table
*/
* Add to asset Table
*/
public static function setAsset($id, $table, $inherit = true)
{
$parent = JTable::getInstance('Asset');
@ -874,12 +902,12 @@ abstract class ###Component###Helper
}
/**
* Check if have an json string
*
* @input string The json string to check
*
* @returns bool true on success
**/
* Check if have an json string
*
* @input string The json string to check
*
* @returns bool true on success
*/
public static function checkJson($string)
{
if (self::checkString($string))
@ -891,12 +919,12 @@ abstract class ###Component###Helper
}
/**
* Check if have an object with a length
*
* @input object The object to check
*
* @returns bool true on success
**/
* Check if have an object with a length
*
* @input object The object to check
*
* @returns bool true on success
*/
public static function checkObject($object)
{
if (isset($object) && is_object($object))
@ -907,12 +935,12 @@ abstract class ###Component###Helper
}
/**
* Check if have an array with a length
*
* @input array The array to check
*
* @returns bool/int number of items in array on success
**/
* Check if have an array with a length
*
* @input array The array to check
*
* @returns bool/int number of items in array on success
*/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
@ -935,12 +963,12 @@ abstract class ###Component###Helper
}
/**
* Check if have a string with a length
*
* @input string The string to check
*
* @returns bool true on success
**/
* Check if have a string with a length
*
* @input string The string to check
*
* @returns bool true on success
*/
public static function checkString($string)
{
if (isset($string) && is_string($string) && strlen($string) > 0)
@ -951,11 +979,11 @@ abstract class ###Component###Helper
}
/**
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
*
* @returns bool true on success
**/
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
*
* @returns bool true on success
*/
public static function isConnected()
{
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
@ -976,12 +1004,12 @@ abstract class ###Component###Helper
}
/**
* Merge an array of array's
*
* @input array The arrays you would like to merge
*
* @returns array on success
**/
* Merge an array of array's
*
* @input array The arrays you would like to merge
*
* @returns array on success
*/
public static function mergeArrays($arrays)
{
if(self::checkArray($arrays))
@ -1006,12 +1034,12 @@ abstract class ###Component###Helper
}
/**
* Shorten a string
*
* @input string The you would like to shorten
*
* @returns string on success
**/
* Shorten a string
*
* @input string The you would like to shorten
*
* @returns string on success
*/
public static function shorten($string, $length = 40, $addTip = true)
{
if (self::checkString($string))
@ -1047,12 +1075,12 @@ abstract class ###Component###Helper
}
/**
* Making strings safe (various ways)
*
* @input string The you would like to make safe
*
* @returns string on success
**/
* Making strings safe (various ways)
*
* @input string The you would like to make safe
*
* @returns string on success
*/
public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true, $keepOnlyCharacters = true)
{
if ($replaceNumbers === true)
@ -1206,12 +1234,12 @@ abstract class ###Component###Helper
}
/**
* Convert an integer into an English word string
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
*
* @input an int
* @returns a string
**/
* Convert an integer into an English word string
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
*
* @input an int
* @returns a string
*/
public static function numberToString($x)
{
$nwords = array( "zero", "one", "two", "three", "four", "five", "six", "seven",
@ -1297,10 +1325,10 @@ abstract class ###Component###Helper
}
/**
* Random Key
*
* @returns a string
**/
* Random Key
*
* @returns a string
*/
public static function randomkey($size)
{
$bag = "abcefghijknopqrstuwxyzABCDDEFGHIJKLLMMNOPQRSTUVVWXYZabcddefghijkllmmnopqrstuvvwxyzABCEFGHIJKNOPQRSTUWXYZ";

View File

@ -20,7 +20,7 @@ defined('_JEXEC') or die('Restricted access');
/**
* ###Component### ###View### Component Category Tree
*/
class ###Component######Views###Categories extends JCategories
class ###Component######View###Categories extends JCategories
{
/**
* Class constructor
@ -31,7 +31,7 @@ class ###Component######Views###Categories extends JCategories
public function __construct($options = array())
{
$options['table'] = '#__###component###_###view###';
$options['extension'] = 'com_###component###.###views###';
$options['extension'] = 'com_###component###.###view###';
parent::__construct($options);
}

View File

@ -18,14 +18,22 @@ defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\Utilities\ArrayHelper;###SITE_HELPER_CLASS_HEADER###
/**
* ###Component### component helper
*/
abstract class ###Component###Helper
{
/**
* Composer Switch
*
* @var array
*/
protected static $composer = array();
/**
* The Main Active Language
*
@ -33,6 +41,29 @@ abstract class ###Component###Helper
*/
public static $langTag;###SITE_GLOBAL_EVENT_HELPER######SITE_CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT###
/**
* Load the Composer Vendors
*/
public static function composerAutoload($target)
{
// insure we load the composer vendor only once
if (!isset(self::$composer[$target]))
{
// get the function name
$functionName = self::safeString('compose' . $target);
// check if method exist
if (method_exists(__CLASS__, $functionName))
{
return self::{$functionName}();
}
return false;
}
return self::$composer[$target];
}
/**
* Convert it into a string
*/
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work
@ -82,8 +113,8 @@ abstract class ###Component###Helper
}
/**
* Load the Component xml manifest.
**/
* Load the Component xml manifest.
*/
public static function manifest()
{
$manifestUrl = JPATH_ADMINISTRATOR."/components/com_###component###/###component###.xml";
@ -91,13 +122,13 @@ abstract class ###Component###Helper
}
/**
* Joomla version object
**/
* Joomla version object
*/
protected static $JVersion;
/**
* set/get Joomla version
**/
* set/get Joomla version
*/
public static function jVersion()
{
// check if set
@ -109,8 +140,8 @@ abstract class ###Component###Helper
}
/**
* Load the Contributors details.
**/
* Load the Contributors details.
*/
public static function getContributors()
{
// get params
@ -147,8 +178,8 @@ abstract class ###Component###Helper
}###HELP_SITE###
/**
* Get any component's model
**/
* Get any component's model
*/
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = '###Component###', $config = array())
{
// fix the name
@ -195,8 +226,8 @@ abstract class ###Component###Helper
}
/**
* Add to asset Table
*/
* Add to asset Table
*/
public static function setAsset($id, $table, $inherit = true)
{
$parent = JTable::getInstance('Asset');
@ -665,18 +696,18 @@ abstract class ###Component###Helper
}
/**
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
* @param object $user The user whose permissions we are loading
*
* @return object The JObject of permission/authorised actions
*
**/
* Get the action permissions
*
* @param string $view The related view name
* @param int $record The item to act upon
* @param string $views The related list view name
* @param mixed $target Only get this permission (like edit, create, delete)
* @param string $component The target component
* @param object $user The user whose permissions we are loading
*
* @return object The JObject of permission/authorised actions
*
*/
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
{
// load the user if not given
@ -840,14 +871,14 @@ abstract class ###Component###Helper
}
/**
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
**/
* Filter the action permissions
*
* @param string $action The action to check
* @param array $targets The array of target actions
*
* @return boolean true if action should be filtered out
*
*/
protected static function filterActions(&$view, &$action, &$targets)
{
foreach ($targets as $target)
@ -863,12 +894,12 @@ abstract class ###Component###Helper
}
/**
* Check if have an json string
*
* @input string The json string to check
*
* @returns bool true on success
**/
* Check if have an json string
*
* @input string The json string to check
*
* @returns bool true on success
*/
public static function checkJson($string)
{
if (self::checkString($string))
@ -880,12 +911,12 @@ abstract class ###Component###Helper
}
/**
* Check if have an object with a length
*
* @input object The object to check
*
* @returns bool true on success
**/
* Check if have an object with a length
*
* @input object The object to check
*
* @returns bool true on success
*/
public static function checkObject($object)
{
if (isset($object) && is_object($object))
@ -896,12 +927,12 @@ abstract class ###Component###Helper
}
/**
* Check if have an array with a length
*
* @input array The array to check
*
* @returns bool/int number of items in array on success
**/
* Check if have an array with a length
*
* @input array The array to check
*
* @returns bool/int number of items in array on success
*/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
@ -924,12 +955,12 @@ abstract class ###Component###Helper
}
/**
* Check if have a string with a length
*
* @input string The string to check
*
* @returns bool true on success
**/
* Check if have a string with a length
*
* @input string The string to check
*
* @returns bool true on success
*/
public static function checkString($string)
{
if (isset($string) && is_string($string) && strlen($string) > 0)
@ -940,11 +971,11 @@ abstract class ###Component###Helper
}
/**
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
*
* @returns bool true on success
**/
* Check if we are connected
* Thanks https://stackoverflow.com/a/4860432/1429677
*
* @returns bool true on success
*/
public static function isConnected()
{
// If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right?
@ -965,12 +996,12 @@ abstract class ###Component###Helper
}
/**
* Merge an array of array's
*
* @input array The arrays you would like to merge
*
* @returns array on success
**/
* Merge an array of array's
*
* @input array The arrays you would like to merge
*
* @returns array on success
*/
public static function mergeArrays($arrays)
{
if(self::checkArray($arrays))
@ -995,12 +1026,12 @@ abstract class ###Component###Helper
}
/**
* Shorten a string
*
* @input string The you would like to shorten
*
* @returns string on success
**/
* Shorten a string
*
* @input string The you would like to shorten
*
* @returns string on success
*/
public static function shorten($string, $length = 40, $addTip = true)
{
if (self::checkString($string))
@ -1036,12 +1067,12 @@ abstract class ###Component###Helper
}
/**
* Making strings safe (various ways)
*
* @input string The you would like to make safe
*
* @returns string on success
**/
* Making strings safe (various ways)
*
* @input string The you would like to make safe
*
* @returns string on success
*/
public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true, $keepOnlyCharacters = true)
{
if ($replaceNumbers === true)
@ -1195,12 +1226,12 @@ abstract class ###Component###Helper
}
/**
* Convert an integer into an English word string
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
*
* @input an int
* @returns a string
**/
* Convert an integer into an English word string
* Thanks to Tom Nicholson <http://php.net/manual/en/function.strval.php#41988>
*
* @input an int
* @returns a string
*/
public static function numberToString($x)
{
$nwords = array( "zero", "one", "two", "three", "four", "five", "six", "seven",
@ -1286,10 +1317,10 @@ abstract class ###Component###Helper
}
/**
* Random Key
*
* @returns a string
**/
* Random Key
*
* @returns a string
*/
public static function randomkey($size)
{
$bag = "abcefghijknopqrstuwxyzABCDDEFGHIJKLLMMNOPQRSTUVVWXYZabcddefghijkllmmnopqrstuvvwxyzABCEFGHIJKNOPQRSTUWXYZ";

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###ADMIN_VIEWS_CONTROLLER_HEADER###
/**
* ###Views### Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER###
/**
* ###SViews### Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###ADMIN_VIEW_CONTROLLER_HEADER###
/**
* ###View### Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###SITE_VIEW_CONTROLLER_HEADER###
/**
* ###Component### ###SView### Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###SITE_ADMIN_VIEW_CONTROLLER_HEADER###
/**
* ###View### Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* General Controller of ###Component### component
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Ajax Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Ajax Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Help Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Help Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Component Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER###
/**
* ###Component### ###SView### Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Import Controller
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### ###View### Controller
*/

View File

@ -17,9 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import the ###JFORM_extends### field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('###JFORM_extends###');
###JFORM_TYPE_HEADER###
/**
* ###Type### Form Field class for the ###Component### component

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
###ADMIN_VIEW_MODEL_HEADER###
/**
* ###Component### ###View### Model
@ -303,7 +303,7 @@ class ###Component###Model###View### extends JModelAdmin
{
// Sanitize ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
@ -344,7 +344,7 @@ class ###Component###Model###View### extends JModelAdmin
if (!empty($commands['move_copy']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
$cmd = ArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
@ -424,7 +424,7 @@ class ###Component###Model###View### extends JModelAdmin
}
/**
* Method to generate a uniqe value.
* Method to generate a unique value.
*
* @param string $field name.
* @param string $value data.
@ -433,15 +433,15 @@ class ###Component###Model###View### extends JModelAdmin
*
* @since 3.0
*/
protected function generateUniqe($field,$value)
protected function generateUnique($field,$value)
{
// set field value uniqe
// set field value unique
$table = $this->getTable();
while ($table->load(array($field => $value)))
{
$value = JString::increment($value);
$value = StringHelper::increment($value);
}
return $value;

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
###SITE_ADMIN_VIEW_MODEL_HEADER###
/**
* ###Component### ###View### Model
@ -303,7 +303,7 @@ class ###Component###Model###View### extends JModelAdmin
{
// Sanitize ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
@ -344,7 +344,7 @@ class ###Component###Model###View### extends JModelAdmin
if (!empty($commands['move_copy']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
$cmd = ArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
@ -424,7 +424,7 @@ class ###Component###Model###View### extends JModelAdmin
}
/**
* Method to generate a uniqe value.
* Method to generate a unique value.
*
* @param string $field name.
* @param string $value data.
@ -433,15 +433,15 @@ class ###Component###Model###View### extends JModelAdmin
*
* @since 3.0
*/
protected function generateUniqe($field,$value)
protected function generateUnique($field,$value)
{
// set field value uniqe
// set field value unique
$table = $this->getTable();
while ($table->load(array($field => $value)))
{
$value = JString::increment($value);
$value = StringHelper::increment($value);
}
return $value;

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###CUSTOM_ADMIN_VIEW_MODEL_HEADER###
/**
* ###Component### ###SView### Model
*/
@ -106,13 +108,13 @@ class ###Component###Model###SView### extends JModelItem
{
try
{###CUSTOM_ADMIN_GET_ITEM###
}
}
catch (Exception $e)
{
if ($e->getCode() == 404)
{
// Need to go thru the error handler to allow Redirect to work.
JError::raiseWaring(404, $e->getMessage());
JError::raiseWarning(404, $e->getMessage());
}
else
{

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###SITE_VIEW_MODEL_HEADER###
/**
* ###Component### ###SView### Model
*/
@ -105,7 +107,7 @@ class ###Component###Model###SView### extends JModelItem
if ($e->getCode() == 404)
{
// Need to go thru the error handler to allow Redirect to work.
JError::raiseWaring(404, $e->getMessage());
JError::raiseWarning(404, $e->getMessage());
}
else
{

View File

@ -17,6 +17,9 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
/**
* ###Component### Import Model
*/
@ -360,30 +363,8 @@ class ###Component###ModelImport extends JModelLegacy
$check['type'] = $this->getType;
return $check;
}
/**
* Check the extension
*
* @param string $file Name of the uploaded file
*
* @return boolean True on success
*
*/
protected function checkExtension($file)
{
// check the extention
switch(strtolower(pathinfo($file, PATHINFO_EXTENSION)))
{
case 'xls':
case 'ods':
case 'csv':
return true;
break;
}
return false;
}
}###IMPORT_EXT_METHOD###
/**
* Clean up temporary uploaded spreadsheet
*
@ -409,263 +390,8 @@ class ###Component###ModelImport extends JModelLegacy
// It might also be just a base filename
JFile::delete(JPath::clean($package));
}
}
/**
* Set the data from the spreadsheet to the database
*
* @param string $package Paths to the uploaded package file
*
* @return boolean false on failure
*
**/
protected function setData($package,$table,$target_headers)
{
if (###Component###Helper::checkArray($target_headers))
{
// make sure the file is loaded
JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
$jinput = JFactory::getApplication()->input;
foreach($target_headers as $header)
{
$data['target_headers'][$header] = $jinput->getString($header, null);
}
// set the data
if(isset($package['dir']))
{
$inputFileType = PHPExcel_IOFactory::identify($package['dir']);
$excelReader = PHPExcel_IOFactory::createReader($inputFileType);
$excelReader->setReadDataOnly(true);
$excelObj = $excelReader->load($package['dir']);
$data['array'] = $excelObj->getActiveSheet()->toArray(null, true,true,true);
$excelObj->disconnectWorksheets();
unset($excelObj);
return $this->save($data,$table);
}
}
return false;
}
/**
* Save the data from the file to the database
*
* @param string $package Paths to the uploaded package file
*
* @return boolean false on failure
*
**/
protected function save($data,$table)
{
// import the data if there is any
if(###Component###Helper::checkArray($data['array']))
{
// get user object
$user = JFactory::getUser();
// remove header if it has headers
$id_key = $data['target_headers']['id'];
$published_key = $data['target_headers']['published'];
$ordering_key = $data['target_headers']['ordering'];
// get the first array set
$firstSet = reset($data['array']);
// check if first array is a header array and remove if true
if($firstSet[$id_key] == 'id' || $firstSet[$published_key] == 'published' || $firstSet[$ordering_key] == 'ordering')
{
array_shift($data['array']);
}
// make sure there is still values in array and that it was not only headers
if(###Component###Helper::checkArray($data['array']) && $user->authorise($table.'.import', 'com_###component###') && $user->authorise('core.import', 'com_###component###'))
{
// set target.
$target = array_flip($data['target_headers']);
// Get a db connection.
$db = JFactory::getDbo();
// set some defaults
$todayDate = JFactory::getDate()->toSql();
// get global action permissions
$canDo = ###Component###Helper::getActions($table);
$canEdit = $canDo->get('core.edit');
$canState = $canDo->get('core.edit.state');
$canCreate = $canDo->get('core.create');
$hasAlias = $this->getAliasesUsed($table);
// prosses the data
foreach($data['array'] as $row)
{
$found = false;
if (isset($row[$id_key]) && is_numeric($row[$id_key]) && $row[$id_key] > 0)
{
// raw items import & update!
$query = $db->getQuery(true);
$query
->select('version')
->from($db->quoteName('#__###component###_'.$table))
->where($db->quoteName('id') . ' = '. $db->quote($row[$id_key]));
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
$found = $db->getNumRows();
}
if($found && $canEdit)
{
// update item
$id = $row[$id_key];
$version = $db->loadResult();
// reset all buckets
$query = $db->getQuery(true);
$fields = array();
// Fields to update.
foreach($row as $key => $cell)
{
// ignore column
if ('IGNORE' == $target[$key])
{
continue;
}
// update modified
if ('modified_by' == $target[$key])
{
continue;
}
// update modified
if ('modified' == $target[$key])
{
continue;
}
// update version
if ('version' == $target[$key])
{
$cell = (int) $version + 1;
}
// verify publish authority
if ('published' == $target[$key] && !$canState)
{
continue;
}
// set to update array
if(in_array($key, $data['target_headers']) && is_numeric($cell))
{
$fields[] = $db->quoteName($target[$key]) . ' = ' . $cell;
}
elseif(in_array($key, $data['target_headers']) && is_string($cell))
{
$fields[] = $db->quoteName($target[$key]) . ' = ' . $db->quote($cell);
}
elseif(in_array($key, $data['target_headers']) && is_null($cell))
{
// if import data is null then set empty
$fields[] = $db->quoteName($target[$key]) . " = ''";
}
}
// load the defaults
$fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
$fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = ' . $id
);
$query->update($db->quoteName('#__###component###_'.$table))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
elseif ($canCreate)
{
// insert item
$query = $db->getQuery(true);
// reset all buckets
$columns = array();
$values = array();
$version = false;
// Insert columns. Insert values.
foreach($row as $key => $cell)
{
// ignore column
if ('IGNORE' == $target[$key])
{
continue;
}
// remove id
if ('id' == $target[$key])
{
continue;
}
// update created
if ('created_by' == $target[$key])
{
continue;
}
// update created
if ('created' == $target[$key])
{
continue;
}
// Make sure the alias is incremented
if ('alias' == $target[$key])
{
$cell = $this->getAlias($cell,$table);
}
// update version
if ('version' == $target[$key])
{
$cell = 1;
$version = true;
}
// set to insert array
if(in_array($key, $data['target_headers']) && is_numeric($cell))
{
$columns[] = $target[$key];
$values[] = $cell;
}
elseif(in_array($key, $data['target_headers']) && is_string($cell))
{
$columns[] = $target[$key];
$values[] = $db->quote($cell);
}
elseif(in_array($key, $data['target_headers']) && is_null($cell))
{
// if import data is null then set empty
$columns[] = $target[$key];
$values[] = "''";
}
}
// load the defaults
$columns[] = 'created_by';
$values[] = $db->quote($user->id);
$columns[] = 'created';
$values[] = $db->quote($todayDate);
if (!$version)
{
$columns[] = 'version';
$values[] = 1;
}
// Prepare the insert query.
$query
->insert($db->quoteName('#__###component###_'.$table))
->columns($db->quoteName($columns))
->values(implode(',', $values));
// Set the query using our newly populated query object and execute it.
$db->setQuery($query);
$done = $db->execute();
if ($done)
{
$aId = $db->insertid();
// make sure the access of asset is set
###Component###Helper::setAsset($aId,$table);
}
}
else
{
return false;
}
}
return true;
}
}
return false;
}
}###IMPORT_SETDATA_METHOD######IMPORT_SAVE_METHOD###
protected function getAlias($name,$type = false)
{
// sanitize the name to an alias

View File

@ -17,6 +17,9 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
/**
* ###Component### ###View### Model
*/
@ -251,8 +254,8 @@ class ###Component###Model###View### extends JModelLegacy
return $check;
}
###IMPORT_EXT_METHOD_CUSTOM###
###IMPORT_EXT_METHOD###
/**
* Clean up temporary uploaded spreadsheet
*
@ -279,9 +282,9 @@ class ###Component###Model###View### extends JModelLegacy
JFile::delete(JPath::clean($package));
}
}
###IMPORT_SETDATE_METHOD_CUSTOM###
###IMPORT_SAVE_METHOD_CUSTOM###
###IMPORT_SETDATA_METHOD###
###IMPORT_SAVE_METHOD###
protected function getAlias($name,$type = false)
{
// sanitize the name to an alias

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###ADMIN_VIEWS_MODEL_HEADER###
/**
* ###Views### Model
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Ajax Model
*/

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.helper');
use Joomla\Utilities\ArrayHelper;
/**
* ###Component### Ajax Model

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###CUSTOM_ADMIN_VIEWS_MODEL_HEADER###
/**
* ###Component### Model for ###SViews###
*/

View File

@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
###SITE_VIEWS_MODEL_HEADER###
/**
* ###Component### Model for ###SViews###
*/

View File

@ -18,6 +18,8 @@ defined('_JEXEC') or die('Restricted access');
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
/**
* ###Views### Table class
@ -142,7 +144,7 @@ class ###Component###Table###View### extends JTable
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->alias = JString::increment($this->alias, 'dash');
$this->alias = StringHelper::increment($this->alias, 'dash');
}
}
@ -157,7 +159,7 @@ class ###Component###Table###View### extends JTable
$bad_characters = array("\n", "\r", "\"", "<", ">");
// Remove bad characters.
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey);
$after_clean = StringHelper::str_ireplace($bad_characters, "", $this->metakey);
// Create array using commas as delimiter.
$keys = explode(',', $after_clean);
@ -181,7 +183,7 @@ class ###Component###Table###View### extends JTable
{
// Only process if not empty
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
$this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc);
}
// If we don't have any access rules set at this point just use an empty JAccessRules class
@ -220,7 +222,7 @@ class ###Component###Table###View### extends JTable
$db->execute();
if ($db->loadRowList())
{
// asset alread set so use saved rules
// asset already set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}

View File

@ -48,9 +48,7 @@ class ###Component###View###SView### extends JViewLegacy
* Setting the toolbar
*/
protected function addToolBar()
{
// hide the main menu
$this->app->input->set('hidemainmenu', true);
{###HIDEMAINMENU###
// set the title
if (isset($this->item->name) && $this->item->name)
{
@ -62,11 +60,7 @@ class ###Component###View###SView### extends JViewLegacy
$title = JText::_('COM_###COMPONENT###_###SVIEW###');
}
// add title to the page
JToolbarHelper::title($title,'###ICOMOON###');
// add the back button
// JToolBarHelper::custom('###sview###.back', 'undo-2', '', 'COM_###COMPONENT###_BACK', false);
// add cpanel button
JToolBarHelper::custom('###sview###.dashboard', 'grid-2', '', 'COM_###COMPONENT###_DASH', false);###CUSTOM_ADMIN_CUSTOM_BUTTONS###
JToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sviews###');

View File

@ -38,9 +38,7 @@ class ###Component###View###Views### extends JViewLegacy
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->user = JFactory::getUser();
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->user = JFactory::getUser();###ADMIN_DIPLAY_METHOD###
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));

View File

@ -48,15 +48,9 @@ class ###Component###View###SViews### extends JViewLegacy
* Setting the toolbar
*/
protected function addToolBar()
{
// hide the main menu
$this->app->input->set('hidemainmenu', true);
{###HIDEMAINMENU###
// add title to the page
JToolbarHelper::title(JText::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');
// add the back button
// JToolBarHelper::custom('###sviews###.back', 'undo-2', '', 'COM_###COMPONENT###_BACK', false);
// add cpanel button
JToolBarHelper::custom('###sviews###.dashboard', 'grid-2', '', 'COM_###COMPONENT###_DASH', false);###CUSTOM_ADMIN_CUSTOM_BUTTONS###
JToolbarHelper::title(JText::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sviews###');

View File

@ -80,8 +80,8 @@ if ($this->saveOrder)
$this->loadTemplate('batch_body')
); ?>
<?php endif; ?>
<input type="hidden" name="filter_order" value="" />
<input type="hidden" name="filter_order_Dir" value="" />
<input type="hidden" name="filter_order" value="<?php echo $this->listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->listDirn; ?>" />
<input type="hidden" name="boxchecked" value="0" />
</div>
<?php endif; ?>

View File

@ -24,9 +24,10 @@ JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate');
JHtml::_('behavior.calendar');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<div class="###component###-###view###">
<?php echo $this->toolbar->render(); ?>
<form action="<?php echo JRoute::_('index.php?option=com_###component###&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
###EDITBODY###
</form>###EDITBODYSCRIPT###
</form>
</div>###EDITBODYSCRIPT###

View File

@ -0,0 +1,20 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
###BOM###
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');###ADMIN_LAYOUT_CODE###
?>###ADMIN_LAYOUT_BODY###

View File

@ -96,6 +96,14 @@ class com_###component###InstallerScript
if ($type === 'install')
{###PREINSTALLSCRIPT###
}
// check if the PHPExcel stuff is still around
if (JFile::exists(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel.php'))
{
// We need to remove this old PHPExcel folder
$this->removeFolder(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel');
// We need to remove this old PHPExcel file
JFile::delete(JPATH_ADMINISTRATOR . '/components/com_###component###/helpers/PHPExcel.php');
}
return true;
}
@ -120,5 +128,106 @@ class com_###component###InstallerScript
{###POSTUPDATESCRIPT###
}
return true;
}
/**
* Remove folders with files
*
* @param string $dir The path to folder to remove
* @param boolean $ignore The folders and files to ignore and not remove
*
* @return boolean True in all is removed
*
*/
protected function removeFolder($dir, $ignore = false)
{
if (JFolder::exists($dir))
{
$it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
// remove ending /
$dir = rtrim($dir, '/');
// now loop the files & folders
foreach ($it as $file)
{
if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue;
// set file dir
$file_dir = $file->getPathname();
// check if this is a dir or a file
if ($file->isDir())
{
$keeper = false;
if ($this->checkArray($ignore))
{
foreach ($ignore as $keep)
{
if (strpos($file_dir, $dir.'/'.$keep) !== false)
{
$keeper = true;
}
}
}
if ($keeper)
{
continue;
}
JFolder::delete($file_dir);
}
else
{
$keeper = false;
if ($this->checkArray($ignore))
{
foreach ($ignore as $keep)
{
if (strpos($file_dir, $dir.'/'.$keep) !== false)
{
$keeper = true;
}
}
}
if ($keeper)
{
continue;
}
JFile::delete($file_dir);
}
}
// delete the root folder if not ignore found
if (!$this->checkArray($ignore))
{
return JFolder::delete($dir);
}
return true;
}
return false;
}
/**
* Check if have an array with a length
*
* @input array The array to check
*
* @returns bool/int number of items in array on success
*/
protected function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
{
foreach ($array as $key => $string)
{
if (empty($string))
{
unset($array[$key]);
}
}
return $this->checkArray($array, false);
}
return $nr;
}
return false;
}###MOVEFOLDERSMETHOD###
}

View File

@ -376,6 +376,11 @@
"rename": "JFormRule",
"type": "rule"
},
"layout_admin.php": {
"path": "c0mp0n3nt/admin/layouts",
"rename": "layout_admin",
"type": "layout"
},
"layoutitems.php": {
"path": "c0mp0n3nt/admin/layouts/VIEW",
"rename": "layoutitems",

View File

@ -47,6 +47,71 @@
/>
<field type="spacer" name="spacerHistory" hr="true" />
<!-- Subform_layouts Field. Type: Subform. (joomla) -->
<field
type="subform"
name="subform_layouts"
label="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION"
icon="list"
max="9"
min="1">
<form hidden="true" name="list_subform_layouts_modal" repeat="true">
<!-- View_field Field. Type: List. (joomla) -->
<field
type="list"
name="view_field"
label="COM_COMPONENTBUILDER_CONFIG_VIEW_FIELD_LABEL"
class="list_class"
multiple="false"
filter="CMD"
required="true"
default="default">
<!-- Option Set. -->
<option value="default">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="admin_custom_tabs.tabs">
COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS</option>
<option value="admin_fields.addfields">
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_ADDFIELDS</option>
<option value="admin_fields_conditions.addconditions">
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS</option>
<option value="admin_fields_relations.addrelations">
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_RELATIONS_ADDRELATIONS</option>
<option value="component_admin_views.addadmin_views">
COM_COMPONENTBUILDER_CONFIG_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS</option>
<option value="component_custom_admin_views.addcustom_admin_views">
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS</option>
<option value="component_site_views.addsite_views">
COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS</option>
<option value="dynamic_get.join_db_table">
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE</option>
<option value="dynamic_get.join_view_table">
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_VIEW_TABLE</option>
</field>
<!-- Layout Field. Type: List. (joomla) -->
<field
type="list"
name="layout"
label="COM_COMPONENTBUILDER_CONFIG_LAYOUT_LABEL"
class="list_class"
multiple="false"
filter="CMD"
required="true"
default="joomla.form.field.subform.repeatable-table">
<!-- Option Set. -->
<option value="joomla.form.field.subform.repeatable-table">
COM_COMPONENTBUILDER_CONFIG_REPEATABLETABLE_JOOMLA</option>
<option value="joomla.form.field.subform.repeatable">
COM_COMPONENTBUILDER_CONFIG_REPEATABLE_JOOMLA</option>
<option value="repeatablejcb">
COM_COMPONENTBUILDER_CONFIG_REPEATABLE_UIKIT</option>
</field>
</form>
</field>
<!-- Editor Field. Type: Plugins. (joomla) -->
<field
type="plugins"
@ -140,7 +205,7 @@
label="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL"
size="30"
maxlength="30"
default="&amp;#187;"
default=""
description="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION"
class="text_area"
filter="SAFEHTML"
@ -229,7 +294,7 @@
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
class="list_class"
multiple="false"
default="0"
default="en-GB"
required="true"
button="true"
/>
@ -246,6 +311,20 @@
max="100"
step="10"
/>
<!-- Export_language_strings Field. Type: Radio. (joomla) -->
<field
type="radio"
name="export_language_strings"
label="COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_YES</option>
<option value="0">
COM_COMPONENTBUILDER_CONFIG_NO</option>
</field>
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_six" hr="true" class="spacer_hr_six" />
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* General Controller of Componentbuilder component
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admin_custom_tabs Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admin_fields Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admin_fields_conditions Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admin_fields_relations Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admin_view Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admin_views Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Admin_views');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admins_custom_tabs Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admins_fields Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admins_fields_conditions Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Admins_fields_relations Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Componentbuilder Ajax Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Class_extendings Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Class_extends Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Class_method Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Class_methods Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerClass_methods extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Class_methods');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Class_properties Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerClass_properties extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Class_properties');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Class_property Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Compiler Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_admin_views Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_config Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_custom_admin_menus Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_custom_admin_views Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_dashboard Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_files_folders Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_modules Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_mysql_tweaks Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_placeholders Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_plugins Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_site_views Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Component_updates Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_admin_views Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_config Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_custom_admin_menus Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_custom_admin_views Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_dashboard Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_files_folders Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_modules Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_mysql_tweaks Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_placeholders Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_plugins Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_site_views Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Components_updates Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Custom_admin_view Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Custom_admin_views Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerCustom_admin_views extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Custom_admin_views');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Custom_code Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Custom_codes Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Custom_codes');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Dynamic_get Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Dynamic_gets Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Dynamic_gets');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Field Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Fields Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerFields extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Fields');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Fieldtype Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Fieldtypes Controller
*/
@ -53,7 +55,7 @@ class ComponentbuilderControllerFieldtypes extends JControllerAdmin
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Fieldtypes');
// get the data to export

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Get_snippets Controller
*/

View File

@ -12,6 +12,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Utilities\ArrayHelper;
/**
* Componentbuilder Help Controller
*/

Some files were not shown because too many files have changed in this diff Show More