New Joomla plugin builder, GUI placeholders, and many bug fixes #457

Merged
Llewellyn merged 13 commits from staging into master 2019-08-14 11:59:31 +00:00
376 changed files with 42435 additions and 5429 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.21) 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*: 6th July, 2019
+ *Version*: 2.9.21
+ *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*: **211603**
+ *Field count*: **1143**
+ *File count*: **1346**
+ *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.21) 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*: 6th July, 2019
+ *Version*: 2.9.21
+ *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*: **211603**
+ *Field count*: **1143**
+ *File count*: **1346**
+ *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

@ -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

@ -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

@ -263,6 +263,20 @@
<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) -->

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

@ -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;
}

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

@ -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;
@ -301,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);
}
}
}
}
@ -452,10 +511,10 @@ 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;
@ -467,21 +526,49 @@ class Compiler extends Infusion
JFolder::copy($this->componentPath, $repoFullPath, '', true);
// 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 = $this->tempPath . '/' . $this->componentFolderName . '.zip';
$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, &$this->tempPath, &$this->componentFolderName, &$this->componentData));
$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 required
if ($this->backupPath && $this->dynamicIntegration)
{
// Trigger Event: jcb_ce_onBeforeBackupZip
$this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->backupPath, &$this->componentData));
$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, $this->backupPath);
JFile::copy($this->filepath['component'], $this->backupPath . '/' . $this->componentBackupName . '.zip');
}
// move to sales server host
@ -491,13 +578,13 @@ class Compiler extends Infusion
if (isset($this->componentData->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
$this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->componentSalesName, &$this->componentData));
$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, &$this->tempPath, &$this->componentFolderName, &$this->componentData));
$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))
{
@ -507,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

@ -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,7 +370,9 @@ 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
@ -408,18 +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_onBeforeSetLibaries
$this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->componentContext, &$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))
{
@ -519,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>";
}
}
@ -828,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
@ -862,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])
@ -889,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;
@ -1297,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
@ -1353,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);
@ -1384,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
@ -1402,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
@ -1416,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'];
}
@ -1427,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);
}
@ -1436,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)
{
@ -1466,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

@ -1089,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)
@ -1133,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'];
@ -1150,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;
@ -1226,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);
@ -1239,7 +1334,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
// 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;
}
@ -1249,7 +1344,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $option);
// no add to option set
// 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;
}
@ -1265,7 +1360,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
// 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;
}
@ -1275,7 +1370,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $value);
// no add to option set
// 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;
}
@ -1399,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'];
@ -1425,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);
}
}
}
}
@ -1498,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
@ -1521,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'];
@ -1542,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);
}
}
}
}
@ -1613,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);
@ -1627,7 +1821,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
}
@ -1637,7 +1831,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $option);
// no add to option set
// now add to option set
$optionXML->addAttribute('value', $option);
$optionArray[$option] = $langValue;
}
@ -1655,7 +1849,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
}
@ -1665,7 +1859,7 @@ class Fields extends Structure
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
// add to lang array
$this->setLangContent($this->lang, $langValue, $value);
// no add to option set
// now add to option set
$optionXML->addAttribute('value', $value);
$optionArray[$value] = $langValue;
}
@ -1778,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'];
@ -1804,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));
}
}
}
}
@ -1886,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
@ -1910,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'];
@ -1931,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));
}
}
}
}
@ -2862,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),
@ -2869,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'],
@ -2901,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>>>

View File

