Compare commits

...

39 Commits

Author SHA1 Message Date
3a27038164 Stable release v2.10.0 2019-08-14 13:45:49 +02:00
7fed9d7a1c Resolved gh-436 so that the new Joomla plugin builder/feature is fully active, and part of the import and export of JCB packages. 2019-08-13 03:08:30 +02:00
ed43b00862 Expande the compiler to fully build and zip plugins linked to components. Added plugin_updates area. Fixed gh-454 to insure placeholders are build even if no local db placeholders are found. Fixed gh-453 to prevent count error with null return value. 2019-08-08 17:45:50 +02:00
7d2cc2c9f0 Adding the the new plugin builder to the compiler. gh-436 2019-08-05 00:38:53 +02:00
e6eada11a9 Added the option to use the groupedlist field type. gh-450 2019-07-29 13:30:13 +02:00
4581b310de Updated the compiler to now add GUI placeholders, resolved gh-451 so we now have easy roundtrip development beyond the original custom-code implementation. Added the files, folders, url option, and added the install fields to the new plugin area. gh-436 2019-07-28 23:48:42 +02:00
affaeb72f8 Resolved gh-441 to allow fieldtype name prefixing. Resolved gh-443 to allow Alphanumeric+dot in fieldtype name. Fixed gh-446 to insure that JFormRuleInt validates correctly in the admin field realtions. Improved the new plugin area to also have system name and option to add custom header code. gh-436 2019-07-19 04:32:41 +02:00
a5ae94b93a Linked the new plugin area to Joomla components. gh-436 2019-07-17 04:37:50 +02:00
fcd5846c5a Update the phpseclib via composer. 2019-07-17 02:29:27 +02:00
8d2af8365b Added more dynamic behavior to the new plugin area. Added a funding yml file. 2019-07-17 01:26:18 +02:00
eae07504fa Resolved gh-442 to add a default catch all option to the setDynamicField method in the field class of the compiler. 2019-07-15 22:03:57 +02:00
e476bcb7b5 Added the main GUI for the plugin area, gh-436 2019-07-15 22:00:46 +02:00
2af4b8cf50 Removed required from all code/editor field to improve the behavior of the codemirror editor. Improved the token validation via Ajax. 2019-07-08 18:05:54 +02:00
3497104f41 Added some more events to compiler. Added new helper method to make safeClassFunctionName. 2019-07-07 00:29:35 +02:00
504abe4751 added sponsor banners to JCB. 2019-07-05 18:19:34 +02:00
9e6233c64f Fixed gh-434 to add the missing table path if not set. Resolved gh-427 to allow numbers in the name of a field. Impoved the compiler by adding a method to set the Lang Content array. 2019-07-05 01:53:54 +02:00
b9c758b800 Added context to all compiler events. Added layout fields override options for dynamic field generation. 2019-07-01 19:17:16 +02:00
663f8405e5 Fixed gh-433 to allow ->value in the Value Key field on the where subform in the Tweak tab of the dynamicGet view. 2019-06-29 23:11:37 +02:00
75656d940a Added many events to the compiler as the first step to allow 3rd party integration with the compiler via plugins. gh-429 2019-06-22 12:43:26 +02:00
e84105c3bd Adapted the safeName to a global safeFieldName method so to use it all over JCB to safely build field names. gh-427 2019-06-18 16:12:49 +02:00
8f8546502a Added a new convention to how JCB builds field names, so that it does not remove/convert the numbers. gh-427 2019-06-18 14:38:34 +02:00
8acbb3b3a4 Fixed gh-422 to insure the details tab always gets added if no custom tab names are found. Added the option to run the expantion option without installing the components locally. 2019-06-18 00:03:04 +02:00
2fb4a1ae43 Improved the getInput method for custom fields, so to allow the edit button to show more consistently. 2019-06-13 23:12:16 +02:00
236ecd53f4 Fixed gh-424 so that the global settings of JCB will save even if the components are not selected in the Development Method tab. 2019-06-13 18:45:55 +02:00
f03c6f5204 Added an after cancel custom code area also in connection with gh-418 in the admin view. 2019-06-12 22:36:05 +02:00
eae13dff06 Resolved gh-418 by adding an on before cancel custom script area to the admin view. 2019-06-12 22:06:19 +02:00
c8b5993219 Fixed gh-420 to allow the linked site view to save correctly. 2019-06-11 17:54:31 +02:00
6da9cb3d42 Fixed gh-417 edit layout by removing the one to many div's from the dynamic build method. 2019-06-10 01:05:37 +02:00
c966720f79 Few more corrections to the category filter, and field integration 2019-06-09 23:19:34 +02:00
37d3f1425e fixed gh-419 to correctly load the category filter (extention and view name) 2019-06-07 16:59:27 +02:00
4a878e32ef Moved the filter sanitation to insure no empty filters will get loaded 2019-06-05 13:14:05 +02:00
e1f32c142b Fixed filter to not display 'Select an option' but the field name instead 2019-06-05 12:50:42 +02:00
76449b01ec Fixed category filter issue. Fixed permissions accross JCB. Updated some notes on the field types. 2019-06-05 12:26:15 +02:00
dda33d66cb fixed the subform build, to allow required value to be set to true. 2019-05-25 22:20:12 +02:00
a90d6f51f7 Fixed the code search keys to include new views, and fields across JCB. 2019-05-20 22:55:25 +02:00
d7d4ec43e6 Added the options to include the xml files to also be target with custom code placeholders. 2019-05-20 14:14:43 +02:00
d3f623d184 Improved on the mysql default selected values to use InnoDB, utf8mb4, utf8mb4_general_ci 2019-05-17 00:43:24 +02:00
42d5b3b55c Added the feature that loads the company global values when creating a new component, if they are set. 2019-05-16 01:07:38 +02:00
8e79417664 Added create new custom code to all fields that have string lenght. 2019-05-16 00:50:45 +02:00
726 changed files with 51269 additions and 8565 deletions

4
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,4 @@
# These are supported funding model platforms
# soon :) github: [Llewellynvdm]
open_collective: Joomla-Component-Builder

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.9.18) 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.10.0) 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)
@ -146,14 +146,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*: 15th May, 2019
+ *Version*: 2.9.18
+ *Last Build*: 14th August, 2019
+ *Version*: 2.10.0
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **206359**
+ *Field count*: **1136**
+ *File count*: **1344**
+ *Folder count*: **209**
+ *Line count*: **246448**
+ *Field count*: **1319**
+ *File count*: **1595**
+ *Folder count*: **244**
> 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

@ -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.9.18) 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.10.0) 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)
@ -146,14 +146,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*: 15th May, 2019
+ *Version*: 2.9.18
+ *Last Build*: 14th August, 2019
+ *Version*: 2.10.0
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **206359**
+ *Field count*: **1136**
+ *File count*: **1344**
+ *Folder count*: **209**
+ *Line count*: **246448**
+ *Field count*: **1319**
+ *File count*: **1595**
+ *Folder count*: **244**
> 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

@ -71,6 +71,40 @@
<action name="admin_fields_relations.edit.own" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_OWN" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_OWN_DESC" />
<action name="admin_fields_relations.edit.state" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_STATE" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_STATE_DESC" />
<action name="admin_fields_relations.version" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_VERSION" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_VERSION_DESC" />
<action name="class_extends.access" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC" />
<action name="class_extends.batch" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE_DESC" />
<action name="class_extends.create" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE_DESC" />
<action name="class_extends.delete" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE_DESC" />
<action name="class_extends.edit" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_DESC" />
<action name="class_extends.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY_DESC" />
<action name="class_extends.edit.created" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE_DESC" />
<action name="class_extends.edit.own" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC" />
<action name="class_extends.edit.state" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC" />
<action name="class_extends.version" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC" />
<action name="class_method.access" title="COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS" description="COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS_DESC" />
<action name="class_method.batch" title="COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE" description="COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE_DESC" />
<action name="class_method.create" title="COM_COMPONENTBUILDER_CLASS_METHODS_CREATE" description="COM_COMPONENTBUILDER_CLASS_METHODS_CREATE_DESC" />
<action name="class_method.delete" title="COM_COMPONENTBUILDER_CLASS_METHODS_DELETE" description="COM_COMPONENTBUILDER_CLASS_METHODS_DELETE_DESC" />
<action name="class_method.edit" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_DESC" />
<action name="class_method.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY_DESC" />
<action name="class_method.edit.created" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE_DESC" />
<action name="class_method.edit.own" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN_DESC" />
<action name="class_method.edit.state" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE_DESC" />
<action name="class_method.version" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION_DESC" />
<action name="class_method.export" title="COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT" description="COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT_DESC" />
<action name="class_method.import" title="COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT" description="COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT_DESC" />
<action name="class_property.access" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS_DESC" />
<action name="class_property.batch" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE_DESC" />
<action name="class_property.create" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE_DESC" />
<action name="class_property.delete" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE_DESC" />
<action name="class_property.edit" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_DESC" />
<action name="class_property.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY_DESC" />
<action name="class_property.edit.created" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE_DESC" />
<action name="class_property.edit.own" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN_DESC" />
<action name="class_property.edit.state" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE_DESC" />
<action name="class_property.version" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION_DESC" />
<action name="class_property.export" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT_DESC" />
<action name="class_property.import" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT_DESC" />
<action name="compiler.access" title="COM_COMPONENTBUILDER_COMPILER_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC" />
<action name="compiler.clear_tmp" title="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC" />
<action name="compiler.dashboard_list" title="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC" />
@ -157,6 +191,16 @@
<action name="component_placeholders.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN_DESC" />
<action name="component_placeholders.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE_DESC" />
<action name="component_placeholders.version" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION_DESC" />
<action name="component_plugins.access" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS_DESC" />
<action name="component_plugins.batch" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE_DESC" />
<action name="component_plugins.create" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE_DESC" />
<action name="component_plugins.delete" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE_DESC" />
<action name="component_plugins.edit" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_DESC" />
<action name="component_plugins.edit.created_by" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY_DESC" />
<action name="component_plugins.edit.created" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE_DESC" />
<action name="component_plugins.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN_DESC" />
<action name="component_plugins.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE_DESC" />
<action name="component_plugins.version" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION_DESC" />
<action name="component_site_views.access" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC" />
<action name="component_site_views.batch" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE_DESC" />
<action name="component_site_views.create" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE_DESC" />
@ -271,7 +315,6 @@
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
<action name="joomla_component.batch" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC" />
<action name="joomla_component.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />
<action name="joomla_component.dashboard_add" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC" />
<action name="joomla_component.dashboard_list" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC" />
<action name="joomla_component.delete" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE_DESC" />
<action name="joomla_component.edit" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_DESC" />
@ -281,6 +324,45 @@
<action name="joomla_component.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC" />
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
<action name="joomla_component.submenu" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC" />
<action name="joomla_plugin.get_boilerplate" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin_group.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS_DESC" />
<action name="joomla_plugin_group.batch" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE_DESC" />
<action name="joomla_plugin_group.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION_DESC" />
<action name="joomla_plugin.methods" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.properties" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.run_expansion" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC" />
<action name="joomla_plugin.batch" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE_DESC" />
<action name="joomla_plugin.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE_DESC" />
<action name="joomla_plugin.dashboard_list" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST_DESC" />
<action name="joomla_plugin.delete" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE_DESC" />
<action name="joomla_plugin.edit" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_DESC" />
<action name="joomla_plugin.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY_DESC" />
<action name="joomla_plugin.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE_DESC" />
<action name="joomla_plugin.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN_DESC" />
<action name="joomla_plugin.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE_DESC" />
<action name="joomla_plugin.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC" />
<action name="joomla_plugin_files_folders_urls.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_ACCESS_DESC" />
<action name="joomla_plugin_files_folders_urls.batch" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_BATCH_USE_DESC" />
<action name="joomla_plugin_files_folders_urls.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_CREATE_DESC" />
<action name="joomla_plugin_files_folders_urls.delete" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_DELETE_DESC" />
<action name="joomla_plugin_files_folders_urls.edit" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_BY_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_DATE_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_OWN_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_STATE_DESC" />
<action name="joomla_plugin_files_folders_urls.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION_DESC" />
<action name="joomla_plugin.submenu" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU_DESC" />
<action name="joomla_plugin_updates.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS_DESC" />
<action name="joomla_plugin_updates.batch" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE_DESC" />
<action name="joomla_plugin_updates.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE_DESC" />
<action name="joomla_plugin_updates.delete" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE_DESC" />
<action name="joomla_plugin_updates.edit" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_DESC" />
<action name="joomla_plugin_updates.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY_DESC" />
<action name="joomla_plugin_updates.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE_DESC" />
<action name="joomla_plugin_updates.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN_DESC" />
<action name="joomla_plugin_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC" />
<action name="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" />
<action name="language.build" title="COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC" />
<action name="language_translation.access" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC" />
<action name="language_translation.batch" title="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE" description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE_DESC" />
@ -406,6 +488,7 @@
<action name="template.export" title="COM_COMPONENTBUILDER_TEMPLATES_EXPORT" description="COM_COMPONENTBUILDER_TEMPLATES_EXPORT_DESC" />
<action name="template.import" title="COM_COMPONENTBUILDER_TEMPLATES_IMPORT" description="COM_COMPONENTBUILDER_TEMPLATES_IMPORT_DESC" />
<action name="template.submenu" title="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU" description="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU_DESC" />
<action name="validation_rule.run_expansion" title="COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="validation_rule.access" title="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS" description="COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC" />
<action name="validation_rule.batch" title="COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE_DESC" />
<action name="validation_rule.create" title="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC" />
@ -430,6 +513,17 @@
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
</section>
<section name="joomla_plugin">
<action name="joomla_plugin.edit" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_DESC" />
<action name="joomla_plugin.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN_DESC" />
<action name="joomla_plugin.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE_DESC" />
<action name="joomla_plugin.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY_DESC" />
<action name="joomla_plugin.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE_DESC" />
<action name="joomla_plugin.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE_DESC" />
<action name="joomla_plugin.delete" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE_DESC" />
<action name="joomla_plugin.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC" />
<action name="joomla_plugin.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC" />
</section>
<section name="admin_view">
<action name="admin_view.edit" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT_DESC" />
<action name="admin_view.edit.own" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT_OWN" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT_OWN_DESC" />
@ -497,6 +591,28 @@
<action name="custom_code.access" title="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS_DESC" />
<action name="custom_code.version" title="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION" description="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION_DESC" />
</section>
<section name="class_property">
<action name="class_property.edit" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_DESC" />
<action name="class_property.edit.own" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN_DESC" />
<action name="class_property.edit.state" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE_DESC" />
<action name="class_property.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY_DESC" />
<action name="class_property.edit.created" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE_DESC" />
<action name="class_property.create" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE_DESC" />
<action name="class_property.delete" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE_DESC" />
<action name="class_property.access" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS_DESC" />
<action name="class_property.version" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION_DESC" />
</section>
<section name="class_method">
<action name="class_method.edit" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_DESC" />
<action name="class_method.edit.own" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN_DESC" />
<action name="class_method.edit.state" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE_DESC" />
<action name="class_method.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY_DESC" />
<action name="class_method.edit.created" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE_DESC" />
<action name="class_method.create" title="COM_COMPONENTBUILDER_CLASS_METHODS_CREATE" description="COM_COMPONENTBUILDER_CLASS_METHODS_CREATE_DESC" />
<action name="class_method.delete" title="COM_COMPONENTBUILDER_CLASS_METHODS_DELETE" description="COM_COMPONENTBUILDER_CLASS_METHODS_DELETE_DESC" />
<action name="class_method.access" title="COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS" description="COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS_DESC" />
<action name="class_method.version" title="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION_DESC" />
</section>
<section name="placeholder">
<action name="placeholder.edit" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_DESC" />
<action name="placeholder.edit.state" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE_DESC" />
@ -743,6 +859,17 @@
<action name="component_placeholders.access" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS_DESC" />
<action name="component_placeholders.version" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION_DESC" />
</section>
<section name="component_plugins">
<action name="component_plugins.edit" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_DESC" />
<action name="component_plugins.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN_DESC" />
<action name="component_plugins.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE_DESC" />
<action name="component_plugins.edit.created_by" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY_DESC" />
<action name="component_plugins.edit.created" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE_DESC" />
<action name="component_plugins.create" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE_DESC" />
<action name="component_plugins.delete" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE_DESC" />
<action name="component_plugins.access" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS_DESC" />
<action name="component_plugins.version" title="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION_DESC" />
</section>
<section name="snippet_type">
<action name="snippet_type.edit" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_DESC" />
<action name="snippet_type.edit.own" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN_DESC" />
@ -774,6 +901,42 @@
<action name="library_files_folders_urls.access" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS_DESC" />
<action name="library_files_folders_urls.version" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC" />
</section>
<section name="class_extends">
<action name="class_extends.edit" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_DESC" />
<action name="class_extends.edit.own" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC" />
<action name="class_extends.edit.state" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC" />
<action name="class_extends.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY_DESC" />
<action name="class_extends.edit.created" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE_DESC" />
<action name="class_extends.create" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE_DESC" />
<action name="class_extends.delete" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE_DESC" />
<action name="class_extends.access" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC" />
<action name="class_extends.version" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC" />
</section>
<section name="joomla_plugin_group">
<action name="joomla_plugin_group.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION_DESC" />
</section>
<section name="joomla_plugin_updates">
<action name="joomla_plugin_updates.edit" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_DESC" />
<action name="joomla_plugin_updates.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN_DESC" />
<action name="joomla_plugin_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC" />
<action name="joomla_plugin_updates.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY_DESC" />
<action name="joomla_plugin_updates.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE_DESC" />
<action name="joomla_plugin_updates.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE_DESC" />
<action name="joomla_plugin_updates.delete" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE_DESC" />
<action name="joomla_plugin_updates.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS_DESC" />
<action name="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" />
</section>
<section name="joomla_plugin_files_folders_urls">
<action name="joomla_plugin_files_folders_urls.edit" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_OWN_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_STATE_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.created_by" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_BY_DESC" />
<action name="joomla_plugin_files_folders_urls.edit.created" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_DATE_DESC" />
<action name="joomla_plugin_files_folders_urls.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_CREATE_DESC" />
<action name="joomla_plugin_files_folders_urls.delete" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_DELETE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_DELETE_DESC" />
<action name="joomla_plugin_files_folders_urls.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_ACCESS_DESC" />
<action name="joomla_plugin_files_folders_urls.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION_DESC" />
</section>
<section name="category.fields">
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />
<action name="core.delete" title="JACTION_DELETE" description="COM_CATEGORIES_ACCESS_DELETE_DESC" />

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,16 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */
.control-group, .controls, .controls input[type="url"], .controls input[type="text"], .controls input[type="number"], .controls input[type="email"], .controls select, .controls textarea {
max-width: 100%;
}

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,15 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */
.mysql_update { width: 100%; height: 392px; }
.version_url { min-width: 100%; }

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @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 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -386,16 +386,16 @@ function bulkSnippetGithub(status) {
function doBulkUpdate_server(path, status) {
// set the ajax scope
ajaxcall = null;
var getUrl = "index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json";
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json&raw=true");
if (token.length > 0 && path.length > 0 && status.length > 0) {
var request = 'token='+token+'&path='+path+'&status='+status;
var request = token+'=1&path='+path+'&status='+status;
}
return jQuery.ajax({
type: 'POST',
url: getUrl,
dataType: 'jsonp',
dataType: 'json',
data: request,
jsonp: 'callback'
jsonp: false
});
}
@ -423,16 +423,16 @@ function setSnippetGithub(key, status) {
function setSnippetGithub_server(path, status) {
// set the ajax scope
ajaxcall = null;
var getUrl = "index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json";
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json&raw=true");
if (token.length > 0 && path.length > 0 && status.length > 0) {
var request = 'token='+token+'&path='+path+'&status='+status;
var request = token+'=1&path='+path+'&status='+status;
}
return jQuery.ajax({
type: 'POST',
url: getUrl,
dataType: 'jsonp',
dataType: 'json',
data: request,
jsonp: 'callback'
jsonp: false
});
}

View File

@ -496,38 +496,42 @@ abstract class ###Component###Helper
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = '###Component###', $config = array())
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = '###Component###', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path
$fullPath = $path . '/models';
// set prefix
$prefix = $component.'Model';
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPath, $prefix);
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $prefix, $config);
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path.'/'.$name.'.php';
$fullPath = $fullPath.'/'.$name.'.php';
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPath))
elseif (JFile::exists($fullPathModel))
{
// get the file
require_once $fullPath;
require_once $fullPathModel;
}
// build class names
$modelClass = $prefix.$name;
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model

View File

@ -139,38 +139,42 @@ abstract class ###Component###Helper
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = '###Component###', $config = array())
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = '###Component###', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path
$fullPath = $path . '/models';
// set prefix
$prefix = $component.'Model';
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPath, $prefix);
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $prefix, $config);
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path.'/'.$name.'.php';
$fullPath = $fullPath.'/'.$name.'.php';
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPath))
elseif (JFile::exists($fullPathModel))
{
// get the file
require_once $fullPath;
require_once $fullPathModel;
}
// build class names
$modelClass = $prefix.$name;
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model

View File

@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL###
$cancel = parent::cancel($key);
@ -177,7 +177,7 @@ class ###Component###Controller###View### extends JControllerForm
'index.php?option=' . $this->option . $redirect, false
)
);
}
}###JCONTROLLERFORM_AFTERCANCEL###
return $cancel;
}

View File

@ -42,7 +42,7 @@ class ###Component###Controller###View### extends JControllerForm
{
$this->view_list = '###SITE_DEFAULT_VIEW###'; // safeguard for setting the return view listing to the default site view.
parent::__construct($config);
}
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/**
* Method override to check if you can add a new record.
@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL###
$cancel = parent::cancel($key);
@ -177,7 +177,7 @@ class ###Component###Controller###View### extends JControllerForm
'index.php?option=' . $this->option . $redirect, false
)
);
}
}###JCONTROLLERFORM_AFTERCANCEL###
return $cancel;
}

View File

@ -39,7 +39,7 @@ class ###Component###ControllerAjax extends JControllerLegacy
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($token == $call_token)
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
$task = $this->getTask();
switch($task)

View File

@ -39,7 +39,7 @@ class ###Component###ControllerAjax extends JControllerLegacy
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($token == $call_token)
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
$task = $this->getTask();
switch($task)

View File

@ -24,7 +24,7 @@ JFormHelper::loadFieldClass('checkboxes');
/**
* ###Type### Form Field class for the ###Component### component
*/
class JFormField###Type### extends JFormFieldCheckboxes
class ###JPREFIX###FormField###Type### extends JFormFieldCheckboxes
{
/**
* The ###type### field type.

View File

@ -24,7 +24,7 @@ JFormHelper::loadFieldClass('###JFORM_extends###');
/**
* ###Type### Form Field class for the ###Component### component
*/
class JFormField###Type### extends JFormField###JFORM_EXTENDS###
class ###JPREFIX###FormField###Type### extends JFormField###JFORM_EXTENDS###
{
/**
* The ###type### field type.

View File

@ -24,7 +24,7 @@ JFormHelper::loadFieldClass('list');
/**
* ###Type### Form Field class for the ###Component### component
*/
class JFormField###Type### extends JFormFieldList
class ###JPREFIX###FormField###Type### extends JFormFieldList
{
/**
* The ###type### field type.

View File

@ -24,7 +24,7 @@ JFormHelper::loadFieldClass('radio');
/**
* ###Type### Form Field class for the ###Component### component
*/
class JFormField###Type### extends JFormFieldRadio
class ###JPREFIX###FormField###Type### extends JFormFieldRadio
{
/**
* The ###type### field type.

View File

@ -24,7 +24,7 @@ JFormHelper::loadFieldClass('user');
/**
* ###Type### Form Field class for the ###Component### component
*/
class JFormField###Type### extends JFormFieldUser
class ###JPREFIX###FormField###Type### extends JFormFieldUser
{
/**
* The ###type### field type.

View File

@ -23,13 +23,20 @@ use Joomla\Registry\Registry;
* ###Component### ###View### Model
*/
class ###Component###Model###View### extends JModelAdmin
{
{
/**
* The tab layout fields array.
*
* @var array
*/
protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###;
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_###COMPONENT###';
/**
* The type alias for this content type.
*

View File

@ -23,13 +23,20 @@ use Joomla\Registry\Registry;
* ###Component### ###View### Model
*/
class ###Component###Model###View### extends JModelAdmin
{
{
/**
* The tab layout fields array.
*
* @var array
*/
protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###;
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_###COMPONENT###';
/**
* The type alias for this content type.
*

View File

@ -29,18 +29,31 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -17,15 +17,27 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -34,3 +46,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -17,18 +17,31 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -17,18 +17,31 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -17,15 +17,27 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -34,3 +46,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -143,6 +143,8 @@ class ###Component###Router extends JComponentRouterBase
{
$getTable = '#__categories';
$query->from($db->quoteName($getTable));
// we need this to target the components categories (TODO will keep an eye on this)
$query->where($db->quoteName('extension') . ' LIKE '. $db->quote((string)'com_' . $main . '%'));
}
else
{

View File

@ -5,7 +5,7 @@
* @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.
* @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -25,21 +25,27 @@ JHTML::_('behavior.modal');
class com_###component###InstallerScript
{
/**
* method to install the component
* Constructor
*
* @return void
* @param JAdapterInstance $parent The object responsible for running this script
*/
function install($parent)
{
}
public function __construct(JAdapterInstance $parent) {}
/**
* method to uninstall the component
* Called on installation
*
* @return void
* @param JAdapterInstance $parent The object responsible for running this script
*
* @return boolean True on success
*/
function uninstall($parent)
public function install(JAdapterInstance $parent) {}
/**
* Called on uninstallation
*
* @param JAdapterInstance $parent The object responsible for running this script
*/
public function uninstall(JAdapterInstance $parent)
{###UNINSTALLSCRIPT###
// little notice as after service, in case of bad experience with component.
echo '<h2>Did something go wrong? Are you disappointed?</h2>
@ -50,62 +56,69 @@ class com_###component###InstallerScript
}
/**
* method to update the component
* Called on update
*
* @return void
* @param JAdapterInstance $parent The object responsible for running this script
*
* @return boolean True on success
*/
function update($parent)
{
}
public function update(JAdapterInstance $parent){}
/**
* method to run before an install/update/uninstall method
* Called before any type of action
*
* @return void
* @param string $type Which action is happening (install|uninstall|discover_install|update)
* @param JAdapterInstance $parent The object responsible for running this script
*
* @return boolean True on success
*/
function preflight($type, $parent)
public function preflight($type, JAdapterInstance $parent)
{
// get application
$app = JFactory::getApplication();
// is redundant ...hmmm
if ($type == 'uninstall')
// is redundant or so it seems ...hmmm let me know if it works again
if ($type === 'uninstall')
{
return true;
}
// the default for both install and update
$jversion = new JVersion();
if (!$jversion->isCompatible('3.6.0'))
if (!$jversion->isCompatible('3.8.0'))
{
$app->enqueueMessage('Please upgrade to at least Joomla! 3.6.0 before continuing!', 'error');
$app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error');
return false;
}
// do any updates needed
if ($type == 'update')
if ($type === 'update')
{###PREUPDATESCRIPT###
}
// do any install needed
if ($type == 'install')
if ($type === 'install')
{###PREINSTALLSCRIPT###
}
return true;
}
/**
* method to run after an install/update/uninstall method
* Called after any type of action
*
* @return void
* @param string $type Which action is happening (install|uninstall|discover_install|update)
* @param JAdapterInstance $parent The object responsible for running this script
*
* @return boolean True on success
*/
function postflight($type, $parent)
public function postflight($type, JAdapterInstance $parent)
{
// get application
$app = JFactory::getApplication();###MOVEFOLDERSSCRIPT###
// set the default component settings
if ($type == 'install')
if ($type === 'install')
{###POSTINSTALLSCRIPT###
}
// do any updates needed
if ($type == 'update')
if ($type === 'update')
{###POSTUPDATESCRIPT###
}
return true;
}###MOVEFOLDERSMETHOD###
}

View File

@ -57,6 +57,16 @@
folder="editors"
filter="cmd"
/>
<!-- Compiler_plugin Field. Type: Plugins. (joomla) -->
<field
type="plugins"
name="compiler_plugin"
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION"
multiple="true"
folder="extension"
filter="cmd"
/>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Manage_jcb_package_directories Field. Type: Radio. (joomla) -->
@ -239,6 +249,34 @@
<option value="2">
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
</field>
<!-- Field_name_builder Field. Type: Radio. (joomla) -->
<field
type="radio"
name="field_name_builder"
label="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC</option>
</field>
<!-- Type_name_builder Field. Type: Radio. (joomla) -->
<field
type="radio"
name="type_name_builder"
label="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT</option>
</field>
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
<!-- Api Field. Type: User. (joomla) -->
@ -711,16 +749,29 @@
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Install Field. Type: List. (joomla) -->
<field
type="list"
name="install"
label="COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION"
class="list_class"
multiple="false"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_TRUE</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_FALSE</option>
</field>
<!-- Backup Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="backup"
label="COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION"
class="inputbox"
/>
@ -730,7 +781,6 @@
name="repository"
label="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION"
class="inputbox"
/>
@ -741,7 +791,6 @@
label="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL"
value="1"
default=""
required="false"
description="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION"
class="inputbox"
/>
@ -843,7 +892,6 @@
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT"

View File

@ -91,6 +91,7 @@ class ComponentbuilderController extends JControllerLegacy
// the view relationships
$views = array(
'joomla_component' => 'joomla_components',
'joomla_plugin' => 'joomla_plugins',
'admin_view' => 'admin_views',
'custom_admin_view' => 'custom_admin_views',
'site_view' => 'site_views',
@ -98,6 +99,8 @@ class ComponentbuilderController extends JControllerLegacy
'layout' => 'layouts',
'dynamic_get' => 'dynamic_gets',
'custom_code' => 'custom_codes',
'class_property' => 'class_properties',
'class_method' => 'class_methods',
'placeholder' => 'placeholders',
'library' => 'libraries',
'snippet' => 'snippets',
@ -122,9 +125,14 @@ class ComponentbuilderController extends JControllerLegacy
'component_dashboard' => 'components_dashboard',
'component_files_folders' => 'components_files_folders',
'component_placeholders' => 'components_placeholders',
'component_plugins' => 'components_plugins',
'snippet_type' => 'snippet_types',
'library_config' => 'libraries_config',
'library_files_folders_urls' => 'libraries_files_folders_urls'
'library_files_folders_urls' => 'libraries_files_folders_urls',
'class_extends' => 'class_extendings',
'joomla_plugin_group' => 'joomla_plugin_groups',
'joomla_plugin_updates' => 'joomla_plugins_updates',
'joomla_plugin_files_folders_urls' => 'joomla_plugins_files_folders_urls'
);
// check if this is a list view
if (in_array($view, $views))

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('admin_views.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -31,6 +31,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('getCronPath', 'ajax');
$this->registerTask('getJCBpackageInfo', 'ajax');
$this->registerTask('getCrowdinDetails', 'ajax');
$this->registerTask('getClassCode', 'ajax');
$this->registerTask('getClassCodeIds', 'ajax');
$this->registerTask('getClassHeaderCode', 'ajax');
$this->registerTask('tableColumns', 'ajax');
$this->registerTask('fieldSelectOptions', 'ajax');
$this->registerTask('getDynamicScripts', 'ajax');
@ -67,7 +70,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($token == $call_token)
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{
$task = $this->getTask();
switch($task)
@ -301,6 +304,123 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getClassCode':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $typeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getClassCode($idValue, $typeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getClassCodeIds':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $typeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getClassCodeIds($idValue, $typeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getClassHeaderCode':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $typeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getClassHeaderCode($idValue, $typeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'tableColumns':
try
{

View File

@ -0,0 +1,43 @@
<?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 - 2019 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');
/**
* Class_extendings Controller
*/
class ComponentbuilderControllerClass_extendings extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_CLASS_EXTENDINGS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Class_extends', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -0,0 +1,321 @@
<?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 - 2019 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');
/**
* Class_extends Controller
*/
class ComponentbuilderControllerClass_extends extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Class_extendings'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('class_extends.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('class_extends.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('class_extends.access', 'com_componentbuilder.class_extends.' . (int) $recordId) && $user->authorise('class_extends.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('class_extends.edit', 'com_componentbuilder.class_extends.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('class_extends.edit.own', 'com_componentbuilder.class_extends.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('class_extends.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('class_extends.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Class_extends', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_extendings' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,321 @@
<?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 - 2019 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');
/**
* Class_method Controller
*/
class ComponentbuilderControllerClass_method extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Class_methods'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('class_method.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('class_method.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('class_method.access', 'com_componentbuilder.class_method.' . (int) $recordId) && $user->authorise('class_method.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('class_method.edit', 'com_componentbuilder.class_method.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('class_method.edit.own', 'com_componentbuilder.class_method.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('class_method.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('class_method.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Class_method', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_methods' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,106 @@
<?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 - 2019 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');
/**
* Class_methods Controller
*/
class ComponentbuilderControllerClass_methods extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_CLASS_METHODS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Class_method', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('class_method.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Class_methods');
// get the data to export
$data = $model->getExportData($pks);
if (ComponentbuilderHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
ComponentbuilderHelper::xls($data,'Class_methods_'.$date->format('jS_F_Y'),'Class methods exported ('.$date->format('jS F, Y').')','class methods');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_methods', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('class_method.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
// Get the import model
$model = $this->getModel('Class_methods');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (ComponentbuilderHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('class_method_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'class_methods');
$session->set('dataType_VDM_IMPORTINTO', 'class_method');
// Redirect to import view.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CLASS_METHODS');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_methods', false), $message, 'error');
return;
}
}

View File

@ -0,0 +1,106 @@
<?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 - 2019 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');
/**
* Class_properties Controller
*/
class ComponentbuilderControllerClass_properties extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_CLASS_PROPERTIES';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Class_property', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('class_property.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Class_properties');
// get the data to export
$data = $model->getExportData($pks);
if (ComponentbuilderHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
ComponentbuilderHelper::xls($data,'Class_properties_'.$date->format('jS_F_Y'),'Class properties exported ('.$date->format('jS F, Y').')','class properties');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_properties', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('class_property.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
// Get the import model
$model = $this->getModel('Class_properties');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (ComponentbuilderHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('class_property_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'class_properties');
$session->set('dataType_VDM_IMPORTINTO', 'class_property');
// Redirect to import view.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_CLASS_PROPERTIES');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_properties', false), $message, 'error');
return;
}
}

View File

@ -0,0 +1,321 @@
<?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 - 2019 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');
/**
* Class_property Controller
*/
class ComponentbuilderControllerClass_property extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Class_properties'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('class_property.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('class_property.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('class_property.access', 'com_componentbuilder.class_property.' . (int) $recordId) && $user->authorise('class_property.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('class_property.edit', 'com_componentbuilder.class_property.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('class_property.edit.own', 'com_componentbuilder.class_property.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('class_property.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('class_property.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Class_property', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_properties' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -60,7 +60,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
// include component compiler
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php';
$model = $this->getModel('compiler');
if ($model->builder($version,$componentId,$addBackup,$addRepo,$addPlaceholders,$debugLinenr, $minify))
if ($model->builder($version, $componentId, $addBackup, $addRepo, $addPlaceholders, $debugLinenr, $minify))
{
$cache = JFactory::getCache('mod_menu');
$cache->clean();
@ -77,14 +77,36 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
if (empty($redirect_url) && $componentId > 0)
{
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
if (($pos = strpos($model->compiler->filepath, "/tmp/")) !== FALSE)
if (($pos = strpos($model->compiler->filepath['component'], "/tmp/")) !== FALSE)
{
$url = JURI::root() . substr($model->compiler->filepath, $pos + 1);
$url = JURI::root() . substr($model->compiler->filepath['component'], $pos + 1);
}
// check if we have plugins
if (ComponentbuilderHelper::checkArray($model->compiler->filepath['plugins']))
{
// Message of successful build
$message = '<h1>The Extensions were Successfully Compiled!</h1>';
$message .= '<h4>You can install any one of the following extensions!</h4>';
}
else
{
// Message of successful build
$message = '<h1>The (' . $model->compiler->filepath['component-folder'] . ') was Successfully Compiled!</h1>';
}
$message .= '<p><button class="btn btn-small btn-success" onclick="Joomla.submitbutton(\'compiler.installCompiledComponent\')">';
$message .= 'Install ' . $model->compiler->filepath['component-folder'] . ' on this <span class="icon-joomla icon-white"></span>Joomla website. (component)</button></p>';
// check if we have plugins
if (ComponentbuilderHelper::checkArray($model->compiler->filepath['plugins']))
{
foreach ($model->compiler->filepath['plugins-folder'] as $plugin_id => $plugin_folder)
{
$message .= '<p><button class="btn btn-small btn-success" onclick="Joomla.submitbutton(\'compiler.installCompiledPlugin\', ' . (int) $plugin_id . ')">';
$message .= 'Install ' . $plugin_folder . ' on this <span class="icon-joomla icon-white"></span>Joomla website. (plugin)</button></p>';
}
$message .= '<h4>You can install all compiled extensions!</h4>';
$message .= '<p><button class="btn btn-small btn-success" onclick="Joomla.submitbutton(\'compiler.installCompiledExtensions\')">';
$message .= 'Install all above extensions on this <span class="icon-joomla icon-white"></span>Joomla website.</button></p>';
}
// Message of successful build
$message = '<h1>The ('.$model->compiler->componentFolderName.') Was Successfully Compiled!</h1>';
$message .= '<p><button class="btn btn-small btn-success" onclick="Joomla.submitbutton(\'compiler.installExtention\')">';
$message .= 'Install '.$model->compiler->componentFolderName.' on this <span class="icon-joomla icon-white"></span>Joomla website.</button></p>';
$message .= '<h2>Total time saved</h2>';
$message .= '<ul>';
$message .= '<li>Total folders created: <b>'.$model->compiler->folderCount.'</b></li>';
@ -100,15 +122,53 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$message .= '<p><b>'.$model->compiler->actualTotalHours.' Hours</b> or <b>'.$model->compiler->actualTotalDays.' Eight Hour Days</b> <em>(a total of the realistic time frame for this project)</em><br />';
$message .= '<small>(if creating a folder and file took <b>5 seconds</b> and writing one line of code took <b>10 seconds</b>, with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)</small></p>';
$message .= '<p>Project duration: <b>'.$model->compiler->projectWeekTime. ' weeks</b> or <b>'.$model->compiler->projectMonthTime.' months</b></p>';
$message .= '<h2>Path to Zip File</h2>';
$message .= '<p><b>Path:</b> <code>'.$model->compiler->filepath.'</code><br />';
$message .= '<b>URL:</b> <code>'.$url.'</code><br /><br />';
$message .= '<small>Hey! you can also download the file right now!</small><br /><a class="btn btn-success" href="'.$url.'" ><span class="icon-download icon-white"></span>Download</a></p>';
$message .= '<p><small><b>Remember!</b> This file is in your tmp folder and therefore publicly accessible untill you click [Clear tmp]!</small> </p>';
// check if we have plugins
if (ComponentbuilderHelper::checkArray($model->compiler->filepath['plugins']))
{
$plugin_url = array();
$message .= '<h2>Path to Zip Files</h2>';
$message .= '<p><b>Component Path:</b> <code>' . $model->compiler->filepath['component'] . '</code><br />';
$message .= '<b>Component URL:</b> <code>' . $url . '</code><br /><br />';
// load the plugins path/url
foreach ($model->compiler->filepath['plugins'] as $plugin_id => $plugin_path)
{
// set plugin path
$message .= '<b>Plugin Path:</b> <code>' . $plugin_path . '</code><br />';
if (($pos = strpos($plugin_path, "/tmp/")) !== FALSE)
{
$plugin_urls[$plugin_id] = JURI::root() . substr($plugin_path, $pos + 1);
$message .= '<b>Plugin URL:</b> <code>' . $plugin_urls[$plugin_id] . '</code><br />';
}
}
$message .= '<br /><small>Hey! you can also download these zip files right now!</small><br />';
$message .= '<a class="btn btn-success" href="' . $url . '" ><span class="icon-download icon-white"></span>Download Component</a>&nbsp;&nbsp;';
// load the plugin download URL's
foreach ($plugin_urls as $plugin_id => $plugin_url)
{
$message .= ' <a class="btn btn-success" href="' . $plugin_url . '" >';
$message .= '<span class="icon-download icon-white"></span>Download ' . $model->compiler->filepath['plugins-folder'][$plugin_id] . '</a>&nbsp;&nbsp;';
}
$message .= '</p>';
$message .= '<p><small><b>Remember!</b> These zip files are in your tmp folder and therefore publicly accessible until you click [Clear tmp]!</small></p>';
}
else
{
$message .= '<h2>Path to Zip File</h2>';
$message .= '<p><b>Path:</b> <code>' . $model->compiler->filepath['component'] . '</code><br />';
$message .= '<b>URL:</b> <code>' . $url . '</code><br /><br />';
$message .= '<small>Hey! you can also download the zip file right now!</small><br />';
$message .= '<a class="btn btn-success" href="' . $url . '" ><span class="icon-download icon-white"></span>Download</a></p>';
$message .= '<p><small><b>Remember!</b> This zip file is in your tmp folder and therefore publicly accessible until you click [Clear tmp]!</small> </p>';
}
$message .= '<p><small>Compilation took <b>'.$model->compiler->secondsCompiled.'</b> seconds to complete.</small> </p>';
// set redirect
$this->setRedirect($redirect_url,$message,'message');
$app->setUserState('com_componentbuilder.extension_name', $model->compiler->componentFolderName);
$this->setRedirect($redirect_url, $message, 'message');
$app->setUserState('com_componentbuilder.component_folder_name', $model->compiler->filepath['component-folder']);
// check if we have plugins
if (ComponentbuilderHelper::checkArray($model->compiler->filepath['plugins']))
{
$app->setUserState('com_componentbuilder.plugins_folder_name', $model->compiler->filepath['plugins-folder']);
}
}
else
{
@ -116,9 +176,10 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$app->setUserState('com_componentbuilder.redirect_url', '');
$app->setUserState('com_componentbuilder.message', '');
$app->setUserState('com_componentbuilder.extension_message', '');
$app->setUserState('com_componentbuilder.extension_name', '');
$app->setUserState('com_componentbuilder.component_folder_name', '');
$app->setUserState('com_componentbuilder.plugins_folder_name', '');
// set redirect
$this->setRedirect($redirect_url,$message);
$this->setRedirect($redirect_url, $message);
}
return true;
}
@ -126,11 +187,11 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
}
/**
* Install Compiled Extension
* Install All Compiled Extensions
*
* @return true on success
*/
public function installExtention()
public function installCompiledExtensions()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
@ -138,27 +199,133 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = 'Could not install component!';
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THESE_EXTENSIONS');
if($user->authorise('core.admin'))
{
// get the model
$model = $this->getModel('compiler');
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_INSTALL_EXTENTIONS');
$_message = array('success' => array(), 'error' => array());
$app = JFactory::getApplication();
$fileName = $app->getUserState('com_componentbuilder.extension_name');
if (ComponentbuilderHelper::checkString($fileName))
$fileNames = $app->getUserState('com_componentbuilder.plugins_folder_name', array());
$fileNames[] = $app->getUserState('com_componentbuilder.component_folder_name', null);
foreach ($fileNames as $fileName)
{
$lang = JFactory::getLanguage();
$extension = 'com_installer';
$base_dir = JPATH_ADMINISTRATOR;
$language_tag = 'en-GB';
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);
$message = '('.$fileName.'.zip) file was also removed from tmp!';
$this->setRedirect($redirect_url,$message,'message');
return $model->install($fileName.'.zip');
if ($this->installExtension($fileName))
{
$_message['success'][] = JText::sprintf('COM_COMPONENTBUILDER_SZIP_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION', $fileName);
}
else
{
$_message['error'][] = JText::sprintf('COM_COMPONENTBUILDER_SZIP_COULD_NOT_BE_INSTALLED', $fileName);
}
}
// catch errors
if (ComponentbuilderHelper::checkArray($_message['error']))
{
$app->enqueueMessage(implode('<br />', $_message['error']), 'Error');
}
// build success message
if (ComponentbuilderHelper::checkArray($_message['success']))
{
$this->setRedirect($redirect_url, implode('<br />', $_message['success']), 'message');
return true;
}
}
$this->setRedirect($redirect_url,$message,'error');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* Install Compiled Component
*
* @return true on success
*/
public function installCompiledComponent()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_COMPONENT');
if($user->authorise('core.admin'))
{
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_INSTALL_COMPONENT');
$fileName = JFactory::getApplication()->getUserState('com_componentbuilder.component_folder_name');
if ($this->installExtension($fileName))
{
$message = JText::sprintf('COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION', $fileName);
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* Install Compiled Plugin
*
* @return true on success
*/
public function installCompiledPlugin()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_PLUGIN');
if($user->authorise('core.admin'))
{
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_INSTALL_PLUGIN');
$app = JFactory::getApplication();
$fileNames = $app->getUserState('com_componentbuilder.plugins_folder_name');
if (ComponentbuilderHelper::checkArray($fileNames))
{
$jinput = JFactory::getApplication()->input;
$pluginId = $jinput->post->get('install_item_id', 0, 'INT');
if ($pluginId > 0 && isset($fileNames[$pluginId]) && $this->installExtension($fileNames[$pluginId]))
{
$message = JText::sprintf('COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION', $fileName);
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* Install Extension
*
* @return true on success
*/
protected function installExtension($fileName)
{
// check that the model is set
if (!isset($this->_compiler_model))
{
// get the compiler model
$this->_compiler_model = $this->getModel('compiler');
}
// set the language if not set
if (!isset($this->_installer_lang))
{
$this->_installer_lang = JFactory::getLanguage();
$extension = 'com_installer';
$base_dir = JPATH_ADMINISTRATOR;
$language_tag = 'en-GB';
$reload = true;
$this->_installer_lang->load($extension, $base_dir, $language_tag, $reload);
}
// make sure we have a string
if (ComponentbuilderHelper::checkString($fileName))
{
return $this->_compiler_model->install($fileName.'.zip');
}
return false;
}
@ -216,7 +383,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER');
if($user->authorise('core.admin', 'com_componentbuilder'))
if($user->authorise('compiler.clear_tmp', 'com_componentbuilder') && $user->authorise('core.options', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');

View File

@ -0,0 +1,321 @@
<?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 - 2019 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');
/**
* Component_plugins Controller
*/
class ComponentbuilderControllerComponent_plugins extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Components_plugins'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('component_plugins.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('component_plugins.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('component_plugins.access', 'com_componentbuilder.component_plugins.' . (int) $recordId) && $user->authorise('component_plugins.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('component_plugins.edit', 'com_componentbuilder.component_plugins.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('component_plugins.edit.own', 'com_componentbuilder.component_plugins.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('component_plugins.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('component_plugins.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Component_plugins', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_plugins' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,43 @@
<?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 - 2019 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');
/**
* Components_plugins Controller
*/
class ComponentbuilderControllerComponents_plugins extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_PLUGINS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Component_plugins', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('custom_codes.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('dynamic_gets.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerFields extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('fields.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -45,7 +45,7 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
if ($user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
$session = JFactory::getSession();
$session->set('backto_VDM_IMPORT', 'joomla_components');

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('joomla_components.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
@ -159,7 +159,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER');
if($user->authorise('core.admin', 'com_componentbuilder'))
if($user->authorise('joomla_components.clear_tmp', 'com_componentbuilder') && $user->authorise('core.options', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');
@ -181,7 +181,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
{
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
if ($user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
$session = JFactory::getSession();
$session->set('backto_VDM_IMPORT', 'joomla_components');
@ -205,7 +205,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
$model = $this->getModel('Joomla_components');
// check if export is allowed for this user.
$model->user = JFactory::getUser();
if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
if ($model->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
@ -289,7 +289,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
// make sure to set active type (adding this script from custom code :)
$model->activeType = 'manualBackup';
// check if export is allowed for this user. (we need this sorry)
if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
if ($model->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
{
// get all component IDs to backup
$pks = componentbuilderHelper::getComponentIDs();
@ -443,7 +443,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
$model = $this->getModel('Joomla_components');
// check if export is allowed for this user.
$model->user = JFactory::getUser();
if ($model->user->authorise('joomla_component.cloner', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder'))
if ($model->user->authorise('joomla_component.clone', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;

View File

@ -0,0 +1,347 @@
<?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 - 2019 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');
/**
* Joomla_plugin Controller
*/
class ComponentbuilderControllerJoomla_plugin extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Joomla_plugins'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('joomla_plugin.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('joomla_plugin.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('joomla_plugin.access', 'com_componentbuilder.joomla_plugin.' . (int) $recordId) && $user->authorise('joomla_plugin.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('joomla_plugin.edit', 'com_componentbuilder.joomla_plugin.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('joomla_plugin.edit.own', 'com_componentbuilder.joomla_plugin.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('joomla_plugin.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('joomla_plugin.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Joomla_plugin', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
// get the state object (Joomla\CMS\Object\CMSObject)
$state = $model->get('state');
// if we save2copy we need to also copy linked tables found!
if ($state->task === 'save2copy' && $state->{'joomla_plugin.new'})
{
// get new ID
$newID = $state->{'joomla_plugin.id'};
// get old ID
$oldID = $this->input->get('id', 0, 'INT');
// linked tables to update
$_tablesArray = array(
'joomla_plugin_updates' => 'joomla_plugin',
'joomla_plugin_files_folders_urls' => 'joomla_plugin'
);
foreach($_tablesArray as $_updateTable => $_key)
{
// get the linked ID
if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, $_key, 'id'))
{
// copy fields to new linked table
ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array($_key => $newID));
}
}
}
return;
}
}

View File

@ -0,0 +1,321 @@
<?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 - 2019 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');
/**
* Joomla_plugin_files_folders_urls Controller
*/
class ComponentbuilderControllerJoomla_plugin_files_folders_urls extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Joomla_plugins_files_folders_urls'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('joomla_plugin_files_folders_urls.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('joomla_plugin_files_folders_urls.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('joomla_plugin_files_folders_urls.access', 'com_componentbuilder.joomla_plugin_files_folders_urls.' . (int) $recordId) && $user->authorise('joomla_plugin_files_folders_urls.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('joomla_plugin_files_folders_urls.edit', 'com_componentbuilder.joomla_plugin_files_folders_urls.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('joomla_plugin_files_folders_urls.edit.own', 'com_componentbuilder.joomla_plugin_files_folders_urls.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('joomla_plugin_files_folders_urls.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('joomla_plugin_files_folders_urls.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Joomla_plugin_files_folders_urls', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins_files_folders_urls' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,314 @@
<?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 - 2019 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');
/**
* Joomla_plugin_group Controller
*/
class ComponentbuilderControllerJoomla_plugin_group extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Joomla_plugin_groups'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('joomla_plugin_group.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return parent::allowAdd($data);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.joomla_plugin_group.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.joomla_plugin_group.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return parent::allowEdit($data, $key);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Joomla_plugin_group', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugin_groups' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,43 @@
<?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 - 2019 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');
/**
* Joomla_plugin_groups Controller
*/
class ComponentbuilderControllerJoomla_plugin_groups extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Joomla_plugin_group', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -0,0 +1,339 @@
<?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 - 2019 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');
/**
* Joomla_plugin_updates Controller
*/
class ComponentbuilderControllerJoomla_plugin_updates extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Joomla_plugins_updates'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('joomla_plugin_updates.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('joomla_plugin_updates.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('joomla_plugin_updates.access', 'com_componentbuilder.joomla_plugin_updates.' . (int) $recordId) && $user->authorise('joomla_plugin_updates.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('joomla_plugin_updates.edit', 'com_componentbuilder.joomla_plugin_updates.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('joomla_plugin_updates.edit.own', 'com_componentbuilder.joomla_plugin_updates.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('joomla_plugin_updates.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('joomla_plugin_updates.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Joomla_plugin_updates', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins_updates' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
// update the component version to match the updated last version
if (isset($validData['joomla_plugin']) && is_numeric($validData['joomla_plugin']) && $validData['joomla_plugin'] > 0)
{
$objectUpdate = new stdClass();
$objectUpdate->id = (int) $validData['joomla_plugin'];
if (isset($validData['version_update']) && ComponentbuilderHelper::checkArray($validData['version_update'])
&& ($plugin_version = end($validData['version_update'])['version'])
&& ComponentbuilderHelper::checkString($plugin_version))
{
$objectUpdate->plugin_version = $plugin_version;
}
// be sure to update the table if we have a value
if (isset($objectUpdate->plugin_version))
{
JFactory::getDbo()->updateObject('#__componentbuilder_joomla_plugin', $objectUpdate, 'id');
}
}
return;
}
}

View File

@ -0,0 +1,136 @@
<?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 - 2019 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');
/**
* Joomla_plugins Controller
*/
class ComponentbuilderControllerJoomla_plugins extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_PLUGINS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Joomla_plugin', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('joomla_plugins.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* get Boilerplate
*
* @return boolean
*/
public function getBoilerplate()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE');
// check if this user has the right to run expansion
if($user->authorise('joomla_plugin.get_boilerplate', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_FAILED_IF_THE_ISSUE_CONTINUES_INFORM_YOUR_SYSTEM_ADMINISTRATOR');
// Get the model
$model = $this->getModel('joomla_plugins');
// check if there is any selections
if (!$model->getBoilerplate())
{
$message = '<b>' . JText::_('COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_WAS_SUCCESSFULLY') . '</b>';
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
public function openClassMethods()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// redirect to the libraries
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_methods', false));
return;
}
public function openClassProperties()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// redirect to the libraries
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=class_properties', false));
return;
}
}

View File

@ -0,0 +1,43 @@
<?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 - 2019 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');
/**
* Joomla_plugins_files_folders_urls Controller
*/
class ComponentbuilderControllerJoomla_plugins_files_folders_urls extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Joomla_plugin_files_folders_urls', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -0,0 +1,43 @@
<?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 - 2019 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');
/**
* Joomla_plugins_updates Controller
*/
class ComponentbuilderControllerJoomla_plugins_updates extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Joomla_plugin_updates', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -102,5 +102,46 @@ class ComponentbuilderControllerValidation_rules extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error');
return;
}
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=validation_rules', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('validation_rules.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
}

View File

@ -35,7 +35,21 @@ class Compiler extends Infusion
private $time_start;
private $time_end;
public $secondsCompiled;
public $filepath = '';
/*
* The file path array
*
* @var string
*/
public $filepath = array(
'component' => '',
'component-folder' => '',
'package' => '',
'plugins' => array(),
'plugins-folders' => array(),
'modules' => array()
);
// fixed pathes
protected $dynamicIntegration = false;
protected $backupPath = false;
@ -58,9 +72,10 @@ class Compiler extends Infusion
// set some folder paths in relation to distribution
if ($config['backup'])
{
$this->backupPath = $this->params->get('backup_folder_path', $this->tempPath) . '/' . $this->componentBackupName . '.zip';
$this->backupPath = $this->params->get('backup_folder_path', $this->tempPath);
$this->dynamicIntegration = true;
}
// set local repos switch
if ($config['repository'])
{
$this->repoPath = $this->params->get('git_folder_path', null);
@ -125,12 +140,16 @@ class Compiler extends Infusion
$this->setCountingStuff();
// build read me
$this->buildReadMe();
// set local repos
$this->setLocalRepos();
// zip the component
if (!$this->zipComponent())
{
// done with error
return false;
}
// if there are plugins zip them
$this->zipPlugins();
// do lang mismatch check
if (ComponentbuilderHelper::checkArray($this->langMismatch))
{
@ -240,6 +259,26 @@ class Compiler extends Infusion
}
// free up some memory
unset($this->newFiles['dynamic']);
// do plugins if found
if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins))
{
foreach ($this->componentData->joomla_plugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin) && isset($this->newFiles[$plugin->key]) && ComponentbuilderHelper::checkArray($this->newFiles[$plugin->key]))
{
foreach ($this->newFiles[$plugin->key] as $plugin_file)
{
if (JFile::exists($plugin_file['path']))
{
$this->setFileContent($plugin_file['name'], $plugin_file['path'], $bom, $plugin->key);
}
}
// free up some memory
unset($this->newFiles[$plugin->key]);
unset($this->fileContentDynamic[$plugin->key]);
}
}
}
return true;
}
return false;
@ -253,6 +292,8 @@ class Compiler extends Infusion
*/
protected function setFileContent(&$name, &$path, &$bom, $view = null)
{
// Trigger Event: jcb_ce_onBeforeSetFileContent
$this->triggerEvent('jcb_ce_onBeforeSetFileContent', array(&$this->componentContext, &$name, &$path, &$bom, &$view));
// set the file name
$this->fileContentStatic[$this->hhh . 'FILENAME' . $this->hhh] = $name;
// check if the file should get PHP opening
@ -263,6 +304,8 @@ class Compiler extends Infusion
}
// get content of the file
$string = ComponentbuilderHelper::getFileContents($path);
// Trigger Event: jcb_ce_onGetFileContents
$this->triggerEvent('jcb_ce_onGetFileContents', array(&$this->componentContext, &$string, &$name, &$path, &$bom, &$view));
// see if we should add a BOM
if (strpos($string, $this->hhh . 'BOM' . $this->hhh) !== false)
{
@ -281,6 +324,8 @@ class Compiler extends Infusion
{
$answer = $this->setDynamicValues($answer);
}
// Trigger Event: jcb_ce_onBeforeSetFileContent
$this->triggerEvent('jcb_ce_onBeforeWriteFileContent', array(&$this->componentContext, &$answer, &$name, &$path, &$bom, &$view));
// add answer back to file
$this->writeFile($path, $answer);
// count the file lines
@ -295,17 +340,37 @@ class Compiler extends Infusion
*/
protected function setUpdateServer()
{
// move the update server to host
if ($this->componentData->add_update_server == 1 && $this->componentData->update_server_target == 1 && isset($this->updateServerFileName) && $this->dynamicIntegration)
// move the component update server to host
if ($this->componentData->add_update_server == 1 && $this->componentData->update_server_target == 1
&& isset($this->updateServerFileName) && $this->dynamicIntegration)
{
$xml_update_server_path = $this->componentPath . '/' . $this->updateServerFileName . '.xml';
$update_server_xml_path = $this->componentPath . '/' . $this->updateServerFileName . '.xml';
// make sure we have the correct file
if (JFile::exists($xml_update_server_path) && isset($this->componentData->update_server))
if (JFile::exists($update_server_xml_path) && isset($this->componentData->update_server))
{
// move to server
ComponentbuilderHelper::moveToServer($xml_update_server_path, $this->updateServerFileName . '.xml', (int) $this->componentData->update_server, $this->componentData->update_server_protocol);
ComponentbuilderHelper::moveToServer($update_server_xml_path, $this->updateServerFileName . '.xml', (int) $this->componentData->update_server, $this->componentData->update_server_protocol);
// remove the local file
JFile::delete($xml_update_server_path);
JFile::delete($update_server_xml_path);
}
}
// move the plugins update server to host
if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins))
{
foreach ($this->componentData->joomla_plugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin)
&& isset($plugin->add_update_server) && $plugin->add_update_server == 1
&& isset($plugin->update_server_target) && $plugin->update_server_target == 1
&& isset($plugin->update_server) && is_numeric($plugin->update_server) && $plugin->update_server > 0
&& isset($plugin->update_server_xml_path) && JFile::exists($plugin->update_server_xml_path)
&& isset($plugin->update_server_xml_file_name) && ComponentbuilderHelper::checkString($plugin->update_server_xml_file_name))
{
// move to server
ComponentbuilderHelper::moveToServer($plugin->update_server_xml_path, $plugin->update_server_xml_file_name, (int) $plugin->update_server, $plugin->update_server_protocol);
// remove the local file
JFile::delete($plugin->update_server_xml_path);
}
}
}
}
@ -446,28 +511,64 @@ class Compiler extends Infusion
$this->fileContentStatic[$this->hhh . 'projectMonthTime' . $this->hhh] = $this->projectMonthTime;
}
private function zipComponent()
private function setLocalRepos()
{
// before we zip the component we first need to move it to the repo folder if set
if (ComponentbuilderHelper::checkString($this->repoPath))
// move it to the repo folder if set
if (isset($this->repoPath) && ComponentbuilderHelper::checkString($this->repoPath))
{
// set the repo path
$repoFullPath = $this->repoPath . '/com_' . $this->componentData->sales_name . '__joomla_' . $this->joomlaVersion;
// Trigger Event: jcb_ce_onBeforeUpdateRepo
$this->triggerEvent('jcb_ce_onBeforeUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData));
// remove old data
$this->removeFolder($repoFullPath, $this->componentData->toignore);
// set the new data
JFolder::copy($this->componentPath, $repoFullPath, '', true);
}
// the name of the zip file to create
$this->filepath = $this->tempPath . '/' . $this->componentFolderName . '.zip';
// Trigger Event: jcb_ce_onAfterUpdateRepo
$this->triggerEvent('jcb_ce_onAfterUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData));
// move the plugins to local folder repos
if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins))
{
foreach ($this->componentData->joomla_plugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin) && isset($plugin->file_name))
{
$plugin_context = 'plugin.' . $plugin->file_name . '.' . $plugin->id;
// set the repo path
$repoFullPath = $this->repoPath . '/' . $plugin->folder_name . '__joomla_' . $this->joomlaVersion;
// Trigger Event: jcb_ce_onBeforeUpdateRepo
$this->triggerEvent('jcb_ce_onBeforeUpdateRepo', array(&$plugin_context, &$plugin->folder_path, &$repoFullPath, &$plugin));
// remove old data
$this->removeFolder($repoFullPath, $this->componentData->toignore);
// set the new data
JFolder::copy($plugin->folder_path, $repoFullPath, '', true);
// Trigger Event: jcb_ce_onAfterUpdateRepo
$this->triggerEvent('jcb_ce_onAfterUpdateRepo', array(&$plugin_context, &$plugin->folder_path, &$repoFullPath, &$plugin));
}
}
}
}
}
private function zipComponent()
{
// Component Folder Name
$this->filepath['component-folder'] = $this->componentFolderName;
// the name of the zip file to create
$this->filepath['component'] = $this->tempPath . '/' . $this->filepath['component-folder'] . '.zip';
// Trigger Event: jcb_ce_onBeforeZipComponent
$this->triggerEvent('jcb_ce_onBeforeZipComponent', array(&$this->componentContext, &$this->componentPath, &$this->filepath['component'], &$this->tempPath, &$this->componentFolderName, &$this->componentData));
//create the zip file
if (ComponentbuilderHelper::zip($this->componentPath, $this->filepath))
if (ComponentbuilderHelper::zip($this->componentPath, $this->filepath['component']))
{
// now move to backup if zip was made and backup is requered
// now move to backup if zip was made and backup is required
if ($this->backupPath && $this->dynamicIntegration)
{
JFile::copy($this->filepath, $this->backupPath);
// Trigger Event: jcb_ce_onBeforeBackupZip
$this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, &$this->backupPath, &$this->componentData));
// copy the zip to backup path
JFile::copy($this->filepath['component'], $this->backupPath . '/' . $this->componentBackupName . '.zip');
}
// move to sales server host
@ -476,10 +577,14 @@ class Compiler extends Infusion
// make sure we have the correct file
if (isset($this->componentData->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
$this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, &$this->componentSalesName, &$this->componentData));
// move to server
ComponentbuilderHelper::moveToServer($this->filepath, $this->componentSalesName . '.zip', (int) $this->componentData->sales_server, $this->componentData->sales_server_protocol);
ComponentbuilderHelper::moveToServer($this->filepath['component'], $this->componentSalesName . '.zip', (int) $this->componentData->sales_server, $this->componentData->sales_server_protocol);
}
}
// Trigger Event: jcb_ce_onAfterZipComponent
$this->triggerEvent('jcb_ce_onAfterZipComponent', array(&$this->componentContext, &$this->filepath['component'], &$this->tempPath, &$this->componentFolderName, &$this->componentData));
// remove the component folder since we are done
if ($this->removeFolder($this->componentPath))
{
@ -489,6 +594,60 @@ class Compiler extends Infusion
return false;
}
private function zipPlugins()
{
if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins))
{
foreach ($this->componentData->joomla_plugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin) && isset($plugin->zip_name)
&& ComponentbuilderHelper::checkString($plugin->zip_name)
&& isset($plugin->folder_path)
&& ComponentbuilderHelper::checkString($plugin->folder_path))
{
// set plugin context
$plugin_context = $plugin->file_name . '.' . $plugin->id;
// Component Folder Name
$this->filepath['plugins-folder'][$plugin->id] = $plugin->zip_name;
// the name of the zip file to create
$this->filepath['plugins'][$plugin->id] = $this->tempPath . '/' . $plugin->zip_name . '.zip';
// Trigger Event: jcb_ce_onBeforeZipPlugin
$this->triggerEvent('jcb_ce_onBeforeZipPlugin', array(&$plugin_context, &$plugin->folder_path, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$plugin->zip_name, &$plugin));
//create the zip file
if (ComponentbuilderHelper::zip($plugin->folder_path, $this->filepath['plugins'][$plugin->id]))
{
// now move to backup if zip was made and backup is required
if ($this->backupPath)
{
$__plugin_context = 'plugin.' . $plugin_context;
// Trigger Event: jcb_ce_onBeforeBackupZip
$this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$__plugin_context, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$this->backupPath, &$plugin));
// copy the zip to backup path
JFile::copy($this->filepath['plugins'][$plugin->id], $this->backupPath . '/' . $plugin->zip_name . '.zip');
}
// move to sales server host
if ($plugin->add_sales_server == 1)
{
// make sure we have the correct file
if (isset($plugin->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
$this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$__plugin_context, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$plugin->zip_name, &$plugin));
// move to server
ComponentbuilderHelper::moveToServer($this->filepath['plugins'][$plugin->id], $plugin->zip_name . '.zip', (int) $plugin->sales_server, $plugin->sales_server_protocol);
}
}
// Trigger Event: jcb_ce_onAfterZipPlugin
$this->triggerEvent('jcb_ce_onAfterZipPlugin', array(&$plugin_context, &$this->filepath['plugins'][$plugin->id], &$this->tempPath, &$plugin->zip_name, &$plugin));
// remove the plugin folder since we are done
$this->removeFolder($plugin->folder_path);
}
}
}
}
}
protected function addCustomCode()
{
// reset all these

File diff suppressed because it is too large Load Diff

View File

@ -19,14 +19,14 @@ class Structure extends Get
{
/**
* The foulder counter
* The folder counter
*
* @var int
*/
public $folderCount = 0;
/**
* The foulder counter
* The file counter
*
* @var int
*/
@ -200,13 +200,6 @@ class Structure extends Get
*/
public $projectMonthTime = 0;
/**
* The Joomla Version
*
* @var string
*/
public $joomlaVersion;
/**
* The template path
*
@ -242,6 +235,13 @@ class Structure extends Get
*/
public $stdFolders = array('site', 'admin', 'media');
/**
* The standard root files
*
* @var array
*/
public $stdRootFiles = array('access.xml', 'config.xml', 'controller.php', 'index.html', 'README.txt');
/**
* Dynamic File Content
*
@ -277,6 +277,13 @@ class Structure extends Get
*/
public $componentPath;
/**
* The Dynamic paths
*
* @var array
*/
public $dynamicPaths = array();
/**
* The not new static items
*
@ -334,6 +341,8 @@ class Structure extends Get
// first we run the perent constructor
if (parent::__construct($config))
{
// set the standard admin file
$this->stdRootFiles[] = $this->componentData->name_code . '.php';
// set incase no extra admin folder are loaded
$this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FOLDERS' . $this->hhh] = '';
// set incase no extra site folder are loaded
@ -348,15 +357,12 @@ class Structure extends Get
$this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FILES' . $this->hhh] = '';
// run global updater
ComponentbuilderHelper::runGlobalUpdater();
// set the Joomla version
$this->joomlaVersion = $config['version'];
// set the template path
$this->templatePath = $this->compilerPath . '/joomla_' . $config['version'];
// set some default names
$this->componentSalesName = 'com_' . $this->componentData->sales_name . '__J' . $this->joomlaVersion;
$this->componentBackupName = 'com_' . $this->componentData->sales_name . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;
$this->componentFolderName = 'com_' . $this->componentData->name_code . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;
// set component folder path
$this->componentPath = $this->compilerPath . '/' . $this->componentFolderName;
// set the template path for custom
@ -364,9 +370,13 @@ class Structure extends Get
// make sure there is no old build
$this->removeFolder($this->componentPath);
// load the libraries files/folders and url's
$this->setLibaries();
$this->setLibraries();
// load the plugin files/folders and url's
$this->setPlugins();
// set the Joomla Version Data
$this->joomlaVersionData = $this->setJoomlaVersionData();
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
$this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->componentContext, &$this->joomlaVersionData));
// set the dashboard
$this->setDynamicDashboard();
// set the new folders
@ -406,16 +416,214 @@ class Structure extends Get
return '';
}
/**
* Build the Plugins files, folders, url's and config
*
* @return void
*
*/
private function setPlugins()
{
if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins))
{
// Trigger Event: jcb_ce_onBeforeSetPlugins
$this->triggerEvent('jcb_ce_onBeforeSetPlugins', array(&$this->componentContext, &$this->componentData->joomla_plugins));
foreach ($this->componentData->joomla_plugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin) && isset($plugin->folder_name)
&& ComponentbuilderHelper::checkString($plugin->folder_name))
{
// plugin path
$plugin->folder_path = $this->compilerPath . '/' . $plugin->folder_name;
// set the plugin paths
$this->dynamicPaths[$plugin->key] = $plugin->folder_path;
// make sure there is no old build
$this->removeFolder($plugin->folder_path);
// creat the main component folder
if (!JFolder::exists($plugin->folder_path))
{
JFolder::create($plugin->folder_path);
// count the folder created
$this->folderCount++;
$this->indexHTML($plugin->folder_name, $this->compilerPath);
}
// set main class file
$fileDetails = array('path' => $plugin->folder_path . '/' . $plugin->file_name . '.php',
'name' => $plugin->file_name . '.php', 'zip' => $plugin->file_name . '.php');
$this->writeFile($fileDetails['path'],
'<?php' . PHP_EOL . '// Plugin main class template' .
PHP_EOL . $this->hhh . 'BOM' . $this->hhh . PHP_EOL .
PHP_EOL . '// No direct access to this file' . PHP_EOL .
"defined('_JEXEC') or die('Restricted access');" . PHP_EOL .
$this->hhh . 'MAINCLASS' . $this->hhh);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
// set main xml file
$fileDetails = array('path' => $plugin->folder_path . '/' . $plugin->file_name . '.xml',
'name' => $plugin->file_name . '.xml', 'zip' => $plugin->file_name . '.xml');
$this->writeFile($fileDetails['path'], $this->getPluginXMLTemplate($plugin));
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
// set install script if needed
if ($plugin->add_install_script)
{
$fileDetails = array('path' => $plugin->folder_path . '/script.php',
'name' => 'script.php', 'zip' => 'script.php');
$this->writeFile($fileDetails['path'],
'<?php' . PHP_EOL . '// Script template' .
PHP_EOL . $this->hhh . 'BOM' . $this->hhh . PHP_EOL .
PHP_EOL . '// No direct access to this file' . PHP_EOL .
"defined('_JEXEC') or die('Restricted access');" . PHP_EOL .
$this->hhh . 'INSTALLCLASS' . $this->hhh);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
}
// set readme if found
if ($plugin->addreadme)
{
$fileDetails = array('path' => $plugin->folder_path . '/README.md',
'name' => 'README.md', 'zip' => 'README.md');
$this->writeFile($fileDetails['path'], $plugin->readme);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
}
// set SQL stuff if needed
if ($plugin->add_sql || $plugin->add_sql_uninstall)
{
// create SQL folder
if (!JFolder::exists($plugin->folder_path . '/sql'))
{
JFolder::create($plugin->folder_path . '/sql');
// count the folder created
$this->folderCount++;
$this->indexHTML($plugin->folder_name . '/sql', $this->compilerPath);
}
// create mysql folder
if (!JFolder::exists($plugin->folder_path . '/sql/mysql'))
{
JFolder::create($plugin->folder_path . '/sql/mysql');
// count the folder created
$this->folderCount++;
$this->indexHTML($plugin->folder_name . '/sql/mysql', $this->compilerPath);
}
// now set the install file
if ($plugin->add_sql)
{
$this->writeFile($plugin->folder_path . '/sql/mysql/install.sql', $plugin->sql);
// count the file created
$this->fileCount++;
}
// now set the uninstall file
if ($plugin->add_sql_uninstall)
{
$this->writeFile($plugin->folder_path . '/sql/mysql/uninstall.sql', $plugin->sql_uninstall);
// count the file created
$this->fileCount++;
}
}
// creat the language folder
if (!JFolder::exists($plugin->folder_path . '/language'))
{
JFolder::create($plugin->folder_path . '/language');
// count the folder created
$this->folderCount++;
// also the lang tag
if (!JFolder::exists($plugin->folder_path . '/language/' . $this->langTag))
{
JFolder::create($plugin->folder_path . '/language/' . $this->langTag);
// count the folder created
$this->folderCount++;
}
}
// check if this lib has files
if (isset($plugin->files) && ComponentbuilderHelper::checkArray($plugin->files))
{
// add to component files
foreach ($plugin->files as $file)
{
// set the path finder
$file['target_type'] = $plugin->target_type;
$file['target_id'] = $plugin->id;
$this->componentData->files[] = $file;
}
}
// check if this lib has folders
if (isset($plugin->folders) && ComponentbuilderHelper::checkArray($plugin->folders))
{
// add to component folders
foreach ($plugin->folders as $folder)
{
// set the path finder
$folder['target_type'] = $plugin->target_type;
$folder['target_id'] = $plugin->id;
$this->componentData->folders[] = $folder;
}
}
// check if this plugin has urls
if (isset($plugin->urls) && ComponentbuilderHelper::checkArray($plugin->urls))
{
// add to component urls
foreach ($plugin->urls as $n => &$url)
{
// should we add the local folder
if (isset($url['type']) && $url['type'] > 1 && isset($url['url'])
&& ComponentbuilderHelper::checkString($url['url']))
{
// set file name
$fileName = basename($url['url']);
// get the file contents
$data = ComponentbuilderHelper::getFileContents($url['url']);
// build sub path
if (strpos($fileName, '.js') !== false)
{
$path = '/js';
}
elseif (strpos($fileName, '.css') !== false)
{
$path = '/css';
}
else
{
$path = '';
}
// create sub media path if not set
if (!JFolder::exists($plugin->folder_path .$path))
{
JFolder::create($plugin->folder_path . $path);
// count the folder created
$this->folderCount++;
$this->indexHTML($plugin->folder_name . $path, $this->compilerPath);
}
// set the path to plugin file
$url['path'] = $plugin->folder_path . $path . '/' . $fileName; // we need this for later
// write data to path
$this->writeFile($url['path'], $data);
// count the file created
$this->fileCount++;
}
}
}
}
}
}
}
/**
* Build the Libraries files, folders, url's and config
*
* @return void
*
*/
private function setLibaries()
private function setLibraries()
{
if (ComponentbuilderHelper::checkArray($this->libraries))
{
// Trigger Event: jcb_ce_onBeforeSetLibraries
$this->triggerEvent('jcb_ce_onBeforeSetLibraries', array(&$this->componentContext, &$this->libraries));
// creat the main component folder
if (!JFolder::exists($this->componentPath))
{
@ -515,7 +723,7 @@ class Structure extends Get
// only add if local
if ($addLocalFolder)
{
// add folder to ml of media folders
// add folder to xml of media folders
$this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FOLDERS' . $this->hhh] .= PHP_EOL . $this->_t(2) . "<folder>" . $libFolder . "</folder>";
}
}
@ -774,7 +982,7 @@ class Structure extends Get
{
if (ComponentbuilderHelper::checkObject($this->joomlaVersionData->move->static))
{
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
$codeName = $this->componentCodeName;
// TODO needs more looking at this must be dynamic actualy
$this->notNew[] = 'PHPExcel.php';
$this->notNew[] = 'LICENSE.txt';
@ -824,9 +1032,19 @@ class Structure extends Get
{
continue;
}
// set destination path
$zipPath = str_replace('c0mp0n3nt/', '', $details->path);
$path = str_replace('c0mp0n3nt/', $this->componentPath . '/', $details->path);
// check if we have a target value
if (isset($details->_target))
{
// set destination path
$zipPath = str_replace($details->_target['type'] . '/', '', $details->path);
$path = str_replace($details->_target['type'] . '/', $this->dynamicPaths[$details->_target['key']] . '/', $details->path);
}
else
{
// set destination path
$zipPath = str_replace('c0mp0n3nt/', '', $details->path);
$path = str_replace('c0mp0n3nt/', $this->componentPath . '/', $details->path);
}
// set the template folder path
$templatePath = (isset($details->custom) && $details->custom) ? (($details->custom !== 'full') ? $this->templatePathCustom . '/' : '') : $this->templatePath . '/';
// set the final paths
@ -858,7 +1076,14 @@ class Structure extends Get
// store the new files
if (!in_array($ftem, $this->notNew))
{
$this->newFiles['static'][] = array('path' => $packageFullPath, 'name' => $new, 'zip' => $zipFullPath);
if (isset($details->_target))
{
$this->newFiles[$details->_target['key']][] = array('path' => $packageFullPath, 'name' => $new, 'zip' => $zipFullPath);
}
else
{
$this->newFiles['static'][] = array('path' => $packageFullPath, 'name' => $new, 'zip' => $zipFullPath);
}
}
// ensure we update this file if needed
if (isset($this->updateFileContent[$ftem]) && $this->updateFileContent[$ftem])
@ -885,40 +1110,59 @@ class Structure extends Get
$this->folderCount++;
}
}
// check if we should add the dynamic folder moving script to the installer script
$checker = array_values((array) explode('/', $zipFullPath));
// TODO <-- this may not be the best way, will keep an eye on this.
// We basicly only want to check if a folder is added that is not in the stdFolders array
if (isset($checker[0]) && ComponentbuilderHelper::checkString($checker[0]) && !in_array($checker[0], $this->stdFolders))
// only add if no target found since those belong to plugins and modules
if (!isset($details->_target))
{
// check if we should add the dynamic folder moving script to the installer script
if (!$this->setMoveFolders)
$checker = array_values((array) explode('/', $zipFullPath));
// TODO <-- this may not be the best way, will keep an eye on this.
// We basicly only want to check if a folder is added that is not in the stdFolders array
if (isset($checker[0]) && ComponentbuilderHelper::checkString($checker[0])
&& !in_array($checker[0], $this->stdFolders))
{
// add the setDynamicF0ld3rs() method to the install scipt.php file
$this->setMoveFolders = true;
// set message that this was done (will still add a tutorial link later)
$this->app->enqueueMessage(JText::_('<hr /><h3>Dynamic folder/s were detected.</h3>'), 'Notice');
$this->app->enqueueMessage(JText::sprintf('A method (setDynamicF0ld3rs) was added to the install <b>script.php</b> of this package to insure that the folder/s are copied into the correct place when this componet is installed!'), 'Notice');
// check if we should add the dynamic folder moving script to the installer script
if (!$this->setMoveFolders)
{
// add the setDynamicF0ld3rs() method to the install scipt.php file
$this->setMoveFolders = true;
// set message that this was done (will still add a tutorial link later)
$this->app->enqueueMessage(JText::_('<hr /><h3>Dynamic folder/s were detected.</h3>'), 'Notice');
$this->app->enqueueMessage(JText::sprintf('A method (setDynamicF0ld3rs) was added to the install <b>script.php</b> of this package to insure that the folder/s are copied into the correct place when this componet is installed!'), 'Notice');
}
}
}
elseif (count($checker) == 2 && ComponentbuilderHelper::checkString($checker[0]) && in_array($checker[0], $this->stdFolders))
{
// set the target
$eNAME = 'FILES';
$ename = 'filename';
if ($details->type === 'folder')
elseif (count($checker) == 2 && ComponentbuilderHelper::checkString($checker[0]))
{
$eNAME = 'FOLDERS';
$ename = 'folder';
$add_to_extra = false;
// set the target
$eNAME = 'FILES';
$ename = 'filename';
// this should not happen and must have been caught by the above if statment
if ($details->type === 'folder')
{
// only folders outside the standard folder are added
$eNAME = 'FOLDERS';
$ename = 'folder';
$add_to_extra = true;
}
// if this is a file, it can only be added to the admin/site/media folders
// all other folders are moved as a whole so their files do not need to be declared
elseif (in_array($checker[0], $this->stdFolders) && !in_array($checker[1], $this->stdRootFiles))
{
$add_to_extra = true;
}
// add if valid folder/file
if ($add_to_extra)
{
// set the tab
$eTab = $this->_t(2);
if ('admin' === $checker[0])
{
$eTab = $this->_t(3);
}
// set the xml file
$this->fileContentStatic[$this->hhh . 'EXSTRA_' . ComponentbuilderHelper::safeString($checker[0], 'U') . '_' . $eNAME . $this->hhh] .= PHP_EOL . $eTab . "<" . $ename . ">" . $checker[1] . "</" . $ename . ">";
}
}
// set the tab
$eTab = $this->_t(2);
if ('admin' === $checker[0])
{
$eTab = $this->_t(3);
}
// set the xml file
$this->fileContentStatic[$this->hhh . 'EXSTRA_' . ComponentbuilderHelper::safeString($checker[0], 'U') . '_' . $eNAME . $this->hhh] .= PHP_EOL . $eTab . "<" . $ename . ">" . $checker[1] . "</" . $ename . ">";
}
}
return true;
@ -1293,6 +1537,12 @@ class Structure extends Get
$pointer_tracker = 'h';
foreach ($this->componentData->folders as $custom)
{
// check type of target type
$_target_type = 'c0mp0n3nt';
if (isset($custom['target_type']))
{
$_target_type = $custom['target_type'];
}
// for good practice
ComponentbuilderHelper::fixPath($custom, array('path', 'folder', 'folderpath'));
// fix custom path
@ -1349,11 +1599,16 @@ class Structure extends Get
// set new folder to object
$versionData->move->static->{$key_pointer} = new stdClass();
$versionData->move->static->{$key_pointer}->naam = str_replace('//','/', $custom['folder']);
$versionData->move->static->{$key_pointer}->path = 'c0mp0n3nt/' . $custom['path'];
$versionData->move->static->{$key_pointer}->path = $_target_type. '/' . $custom['path'];
$versionData->move->static->{$key_pointer}->rename = $rename;
$versionData->move->static->{$key_pointer}->newName = $newname;
$versionData->move->static->{$key_pointer}->type = 'folder';
$versionData->move->static->{$key_pointer}->custom = $customPath;
// set the target if type and id is found
if (isset($custom['target_id']) && isset($custom['target_type']))
{
$versionData->move->static->{$key_pointer}->_target = array('key' => $custom['target_id'] . '_' . $custom['target_type'], 'type' => $custom['target_type']);
}
}
unset($this->componentData->folders);
unset($custom);
@ -1380,6 +1635,12 @@ class Structure extends Get
$pointer_tracker = 'h';
foreach ($this->componentData->files as $custom)
{
// check type of target type
$_target_type = 'c0mp0n3nt';
if (isset($custom['target_type']))
{
$_target_type = $custom['target_type'];
}
// for good practice
ComponentbuilderHelper::fixPath($custom, array('path', 'file', 'filepath'));
// by default custom path is true
@ -1398,7 +1659,7 @@ class Structure extends Get
// triget fullpath
$customPath = 'full';
}
// make we have not duplicates
// make sure we have not duplicates
$key_pointer = ComponentbuilderHelper::safeString($custom['file']) . '_g' . $pointer_tracker;
$pointer_tracker++;
// set new file to object
@ -1412,7 +1673,7 @@ class Structure extends Get
{
$pathInfo['dirname'] = trim($pathInfo['dirname'], '/');
// set the info
$versionData->move->static->{$key_pointer}->path = 'c0mp0n3nt/' . $pathInfo['dirname'];
$versionData->move->static->{$key_pointer}->path = $_target_type . '/' . $pathInfo['dirname'];
$versionData->move->static->{$key_pointer}->rename = 'new';
$versionData->move->static->{$key_pointer}->newName = $pathInfo['basename'];
}
@ -1423,7 +1684,7 @@ class Structure extends Get
// get file array
$fileArray = (array) explode('/', $custom['file']);
// set the info
$versionData->move->static->{$key_pointer}->path = 'c0mp0n3nt/' . $custom['path'];
$versionData->move->static->{$key_pointer}->path = $_target_type . '/' . $custom['path'];
$versionData->move->static->{$key_pointer}->rename = 'new';
$versionData->move->static->{$key_pointer}->newName = end($fileArray);
}
@ -1432,11 +1693,16 @@ class Structure extends Get
// fix custom path
$custom['path'] = ltrim($custom['path'], '/');
// set the info
$versionData->move->static->{$key_pointer}->path = 'c0mp0n3nt/' . $custom['path'];
$versionData->move->static->{$key_pointer}->path = $_target_type . '/' . $custom['path'];
$versionData->move->static->{$key_pointer}->rename = false;
}
$versionData->move->static->{$key_pointer}->type = 'file';
$versionData->move->static->{$key_pointer}->custom = $customPath;
// set the target if type and id is found
if (isset($custom['target_id']) && isset($custom['target_type']))
{
$versionData->move->static->{$key_pointer}->_target = array('key' => $custom['target_id'] . '_' . $custom['target_type'], 'type' => $custom['target_type']);
}
// check if file should be updated
if (!isset($custom['notnew']) || $custom['notnew'] == 0 || $custom['notnew'] != 1)
{
@ -1462,17 +1728,22 @@ class Structure extends Get
* @return void
*
*/
private function indexHTML($path)
private function indexHTML($path, $root = 'component')
{
if ('component' === $root)
{
$root = $this->componentPath;
}
// use path if exist
if (strlen($path) > 0)
{
JFile::copy($this->templatePath . '/index.html', $this->componentPath . '/' . $path . '/index.html');
JFile::copy($this->templatePath . '/index.html', $root . '/' . $path . '/index.html');
// count the file created
$this->fileCount++;
}
else
{
JFile::copy($this->templatePath . '/index.html', $this->componentPath . '/index.html');
JFile::copy($this->templatePath . '/index.html', $root . '/index.html');
// count the file created
$this->fileCount++;
}

View File

@ -380,42 +380,42 @@ class Fields extends Structure
$langView = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEW' . $this->hhh];
$langViews = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
// set default lang
$this->langContent[$this->lang][$langView] = $view['settings']->name_single;
$this->langContent[$this->lang][$langViews] = $view['settings']->name_list;
$this->setLangContent($this->lang, $langView, $view['settings']->name_single);
$this->setLangContent($this->lang, $langViews, $view['settings']->name_list);
// set global item strings
$this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED'] = "%s " . $view['settings']->name_list . " archived.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED_1'] = "%s " . $view['settings']->name_single . " archived.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_0'] = "No " . $view['settings']->name_single . " successfully checked in.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_1'] = "%d " . $view['settings']->name_single . " successfully checked in.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_MORE'] = "%d " . $view['settings']->name_list . " successfully checked in.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED'] = "%s " . $view['settings']->name_list . " deleted.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED_1'] = "%s " . $view['settings']->name_single . " deleted.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED'] = "%s " . $view['settings']->name_list . " featured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED_1'] = "%s " . $view['settings']->name_single . " featured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED'] = "%s " . $view['settings']->name_list . " published.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED_1'] = "%s " . $view['settings']->name_single . " published.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED'] = "%s " . $view['settings']->name_list . " trashed.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED_1'] = "%s " . $view['settings']->name_single . " trashed.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED'] = "%s " . $view['settings']->name_list . " unfeatured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED_1'] = "%s " . $view['settings']->name_single . " unfeatured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED'] = "%s " . $view['settings']->name_list . " unpublished.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED_1'] = "%s " . $view['settings']->name_single . " unpublished.";
$this->langContent[$this->lang][$langViews . '_BATCH_OPTIONS'] = "Batch process the selected " . $view['settings']->name_list;
$this->langContent[$this->lang][$langViews . '_BATCH_TIP'] = "All changes will be applied to all selected " . $view['settings']->name_list;
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED', "%s " . $view['settings']->name_list . " archived.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED_1', "%s " . $view['settings']->name_single . " archived.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_0', "No " . $view['settings']->name_single . " successfully checked in.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_1', "%d " . $view['settings']->name_single . " successfully checked in.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_MORE', "%d " . $view['settings']->name_list . " successfully checked in.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED', "%s " . $view['settings']->name_list . " deleted.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED_1', "%s " . $view['settings']->name_single . " deleted.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED', "%s " . $view['settings']->name_list . " featured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED_1', "%s " . $view['settings']->name_single . " featured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED', "%s " . $view['settings']->name_list . " published.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED_1', "%s " . $view['settings']->name_single . " published.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED', "%s " . $view['settings']->name_list . " trashed.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED_1', "%s " . $view['settings']->name_single . " trashed.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED', "%s " . $view['settings']->name_list . " unfeatured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED_1', "%s " . $view['settings']->name_single . " unfeatured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED', "%s " . $view['settings']->name_list . " unpublished.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED_1', "%s " . $view['settings']->name_single . " unpublished.");
$this->setLangContent($this->lang, $langViews . '_BATCH_OPTIONS', "Batch process the selected " . $view['settings']->name_list);
$this->setLangContent($this->lang, $langViews . '_BATCH_TIP', "All changes will be applied to all selected " . $view['settings']->name_list);
// set some basic defaults
$this->langContent[$this->lang][$langView . '_ERROR_UNIQUE_ALIAS'] = "Another " . $view['settings']->name_single . " has the same alias.";
$this->langContent[$this->lang][$langView . '_CREATED_DATE_LABEL'] = "Created Date";
$this->langContent[$this->lang][$langView . '_CREATED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was created.";
$this->langContent[$this->lang][$langView . '_MODIFIED_DATE_LABEL'] = "Modified Date";
$this->langContent[$this->lang][$langView . '_MODIFIED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was modified.";
$this->langContent[$this->lang][$langView . '_CREATED_BY_LABEL'] = "Created By";
$this->langContent[$this->lang][$langView . '_CREATED_BY_DESC'] = "The user that created this " . $view['settings']->name_single . ".";
$this->langContent[$this->lang][$langView . '_MODIFIED_BY_LABEL'] = "Modified By";
$this->langContent[$this->lang][$langView . '_MODIFIED_BY_DESC'] = "The last user that modified this " . $view['settings']->name_single . ".";
$this->langContent[$this->lang][$langView . '_ORDERING_LABEL'] = "Ordering";
$this->langContent[$this->lang][$langView . '_VERSION_LABEL'] = "Revision";
$this->langContent[$this->lang][$langView . '_VERSION_DESC'] = "A count of the number of times this " . $view['settings']->name_single . " has been revised.";
$this->langContent[$this->lang][$langView . '_SAVE_WARNING'] = "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias.";
$this->setLangContent($this->lang, $langView . '_ERROR_UNIQUE_ALIAS', "Another " . $view['settings']->name_single . " has the same alias.");
$this->setLangContent($this->lang, $langView . '_CREATED_DATE_LABEL', "Created Date");
$this->setLangContent($this->lang, $langView . '_CREATED_DATE_DESC', "The date this " . $view['settings']->name_single . " was created.");
$this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_LABEL', "Modified Date");
$this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_DESC', "The date this " . $view['settings']->name_single . " was modified.");
$this->setLangContent($this->lang, $langView . '_CREATED_BY_LABEL', "Created By");
$this->setLangContent($this->lang, $langView . '_CREATED_BY_DESC', "The user that created this " . $view['settings']->name_single . ".");
$this->setLangContent($this->lang, $langView . '_MODIFIED_BY_LABEL', "Modified By");
$this->setLangContent($this->lang, $langView . '_MODIFIED_BY_DESC', "The last user that modified this " . $view['settings']->name_single . ".");
$this->setLangContent($this->lang, $langView . '_ORDERING_LABEL', "Ordering");
$this->setLangContent($this->lang, $langView . '_VERSION_LABEL', "Revision");
$this->setLangContent($this->lang, $langView . '_VERSION_DESC', "A count of the number of times this " . $view['settings']->name_single . " has been revised.");
$this->setLangContent($this->lang, $langView . '_SAVE_WARNING', "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias.");
// check what type of field builder to use
if ($this->fieldBuilderType == 1)
{
@ -456,11 +456,15 @@ class Fields extends Structure
$dynamicFields = '';
// set the custom table key
$dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeBuildFields
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field)
{
$dynamicFields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
}
// Trigger Event: jcb_ce_onAfterBuildFields
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// set the default fields
$fieldSet = array();
$fieldSet[] = '<fieldset name="details">';
@ -724,11 +728,15 @@ class Fields extends Structure
$dynamicFieldsXML = array();
// set the custom table key
$dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeBuildFields
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field)
{
$dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
}
// Trigger Event: jcb_ce_onAfterBuildFields
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// set the default fields
$XML = new simpleXMLElement('<a/>');
$fieldSetXML = $XML->addChild('fieldset');
@ -1081,16 +1089,6 @@ class Fields extends Structure
$this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, false, $optionArray);
}
}
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'plain'))
{
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple);
}
// now add to the field set
$dynamicField = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'spacer'))
{
if ($build)
@ -1125,7 +1123,7 @@ class Fields extends Structure
$dynamicField = $this->setField('special', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
}
elseif (ComponentbuilderHelper::checkArray($fieldAttributes['custom']))
elseif (isset($fieldAttributes['custom']) && ComponentbuilderHelper::checkArray($fieldAttributes['custom']))
{
// set the custom array
$custom = $fieldAttributes['custom'];
@ -1142,6 +1140,16 @@ class Fields extends Structure
// now add to the field set
$dynamicField = $this->setField('custom', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray, $custom);
}
else
{
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple);
}
// now add to the field set
$dynamicField = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
}
}
return $dynamicField;
@ -1206,7 +1214,7 @@ class Fields extends Structure
if ($setType === 'option')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<field";
$optionSet = '';
foreach ($fieldAttributes as $property => $value)
@ -1218,7 +1226,102 @@ class Fields extends Structure
elseif ($property === 'option')
{
$optionSet = '';
if (strpos($value, ',') !== false)
if (strtolower($typeName) === 'groupedlist' && strpos($value, ',') !== false && strpos($value, '@@') !== false)
{
// reset the group temp arrays
$groups_ = array();
$grouped_ = array('group' => array(), 'option' => array());
$order_ = array();
// mulitpal options
$options = explode(',', $value);
foreach ($options as $option)
{
if (strpos($option, '@@') !== false)
{
// set the group label
$valueKeyArray = explode('@@', $option);
if (count((array) $valueKeyArray) == 2)
{
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($valueKeyArray[0], true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $valueKeyArray[0]);
// now add group label
$groups_[$valueKeyArray[1]] = PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '<group label="' . $langValue . '">';
// set order
$order_['group' . $valueKeyArray[1]] = $valueKeyArray[1];
}
}
elseif (strpos($option, '|') !== false)
{
// has other value then text
$valueKeyArray = explode('|', $option);
if (count((array) $valueKeyArray) == 3)
{
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($valueKeyArray[1], true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $valueKeyArray[1]);
// now add to option set
$grouped_['group'][$valueKeyArray[2]][] = PHP_EOL . $this->_t(1) . $taber . $this->_t(3) . '<option value="' . $valueKeyArray[0] . '">' . PHP_EOL . $this->_t(1) . $taber . $this->_t(4) . $langValue . '</option>';
$optionArray[$valueKeyArray[0]] = $langValue;
// set order
$order_['group' . $valueKeyArray[2]] = $valueKeyArray[2];
}
else
{
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($valueKeyArray[1], true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $valueKeyArray[1]);
// now add to option set
$grouped_['option'][$valueKeyArray[0]] = PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '<option value="' . $valueKeyArray[0] . '">' . PHP_EOL . $this->_t(1) . $taber . $this->_t(3) . $langValue . '</option>';
$optionArray[$valueKeyArray[0]] = $langValue;
// set order
$order_['option' . $valueKeyArray[0]] = $valueKeyArray[0];
}
}
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $option);
// now add to option set
$grouped_['option'][$option] = PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '<option value="' . $option . '">' . PHP_EOL . $this->_t(1) . $taber . $this->_t(3) . $langValue . '</option>';
$optionArray[$option] = $langValue;
// set order
$order_['option' . $option] = $option;
}
}
// now build the groups
foreach ($order_ as $pointer_ => $_id)
{
// load the default key
$key_ = 'group';
if (strpos($pointer_, 'option') !== false)
{
// load the option field
$key_ = 'option';
}
// check if this is a group loader
if ('group' === $key_ && isset($groups_[$_id]) && isset($grouped_[$key_][$_id]) && ComponentbuilderHelper::checkArray($grouped_[$key_][$_id]))
{
// set group label
$optionSet .= $groups_[$_id];
foreach ($grouped_[$key_][$_id] as $option_)
{
$optionSet .= $option_;
}
unset($groups_[$_id]);
unset($grouped_[$key_][$_id]);
// close the group
$optionSet .= PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '</group>';
}
elseif (isset($grouped_[$key_][$_id]) && ComponentbuilderHelper::checkString($grouped_[$key_][$_id]))
{
$optionSet .= $grouped_[$key_][$_id];
}
}
}
elseif (strpos($value, ',') !== false)
{
// mulitpal options
$options = explode(',', $value);
@ -1228,20 +1331,20 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $option);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
// no add to option set
$this->setLangContent($this->lang, $langValue, $t);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(1) . $taber . $this->_t(3) . $langValue . '</option>';
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $option;
// no add to option set
$this->setLangContent($this->lang, $langValue, $option);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $option . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
$optionArray[$option] = $langValue;
}
@ -1254,20 +1357,20 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $value);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
// no add to option set
$this->setLangContent($this->lang, $langValue, $t);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $value;
// no add to option set
$this->setLangContent($this->lang, $langValue, $value);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $value . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
$optionArray[$value] = $langValue;
}
@ -1298,7 +1401,7 @@ class Fields extends Structure
elseif ($setType === 'plain')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
foreach ($fieldAttributes as $property => $value)
{
@ -1312,7 +1415,7 @@ class Fields extends Structure
elseif ($setType === 'spacer')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<field";
foreach ($fieldAttributes as $property => $value)
{
@ -1329,7 +1432,7 @@ class Fields extends Structure
if ($typeName === 'repeatable')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<field";
$fieldsSet = array();
foreach ($fieldAttributes as $property => $value)
@ -1391,12 +1494,7 @@ class Fields extends Structure
// now add to the field set
$field .= $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
$field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
elseif (isset($r_fieldValues['custom']) && ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
{
// add to custom
$custom = $r_fieldValues['custom'];
@ -1404,9 +1502,9 @@ class Fields extends Structure
// now add to the field set
$field .= $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1417,6 +1515,11 @@ class Fields extends Structure
// set the custom field file
$this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
}
else
{
// now add to the field set
$field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
}
}
}
@ -1429,7 +1532,7 @@ class Fields extends Structure
elseif ($typeName === 'subform')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
$fieldsSet = array();
foreach ($fieldAttributes as $property => $value)
@ -1490,11 +1593,6 @@ class Fields extends Structure
// now add to the field set
$field .= $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
$field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
elseif ($r_typeName === 'subform')
{
// set nested depth
@ -1513,7 +1611,7 @@ class Fields extends Structure
$field .= $this->setField('special', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
}
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
elseif (isset($r_fieldValues['custom']) && ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
{
// add to custom
$custom = $r_fieldValues['custom'];
@ -1521,9 +1619,9 @@ class Fields extends Structure
// now add to the field set
$field .= $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1534,6 +1632,11 @@ class Fields extends Structure
// set the custom field file
$this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
}
else
{
// now add to the field set
$field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
}
}
}
@ -1545,7 +1648,7 @@ class Fields extends Structure
elseif ($setType === 'custom')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
foreach ($fieldAttributes as $property => $value)
{
@ -1594,7 +1697,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
foreach ($fieldAttributes as $property => $value)
{
@ -1605,7 +1708,106 @@ class Fields extends Structure
elseif ($property === 'option')
{
ComponentbuilderHelper::xmlComment($field->fieldXML, $this->setLine(__LINE__) . " Option Set.");
if (strpos($value, ',') !== false)
if (strtolower($typeName) === 'groupedlist' && strpos($value, ',') !== false && strpos($value, '@@') !== false)
{
// reset the group temp arrays
$groups_ = array();
$grouped_ = array('group' => array(), 'option' => array());
$order_ = array();
// mulitpal options
$options = explode(',', $value);
foreach ($options as $option)
{
if (strpos($option, '@@') !== false)
{
// set the group label
$valueKeyArray = explode('@@', $option);
if (count((array) $valueKeyArray) == 2)
{
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($valueKeyArray[0], true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $valueKeyArray[0]);
// now add group label
$groups_[$valueKeyArray[1]] = $langValue;
// set order
$order_['group' . $valueKeyArray[1]] = $valueKeyArray[1];
}
}
elseif (strpos($option, '|') !== false)
{
// has other value then text
$valueKeyArray = explode('|', $option);
if (count((array) $valueKeyArray) == 3)
{
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($valueKeyArray[1], true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $valueKeyArray[1]);
// now add to option set
$grouped_['group'][$valueKeyArray[2]][] = array('value' => $valueKeyArray[0], 'text' => $langValue);
$optionArray[$valueKeyArray[0]] = $langValue;
// set order
$order_['group' . $valueKeyArray[2]] = $valueKeyArray[2];
}
else
{
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($valueKeyArray[1], true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $valueKeyArray[1]);
// now add to option set
$grouped_['option'][$valueKeyArray[0]] = array('value' => $valueKeyArray[0], 'text' => $langValue);
$optionArray[$valueKeyArray[0]] = $langValue;
// set order
$order_['option' . $valueKeyArray[0]] = $valueKeyArray[0];
}
}
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $option);
// now add to option set
$grouped_['option'][$option] = array('value' => $valueKeyArray[0], 'text' => $langValue);
$optionArray[$option] = $langValue;
// set order
$order_['option' . $option] = $option;
}
}
// now build the groups
foreach ($order_ as $pointer_ => $_id)
{
// load the default key
$key_ = 'group';
if (strpos($pointer_, 'option') !== false)
{
// load the option field
$key_ = 'option';
}
// check if this is a group loader
if ('group' === $key_ && isset($groups_[$_id]) && isset($grouped_[$key_][$_id]) && ComponentbuilderHelper::checkArray($grouped_[$key_][$_id]))
{
// set group label
$groupXML = $field->fieldXML->addChild('group');
$groupXML->addAttribute('label', $groups_[$_id]);
foreach ($grouped_[$key_][$_id] as $option_)
{
$groupOptionXML = $groupXML->fieldXML->addChild('option');
$groupOptionXML->addAttribute('value', $option_['value']);
$groupOptionXML[] = $option_['text'];
}
unset($groups_[$_id]);
unset($grouped_[$key_][$_id]);
}
elseif (isset($grouped_[$key_][$_id]) && ComponentbuilderHelper::checkString($grouped_[$key_][$_id]))
{
$optionXML = $field->fieldXML->addChild('option');
$optionXML->addAttribute('value', $grouped_[$key_][$_id]['value']);
$optionXML[] = $grouped_[$key_][$_id]['text'];
}
}
}
elseif (strpos($value, ',') !== false)
{
// mulitpal options
$options = explode(',', $value);
@ -1616,20 +1818,20 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $option);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
// no add to option set
$this->setLangContent($this->lang, $langValue, $t);
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $option;
// no add to option set
$this->setLangContent($this->lang, $langValue, $option);
// now add to option set
$optionXML->addAttribute('value', $option);
$optionArray[$option] = $langValue;
}
@ -1644,20 +1846,20 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $value);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
// no add to option set
$this->setLangContent($this->lang, $langValue, $t);
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $value;
// no add to option set
$this->setLangContent($this->lang, $langValue, $value);
// now add to option set
$optionXML->addAttribute('value', $value);
$optionArray[$value] = $langValue;
}
@ -1675,7 +1877,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
foreach ($fieldAttributes as $property => $value)
{
@ -1689,7 +1891,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)";
foreach ($fieldAttributes as $property => $value)
{
@ -1706,7 +1908,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)";
foreach ($fieldAttributes as $property => $value)
{
@ -1770,12 +1972,7 @@ class Fields extends Structure
// now add to the field set
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
elseif (isset($r_fieldValues['custom']) && ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
{
// add to custom
$custom = $r_fieldValues['custom'];
@ -1783,9 +1980,9 @@ class Fields extends Structure
// now add to the field set
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1796,6 +1993,11 @@ class Fields extends Structure
// set the custom field file
$this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
}
else
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
}
}
}
@ -1806,7 +2008,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
// add all properties
foreach ($fieldAttributes as $property => $value)
{
@ -1878,11 +2080,6 @@ class Fields extends Structure
// now add to the field set
ComponentbuilderHelper::xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif ($r_typeName === 'subform')
{
// set nested depth
@ -1902,7 +2099,7 @@ class Fields extends Structure
}
}
elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
elseif (isset($r_fieldValues['custom']) && ComponentbuilderHelper::checkArray($r_fieldValues['custom']))
{
// add to custom
$custom = $r_fieldValues['custom'];
@ -1910,9 +2107,9 @@ class Fields extends Structure
// now add to the field set
ComponentbuilderHelper::xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1923,6 +2120,11 @@ class Fields extends Structure
// set the custom field file
$this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
}
else
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
}
}
}
@ -1934,7 +2136,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)";
foreach ($fieldAttributes as $property => $value)
{
if ($property != 'option')
@ -2005,7 +2207,7 @@ class Fields extends Structure
{
$this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name;
}
// check if publishing fields were over written
// check if default fields were over written
if (in_array($name, $this->defaultFields))
{
// just to eliminate
@ -2047,7 +2249,7 @@ class Fields extends Structure
{
$this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name;
}
// check if publishing fields were over written
// check if default fields were over written
if (in_array($name, $this->defaultFields))
{
// just to eliminate
@ -2249,14 +2451,14 @@ class Fields extends Structure
}
elseif ($property['name'] === 'button' && $setCustom)
{
// dont load the button to repeatable
// load the button string value if found
$xmlValue = (string) ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'button="', '"'));
// add to custom values
$fieldAttributes['custom']['add_button'] = (ComponentbuilderHelper::checkString($xmlValue) || 1 == $xmlValue) ? $xmlValue : 'false';
}
elseif ($property['name'] === 'required' && $repeatable)
elseif ($property['name'] === 'required' && 'repeatable' === $typeName)
{
// dont load the required to repeatable
// dont load the required to repeatable field type
$xmlValue = 'false';
}
elseif ($viewType == 2 && ($property['name'] === 'readonly' || $property['name'] === 'disabled'))
@ -2320,9 +2522,9 @@ class Fields extends Structure
$customLabel = $xmlValue;
}
// set lang key
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($name . ' ' . $property['name'], 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($name . ' ' . $property['name'], true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $xmlValue;
$this->setLangContent($this->lang, $langValue, $xmlValue);
// use lang value
$xmlValue = $langValue;
}
@ -2552,16 +2754,16 @@ class Fields extends Structure
$tempName = $view_name_single . ' category';
}
// set lang
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($tempName, 'U');
$listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($tempName, true);
// add to lang array
$this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($tempName, 'W');
$this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($tempName, 'W'));
}
else
{
// set lang (just incase)
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U');
$listLangName = $langView . '_' .ComponentbuilderHelper::safeFieldName($name, true);
// add to lang array
$this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($name, 'W');
$this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($langLabel))
{
@ -2702,6 +2904,11 @@ class Fields extends Structure
}
// get the xml extension name
$_extension = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'extension="', '"'), $this->placeholders);
// if they left out the extention for some reason
if (!ComponentbuilderHelper::checkString($_extension))
{
$_extension = 'com_' . $this->componentCodeName . '.' . $otherView;
}
// load the category builder
$this->categoryBuilder[$view_name_list] = array('code' => $name, 'name' => $listLangName, 'extension' => $_extension);
// also set code name for title alias fix
@ -2849,6 +3056,22 @@ class Fields extends Structure
// make sure it is not already been build or if it is prime
if (isset($data['custom']) && isset($data['custom']['extends']) && ((isset($data['custom']['prime_php']) && $data['custom']['prime_php'] == 1) || !isset($this->fileContentDynamic['customfield_' . $data['type']]) || !ComponentbuilderHelper::checkArray($this->fileContentDynamic['customfield_' . $data['type']])))
{
// set J prefix
$jprefix = 'J';
// check if this field has a dot in field type name
if (strpos($data['type'], '.') !== false)
{
// so we have name spacing in custom field type name
$dotTypeArray = explode('.', $data['type']);
// set the J prefix
if (count($dotTypeArray) > 1)
{
$jprefix = strtoupper(array_shift($dotTypeArray));
}
// update the type name now
$data['type'] = implode('', $dotTypeArray);
$data['custom']['type'] = $data['type'];
}
// set tab and break replacements
$tabBreak = array(
'\t' => $this->_t(1),
@ -2856,6 +3079,7 @@ class Fields extends Structure
);
// set the [[[PLACEHOLDER]]] options
$replace = array(
$this->bbb . 'JPREFIX' . $this->ddd => $jprefix,
$this->bbb . 'TABLE' . $this->ddd => $data['custom']['table'],
$this->bbb . 'ID' . $this->ddd => $data['custom']['id'],
$this->bbb . 'TEXT' . $this->ddd => $data['custom']['text'],
@ -2863,9 +3087,9 @@ class Fields extends Structure
$this->bbb . 'CODE' . $this->ddd => $data['code'],
$this->bbb . 'view_type' . $this->ddd => $view_name_single . '_' . $data['type'],
$this->bbb . 'type' . $this->ddd => $data['type'],
$this->bbb . 'com_component' . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString($data['custom']['component'])) ? ComponentbuilderHelper::safeString($data['custom']['component']) : 'com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh],
$this->bbb . 'com_component' . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString($data['custom']['component'])) ? ComponentbuilderHelper::safeString($data['custom']['component']) : 'com_' . $this->componentCodeName,
// set the generic values
$this->bbb . 'component' . $this->ddd => $this->fileContentStatic[$this->hhh . 'component' . $this->hhh],
$this->bbb . 'component' . $this->ddd => $this->componentCodeName,
$this->bbb . 'Component' . $this->ddd => $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh],
$this->bbb . 'view' . $this->ddd => (isset($data['custom']['view']) && ComponentbuilderHelper::checkString($data['custom']['view'])) ? ComponentbuilderHelper::safeString($data['custom']['view']) : $view_name_single,
$this->bbb . 'views' . $this->ddd => (isset($data['custom']['views']) && ComponentbuilderHelper::checkString($data['custom']['views'])) ? ComponentbuilderHelper::safeString($data['custom']['views']) : $view_name_list
@ -2888,6 +3112,8 @@ class Fields extends Structure
}
// start loading the field type
$this->fileContentDynamic['customfield_' . $data['type']] = array();
// JPREFIX <<DYNAMIC>>>
$this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'JPREFIX' . $this->hhh] = $jprefix;
// Type <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'Type' . $this->hhh] = ComponentbuilderHelper::safeString($data['custom']['type'], 'F');
// type <<<DYNAMIC>>>
@ -2996,9 +3222,9 @@ class Fields extends Structure
// temp holder for name
$tempName = $data['custom']['label'] . ' Group';
// set lang
$groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tempName, 'U');
$groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeFieldName($tempName, true);
// add to lang array
$this->langContent[$this->lang][$groupLangName] = ComponentbuilderHelper::safeString($tempName, 'W');
$this->setLangContent($this->lang, $groupLangName, ComponentbuilderHelper::safeString($tempName, 'W'));
// build the Group Control
$this->setGroupControl[$data['type']] = $groupLangName;
// JFORM_GETGROUPS_PHP <<<DYNAMIC>>>
@ -3033,7 +3259,7 @@ class Fields extends Structure
ComponentbuilderHelper::checkString($fieldData['view']) && ComponentbuilderHelper::checkString($fieldData['views']))
{
// set local component
$local_component = "com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh];
$local_component = "com_" . $this->componentCodeName;
// check that the component value is set
if (!isset($fieldData['component']) || !ComponentbuilderHelper::checkString($fieldData['component']))
{
@ -3049,6 +3275,10 @@ class Fields extends Structure
{
$fieldData['component'] = $this->setPlaceholders($fieldData['component'], $this->placeholders);
}
// get core permissions
$coreLoad = false;
// add ref tags
$refLoad = true;
// fall back on the field component
$component = $fieldData['component'];
// check if we should add ref tags (since it only works well on local views)
@ -3057,10 +3287,7 @@ class Fields extends Structure
// do not add ref tags
$refLoad = false;
}
// get core permissions
$coreLoad = false;
// add ref tags
$refLoad = true;
// get core permisssions
if (isset($this->permissionCore[$fieldData['view']]))
{
// get the core permission naming array
@ -3080,15 +3307,15 @@ class Fields extends Structure
$addButton[] = $this->_t(1) . "protected function getInput()";
$addButton[] = $this->_t(1) . "{";
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " see if we should add buttons";
$addButton[] = $this->_t(2) . "\$setButton = \$this->getAttribute('button');";
$addButton[] = $this->_t(2) . "\$set_button = \$this->getAttribute('button');";
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " get html";
$addButton[] = $this->_t(2) . "\$html = parent::getInput();";
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " if true set button";
$addButton[] = $this->_t(2) . "if (\$setButton === 'true')";
$addButton[] = $this->_t(2) . "if (\$set_button === 'true')";
$addButton[] = $this->_t(2) . "{";
$addButton[] = $this->_t(3) . "\$button = array();";
$addButton[] = $this->_t(3) . "\$script = array();";
$addButton[] = $this->_t(3) . "\$buttonName = \$this->getAttribute('name');";
$addButton[] = $this->_t(3) . "\$button_code_name = \$this->getAttribute('name');";
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the input from url";
$addButton[] = $this->_t(3) . "\$app = JFactory::getApplication();";
$addButton[] = $this->_t(3) . "\$jinput = \$app->input;";
@ -3130,6 +3357,13 @@ class Fields extends Structure
$addButton[] = $this->_t(4) . "\$refJ = '&return=' . \$_return;";
$addButton[] = $this->_t(3) . "}";
}
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get button label";
$addButton[] = $this->_t(3) . "\$button_label = trim(\$button_code_name);";
$addButton[] = $this->_t(3) . "\$button_label = preg_replace('/_+/', ' ', \$button_label);";
$addButton[] = $this->_t(3) . "\$button_label = preg_replace('/\s+/', ' ', \$button_label);";
$addButton[] = $this->_t(3) . "\$button_label = preg_replace(\"/[^A-Za-z ]/\", '', \$button_label);";
$addButton[] = $this->_t(3) . "\$button_label = ucfirst(strtolower(\$button_label));";
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get user object";
$addButton[] = $this->_t(3) . "\$user = JFactory::getUser();";
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions.
@ -3143,12 +3377,7 @@ class Fields extends Structure
}
$addButton[] = $this->_t(3) . "{";
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build Create button";
$addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$button_code_name.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$button_label).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = $this->_t(5) . "href=\"index.php?option=" . $fieldData['component'] . "&amp;view=" . $fieldData['view'] . "&amp;layout=edit'.\$ref.'\" >";
$addButton[] = $this->_t(5) . "<span class=\"icon-new icon-white\"></span></a>';";
$addButton[] = $this->_t(3) . "}";
@ -3156,45 +3385,40 @@ class Fields extends Structure
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.edit']]))
{
$addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
$addButton[] = $this->_t(3) . "if (\$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
$addButton[] = $this->_t(3) . "if (\$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = $this->_t(3) . "{";
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build edit button";
$addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$button_code_name.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$button_label).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = $this->_t(5) . "<span class=\"icon-edit\"></span></a>';";
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build script";
$addButton[] = $this->_t(4) . "\$script[] = \"";
$addButton[] = $this->_t(5) . "jQuery(document).ready(function() {";
$addButton[] = $this->_t(6) . "jQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {";
$addButton[] = $this->_t(6) . "jQuery('#adminForm').on('change', '#jform_\".\$button_code_name.\"',function (e) {";
$addButton[] = $this->_t(7) . "e.preventDefault();";
$addButton[] = $this->_t(7) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = $this->_t(7) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = $this->_t(7) . "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();";
$addButton[] = $this->_t(7) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = $this->_t(6) . "});";
$addButton[] = $this->_t(6) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = $this->_t(6) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = $this->_t(6) . "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();";
$addButton[] = $this->_t(6) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = $this->_t(5) . "});";
$addButton[] = $this->_t(5) . "function \".\$buttonName.\"Button(value) {";
$addButton[] = $this->_t(5) . "function \".\$button_code_name.\"Button(value) {";
$addButton[] = $this->_t(6) . "if (value > 0) {"; // TODO not ideal since value may not be an (int)
$addButton[] = $this->_t(7) . "// hide the create button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').hide();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Create').hide();";
$addButton[] = $this->_t(7) . "// show edit button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').show();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').show();";
$addButton[] = $this->_t(7) . "var url = 'index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['views'] . "&task=" . $fieldData['view'] . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').attr('href', url);";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').attr('href', url);";
$addButton[] = $this->_t(6) . "} else {";
$addButton[] = $this->_t(7) . "// show the create button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').show();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Create').show();";
$addButton[] = $this->_t(7) . "// hide edit button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').hide();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').hide();";
$addButton[] = $this->_t(6) . "}";
$addButton[] = $this->_t(5) . "}\";";
$addButton[] = $this->_t(3) . "}";

File diff suppressed because it is too large Load Diff

View File

@ -68,6 +68,9 @@ class Infusion extends Interpretation
{
if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views))
{
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
$this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
// COMPONENT
$this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
@ -231,6 +234,9 @@ class Infusion extends Interpretation
// set the target
$this->target = 'admin';
$this->lang = 'admin';
// reset
$viewName_single = '';
$viewName_list = '';
// set single view
if (isset($view['settings']->name_single))
@ -269,8 +275,11 @@ class Infusion extends Interpretation
$this->setLockLicensePer($viewName_single, $this->target);
$this->setLockLicensePer($viewName_list, $this->target);
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
// FIELDSETS <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->fileContentStatic[$this->hhh . 'component' . $this->hhh], $viewName_single, $viewName_list);
$this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->componentCodeName, $viewName_single, $viewName_list);
// ACCESSCONTROL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'ACCESSCONTROL' . $this->hhh] = $this->setFieldSetAccessControl($viewName_single);
@ -367,6 +376,12 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$viewName_single][$this->hhh . 'SITE_MENU_XML' . $this->hhh] = $this->setAdminViewMenu($viewName_single, $view);
}
}
// TABLAYOUTFIELDSARRAY <<<DYNAMIC>>> add the tab layout fields array to the model
$this->fileContentDynamic[$viewName_single][$this->hhh . 'TABLAYOUTFIELDSARRAY' . $this->hhh] = $this->getTabLayoutFieldsArray($viewName_single);
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
}
// set the views names
if (isset($view['settings']->name_list) && $view['settings']->name_list != 'null')
@ -376,6 +391,9 @@ class Infusion extends Interpretation
// ICOMOON <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
// set the export/import option
if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import)
{
@ -396,7 +414,7 @@ class Infusion extends Interpretation
if (isset($view['checkin']) && $view['checkin'] == 1)
{
// AUTOCHECKIN <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = $this->setAutoCheckin($viewName_single, $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]);
$this->fileContentDynamic[$viewName_list][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = $this->setAutoCheckin($viewName_single, $this->componentCodeName);
// CHECKINCALL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'CHECKINCALL' . $this->hhh] = $this->setCheckinCall();
}
@ -505,6 +523,9 @@ class Infusion extends Interpretation
{
$this->fileContentDynamic[$viewName_list][$this->hhh . 'VIEWS_FOOTER_SCRIPT' . $this->hhh] = '';
}
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
}
// set u fields used in batch
@ -527,9 +548,16 @@ class Infusion extends Interpretation
// BATCH_ONCLICK_CANCEL_SCRIPT <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh] = ''; // TODO <-- must still be build
// JCONTROLLERFORM_ALLOWADD <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWADD' . $this->hhh] = $this->setJcontrollerAllowAdd($viewName_single, $viewName_list);
// JCONTROLLERFORM_BEFORECANCEL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_before_cancel', $viewName_single, PHP_EOL, null, null, '');
// JCONTROLLERFORM_AFTERCANCEL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_AFTERCANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_after_cancel', $viewName_single, PHP_EOL, null, null, '');
// JCONTROLLERFORM_ALLOWEDIT <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh] = $this->setJcontrollerAllowEdit($viewName_single, $viewName_list);
@ -578,6 +606,9 @@ class Infusion extends Interpretation
}
// HELPER_EXEL
$this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods();
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
}
// setup custom_admin_views and all needed stuff for the site
@ -585,7 +616,6 @@ class Infusion extends Interpretation
{
$this->target = 'custom_admin';
$this->lang = 'admin';
// var_dump($this->componentData->custom_admin_views);exit;
// start dynamic build
foreach ($this->componentData->custom_admin_views as $view)
{
@ -598,14 +628,8 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'sviews' . $this->hhh] = $view['settings']->code;
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SVIEWS' . $this->hhh] = $view['settings']->CODE;
// add to lang array
if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE]))
{
$this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name;
}
if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC']))
{
$this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description;
}
$this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name);
$this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description);
// ICOMOON <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
@ -623,6 +647,9 @@ class Infusion extends Interpretation
$this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code;
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
// set license per view if needed
$this->setLockLicensePer($view['settings']->code, $this->target);
@ -673,6 +700,9 @@ class Infusion extends Interpretation
// setup the templates
$this->setCustomViewTemplateBody($view);
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
$this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
}
// setup the layouts
@ -713,22 +743,22 @@ class Infusion extends Interpretation
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
{
// DASHBOARDVIEW
$this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW' . $this->hhh] = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh];
$this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW' . $this->hhh] = $this->componentCodeName;
// DASHBOARDICONS
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASHBOARDICONS' . $this->hhh] = $this->setDashboardIcons();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASHBOARDICONS' . $this->hhh] = $this->setDashboardIcons();
// DASHBOARDICONACCESS
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASHBOARDICONACCESS' . $this->hhh] = $this->setDashboardIconAccess();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASHBOARDICONACCESS' . $this->hhh] = $this->setDashboardIconAccess();
// DASH_MODEL_METHODS
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_MODEL_METHODS' . $this->hhh] = $this->setDashboardModelMethods();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_MODEL_METHODS' . $this->hhh] = $this->setDashboardModelMethods();
// DASH_GET_CUSTOM_DATA
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_GET_CUSTOM_DATA' . $this->hhh] = $this->setDashboardGetCustomData();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_GET_CUSTOM_DATA' . $this->hhh] = $this->setDashboardGetCustomData();
// DASH_DISPLAY_DATA
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_DISPLAY_DATA' . $this->hhh] = $this->setDashboardDisplayData();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_DISPLAY_DATA' . $this->hhh] = $this->setDashboardDisplayData();
}
else
{
@ -814,7 +844,6 @@ class Infusion extends Interpretation
if (isset($this->componentData->site_views) && ComponentbuilderHelper::checkArray($this->componentData->site_views))
{
$this->target = 'site';
// var_dump($this->componentData->site_views);exit;
// start dynamic build
foreach ($this->componentData->site_views as $view)
{
@ -839,6 +868,9 @@ class Infusion extends Interpretation
$this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code;
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
// set license per view if needed
$this->setLockLicensePer($view['settings']->code, $this->target);
@ -891,14 +923,8 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_AFTER_GET_ITEMS' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
}
// add to lang array
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE]))
{
$this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name;
}
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC']))
{
$this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description;
}
$this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name);
$this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description);
// SITE_CUSTOM_METHODS <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] = $this->setCustomViewCustomItemMethods($view['settings']->main_get, $view['settings']->code);
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] .= $this->setCustomViewCustomMethods($view, $view['settings']->code);
@ -919,6 +945,9 @@ class Infusion extends Interpretation
// set the site form if needed
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_TOP_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 1);
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BOTTOM_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 2);
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
$this->triggerEvent('jcb_ce_onAfterBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
}
// setup the layouts
$this->setCustomViewLayouts();
@ -1002,6 +1031,31 @@ class Infusion extends Interpretation
{
$this->fileContentStatic[$this->hhh . 'README' . $this->hhh] = $this->componentData->readme;
}
// infuze plugin data if set
if (ComponentbuilderHelper::checkArray($this->componentData->joomla_plugins))
{
foreach ($this->componentData->joomla_plugins as $plugin)
{
if (ComponentbuilderHelper::checkObject($plugin))
{
// MAINCLASS
$this->fileContentDynamic[$plugin->key][$this->hhh . 'MAINCLASS' . $this->hhh] = $this->getPluginMainClass($plugin);
// only add install script if needed
if ($plugin->add_install_script)
{
// INSTALLCLASS
$this->fileContentDynamic[$plugin->key][$this->hhh . 'INSTALLCLASS' . $this->hhh] = $this->getPluginInstallClass($plugin);
}
// MAINXML
$this->fileContentDynamic[$plugin->key][$this->hhh . 'MAINXML' . $this->hhh] = $this->getPluginMainXML($plugin);
}
}
}
// Trigger Event: jcb_ce_onAfterBuildFilesContent
$this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
return true;
}
return false;
@ -1129,6 +1183,9 @@ class Infusion extends Interpretation
// now we insert the values into the files
if (ComponentbuilderHelper::checkArray($this->languages))
{
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
$this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->componentContext, &$this->languages, &$this->langTag));
// rest xml array
$langXML = array();
foreach ($this->languages as $tag => $areas)
{
@ -1203,7 +1260,7 @@ class Infusion extends Interpretation
$langXML[$p][] = '<language tag="' . $tag . '">language/' . $tag . '/' . $fileName . '</language>';
}
}
// load the lang xml
// load the lang xml
if (ComponentbuilderHelper::checkArray($langXML))
{
$replace = array();
@ -1216,7 +1273,7 @@ class Infusion extends Interpretation
$replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh] = implode(PHP_EOL . $this->_t(2), $langXML['site']);
}
// build xml path
$xmlPath = $this->componentPath . '/' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.xml';
$xmlPath = $this->componentPath . '/' . $this->componentCodeName . '.xml';
// get the content in xml
$componentXML = ComponentbuilderHelper::getFileContents($xmlPath);
// update the xml content