@ -5218,7 +5218,7 @@ class Interpretation extends Fields
$script[] = $this->_t(2) . "\$folders = JFolder::folders(\$installPath);";
$script[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if we have folders we may want to copy";
$script[] = $this->_t(2) . "\$doNotCopy = array('media','admin','site'); // Joomla already deals with these";
$script[] = $this->_t(2) . "if (count(\$folders) > 1)";
$script[] = $this->_t(2) . "if (count((array) \$folders) > 1)";
$script[] = $this->_t(2) . "{";
$script[] = $this->_t(3) . "foreach (\$folders as \$folder)";
$script[] = $this->_t(3) . "{";
@ -5419,7 +5419,7 @@ class Interpretation extends Fields
{
// load the custom script for the switch based on dynamic get
$routerSwitch[] = PHP_EOL . $this->_t(3) . "case '" . $view . "':";
$routerSwitch[] = $this->setPlaceholders($this->setDynamicValues(base64_decode($viewArray['settings']->main_get->php_router_parse)), $this->placeholders);
$routerSwitch[] = $this->setPlaceholders($viewArray['settings']->main_get->php_router_parse, $this->placeholders);
$routerSwitch[] = $this->_t(4) . "break;";
return implode(PHP_EOL, $routerSwitch);
@ -10807,7 +10807,7 @@ class Interpretation extends Fields
$function[] = $this->_t(2) . "\$query->from(\$db->quoteName('" . $filter['custom']['table'] . "', 'a'));";
$function[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " get the targeted groups";
$function[] = $this->_t(2) . "\$groups= JComponentHelper::getParams('com_" . $component . "')->get('" . $filter['type'] . "');";
$function[] = $this->_t(2) . "if (count(\$groups) > 0)";
$function[] = $this->_t(2) . "if (!empty(\$groups) && count((array) \$groups) > 0)";
$function[] = $this->_t(2) . "{";
$function[] = $this->_t(3) . "\$query->join('LEFT', \$db->quoteName('#__user_usergroup_map', 'group') . ' ON (' . \$db->quoteName('group.user_id') . ' = ' . \$db->quoteName('a.id') . ')');";
$function[] = $this->_t(3) . "\$query->where('group.group_id IN (' . implode(',', \$groups) . ')');";
@ -14040,7 +14040,7 @@ class Interpretation extends Fields
if (isset($newxmlField->fieldXML))
{
$xmlField = dom_import_simplexml($newxmlField->fieldXML);
$xmlField = PHP_EOL . $this->_t(1) . "<!-- " . $newxmlField->comment . ' -->' . PHP_EOL . $this->_t(1) . $this->xmlPrettyPrint($xmlField, 'field');
$xmlField = PHP_EOL . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . $newxmlField->comment . ' -->' . PHP_EOL . $this->_t(1) . $this->xmlPrettyPrint($xmlField, 'field');
}
}
// make sure the xml is set and a string
@ -16293,4 +16293,352 @@ function vdm_dkim() {
return $matches[1];
}
public function getPluginMainClass(&$plugin)
{
return
PHP_EOL . $plugin->head . PHP_EOL .
$plugin->comment . PHP_EOL . 'class ' .
$plugin->class_name . ' extends ' .
$plugin->extends . PHP_EOL . '{' . PHP_EOL .
$plugin->main_class_code . PHP_EOL .
"}" . PHP_EOL;
}
public function getPluginMainXML(&$plugin)
{
// tweak system to set stuff to the plugin domain
$_backup_target = $this->target;
$_backup_lang = $this->lang;
$_backup_langPrefix = $this->langPrefix;
$this->target = $plugin->key;
$this->lang = $plugin->key;
$this->langPrefix = $plugin->lang_prefix;
$view = '';
$viewType = 0;
// set the custom table key
$dbkey = 'yy';
// build the xml
$xml = '';
// build the config fields
$config_field = '';
if (isset($plugin->config_fields) && ComponentbuilderHelper::checkArray($plugin->config_fields))
{
foreach ($plugin->config_fields as $field)
{
// check the field builder type
if ($this->fieldBuilderType == 1)
{
// string manipulation
$xmlField = $this->setDynamicField($field, $view, $viewType, $plugin->lang_prefix, $plugin->key, $plugin->key, $this->globalPlaceholders, $dbkey, false);
}
else
{
// simpleXMLElement class
$newxmlField = $this->setDynamicField($field, $view, $viewType, $plugin->lang_prefix, $plugin->key, $plugin->key, $this->globalPlaceholders, $dbkey, false);
if (isset($newxmlField->fieldXML))
{
$xmlField = dom_import_simplexml($newxmlField->fieldXML);
$xmlField = PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . $newxmlField->comment . ' -->' . PHP_EOL . $this->_t(1) . $this->xmlPrettyPrint($xmlField, 'field');
}
}
// make sure the xml is set and a string
if (isset($xmlField) && ComponentbuilderHelper::checkString($xmlField))
{
$config_field .= $xmlField;
}
}
}
// switch to add the xml
$addLang = false;
// now build the language files
if (isset($this->langContent[$plugin->key]))
{
$lang = array_map(function ($langstring, $placeholder)
{
return $placeholder . '="' . $langstring . '"';
}, $this->langContent[$plugin->key], array_keys($this->langContent[$plugin->key]));
// add to language file
$this->writeFile($plugin->folder_path . '/language/' . $this->langTag . '/' . $this->langTag . '.plg_' . strtolower($plugin->group) . '_' . strtolower($plugin->name) . '.ini', implode(PHP_EOL, $lang));
$this->writeFile($plugin->folder_path . '/language/' . $this->langTag . '/' . $this->langTag . '.plg_' . strtolower($plugin->group) . '_' . strtolower($plugin->name) . '.sys.ini', implode(PHP_EOL, $lang));
// set the line counter
$this->lineCount = $this->lineCount + count((array) $lang);
unset($lang);
// trigger the xml
$addLang = true;
}
// get all files and folders in plugin folder
$files = JFolder::files($plugin->folder_path);
$folders = JFolder::folders($plugin->folder_path);
// the files/folders to ignore
$ignore = array('sql', 'language', 'script.php', $plugin->file_name . '.xml', $plugin->file_name . '.php');
// should the scriptfile be added
if ($plugin->add_install_script)
{
$xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '<!--' . $this->setLine(__LINE__) . ' Scripts to run on installation -->';
$xml .= PHP_EOL . $this->_t(1) . '<scriptfile>script.php</scriptfile>';
}
// should the sql install be added
if ($plugin->add_sql)
{
$xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '<!--' . $this->setLine(__LINE__) . ' Runs on install; New in Joomla 1.5 -->';
$xml .= PHP_EOL . $this->_t(1) . '<install>';
$xml .= PHP_EOL . $this->_t(2) . '<sql>';
$xml .= PHP_EOL . $this->_t(3) . '<file driver="mysql" charset="utf8">sql/mysql/install.sql</file>';
$xml .= PHP_EOL . $this->_t(2) . '<sql>';
$xml .= PHP_EOL . $this->_t(1) . '</install>';
}
// should the sql uninstall be added
if ($plugin->add_sql_uninstall)
{
$xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '<!--' . $this->setLine(__LINE__) . ' Runs on uninstall; New in Joomla 1.5 -->';
$xml .= PHP_EOL . $this->_t(1) . '<uninstall>';
$xml .= PHP_EOL . $this->_t(2) . '<sql>';
$xml .= PHP_EOL . $this->_t(3) . '<file driver="mysql" charset="utf8">sql/mysql/uninstall.sql</file>';
$xml .= PHP_EOL . $this->_t(2) . '<sql>';
$xml .= PHP_EOL . $this->_t(1) . '</uninstall>';
}
// should the language xml be added
if ($addLang)
{
$xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '<!--' . $this->setLine(__LINE__) . ' Language files -->';
$xml .= PHP_EOL . $this->_t(1) . '<languages folder="language">';
$xml .= PHP_EOL . $this->_t(2) . '<language tag="en-GB">' . $this->langTag . '/' . $this->langTag . '.plg_' . strtolower($plugin->group) . '_' . strtolower($plugin->name) . '.ini</language>';
$xml .= PHP_EOL . $this->_t(2) . '<language tag="en-GB">' . $this->langTag . '/' . $this->langTag . '.plg_' . strtolower($plugin->group) . '_' . strtolower($plugin->name) . '.sys.ini</language>';
$xml .= PHP_EOL . $this->_t(1) . '</languages>';
}
// add the plugin files
$xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '<!--' . $this->setLine(__LINE__) . ' Plugin files -->';
$xml .= PHP_EOL . $this->_t(1) . '<files>';
$xml .= PHP_EOL . $this->_t(2) . '<filename plugin="' . $plugin->file_name . '">' . $plugin->file_name . '.php</filename>';
// add other files found
if (ComponentbuilderHelper::checkArray($files))
{
foreach ($files as $file)
{
// only add what is not ignored
if (!in_array($file, $ignore))
{
$xml .= PHP_EOL . $this->_t(2) . '<filename>' . $file . '</filename>';
}
}
}
// add language folder
if ($addLang)
{
$xml .= PHP_EOL . $this->_t(2) . '<folder>language</folder>';
}
// add sql folder
if ($plugin->add_sql || $plugin->add_sql_uninstall)
{
$xml .= PHP_EOL . $this->_t(2) . '<folder>sql</folder>';
}
// add other files found
if (ComponentbuilderHelper::checkArray($folders))
{
foreach ($folders as $folder)
{
// only add what is not ignored
if (!in_array($folder, $ignore))
{
$xml .= PHP_EOL . $this->_t(2) . '<folder>' . $folder . '</folder>';
}
}
}
$xml .= PHP_EOL . $this->_t(1) . '</files>';
// now add the Config Params if needed
if (ComponentbuilderHelper::checkString($config_field))
{
$xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '<!--' . $this->setLine(__LINE__) . ' Config parameter -->';
$xml .= PHP_EOL . $this->_t(1) . '<config>';
$xml .= PHP_EOL . $this->_t(1) . '<fields name="params">';
$xml .= PHP_EOL . $this->_t(1) . '<fieldset name="basic">';
$xml .= $config_field;
$xml .= PHP_EOL . $this->_t(1) . '</fieldset>';
$xml .= PHP_EOL . $this->_t(1) . '</fields>';
$xml .= PHP_EOL . $this->_t(1) . '</config>';
}
// set update server if found
if ($plugin->add_update_server)
{
$xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '<!--' . $this->setLine(__LINE__) . ' Update servers -->';
$xml .= PHP_EOL . $this->_t(1) . '<updateservers>';
$xml .= PHP_EOL . $this->_t(2) . '<server type="extension" priority="1" name="' . $plugin->official_name . '">' . $plugin->update_server_url . '</server>';
$xml .= PHP_EOL . $this->_t(1) . '</updateservers>';
}
// rest globals
$this->target = $_backup_target;
$this->lang = $_backup_lang;
$this->langPrefix = $_backup_langPrefix;
return $xml;
}
public function getPluginInstallClass(&$plugin)
{
// yes we are adding it
$script = PHP_EOL . '/**';
$script .= PHP_EOL . ' * ' . $plugin->official_name . ' script file.';
$script .= PHP_EOL . ' *';
$script .= PHP_EOL . ' * @package ' . $plugin->class_name;
$script .= PHP_EOL . ' */';
$script .= PHP_EOL . 'class ' . $plugin->installer_class_name;
$script .= PHP_EOL . '{';
// set constructor
if (isset($plugin->add_php_script_construct)
&& $plugin->add_php_script_construct == 1
&& ComponentbuilderHelper::checkString($plugin->php_script_construct))
{
$script .= $this->setInstallMethodScript('construct', $plugin->php_script_construct);
}
// add PHP in plugin install
$addScriptMethods = array('php_preflight', 'php_postflight', 'php_method');
$addScriptTypes = array('install', 'update', 'uninstall', 'discover_install');
// set some buckets for sorting
$function_install = array();
$function_update = array();
$function_uninstall = array();
$has_php_preflight = false;
$function_php_preflight = array('install' => array(), 'uninstall' => array(), 'discover_install' => array(), 'update' => array());
$has_php_postflight = false;
$function_php_postflight = array('install' => array(), 'uninstall' => array(), 'discover_install' => array(), 'update' => array());
// the function sorter
foreach ($addScriptMethods as $scriptMethod)
{
foreach ($addScriptTypes as $scriptType)
{
if (isset($plugin->{'add_' . $scriptMethod . '_' . $scriptType})
&& $plugin->{'add_' . $scriptMethod . '_' . $scriptType} == 1
&& ComponentbuilderHelper::checkString($plugin->{$scriptMethod . '_' . $scriptType}))
{
// add to the main methods
if ('php_method' === $scriptMethod)
{
${'function_' . $scriptType}[] = $plugin->{$scriptMethod . '_' . $scriptType};
}
else
{
${'function_' . $scriptMethod}[$scriptType][] = $plugin->{$scriptMethod . '_' . $scriptType};
${'has_' . $scriptMethod} = true;
}
}
}
}
// now add the install script.
if (ComponentbuilderHelper::checkArray($function_install))
{
$script .= $this->setInstallMethodScript('install', $function_install);
}
// now add the update script.
if (ComponentbuilderHelper::checkArray($function_update))
{
$script .= $this->setInstallMethodScript('update', $function_update);
}
// now add the uninstall script.
if (ComponentbuilderHelper::checkArray($function_uninstall))
{
$script .= $this->setInstallMethodScript('uninstall', $function_uninstall);
}
// now add the preflight script.
if ($has_php_preflight)
{
$script .= $this->setInstallMethodScript('preflight', $function_php_preflight);
}
// now add the postflight script.
if ($has_php_postflight)
{
$script .= $this->setInstallMethodScript('postflight', $function_php_postflight);
}
$script .= PHP_EOL . '}' . PHP_EOL;
return $script;
}
protected function setInstallMethodScript($function_name, &$scripts)
{
$script = '';
// build function
switch($function_name)
{
case 'install':
case 'update':
case 'uninstall':
// the main function types
$script = PHP_EOL . PHP_EOL . $this->_t(1) .'/**';
$script .= PHP_EOL . $this->_t(1) .' * Called on ' . $function_name;
$script .= PHP_EOL . $this->_t(1) .' *';
$script .= PHP_EOL . $this->_t(1) .' * @param JAdapterInstance $adapter The object responsible for running this script';
$script .= PHP_EOL . $this->_t(1) .' *';
$script .= PHP_EOL . $this->_t(1) .' * @return boolean True on success';
$script .= PHP_EOL . $this->_t(1) .' */';
$script .= PHP_EOL . $this->_t(1) .'public function ' . $function_name . '(JAdapterInstance $adapter)';
$script .= PHP_EOL . $this->_t(1) .'{';
$script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $scripts);
// return true
if ('uninstall' !== $function_name)
{
$script .= PHP_EOL . $this->_t(2) . 'return true;';
}
break;
case 'preflight':
case 'postflight':
// the pre/post function types
$script = PHP_EOL . PHP_EOL . $this->_t(1) .'/**';
$script .= PHP_EOL . $this->_t(1) .' * Called before any type of action';
$script .= PHP_EOL . $this->_t(1) .' *';
$script .= PHP_EOL . $this->_t(1) .' * @param string $route Which action is happening (install|uninstall|discover_install|update)';
$script .= PHP_EOL . $this->_t(1) .' * @param JAdapterInstance $adapter The object responsible for running this script';
$script .= PHP_EOL . $this->_t(1) .' *';
$script .= PHP_EOL . $this->_t(1) .' * @return boolean True on success';
$script .= PHP_EOL . $this->_t(1) .' */';
$script .= PHP_EOL . $this->_t(1) .'public function ' . $function_name . '($route, JAdapterInstance $adapter)';
$script .= PHP_EOL . $this->_t(1) .'{';
$script .= PHP_EOL . $this->_t(2) . '//' . $this->setLine(__LINE__) . ' get application';
$script .= PHP_EOL . $this->_t(2) . '$app = JFactory::getApplication();' . PHP_EOL;
// add the default version check (TODO) must make this dynamic
if ('preflight' === $function_name)
{
$script .= PHP_EOL . $this->_t(2) . '//' . $this->setLine(__LINE__) . ' the default for both install and update';
$script .= PHP_EOL . $this->_t(2) . '$jversion = new JVersion();';
$script .= PHP_EOL . $this->_t(2) . "if (!\$jversion->isCompatible('3.8.0'))";
$script .= PHP_EOL . $this->_t(2) . '{';
$script .= PHP_EOL . $this->_t(3) . "\$app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error');";
$script .= PHP_EOL . $this->_t(3) . 'return false;';
$script .= PHP_EOL . $this->_t(2) . '}' . PHP_EOL;
}
// now add the scripts
foreach ($scripts as $route => $_script)
{
if (ComponentbuilderHelper::checkArray($_script))
{
// set the if and script
$script .= PHP_EOL . $this->_t(2) . "if ('" . $route . "' === \$route)";
$script .= PHP_EOL . $this->_t(2) . '{';
$script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $_script);
$script .= PHP_EOL . $this->_t(2) . '}' . PHP_EOL;
}
}
// return true
$script .= PHP_EOL . $this->_t(2) . 'return true;';
break;
case 'construct':
// the __construct script
$script = PHP_EOL . PHP_EOL . $this->_t(1) .'/**';
$script .= PHP_EOL . $this->_t(1) .' * Constructor';
$script .= PHP_EOL . $this->_t(1) .' *';
$script .= PHP_EOL . $this->_t(1) .' * @param JAdapterInstance $adapter The object responsible for running this script';
$script .= PHP_EOL . $this->_t(1) .' */';
$script .= PHP_EOL . $this->_t(1) .'public function __construct(JAdapterInstance $adapter)';
$script .= PHP_EOL . $this->_t(1) .'{';
$script .= PHP_EOL . $scripts;
break;
default:
// oops error
return '';
}
// close the function
$script .= PHP_EOL . $this->_t(1) . '}';
return $script;
}
}