View File

@ -70,6 +70,12 @@ abstract class ComponentbuilderHelper
public static $jcbGithubPackagesUrl = "https://api.github.com/repos/vdm-io/JCB-Community-Packages/git/trees/master";
public static $jcbGithubPackageUrl = "https://github.com/vdm-io/JCB-Community-Packages/raw/master/";
/**
* The bolerplate paths
**/
public static $bolerplatePath = 'https://raw.githubusercontent.com/vdm-io/boilerplate/jcb/';
public static $bolerplateAPI = 'https://api.github.com/repos/vdm-io/boilerplate/git/trees/jcb';
// not needed at this time (maybe latter)
public static $accessToken = "";
@ -124,6 +130,630 @@ abstract class ComponentbuilderHelper
'JPATH_THEMES' => JPATH_THEMES
);
/**
* get the class method or property
*
* @input int The method/property ID
* @input string The target type
*
* @returns string on success
**/
public static function getClassCode($id, $type)
{
if ('property' === $type || 'method' === $type)
{
// Get a db connection.
$db = JFactory::getDbo();
// Get user object
$user = JFactory::getUser();
// Create a new query object.
$query = $db->getQuery(true);
// get method
if ('method' === $type)
{
$query->select($db->quoteName(array('a.comment','a.name','a.visibility','a.arguments','a.code')));
}
// get property
elseif ('property' === $type)
{
$query->select($db->quoteName(array('a.comment','a.name','a.visibility','a.default')));
}
$query->from($db->quoteName('#__componentbuilder_class_' . $type,'a'));
$query->where($db->quoteName('a.id') . ' = ' . (int) $id);
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$columns = $db->getTableColumns('#__componentbuilder_class_' . $type);
if(isset($columns['access']))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
}
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// get the code
$code = $db->loadObject();
// combine method values
$combinded = array();
// add comment if set
if (self::checkString($code->comment))
{
$comment = array_map('trim', (array) explode(PHP_EOL, base64_decode($code->comment)));
$combinded[] = "\t" . implode(PHP_EOL . "\t ", $comment);
}
// build method
if ('method' === $type)
{
// set the method signature
if (self::checkString($code->arguments))
{
$combinded[] = "\t" . $code->visibility . ' function ' . $code->name . '(' . base64_decode($code->arguments) . ')';
}
else
{
$combinded[] = "\t" . $code->visibility . ' function ' . $code->name . '()';
}
// set the method code
$combinded[] = "\t" . "{";
// add code if set
if (self::checkString(trim($code->code)))
{
$combinded[] = base64_decode($code->code);
}
else
{
$combinded[] = "\t\t// add your code here";
}
$combinded[] = "\t" . "}";
}
else
{
if (self::checkString($code->default))
{
$code->default = base64_decode($code->default);
if (is_int($code->default))
{
// set the class property
$combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = ' . (int) $code->default . ';';
}
elseif (is_float($code->default))
{
// set the class property
$combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = ' . (float) $code->default . ';';
}
elseif (('false' === $code->default || 'true' === $code->default)
|| (self::checkString($code->default) && (strpos($code->default, 'array(') !== false || strpos($code->default, '"') !== false)))
{
// set the class property
$combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = ' . $code->default . ';';
}
elseif (self::checkString($code->default) && strpos($code->default, '"') === false)
{
// set the class property
$combinded[] = "\t" . $code->visibility . ' $' . $code->name . ' = "' . $code->default . '";';
}
else
{
// set the class property
$combinded[] = "\t" . $code->visibility . ' $' . $code->name . ';';
}
}
else
{
// set the class property
$combinded[] = "\t" . $code->visibility . ' $' . $code->name . ';';
}
}
// return the code
return implode(PHP_EOL, $combinded);
}
}
return false;
}
/**
* extract Boilerplate Class Extends
*
* @input string The class as a string
* @input string The type of class/extension
*
* @returns string on success
**/
public static function extractBoilerplateClassExtends(&$class, $type)
{
if (($strings = self::getAllBetween($class, 'class ', '}')) !== false && self::checkArray($strings))
{
foreach ($strings as $string)
{
if (($extends = self::getBetween($string, 'extends ', '{')) !== false && self::checkString($extends))
{
return trim($extends);
}
}
}
return false;
}
/**
* extract Boilerplate Class Header
*
* @input string The class as a string
* @input string The class being extended
* @input string The type of class/extension
*
* @returns string on success
**/
public static function extractBoilerplateClassHeader(&$class, $extends, $type)
{
if (($string = self::getBetween($class, "defined('_JEXEC')", 'extends ' . $extends)) !== false && self::checkString($string))
{
$headArray = explode(PHP_EOL, $string);
if (self::checkArray($headArray) && count($headArray) > 3)
{
// remove first since it still has the [or die;] string in it
array_shift($headArray);
// remove the last since it has the class declaration
array_pop($headArray);
// at this point we have the class comment still in as part of the header, lets remove that
$last = count($headArray);
while ($last > 0)
{
$last--;
if (isset($headArray[$last]) && strpos($headArray[$last], '*') !== false)
{
unset($headArray[$last]);
}
else
{
// moment the comment stops, we break out
$last = 0;
}
}
// make sure we only return if we have values
if (self::checkArray($headArray))
{
return implode(PHP_EOL, $headArray);
}
}
}
return false;
}
/**
* extract Boilerplate Class Comment
*
* @input string The class as a string
* @input string The class being extended
* @input string The type of class/extension
*
* @returns string on success
**/
public static function extractBoilerplateClassComment(&$class, $extends, $type)
{
if (($string = self::getBetween($class, "defined('_JEXEC')", 'extends ' . $extends)) !== false && self::checkString($string))
{
$headArray = explode(PHP_EOL, $string);
if (self::checkArray($headArray) && count($headArray) > 3)
{
$comment = array();
// remove the last since it has the class declaration
array_pop($headArray);
// at this point we have the class comment still in as part of the header, lets remove that
$last = count($headArray);
while ($last > 0)
{
$last--;
if (isset($headArray[$last]) && strpos($headArray[$last], '*') !== false)
{
$comment[$last] = $headArray[$last];
}
else
{
// moment the comment stops, we break out
$last = 0;
}
}
// make sure we only return if we have values
if (self::checkArray($comment))
{
// set the correct order
ksort($comment);
return implode(PHP_EOL, $comment);
}
}
}
return false;
}
/**
* extract Boilerplate Class Properties & Methods
*
* @input string The class as a string
* @input string The class being extended
* @input string The type of class/extension
* @input int The plugin groups
*
* @returns string on success
**/
public static function extractBoilerplateClassPropertiesMethods(&$class, $extends, $type, $plugin_group = null)
{
$bucket = array('property' => array(), 'method' => array());
// get the class code, and remove the head
$codeArrayTmp = explode('extends ' . $extends, $class);
// make sure we have the correct result
if (self::checkArray($codeArrayTmp) && count($codeArrayTmp) == 2)
{
// the triggers
$triggers = array('public' => 1, 'protected' => 2, 'private' => 3);
$codeArray = explode(PHP_EOL, $codeArrayTmp[1]);
unset($codeArrayTmp);
// clean the code
self::cleanBoilerplateCode($codeArray);
// temp bucket
$name = null;
$arg = null;
$target = null;
$visibility = null;
$tmp = array();
$comment = array();
// load method
$loadCode = function (&$bucket, &$target, &$name, &$arg, &$visibility, &$tmp, &$comment) use($type, $plugin_group){
$_tmp = array(
'name' => $name,
'visibility' => $visibility,
'extension_type' => $type
);
// build filter
$filters = array('extension_type' => $type);
// add more data based on target
if ('method' === $target && self::checkArray($tmp))
{
// clean the code
self::cleanBoilerplateCode($tmp);
// only load if there are values
if (self::checkArray($tmp, true))
{
$_tmp['code'] = implode(PHP_EOL, $tmp);
}
else
{
$_tmp['code'] = '';
}
// load arguments only if set
if (self::checkString($arg))
{
$_tmp['arguments'] = $arg;
}
}
elseif ('property' === $target)
{
// load default only if set
if (self::checkString($arg))
{
$_tmp['default'] = $arg;
}
}
// load comment only if set
if (self::checkArray($comment, true))
{
$_tmp['comment'] = implode(PHP_EOL, $comment);
}
// load the group target
if ($plugin_group)
{
$_tmp['joomla_plugin_group'] = $plugin_group;
$filters['joomla_plugin_group'] = $plugin_group;
}
// load the local values
if (($locals = self::getLocalBoilerplate($name, $target, $type, $filters)) !== false)
{
foreach ($locals as $key => $value)
{
$_tmp[$key] = $value;
}
}
else
{
$_tmp['id'] = 0;
$_tmp['published'] = 1;
$_tmp['version'] = 1;
}
// store the data based on target
$bucket[$target][] = $_tmp;
};
// now we start loading
foreach($codeArray as $line)
{
if ($visibility && $target && $name && strpos($line, '/**') !== false)
{
$loadCode($bucket, $target, $name, $arg, $visibility, $tmp, $comment);
// reset loop buckets
$name = null;
$arg = null;
$target = null;
$visibility = null;
$tmp = array();
$comment = array();
}
// load the comment before method/property
if (!$visibility && !$target && !$name && strpos($line, '*') !== false)
{
$comment[] = rtrim($line);
}
else
{
if (!$visibility && !$target && !$name)
{
// get the line values
$lineArray = array_values(array_map('trim', preg_split('/\s+/', trim($line))));
// check if we are at the main line
if (isset($lineArray[0]) && isset($triggers[$lineArray[0]]))
{
$visibility = $lineArray[0];
if (strpos($line, 'function') !== false)
{
$target = 'method';
// get the name
$name = trim(self::getBetween($line, 'function ', '('));
// get the arguments
$arg = trim(self::getBetween($line, ' ' . $name . '(', ')'));
}
else
{
$target = 'property';
if (strpos($line, '=') !== false)
{
// get the name
$name = trim(self::getBetween($line, '$', '='));
// get the default
$arg = trim(self::getBetween($line, '=', ';'));
}
else
{
// get the name
$name = trim(self::getBetween($line, '$', ';'));
}
}
}
}
else
{
$tmp[] = rtrim($line);
}
}
}
// check if a last method is still around
if ($visibility && $target && $name)
{
$loadCode($bucket, $target, $name, $arg, $visibility, $tmp, $comment);
// reset loop buckets
$name = null;
$arg = null;
$target = null;
$visibility = null;
$tmp = array();
$comment = array();
}
return $bucket;
}
return false;
}
protected static function getLocalBoilerplate($name, $table, $extension_type, $filters = array())
{
if ('property' === $table || 'method' === $table)
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// get method
$query->select($db->quoteName(array('a.id','a.published','a.version')));
$query->from($db->quoteName('#__componentbuilder_class_' . $table,'a'));
$query->where($db->quoteName('a.name') . ' = ' . $db->quote($name));
$query->where($db->quoteName('a.extension_type') . ' = ' . $db->quote($extension_type));
// add more filters
if (self::checkArray($filters))
{
foreach($filters as $where => $value)
{
if (is_numeric($value))
{
$query->where($db->quoteName('a.' . $where) . ' = ' . $value);
}
else
{
$query->where($db->quoteName('a.' . $where) . ' = ' . $db->quote($value));
}
}
}
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// get the code
return $db->loadAssoc();
}
}
return false;
}
protected static function cleanBoilerplateCode(&$code)
{
// remove the first lines until a { is found
$key = 0;
$found = false;
while (!$found)
{
if (isset($code[$key]))
{
if (strpos($code[$key], '{') !== false)
{
unset($code[$key]);
// only remove the first } found
$found = true;
}
// remove empty lines
elseif (!self::checkString(trim($code[$key])))
{
unset($code[$key]);
}
}
// check next line
$key++;
// stop loop at line 30 (really this should never happen)
if ($key > 30)
{
$found = true;
}
}
// reset all keys
$code = array_values($code);
// remove last lines until }
$last = count($code);
while ($last > 0)
{
$last--;
if (isset($code[$last]))
{
if (strpos($code[$last], '}') !== false)
{
unset($code[$last]);
// only remove the first } found
$last = 0;
}
// remove empty lines
elseif (!self::checkString(trim($code[$last])))
{
unset($code[$last]);
}
}
}
}
/**
* Making class or function name safe
*
* @input string The name you would like to make safe
*
* @returns string on success
**/
public static function safeClassFunctionName($name)
{
// remove numbers if the first character is a number
if (is_numeric(substr($name, 0, 1)))
{
$name = self::replaceNumbers($name);
}
// remove all spaces and strange characters
return trim(preg_replace("/[^A-Za-z0-9_-]/", '', $name));
}
/**
* The field builder switch
**/
protected static $fieldNameBuilder = false;
/**
* Making field names safe
*
* @input string The you would like to make safe
* @input boolean The switch to return an ALL UPPER CASE string
* @input string The string to use in white space
*
* @returns string on success
**/
public static function safeFieldName($string, $allcap = false, $spacer = '_')
{
// get global value
if (self::$fieldNameBuilder === false)
{
self::$fieldNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('field_name_builder', 1);
}
// use the new convention
if (2 == self::$fieldNameBuilder)
{
// 0nly continue if we have a string
if (self::checkString($string))
{
// check that the first character is not a number
if (is_numeric(substr($string, 0, 1)))
{
$string = self::replaceNumbers($string);
}
// remove all other strange characters
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
// remove all and keep only characters and numbers
$string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
// replace white space with underscore (SAFEST OPTION)
$string = preg_replace('/\s+/', $spacer, $string);
// return all caps
if ($allcap)
{
return strtoupper($string);
}
// default is to return lower
return strtolower($string);
}
// not a string
return '';
}
// return all caps
if ($allcap)
{
return self::safeString($string, 'U');
}
// use the default (original behaviour/convention)
return self::safeString($string);
}
/**
* The type builder switch
**/
protected static $typeNameBuilder = false;
/**
* Making field type name safe
*
* @input string The you would like to make safe
*
* @returns string on success
**/
public static function safeTypeName($string)
{
// get global value
if (self::$typeNameBuilder === false)
{
self::$typeNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('type_name_builder', 1);
}
// use the new convention
if (2 == self::$typeNameBuilder)
{
// 0nly continue if we have a string
if (self::checkString($string))
{
// check that the first character is not a number
if (is_numeric(substr($string, 0, 1)))
{
$string = self::replaceNumbers($string);
}
// remove all and keep only characters and numbers and point (TODO just one point)
$string = trim(preg_replace("/[^A-Za-z0-9\.]/", '', $string));
// best is to return lower (for all string equality in compiler)
return strtolower($string);
}
// not a string
return '';
}
// use the default (original behaviour/convention)
return self::safeString($string);
}
/*
* Get the Array of Existing Validation Rule Names
*
@ -451,7 +1081,7 @@ abstract class ComponentbuilderHelper
* @return void
*
*/
public static function getAllFilePaths($folder, $fileTypes = array('\.php', '\.js', '\.css', '\.less'))
public static function getAllFilePaths($folder, $fileTypes = array('\.php', '\.js', '\.css', '\.less'), $recurse = true, $full = true)
{
if (JFolder::exists($folder))
{
@ -459,11 +1089,25 @@ abstract class ComponentbuilderHelper
$joomla = getcwd();
// we are changing the working directory to the componet path
chdir($folder);
// get the files
foreach ($fileTypes as $type)
// make sure we have file type filter
if (self::checkArray($fileTypes))
{
// get the files
foreach ($fileTypes as $type)
{
// get a list of files in the current directory tree
$files[] = JFolder::files('.', $type, $recurse, $full);
}
}
elseif (self::checkString($fileTypes))
{
// get a list of files in the current directory tree
$files[] = JFolder::files('.', $type, true, true);
$files[] = JFolder::files('.', $fileTypes, $recurse, $full);
}
else
{
// get a list of files in the current directory tree
$files[] = JFolder::files('.', '.', $recurse, $full);
}
// change back to Joomla working directory
chdir($joomla);
@ -1200,13 +1844,13 @@ abstract class ComponentbuilderHelper
}
else
{
$name = self::safeString(self::getBetween($field->xml,'name="','"'));
$name = self::safeFieldName(self::getBetween($field->xml,'name="','"'));
}
// use field core name only if not found in xml
if (!self::checkString($name))
{
$name = self::safeString($field->name);;
$name = self::safeFieldName($field->name);
}
return array('name' => $name, 'type' => $field->type_name);
}
@ -1311,12 +1955,14 @@ abstract class ComponentbuilderHelper
// The banners by size
'banner' => array(
'728-90' => array(
'<a href="https://volunteers.joomla.org/" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>',
'<a href="https://magazine.joomla.org" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img alt="Joomla! Community Magazine | Because community matters..." src="https://magazine.joomla.org/images/banners/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>'
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>',
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img alt="Joomla! Community Magazine | Because community matters..." src="https://magazine.joomla.org/images/banners/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>',
'<a href="https://vdm.bz/jcb-sponsor-tlwebdesign" target="_blank" title="tlwebdesign a JCB sponsor | Because community matters..."><img alt="tlwebdesign a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/tlwebdesign_jcb_sponsor_728_90.png" width="728" height="90" border="0" /></a>',
'<a href="https://vdm.bz/jcb-sponsor-vdm" target="_blank" title="VDM a JCB sponsor | Because community matters..."><img alt="VDM a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/vdm_jcb_sponsor_728_90.gif" width="728" height="90" border="0" /></a>'
),
'160-600' => array(
'<a href="https://volunteers.joomla.org/" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>',
'<a href="https://magazine.joomla.org" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="https://magazine.joomla.org/images/banners/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>'
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>',
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="https://magazine.joomla.org/images/banners/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>'
)
),
// The build-gif by size
@ -2618,13 +3264,13 @@ abstract class ComponentbuilderHelper
),
'option' => array(
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', // 'components', (TODO) must be added but still in use as a custom field in JCB
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql'
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql', 'groupedlist'
),
'text' => array(
'calendar', 'color', 'editor', 'email', 'number', 'password', 'range', 'tel', 'text', 'textarea', 'url'
),
'list' => array(
'checkbox', 'checkboxes', 'list', 'radio'
'checkbox', 'checkboxes', 'list', 'radio', 'groupedlist'
),
'dynamic' => array(
'category', 'file', 'filelist', 'folderlist', 'headertag', 'imagelist', 'integer', 'media', 'meter', 'rules', 'tag', 'timezone', 'user'
@ -2633,7 +3279,7 @@ abstract class ComponentbuilderHelper
'note', 'spacer'
),
'special' => array(
'contentlanguage', 'groupedlist', 'moduleposition', 'plugin', 'repeatable', 'subform', 'templatestyle'
'contentlanguage', 'moduleposition', 'plugin', 'repeatable', 'subform', 'templatestyle'
)
);
@ -4723,6 +5369,10 @@ abstract class ComponentbuilderHelper
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS'), 'index.php?option=com_componentbuilder&view=joomla_components', $submenu === 'joomla_components');
}
if ($user->authorise('joomla_plugin.access', 'com_componentbuilder') && $user->authorise('joomla_plugin.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_PLUGINS'), 'index.php?option=com_componentbuilder&view=joomla_plugins', $submenu === 'joomla_plugins');
}
if ($user->authorise('admin_view.access', 'com_componentbuilder') && $user->authorise('admin_view.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS'), 'index.php?option=com_componentbuilder&view=admin_views', $submenu === 'admin_views');
@ -5478,38 +6128,42 @@ abstract class ComponentbuilderHelper
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'Componentbuilder', $config = array())
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Componentbuilder', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path
$fullPath = $path . '/models';
// set prefix
$prefix = $component.'Model';
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPath, $prefix);
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $prefix, $config);
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path.'/'.$name.'.php';
$fullPath = $fullPath.'/'.$name.'.php';
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPath))
elseif (JFile::exists($fullPathModel))
{
// get the file
require_once $fullPath;
require_once $fullPathModel;
}
// build class names
$modelClass = $prefix.$name;
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model