View File

@ -1032,6 +1032,27 @@ 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));

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,510 @@ 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
*
@ -139,7 +649,7 @@ abstract class ComponentbuilderHelper
$name = self::replaceNumbers($name);
}
// remove all spaces and strange characters
return trim(reg_replace("/[^A-Za-z0-9]/", '', $name));
return trim(preg_replace("/[^A-Za-z0-9_-]/", '', $name));
}
/**
@ -202,6 +712,48 @@ abstract class ComponentbuilderHelper
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
*
@ -529,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))
{
@ -537,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);
@ -2698,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'
@ -2713,7 +3279,7 @@ abstract class ComponentbuilderHelper
'note', 'spacer'
),
'special' => array(
'contentlanguage', 'groupedlist', 'moduleposition', 'plugin', 'repeatable', 'subform', 'templatestyle'
'contentlanguage', 'moduleposition', 'plugin', 'repeatable', 'subform', 'templatestyle'
)
);
@ -4803,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');

File diff suppressed because it is too large Load Diff

View File

@ -111,6 +111,74 @@ 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_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_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access"
@ -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"
@ -520,8 +608,6 @@ 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"
@ -552,6 +638,84 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla
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_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"
@ -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"
@ -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

@ -0,0 +1,44 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'head'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

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');
// get the form
$form = $displayData->getForm();
// 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(
'name',
'extension_type'
);
$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

@ -0,0 +1,42 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'comment'
);
$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

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,45 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'modified_by'
);
$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

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'version',
'hits',
'id'
);
$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

@ -0,0 +1,44 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'code'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,46 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'name',
'arguments',
'visibility',
'extension_type',
'joomla_plugin_group'
);
$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

@ -0,0 +1,42 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'comment'
);
$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

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,45 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'modified_by'
);
$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

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'version',
'hits',
'id'
);
$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

@ -0,0 +1,46 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'name',
'visibility',
'default',
'extension_type',
'joomla_plugin_group'
);
$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

@ -0,0 +1,42 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'comment'
);
$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

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,45 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'modified_by'
);
$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

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'version',
'hits',
'id'
);
$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

@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'note_php_dashboard_note',
'php_dashboard_methods',
'dashboard_tab'
);

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,44 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'joomla_component'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,45 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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_joomla_plugins',
'addjoomla_plugins'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,45 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'modified_by'
);
$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

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'version',
'hits',
'id'
);
$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

@ -13,7 +13,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->warfields;
$items = $displayData->vxwfields;
$user = JFactory::getUser();
$id = $displayData->item->id;
// set the edit URL

View File

@ -0,0 +1,45 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'system_name',
'plugin_version'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'head',
'main_class_code',
'note_linked_to_notice',
'not_required'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'name',
'description',
'class_extends',
'joomla_plugin_group',
'add_head',
'note_plugin'
);
$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

@ -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');
// get the form
$form = $displayData->getForm();
// 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(
'property_selection',
'method_selection'
);
$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

@ -0,0 +1,44 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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(
'fields'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,50 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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_update_server',
'update_server_url',
'update_server_target',
'note_update_server_note_ftp',
'note_update_server_note_zip',
'note_update_server_note_other',
'update_server',
'add_sales_server',
'sales_server'
);
$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

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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_sql',
'sql',
'add_sql_uninstall',
'sql_uninstall'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,45 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'modified_by'
);
$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

@ -0,0 +1,47 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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',
'version',
'hits',
'id'
);
$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

@ -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');
// get the form
$form = $displayData->getForm();
// 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(
'addreadme',
'readme'
);
$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

@ -0,0 +1,57 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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_php_script_construct',
'php_script_construct',
'add_php_preflight_install',
'php_preflight_install',
'add_php_preflight_update',
'php_preflight_update',
'add_php_preflight_uninstall',
'php_preflight_uninstall',
'add_php_postflight_install',
'php_postflight_install',
'add_php_postflight_update',
'php_postflight_update',
'add_php_method_uninstall',
'php_method_uninstall'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,48 @@
<?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');
// get the form
$form = $displayData->getForm();
// 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_add_files_fullpath',
'addfilesfullpath',
'note_add_folders_fullpath',
'addfoldersfullpath',
'note_constant_paths'
);
$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)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

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