File diff suppressed because it is too large Load Diff

View File

@ -110,19 +110,87 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT_DESC="Allows the users in this group to
COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu"
COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of admin view"
COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access"
COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS="Class Extendings Access"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC="Allows the users in this group to access access class extendings"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE="Class Extendings Batch Use"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class extendings"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE="Class Extendings Create"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE_DESC="Allows the users in this group to create create class extendings"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE="Class Extendings Delete"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE_DESC="Allows the users in this group to delete delete class extendings"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT="Class Extendings Edit"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY="Class Extendings Edit Created By"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class extendings"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE="Class Extendings Edit Created Date"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class extendings"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_DESC="Allows the users in this group to edit the class extends"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN="Class Extendings Edit Own"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC="Allows the users in this group to edit edit own class extendings created by them"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE="Class Extendings Edit State"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class extends"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION="Class Extendings Edit Version"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class extendings"
COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS="Class Methods Access"
COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS_DESC="Allows the users in this group to access access class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE="Class Methods Batch Use"
COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_CREATE="Class Methods Create"
COM_COMPONENTBUILDER_CLASS_METHODS_CREATE_DESC="Allows the users in this group to create create class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_DELETE="Class Methods Delete"
COM_COMPONENTBUILDER_CLASS_METHODS_DELETE_DESC="Allows the users in this group to delete delete class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT="Class Methods Edit"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY="Class Methods Edit Created By"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE="Class Methods Edit Created Date"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_DESC="Allows the users in this group to edit the class method"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN="Class Methods Edit Own"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_OWN_DESC="Allows the users in this group to edit edit own class methods created by them"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE="Class Methods Edit State"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class method"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION="Class Methods Edit Version"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT="Class Methods Export"
COM_COMPONENTBUILDER_CLASS_METHODS_EXPORT_DESC="Allows the users in this group to export export class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT="Class Methods Import"
COM_COMPONENTBUILDER_CLASS_METHODS_IMPORT_DESC="Allows the users in this group to import import class methods"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS="Class Properties Access"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS_DESC="Allows the users in this group to access access class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE="Class Properties Batch Use"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE="Class Properties Create"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_CREATE_DESC="Allows the users in this group to create create class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE="Class Properties Delete"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_DELETE_DESC="Allows the users in this group to delete delete class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT="Class Properties Edit"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY="Class Properties Edit Created By"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE="Class Properties Edit Created Date"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_DESC="Allows the users in this group to edit the class property"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN="Class Properties Edit Own"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own class properties created by them"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE="Class Properties Edit State"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the class property"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION="Class Properties Edit Version"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT="Class Properties Export"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EXPORT_DESC="Allows the users in this group to export export class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT="Class Properties Import"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_IMPORT_DESC="Allows the users in this group to import import class properties"
COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access"
COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC=" Allows the users in this group to access compiler."
COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC="Allows the users in this group to access compiler."
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access"
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC="Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List"
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS="Compiler Run Expansion Button Access"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu"
COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to submenu of Compiler"
COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS="Compiler Translate Button Access"
COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the translate button."
COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the translate button."
COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS="Components Admin Views Access"
COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access components admin views"
COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE="Components Admin Views Batch Use"
@ -283,6 +351,26 @@ COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE="Components Placeholders
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component placeholders"
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION="Components Placeholders Edit Version"
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components placeholders"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS="Components Plugins Access"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_ACCESS_DESC="Allows the users in this group to access access components plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE="Components Plugins Batch Use"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE="Components Plugins Create"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_CREATE_DESC="Allows the users in this group to create create components plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE="Components Plugins Delete"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_DELETE_DESC="Allows the users in this group to delete delete components plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT="Components Plugins Edit"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY="Components Plugins Edit Created By"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE="Components Plugins Edit Created Date"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_DESC="Allows the users in this group to edit the component plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN="Components Plugins Edit Own"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components plugins created by them"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE="Components Plugins Edit State"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component plugins"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION="Components Plugins Edit Version"
COM_COMPONENTBUILDER_COMPONENTS_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components plugins"
COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS="Components Site Views Access"
COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC="Allows the users in this group to access access components site views"
COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE="Components Site Views Batch Use"
@ -351,7 +439,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_IMPORT_DESC="Allows the users in this gr
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_SUBMENU="Custom Admin Views Submenu"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of custom admin view"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS="Custom Admin View Get Snippets Button Access"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS="Custom Codes Access"
COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS_DESC="Allows the users in this group to access access custom codes"
COM_COMPONENTBUILDER_CUSTOM_CODES_BATCH_USE="Custom Codes Batch Use"
@ -381,7 +469,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT_DESC="Allows the users in this group to
COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU="Custom Codes Submenu"
COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU_DESC="Allows the users in this group to submenu of custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS="Custom Code Run Expansion Button Access"
COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS="Dynamic Gets Access"
COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS_DESC="Allows the users in this group to access access dynamic gets"
COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE="Dynamic Gets Batch Use"
@ -409,15 +497,15 @@ COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC="Allows the users in this group to
COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU="Dynamic Gets Submenu"
COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC="Allows the users in this group to submenu of dynamic get"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS="Dynamic Get Run Expansion Button Access"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_EDIT_CREATED_BY="Edit Created By"
COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by."
COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by."
COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date"
COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date."
COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date."
COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version"
COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions."
COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC="Allows users in this group to edit versions."
COM_COMPONENTBUILDER_EXPORT_DATA="Export Data"
COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data."
COM_COMPONENTBUILDER_EXPORT_DATA_DESC="Allows users in this group to export data."
COM_COMPONENTBUILDER_FIELDS_ACCESS="Fields Access"
COM_COMPONENTBUILDER_FIELDS_ACCESS_DESC="Allows the users in this group to access access fields"
COM_COMPONENTBUILDER_FIELDS_BATCH_USE="Fields Batch Use"
@ -469,25 +557,25 @@ COM_COMPONENTBUILDER_FIELDTYPES_IMPORT_DESC="Allows the users in this group to i
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu"
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to submenu of fieldtype"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS="Field Run Expansion Button Access"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC="Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC="Allows the users in this group to access the custom admin views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST="Get Snippets Dashboard List"
COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button."
COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC="Allows the users in this group to access the layouts button."
COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS="Get Snippets Libraries Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the libraries button."
COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC="Allows the users in this group to access the libraries button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Views Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC="Allows the users in this group to access the site views button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the snippets button."
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu"
COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to submenu of Get Snippets"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button."
COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC="Allows the users in this group to access the templates button."
COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS="Help Documents Access"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use"
@ -513,15 +601,13 @@ COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT_DESC="Allows the users in this group
COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu"
COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to submenu of help document"
COM_COMPONENTBUILDER_IMPORT_DATA="Import Data"
COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data."
COM_COMPONENTBUILDER_IMPORT_DATA_DESC="Allows users in this group to import data."
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS="Joomla Components Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC="Allows the users in this group to access access joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE="Joomla Components Batch Use"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE="Joomla Components Create"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC="Allows the users in this group to create create joomla components"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD="Joomla Components Dashboard Add"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST="Joomla Components Dashboard List"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DELETE="Joomla Components Delete"
@ -541,17 +627,95 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC="Allows users in this g
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU="Joomla Components Submenu"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC="Allows the users in this group to submenu of joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS="Joomla Component Backup Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the backup button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC="Allows the users in this group to access the backup button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS="Joomla Component Clear tmp Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC="Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC="Allows the users in this group to access the clone button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the export jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the import jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS="Joomla Component Run Expansion Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS="Joomla Plugins Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC="Allows the users in this group to access access joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE="Joomla Plugins Batch Use"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE="Joomla Plugins Create"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE_DESC="Allows the users in this group to create create joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST="Joomla Plugins Dashboard List"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of joomla plugin"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE="Joomla Plugins Delete"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_DELETE_DESC="Allows the users in this group to delete delete joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT="Joomla Plugins Edit"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY="Joomla Plugins Edit Created By"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE="Joomla Plugins Edit Created Date"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_DESC="Allows the users in this group to edit the joomla plugin"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN="Joomla Plugins Edit Own"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla plugins created by them"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE="Joomla Plugins Edit State"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION="Joomla Plugins Edit Version"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_ACCESS="Joomla Plugins Files Folders Urls Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_ACCESS_DESC="Allows the users in this group to access access joomla plugins files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_BATCH_USE="Joomla Plugins Files Folders Urls Batch Use"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugins files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_CREATE="Joomla Plugins Files Folders Urls Create"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_CREATE_DESC="Allows the users in this group to create create joomla plugins files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_DELETE="Joomla Plugins Files Folders Urls Delete"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_DELETE_DESC="Allows the users in this group to delete delete joomla plugins files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT="Joomla Plugins Files Folders Urls Edit"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_BY="Joomla Plugins Files Folders Urls Edit Created By"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla plugins files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_DATE="Joomla Plugins Files Folders Urls Edit Created Date"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla plugins files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_DESC="Allows the users in this group to edit the joomla plugin files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_OWN="Joomla Plugins Files Folders Urls Edit Own"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla plugins files folders urls created by them"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_STATE="Joomla Plugins Files Folders Urls Edit State"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION="Joomla Plugins Files Folders Urls Edit Version"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_FILES_FOLDERS_URLS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins files folders urls"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU="Joomla Plugins Submenu"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_SUBMENU_DESC="Allows the users in this group to submenu of joomla plugin"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS="Joomla Plugins Updates Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_ACCESS_DESC="Allows the users in this group to access access joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE="Joomla Plugins Updates Batch Use"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE="Joomla Plugins Updates Create"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_CREATE_DESC="Allows the users in this group to create create joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE="Joomla Plugins Updates Delete"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_DELETE_DESC="Allows the users in this group to delete delete joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT="Joomla Plugins Updates Edit"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY="Joomla Plugins Updates Edit Created By"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE="Joomla Plugins Updates Edit Created Date"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_DESC="Allows the users in this group to edit the joomla plugin updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN="Joomla Plugins Updates Edit Own"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_OWN_DESC="Allows the users in this group to edit edit own joomla plugins updates created by them"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE="Joomla Plugins Updates Edit State"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION="Joomla Plugins Updates Edit Version"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS="Joomla Plugin Get Boilerplate Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the get boilerplate button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS="Joomla Plugin Groups Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS_DESC="Allows the users in this group to access access joomla plugin groups"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE="Joomla Plugin Groups Batch Use"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch joomla plugin groups"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION="Joomla Plugin Groups Edit Version"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version joomla plugin groups"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS="Joomla Plugin Methods Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS_DESC="Allows the users in this group to access the methods button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS="Joomla Plugin Properties Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS_DESC="Allows the users in this group to access the properties button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS="Joomla Plugin Run Expansion Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages"
COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use"
@ -575,7 +739,7 @@ COM_COMPONENTBUILDER_LANGUAGES_IMPORT_DESC="Allows the users in this group to im
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu"
COM_COMPONENTBUILDER_LANGUAGES_SUBMENU_DESC="Allows the users in this group to submenu of language"
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS="Language Build Button Access"
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC=" Allows the users in this group to access the build button."
COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC="Allows the users in this group to access the build button."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS="Language Translations Access"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC="Allows the users in this group to access access language translations"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE="Language Translations Batch Use"
@ -627,7 +791,7 @@ COM_COMPONENTBUILDER_LAYOUTS_IMPORT_DESC="Allows the users in this group to impo
COM_COMPONENTBUILDER_LAYOUTS_SUBMENU="Layouts Submenu"
COM_COMPONENTBUILDER_LAYOUTS_SUBMENU_DESC="Allows the users in this group to submenu of layout"
COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS="Layout Get Snippets Button Access"
COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_LIBRARIES_ACCESS="Libraries Access"
COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC="Allows the users in this group to access access libraries"
COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE="Libraries Batch Use"
@ -689,7 +853,7 @@ COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC="Allows user
COM_COMPONENTBUILDER_LIBRARIES_SUBMENU="Libraries Submenu"
COM_COMPONENTBUILDER_LIBRARIES_SUBMENU_DESC="Allows the users in this group to submenu of library"
COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS="Library Get Snippets Button Access"
COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_MENU="&#10003 Component Builder"
COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views"
COM_COMPONENTBUILDER_MENU_COMPILER="Compiler"
@ -700,6 +864,7 @@ COM_COMPONENTBUILDER_MENU_FIELDS="Fields"
COM_COMPONENTBUILDER_MENU_FIELDTYPES="Fieldtypes"
COM_COMPONENTBUILDER_MENU_HELP_DOCUMENTS="Help Documents"
COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS="Joomla Components"
COM_COMPONENTBUILDER_MENU_JOOMLA_PLUGINS="Joomla Plugins"
COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS="Language Translations"
COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts"
COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries"
@ -787,7 +952,7 @@ COM_COMPONENTBUILDER_SITE_VIEWS_IMPORT_DESC="Allows the users in this group to i
COM_COMPONENTBUILDER_SITE_VIEWS_SUBMENU="Site Views Submenu"
COM_COMPONENTBUILDER_SITE_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of site view"
COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS="Site View Get Snippets Button Access"
COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_SNIPPETS_ACCESS="Snippets Access"
COM_COMPONENTBUILDER_SNIPPETS_ACCESS_DESC="Allows the users in this group to access access snippets"
COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE="Snippets Batch Use"
@ -813,9 +978,9 @@ COM_COMPONENTBUILDER_SNIPPETS_IMPORT_DESC="Allows the users in this group to imp
COM_COMPONENTBUILDER_SNIPPETS_SUBMENU="Snippets Submenu"
COM_COMPONENTBUILDER_SNIPPETS_SUBMENU_DESC="Allows the users in this group to submenu of snippet"
COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS="Snippet Get Snippets Button Access"
COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS="Snippet Share Snippets Button Access"
COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the share snippets button."
COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the share snippets button."
COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS="Snippet Types Access"
COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC="Allows the users in this group to access access snippet types"
COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_USE="Snippet Types Batch Use"
@ -859,9 +1024,9 @@ COM_COMPONENTBUILDER_TEMPLATES_IMPORT_DESC="Allows the users in this group to im
COM_COMPONENTBUILDER_TEMPLATES_SUBMENU="Templates Submenu"
COM_COMPONENTBUILDER_TEMPLATES_SUBMENU_DESC="Allows the users in this group to submenu of template"
COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS="Template Get Snippets Button Access"
COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_USE_BATCH="Use Batch"
COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS="Validation Rules Access"
COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC="Allows the users in this group to access access validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE="Validation Rules Batch Use"
@ -885,4 +1050,6 @@ COM_COMPONENTBUILDER_VALIDATION_RULES_EXPORT_DESC="Allows the users in this grou
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT="Validation Rules Import"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU="Validation Rules Submenu"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to submenu of validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULES_SUBMENU_DESC="Allows the users in this group to submenu of validation rule"
COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS="Validation Rule Run Expansion Button Access"
COM_COMPONENTBUILDER_VALIDATION_RULE_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'published',
'ordering',
'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'tabs'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'note_on_views',
'addfields'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'published',
'ordering',
'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'note_on_conditions',
'addconditions'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'published',
'ordering',
'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'published',
'ordering',
'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'note_on_relations',
'addrelations'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'add_css_view',
'css_view',
'add_css_views',
@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'php_controller',
'php_model',
'php_controller_list',
@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'add_custom_button',
'custom_button'
);
@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

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