Compare commits

..

24 Commits

Author SHA1 Message Date
ca7138cb4a Release of v3.2.3
Fix site view form missing classes in J4+. Fix permissions tab in items in J4+. Fix site display controller checkEditId function in J4+. Add class methods to the HtmlView classes in J4+. Fix broken toolbar call in HtmlView in J4+. Fix missing scripts and styles fields and methods in the site admin view model. Update subform field layout across JCB for cleaner look. Remove expansion feature. Fix helper area. Fix database mySql update in J4+. Remove phpspreadsheet completely from Joomla 4+. Add option to use powers in preflight event in the installer class. Fix abstract schema class function check default index warring. Fix dynamicGet so that the table values will load again. #1155. Keep jQuery in dynamicGet area for Joomla 3. Add native plugin builder for Joomla 4 & 5. Add basic API for admin views.
2024-08-16 19:20:22 +02:00
b3ced491d7 Release of v3.2.3-beta4
Add native plugin builder for Joomla 4 & 5.
2024-08-15 01:37:23 +02:00
3aaa91daf7 Release of v3.2.3-beta3
Keep jQuery in dynamicGet area for Joomla 3.
2024-08-01 19:40:49 +02:00
ce13c13f05 Release of v3.2.3-beta2
Fix dynamicGet so that the table values will load again. #1155.
2024-08-01 18:10:19 +02:00
101f0e65ed Release of v3.2.3-beta1
Fix abstract schema class function check default index warring.
2024-08-01 10:04:50 +02:00
51e786a197 Release of v3.2.3-alpha3
Fix database mySql update in J4+. Remove phpspreadsheet completely from Joomla 4+. Add option to use powers in preflight event in the installer class.
2024-07-27 22:48:41 +02:00
c55fc67db4 Release of v3.2.3-alpha2
Fix missing scripts and styles fields and methods in the site admin view model. Update subform field layout across JCB for cleaner look. Remove expansion feature. Fix helper area.
2024-07-26 18:33:01 +02:00
fd08d48baf Release of v3.2.3-alpha1
Fix site view form missing classes in J4+. Fix permissions tab in items in J4+. Fix site display controller checkEditId function in J4+. Add class methods to the HtmlView classes in J4+. Fix broken toolbar call in HtmlView in J4+.
2024-07-26 15:33:16 +02:00
36d0eb98ee Release of v3.2.2
Fix auto build from SQL in Joomla 4 and 5. Fix permission issue for admin views. Add extending options to interfaces. Update the Schema class to also update null mismatching if needed. Add repositories for better integration with gitea. Refactored the Data classes. Add new Data classes. Add new subform classes. Fix registry class methods return type. Update all list and custom fields to use the new layouts. Add push options to Joomla Power. Complete the Joomla Power Init and Reset features. Fix Gitea Contents class functions. Fix subform set methods. Improved the Joomla Power Push path. Fix the metadata, metadesc, metakey database issue. Fix function mismatch call in the compiler power class. Fix init feature to only add missing powers. Fix controller postSaveHook function, for correct model class in Joomla 4 and 5. Fix app instances (mismatch) in the install script and schema class when installing from CLI. Add option to use placeholders in Joomla Power namespaces. Fix subform layout of uikit in JCB.
2024-07-20 22:39:19 +02:00
af6649d9ca Release of v3.2.2-rc1
Final testing for stable release!.
2024-07-19 17:29:53 +02:00
15a4678a59 Release of v3.2.2-beta5
Add option to use placeholders in Joomla Power namespaces.
2024-07-19 12:35:06 +02:00
49d2a0bdf4 Update on v3.2.2-beta4 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-18 21:10:14 +02:00
a1705c5360 Release of v3.2.2-beta4
Fix app instances (mismatch) in the install script and schema class when installing from CLI.
2024-07-18 20:48:51 +02:00
b4792c097c Release of v3.2.2-beta3
Fix init feature to only add missing powers. Fix controller postSaveHook function, for correct model class in Joomla 4 and 5.
2024-07-18 17:11:47 +02:00
cab8ffa122 Update on v3.2.2-beta2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-18 14:57:53 +02:00
421bb93ba4 Release of v3.2.2-beta2
Fix function mismatch call in the compiler power class.
2024-07-17 14:55:57 +02:00
b656269527 Release of v3.2.2-beta1
Fix subform set methods. Improved the Joomla Power Push path. Fix the metadata, metadesc, metakey database issue.
2024-07-17 02:39:35 +02:00
9e59163661 Release of v3.2.2-alpha7
Add push options to Joomla Power. Complete the Joomla Power Init and Reset features. Fix Gitea Contents class functions. Last Alpha release (feature block).
2024-07-08 22:53:46 +02:00
1d417c40f1 Release of v3.2.2-alpha6
Add new subform classes. Fix registry class methods return type. Update all list and custom fields to use the new layouts.
2024-06-28 03:48:57 +02:00
7a680bb734 Release of v3.2.2-alpha5
Add repositories for better integration with gitea. Refactored the Data classes. Add new Data classes.
2024-06-21 01:32:05 +02:00
894d691897 Release of v3.2.2-alpha4
Update the Schema class to also update null mismatching if needed.
2024-06-07 23:03:20 +02:00
b67e534b9f Release of v3.2.2-alpha3
Fix permission issue for admin views. Add extending options to interfaces.
2024-06-05 16:29:28 +02:00
dfaaf15ca9 Release of v3.2.2-alpha2
Fix permission issue for admin views.
2024-05-16 15:13:36 +02:00
f8d6607392 Release of v3.2.2-alpha1
Fix auto build from SQL in Joomla 4 and 5.
2024-05-13 12:23:57 +02:00
446 changed files with 33212 additions and 12429 deletions

View File

@ -1,3 +1,48 @@
# v3.2.3
- Fix site view form missing classes in J4+
- Fix permissions tab in items in J4+
- Fix site display controller checkEditId function in J4+
- Add class methods to the HtmlView classes in J4+
- Fix broken toolbar call in HtmlView in J4+
- Fix missing scripts and styles fields and methods in the site admin view model
- Update subform field layout across JCB for cleaner look
- Remove expansion feature
- Fix helper area
- Fix database mySql update in J4+
- Remove phpspreadsheet completely from Joomla 4+
- Add option to use powers in preflight event in the installer class
- Fix abstract schema class function check default index warring
- Fix dynamicGet so that the table values will load again. #1155
- Keep jQuery in dynamicGet area for Joomla 3
- Add native plugin builder for Joomla 4 & 5
- Add basic API for admin views
# v3.2.2
- Fix auto build from SQL in Joomla 4 and 5.
- Fix permission issue for admin views.
- Add extending options to interfaces.
- Update the Schema class to also update null mismatching if needed
- Add repositories for better integration with gitea
- Refactored the Data classes
- Add new Data classes
- Add new subform classes
- Fix registry class methods return type
- Update all list and custom fields to use the new layouts
- Add push options to Joomla Power
- Complete the Joomla Power Init and Reset features
- Fix Gitea Contents class functions
- Fix subform set methods
- Improved the Joomla Power Push path
- Fix the metadata, metadesc, metakey database issue
- Fix function mismatch call in the compiler power class.
- Fix init feature to only add missing powers
- Fix controller postSaveHook function, for correct model class in Joomla 4 and 5
- Fix app instances (mismatch) in the install script and schema class when installing from CLI
- Add option to use placeholders in Joomla Power namespaces.
- Fix subform layout of uikit in JCB
# v3.2.1 # v3.2.1
- Add power path override option on component level. - Add power path override option on component level.

View File

@ -9,7 +9,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 save you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.3) 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) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 10th May, 2024 + *Last Build*: 16th August, 2024
+ *Version*: 3.2.1 + *Version*: 3.2.3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **761616** + *Line count*: **831771**
+ *Field count*: **2097** + *Field count*: **2094**
+ *File count*: **5292** + *File count*: **5670**
+ *Folder count*: **471** + *Folder count*: **496**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -9,7 +9,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 save you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.3) 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) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 10th May, 2024 + *Last Build*: 16th August, 2024
+ *Version*: 3.2.1 + *Version*: 3.2.3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **761616** + *Line count*: **831771**
+ *Field count*: **2097** + *Field count*: **2094**
+ *File count*: **5292** + *File count*: **5670**
+ *Folder count*: **471** + *Folder count*: **496**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -15,7 +15,6 @@
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" /> <action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
<action name="core.edit.created_by" title="COM_COMPONENTBUILDER_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC" /> <action name="core.edit.created_by" title="COM_COMPONENTBUILDER_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC" />
<action name="core.edit.created" title="COM_COMPONENTBUILDER_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC" /> <action name="core.edit.created" title="COM_COMPONENTBUILDER_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC" />
<action name="admin_view.run_expansion" title="COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="admin_view.access" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS_DESC" /> <action name="admin_view.access" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS_DESC" />
<action name="admin_view.batch" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE_DESC" /> <action name="admin_view.batch" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE_DESC" />
<action name="admin_view.create" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE_DESC" /> <action name="admin_view.create" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE_DESC" />
@ -108,7 +107,6 @@
<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.clear_tmp" title="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC" />
<action name="compiler.compiler_animations" title="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS_DESC" /> <action name="compiler.compiler_animations" title="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS_DESC" />
<action name="compiler.dashboard_list" title="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC" /> <action name="compiler.dashboard_list" title="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC" />
<action name="compiler.run_expansion" title="COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="compiler.submenu" title="COM_COMPONENTBUILDER_COMPILER_SUBMENU" description="COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC" /> <action name="compiler.submenu" title="COM_COMPONENTBUILDER_COMPILER_SUBMENU" description="COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC" />
<action name="compiler.translate" title="COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC" /> <action name="compiler.translate" title="COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC" />
<action name="component_admin_views.access" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS_DESC" /> <action name="component_admin_views.access" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS_DESC" />
@ -264,7 +262,6 @@
<action name="custom_code.export" title="COM_COMPONENTBUILDER_CUSTOM_CODES_EXPORT" description="COM_COMPONENTBUILDER_CUSTOM_CODES_EXPORT_DESC" /> <action name="custom_code.export" title="COM_COMPONENTBUILDER_CUSTOM_CODES_EXPORT" description="COM_COMPONENTBUILDER_CUSTOM_CODES_EXPORT_DESC" />
<action name="custom_code.import" title="COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT" description="COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT_DESC" /> <action name="custom_code.import" title="COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT" description="COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT_DESC" />
<action name="custom_code.submenu" title="COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU" description="COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU_DESC" /> <action name="custom_code.submenu" title="COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU" description="COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU_DESC" />
<action name="dynamic_get.run_expansion" title="COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="dynamic_get.access" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS_DESC" /> <action name="dynamic_get.access" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS_DESC" />
<action name="dynamic_get.batch" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE_DESC" /> <action name="dynamic_get.batch" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE_DESC" />
<action name="dynamic_get.create" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_CREATE" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_CREATE_DESC" /> <action name="dynamic_get.create" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_CREATE" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_CREATE_DESC" />
@ -278,7 +275,6 @@
<action name="dynamic_get.export" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_EXPORT" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_EXPORT_DESC" /> <action name="dynamic_get.export" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_EXPORT" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_EXPORT_DESC" />
<action name="dynamic_get.import" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC" /> <action name="dynamic_get.import" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC" />
<action name="dynamic_get.submenu" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC" /> <action name="dynamic_get.submenu" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC" />
<action name="field.run_expansion" title="COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="field.access" title="COM_COMPONENTBUILDER_FIELDS_ACCESS" description="COM_COMPONENTBUILDER_FIELDS_ACCESS_DESC" /> <action name="field.access" title="COM_COMPONENTBUILDER_FIELDS_ACCESS" description="COM_COMPONENTBUILDER_FIELDS_ACCESS_DESC" />
<action name="field.batch" title="COM_COMPONENTBUILDER_FIELDS_BATCH_USE" description="COM_COMPONENTBUILDER_FIELDS_BATCH_USE_DESC" /> <action name="field.batch" title="COM_COMPONENTBUILDER_FIELDS_BATCH_USE" description="COM_COMPONENTBUILDER_FIELDS_BATCH_USE_DESC" />
<action name="field.create" title="COM_COMPONENTBUILDER_FIELDS_CREATE" description="COM_COMPONENTBUILDER_FIELDS_CREATE_DESC" /> <action name="field.create" title="COM_COMPONENTBUILDER_FIELDS_CREATE" description="COM_COMPONENTBUILDER_FIELDS_CREATE_DESC" />
@ -330,7 +326,6 @@
<action name="joomla_component.clone" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC" /> <action name="joomla_component.clone" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC" />
<action name="joomla_component.export_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" /> <action name="joomla_component.export_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
<action name="joomla_component.import_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" /> <action name="joomla_component.import_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
<action name="joomla_component.run_expansion" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" /> <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.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.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />
@ -344,7 +339,6 @@
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_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_component.submenu" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC" />
<action name="joomla_module.get_snippets" title="COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS_DESC" /> <action name="joomla_module.get_snippets" title="COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="joomla_module.run_expansion" title="COM_COMPONENTBUILDER_JOOMLA_MODULE_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="joomla_module.access" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS_DESC" /> <action name="joomla_module.access" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS_DESC" />
<action name="joomla_module.batch" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE_DESC" /> <action name="joomla_module.batch" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE_DESC" />
<action name="joomla_module.create" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE_DESC" /> <action name="joomla_module.create" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE_DESC" />
@ -385,7 +379,6 @@
<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_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.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.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.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.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.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE_DESC" />
@ -419,6 +412,7 @@
<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.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="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" />
<action name="joomla_power.init" title="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC" /> <action name="joomla_power.init" title="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC" />
<action name="joomla_power.push" title="COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS_DESC" />
<action name="joomla_power.reset" title="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC" /> <action name="joomla_power.reset" title="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC" />
<action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" /> <action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" />
<action name="joomla_power.batch" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE_DESC" /> <action name="joomla_power.batch" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE_DESC" />
@ -508,7 +502,6 @@
<action name="placeholder.submenu" title="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU" description="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC" /> <action name="placeholder.submenu" title="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU" description="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC" />
<action name="power.init" title="COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS_DESC" /> <action name="power.init" title="COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS_DESC" />
<action name="power.reset" title="COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC" /> <action name="power.reset" title="COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC" />
<action name="power.run_expansion" title="COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="power.access" title="COM_COMPONENTBUILDER_POWERS_ACCESS" description="COM_COMPONENTBUILDER_POWERS_ACCESS_DESC" /> <action name="power.access" title="COM_COMPONENTBUILDER_POWERS_ACCESS" description="COM_COMPONENTBUILDER_POWERS_ACCESS_DESC" />
<action name="power.batch" title="COM_COMPONENTBUILDER_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_POWERS_BATCH_USE_DESC" /> <action name="power.batch" title="COM_COMPONENTBUILDER_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_POWERS_BATCH_USE_DESC" />
<action name="power.create" title="COM_COMPONENTBUILDER_POWERS_CREATE" description="COM_COMPONENTBUILDER_POWERS_CREATE_DESC" /> <action name="power.create" title="COM_COMPONENTBUILDER_POWERS_CREATE" description="COM_COMPONENTBUILDER_POWERS_CREATE_DESC" />
@ -521,6 +514,18 @@
<action name="power.edit.state" title="COM_COMPONENTBUILDER_POWERS_EDIT_STATE" description="COM_COMPONENTBUILDER_POWERS_EDIT_STATE_DESC" /> <action name="power.edit.state" title="COM_COMPONENTBUILDER_POWERS_EDIT_STATE" description="COM_COMPONENTBUILDER_POWERS_EDIT_STATE_DESC" />
<action name="power.version" title="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION_DESC" /> <action name="power.version" title="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION_DESC" />
<action name="power.submenu" title="COM_COMPONENTBUILDER_POWERS_SUBMENU" description="COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC" /> <action name="power.submenu" title="COM_COMPONENTBUILDER_POWERS_SUBMENU" description="COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC" />
<action name="repository.access" title="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS" description="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC" />
<action name="repository.batch" title="COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE" description="COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE_DESC" />
<action name="repository.create" title="COM_COMPONENTBUILDER_REPOSITORIES_CREATE" description="COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC" />
<action name="repository.dashboard_list" title="COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST_DESC" />
<action name="repository.delete" title="COM_COMPONENTBUILDER_REPOSITORIES_DELETE" description="COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC" />
<action name="repository.edit" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC" />
<action name="repository.edit.created_by" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC" />
<action name="repository.edit.created" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC" />
<action name="repository.edit.own" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC" />
<action name="repository.edit.state" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC" />
<action name="repository.version" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC" />
<action name="repository.submenu" title="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU" description="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC" />
<action name="search.access" title="COM_COMPONENTBUILDER_SEARCH_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC" /> <action name="search.access" title="COM_COMPONENTBUILDER_SEARCH_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC" />
<action name="search.compiler" title="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC" /> <action name="search.compiler" title="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC" />
<action name="search.dashboard_list" title="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST_DESC" /> <action name="search.dashboard_list" title="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST_DESC" />
@ -573,7 +578,6 @@
<action name="template.export" title="COM_COMPONENTBUILDER_TEMPLATES_EXPORT" description="COM_COMPONENTBUILDER_TEMPLATES_EXPORT_DESC" /> <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.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="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.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.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" /> <action name="validation_rule.create" title="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE" description="COM_COMPONENTBUILDER_VALIDATION_RULES_CREATE_DESC" />
@ -814,6 +818,17 @@
<action name="server.access" title="COM_COMPONENTBUILDER_SERVERS_ACCESS" description="COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC" /> <action name="server.access" title="COM_COMPONENTBUILDER_SERVERS_ACCESS" description="COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC" />
<action name="server.version" title="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION_DESC" /> <action name="server.version" title="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION_DESC" />
</section> </section>
<section name="repository">
<action name="repository.edit" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC" />
<action name="repository.edit.own" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC" />
<action name="repository.edit.state" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC" />
<action name="repository.edit.created_by" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC" />
<action name="repository.edit.created" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC" />
<action name="repository.create" title="COM_COMPONENTBUILDER_REPOSITORIES_CREATE" description="COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC" />
<action name="repository.delete" title="COM_COMPONENTBUILDER_REPOSITORIES_DELETE" description="COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC" />
<action name="repository.access" title="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS" description="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC" />
<action name="repository.version" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC" />
</section>
<section name="help_document"> <section name="help_document">
<action name="help_document.edit" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_DESC" /> <action name="help_document.edit" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_DESC" />
<action name="help_document.edit.own" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN_DESC" /> <action name="help_document.edit.own" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN_DESC" />

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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 <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
###ADMIN_HELPER_CLASS_HEADER### ###ADMIN_HELPER_CLASS_HEADER###

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###SITE_CUSTOM_POWER_AUTOLOADER### ###SITE_POWER_AUTOLOADER###
###SITE_HELPER_CLASS_HEADER### ###SITE_HELPER_CLASS_HEADER###

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
###ADMIN_COMPONENT_HEADER### ###ADMIN_COMPONENT_HEADER###

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###SITE_CUSTOM_POWER_AUTOLOADER### ###SITE_POWER_AUTOLOADER###
###SITE_COMPONENT_HEADER### ###SITE_COMPONENT_HEADER###

View File

@ -28,6 +28,8 @@ HTML::_('bootstrap.renderModal');
/** /**
* Script File of ###Component### Component * Script File of ###Component### Component
*
* @since 1.5.0
*/ */
class Com_###Component###InstallerScript class Com_###Component###InstallerScript
{ {
@ -35,6 +37,7 @@ class Com_###Component###InstallerScript
* Constructor * Constructor
* *
* @param ComponentAdapter $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* @since 1.5.0
*/ */
public function __construct(ComponentAdapter $parent) {} public function __construct(ComponentAdapter $parent) {}
@ -44,6 +47,7 @@ class Com_###Component###InstallerScript
* @param ComponentAdapter $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
* @since 1.5.0
*/ */
public function install(ComponentAdapter $parent) {} public function install(ComponentAdapter $parent) {}
@ -51,6 +55,8 @@ class Com_###Component###InstallerScript
* Called on uninstallation * Called on uninstallation
* *
* @param ComponentAdapter $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
*
* @since 1.5.0
*/ */
public function uninstall(ComponentAdapter $parent) public function uninstall(ComponentAdapter $parent)
{###UNINSTALLSCRIPT### {###UNINSTALLSCRIPT###
@ -68,6 +74,7 @@ class Com_###Component###InstallerScript
* @param ComponentAdapter $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
* @since 1.5.0
*/ */
public function update(ComponentAdapter $parent){} public function update(ComponentAdapter $parent){}
@ -78,6 +85,7 @@ class Com_###Component###InstallerScript
* @param ComponentAdapter $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
* @since 1.5.0
*/ */
public function preflight($type, ComponentAdapter $parent) public function preflight($type, ComponentAdapter $parent)
{ {
@ -121,6 +129,7 @@ class Com_###Component###InstallerScript
* @param ComponentAdapter $parent The object responsible for running this script * @param ComponentAdapter $parent The object responsible for running this script
* *
* @return boolean True on success * @return boolean True on success
* @since 1.5.0
*/ */
public function postflight($type, ComponentAdapter $parent) public function postflight($type, ComponentAdapter $parent)
{ {
@ -138,76 +147,77 @@ class Com_###Component###InstallerScript
} }
/** /**
* Remove folders with files * Remove folders with files (with ignore options)
* *
* @param string $dir The path to folder to remove * @param string $dir The path to the folder to remove.
* @param boolean $ignore The folders and files to ignore and not remove * @param array|null $ignore The folders and files to ignore and not remove.
*
* @return boolean True in all is removed
* *
* @return bool True if all specified files/folders are removed, false otherwise.
* @since 3.2.2
*/ */
protected function removeFolder($dir, $ignore = false) protected function removeFolder(string $dir, ?array $ignore = null): bool
{ {
if (Folder::exists($dir)) if (!is_dir($dir))
{ {
$it = new RecursiveDirectoryIterator($dir); return false;
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
// remove ending /
$dir = rtrim($dir, '/');
// now loop the files & folders
foreach ($it as $file)
{
if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue;
// set file dir
$file_dir = $file->getPathname();
// check if this is a dir or a file
if ($file->isDir())
{
$keeper = false;
if ($this->checkArray($ignore))
{
foreach ($ignore as $keep)
{
if (strpos($file_dir, $dir.'/'.$keep) !== false)
{
$keeper = true;
}
}
}
if ($keeper)
{
continue;
}
Folder::delete($file_dir);
}
else
{
$keeper = false;
if ($this->checkArray($ignore))
{
foreach ($ignore as $keep)
{
if (strpos($file_dir, $dir.'/'.$keep) !== false)
{
$keeper = true;
}
}
}
if ($keeper)
{
continue;
}
File::delete($file_dir);
}
}
// delete the root folder if not ignore found
if (!$this->checkArray($ignore))
{
return Folder::delete($dir);
}
return true;
} }
return false;
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
$it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
// Remove trailing slash
$dir = rtrim($dir, '/');
foreach ($it as $file)
{
$filePath = $file->getPathname();
$relativePath = str_replace($dir . '/', '', $filePath);
if ($ignore !== null && in_array($relativePath, $ignore, true))
{
continue;
}
if ($file->isDir())
{
Folder::delete($filePath);
}
else
{
File::delete($filePath);
}
}
// Delete the root folder if there are no ignored files/folders left
if ($ignore === null || $this->isDirEmpty($dir, $ignore))
{
return Folder::delete($dir);
}
return true;
}
/**
* Check if a directory is empty considering ignored files/folders.
*
* @param string $dir The path to the folder to check.
* @param array $ignore The folders and files to ignore.
*
* @return bool True if the directory is empty or contains only ignored items, false otherwise.
* @since 3.2.1
*/
protected function isDirEmpty(string $dir, array $ignore): bool
{
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
foreach ($it as $file)
{
$relativePath = str_replace($dir . '/', '', $file->getPathname());
if (!in_array($relativePath, $ignore, true))
{
return false;
}
}
return true;
} }
/** /**
@ -216,6 +226,7 @@ class Com_###Component###InstallerScript
* @input array The array to check * @input array The array to check
* *
* @returns bool/int number of items in array on success * @returns bool/int number of items in array on success
* @since 3.2.2
*/ */
protected function checkArray($array, $removeEmptyString = false) protected function checkArray($array, $removeEmptyString = false)
{ {
@ -235,6 +246,41 @@ class Com_###Component###InstallerScript
} }
return $nr; return $nr;
} }
return false;
}
/**
* Ensures that a class in the namespace is available.
* If the class is not already loaded, it attempts to load it via the specified autoloader.
*
* @param string $className The fully qualified name of the class to check.
*
* @return bool True if the class exists or was successfully loaded, false otherwise.
* @since 3.2.2
*/
protected function classExists(string $className): bool
{
if (class_exists($className, true))
{
return true;
}
// Autoloaders to check
$autoloaders = [###INSTALLER_POWER_AUTOLOADER_ARRAY###];
foreach ($autoloaders as $autoloader)
{
if (file_exists($autoloader))
{
require_once $autoloader;
if (class_exists($className, true))
{
return true;
}
}
}
return false; return false;
}###INSTALLERMETHODS### }###INSTALLERMETHODS###
} }

View File

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

View File

@ -184,6 +184,12 @@
"rename": false, "rename": false,
"type": "file" "type": "file"
}, },
"script_powerloader.php": {
"naam": "script_powerloader.php",
"path": "c0mp0n3nt/",
"rename": false,
"type": "file"
},
"install.mysql.utf8.sql": { "install.mysql.utf8.sql": {
"naam": "install.mysql.utf8.sql", "naam": "install.mysql.utf8.sql",
"path": "c0mp0n3nt/admin/sql", "path": "c0mp0n3nt/admin/sql",

View File

@ -15,7 +15,7 @@ defined('_JCB_TEMPLATE') or die;
###BOM### ###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper; namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper;
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
###ADMIN_HELPER_CLASS_HEADER### ###ADMIN_HELPER_CLASS_HEADER###

View File

@ -14,7 +14,7 @@ defined('_JCB_TEMPLATE') or die;
?> ?>
###BOM### ###BOM###
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
// (soon) use Joomla\CMS\Association\AssociationExtensionInterface; // (soon) use Joomla\CMS\Association\AssociationExtensionInterface;
use Joomla\CMS\Categories\CategoryFactoryInterface; use Joomla\CMS\Categories\CategoryFactoryInterface;
@ -55,10 +55,10 @@ return new class () implements ServiceProviderInterface
{ {
// (soon) $container->set(AssociationExtensionInterface::class, new AssociationsHelper()); // (soon) $container->set(AssociationExtensionInterface::class, new AssociationsHelper());
$container->registerServiceProvider(new CategoryFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new CategoryFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->registerServiceProvider(new MVCFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new MVCFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->registerServiceProvider(new ComponentDispatcherFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new ComponentDispatcherFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->registerServiceProvider(new RouterFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new RouterFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->set( $container->set(
ComponentInterface::class, ComponentInterface::class,

View File

@ -27,6 +27,62 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
* @since 3.10.11
*/
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
/** /**
* ###Views### view display method * ###Views### view display method
* *
@ -43,7 +99,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();###ADMIN_DIPLAY_METHOD### $this->user ??= $this->getCurrentUser();###ADMIN_DIPLAY_METHOD###
$this->saveOrder = $this->listOrder == 'a.ordering'; $this->saveOrder = $this->listOrder == 'a.ordering';
// set the return here value // set the return here value
$this->return_here = urlencode(base64_encode((string) Uri::getInstance())); $this->return_here = urlencode(base64_encode((string) Uri::getInstance()));

View File

@ -261,7 +261,7 @@ class ###View###Controller extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -27,6 +27,86 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* ###View### view display method * ###View### view display method
* *
@ -41,7 +121,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_###component###'); $this->params = ComponentHelper::getParams('com_###component###');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts');

View File

@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Api\Controller;
###API_VIEWS_CONTROLLER_HEADER###
// No direct access to this file
\defined('_JEXEC') or die;
/**
* ###Views### Api Controller
*
* @since 4.0.0
*/
class ###Views###Controller extends ApiController
{
/**
* The content type of the item.
*
* @var string
* @since 4.0.0
*/
protected $contentType = '###views###';
/**
* The default view for the display method.
*
* @var string
* @since 3.0
*/
protected $default_view = '###views###';
}

View File

@ -0,0 +1,30 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Api\View\###Views###;
###API_VIEWS_JSON_HEADER###
// No direct access to this file
\defined('_JEXEC') or die;
/**
* ###Component### Json View class for the ###Views###
*
* @since 4.0.0
*/
class JsonapiView extends BaseApiView
{
}

View File

@ -0,0 +1,72 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Api\Controller;
###API_VIEW_CONTROLLER_HEADER###
// No direct access to this file
\defined('_JEXEC') or die;
/**
* ###View### Api Controller
*
* @since 4.0.0
*/
class ###View###Controller extends ApiController
{
/**
* The content type of the item.
*
* @var string
* @since 4.0.0
*/
protected $contentType = '###view###';
/**
* The default view for the display method.
*
* @var string
* @since 3.0
*/
protected $default_view = '###view###';
/**
* 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 = [])
{###JCONTROLLERFORM_ALLOWADD###
}
/**
* 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 = [], $key = 'id')
{###JCONTROLLERFORM_ALLOWEDIT###
}
}

View File

@ -0,0 +1,30 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Api\View\###View###;
###API_VIEW_JSON_HEADER###
// No direct access to this file
\defined('_JEXEC') or die;
/**
* ###View### Json View class
*
* @since 4.0.0
*/
class JsonapiView extends BaseApiView
{
}

View File

@ -27,6 +27,38 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The user object.
*
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
* @since 3.10.11
*/
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
/** /**
* Display the view * Display the view
* *
@ -42,11 +74,11 @@ class HtmlView extends BaseHtmlView
// get the application // get the application
$this->app ??= Factory::getApplication(); $this->app ??= Factory::getApplication();
// get the user object // get the user object
$this->user ??= $this->app->getIdentity(); $this->user ??= $this->getCurrentUser();
// get global action permissions // get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###'); $this->canDo = ###Component###Helper::getActions('###sview###');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles') ?? [];
$this->scripts = $this->get('Scripts');###CUSTOM_ADMIN_DIPLAY_METHOD### $this->scripts = $this->get('Scripts') ?? [];###CUSTOM_ADMIN_DIPLAY_METHOD###
// Set the html view document stuff // Set the html view document stuff
$this->_prepareDocument(); $this->_prepareDocument();

View File

@ -0,0 +1,18 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die;###INSTALLER_POWER_HELPER###

View File

@ -19,7 +19,6 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerAdapter; use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Installer\InstallerScriptInterface; use Joomla\CMS\Installer\InstallerScriptInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Log\Log; use Joomla\CMS\Log\Log;
use Joomla\CMS\Version; use Joomla\CMS\Version;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
@ -39,7 +38,6 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* The CMS Application. * The CMS Application.
* *
* @var CMSApplication
* @since 4.4.2 * @since 4.4.2
*/ */
protected $app; protected $app;
@ -54,7 +52,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* The version number of the extension. * The version number of the extension.
* *
* @var string * @var string
* @since 3.6 * @since 3.6
*/ */
protected $release; protected $release;
@ -62,7 +60,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* The table the parameters are stored in. * The table the parameters are stored in.
* *
* @var string * @var string
* @since 3.6 * @since 3.6
*/ */
protected $paramTable; protected $paramTable;
@ -70,7 +68,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* The extension name. This should be set in the installer script. * The extension name. This should be set in the installer script.
* *
* @var string * @var string
* @since 3.6 * @since 3.6
*/ */
protected $extension; protected $extension;
@ -78,7 +76,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* A list of files to be deleted * A list of files to be deleted
* *
* @var array * @var array
* @since 3.6 * @since 3.6
*/ */
protected $deleteFiles = []; protected $deleteFiles = [];
@ -86,7 +84,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* A list of folders to be deleted * A list of folders to be deleted
* *
* @var array * @var array
* @since 3.6 * @since 3.6
*/ */
protected $deleteFolders = []; protected $deleteFolders = [];
@ -94,7 +92,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* A list of CLI script files to be copied to the cli directory * A list of CLI script files to be copied to the cli directory
* *
* @var array * @var array
* @since 3.6 * @since 3.6
*/ */
protected $cliScriptFiles = []; protected $cliScriptFiles = [];
@ -102,7 +100,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* Minimum PHP version required to install the extension * Minimum PHP version required to install the extension
* *
* @var string * @var string
* @since 3.6 * @since 3.6
*/ */
protected $minimumPhp; protected $minimumPhp;
@ -110,7 +108,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* Minimum Joomla! version required to install the extension * Minimum Joomla! version required to install the extension
* *
* @var string * @var string
* @since 3.6 * @since 3.6
*/ */
protected $minimumJoomla; protected $minimumJoomla;
@ -164,7 +162,6 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function install(InstallerAdapter $adapter): bool {return true;} public function install(InstallerAdapter $adapter): bool {return true;}
@ -186,7 +183,6 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function uninstall(InstallerAdapter $adapter): bool public function uninstall(InstallerAdapter $adapter): bool
@ -209,7 +205,6 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function preflight(string $type, InstallerAdapter $adapter): bool public function preflight(string $type, InstallerAdapter $adapter): bool
@ -254,7 +249,6 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method * @param InstallerAdapter $adapter The adapter calling this method
* *
* @return boolean True on success * @return boolean True on success
*
* @since 4.2.0 * @since 4.2.0
*/ */
public function postflight(string $type, InstallerAdapter $adapter): bool public function postflight(string $type, InstallerAdapter $adapter): bool
@ -279,11 +273,84 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
return true; return true;
} }
/**
* Remove folders with files (with ignore options)
*
* @param string $dir The path to the folder to remove.
* @param array|null $ignore The folders and files to ignore and not remove.
*
* @return bool True if all specified files/folders are removed, false otherwise.
* @since 3.2.2
*/
protected function removeFolder(string $dir, ?array $ignore = null): bool
{
if (!is_dir($dir))
{
return false;
}
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
$it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
// Remove trailing slash
$dir = rtrim($dir, '/');
foreach ($it as $file)
{
$filePath = $file->getPathname();
$relativePath = str_replace($dir . '/', '', $filePath);
if ($ignore !== null && in_array($relativePath, $ignore, true))
{
continue;
}
if ($file->isDir())
{
Folder::delete($filePath);
}
else
{
File::delete($filePath);
}
}
// Delete the root folder if there are no ignored files/folders left
if ($ignore === null || $this->isDirEmpty($dir, $ignore))
{
return Folder::delete($dir);
}
return true;
}
/**
* Check if a directory is empty considering ignored files/folders.
*
* @param string $dir The path to the folder to check.
* @param array $ignore The folders and files to ignore.
*
* @return bool True if the directory is empty or contains only ignored items, false otherwise.
* @since 3.2.1
*/
protected function isDirEmpty(string $dir, array $ignore): bool
{
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
foreach ($it as $file)
{
$relativePath = str_replace($dir . '/', '', $file->getPathname());
if (!in_array($relativePath, $ignore, true))
{
return false;
}
}
return true;
}
/** /**
* Remove the files and folders in the given array from * Remove the files and folders in the given array from
* *
* @return void * @return void
*
* @since 3.6 * @since 3.6
*/ */
protected function removeFiles() protected function removeFiles()
@ -315,7 +382,6 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* Moves the CLI scripts into the CLI folder in the CMS * Moves the CLI scripts into the CLI folder in the CMS
* *
* @return void * @return void
*
* @since 3.6 * @since 3.6
*/ */
protected function moveCliFiles() protected function moveCliFiles()
@ -346,7 +412,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $contentHistoryOptions * @param string $contentHistoryOptions
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function setContentType( protected function setContentType(
string $typeTitle, string $typeTitle,
@ -408,7 +474,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $textPrefix * @param string $textPrefix
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function setActionLogConfig( protected function setActionLogConfig(
string $typeTitle, string $typeTitle,
@ -461,7 +527,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* Set action logs extensions integration * Set action logs extensions integration
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function setActionLogsExtensions(): void protected function setActionLogsExtensions(): void
{ {
@ -502,7 +568,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $rules The component rules * @param string $rules The component rules
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function setAssetsRules(string $rules): void protected function setAssetsRules(string $rules): void
{ {
@ -540,7 +606,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $params The component rules * @param string $params The component rules
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function setExtensionsParams(string $params): void protected function setExtensionsParams(string $params): void
{ {
@ -583,7 +649,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $dataType This datatype we will change the rules column to if it to small. * @param string $dataType This datatype we will change the rules column to if it to small.
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function setDatabaseAssetsRulesFix(int $accessWorseCase, string $dataType): void protected function setDatabaseAssetsRulesFix(int $accessWorseCase, string $dataType): void
{ {
@ -618,7 +684,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param bool $fields The switch to also remove related field data * @param bool $fields The switch to also remove related field data
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeViewData(string $context, bool $fields = false): void protected function removeViewData(string $context, bool $fields = false): void
{ {
@ -641,7 +707,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $context The view context * @param string $context The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeContentTypes(string $context): void protected function removeContentTypes(string $context): void
{ {
@ -698,7 +764,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $context The view context * @param string $context The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeFields(string $context): void protected function removeFields(string $context): void
{ {
@ -760,7 +826,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param array $ids The view context * @param array $ids The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeFieldsValues(string $context, array $ids): void protected function removeFieldsValues(string $context, array $ids): void
{ {
@ -791,7 +857,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $context The view context * @param string $context The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeFieldsGroups(string $context): void protected function removeFieldsGroups(string $context): void
{ {
@ -846,7 +912,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $context The view context * @param string $context The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeViewHistory(string $context): void protected function removeViewHistory(string $context): void
{ {
@ -878,7 +944,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param array $ids The type ids * @param array $ids The type ids
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeUcmBase(array $ids): void protected function removeUcmBase(array $ids): void
{ {
@ -911,7 +977,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $context The view context * @param string $context The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeUcmContent(string $context): void protected function removeUcmContent(string $context): void
{ {
@ -943,7 +1009,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $context The view context * @param string $context The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeContentItemTagMap(string $context): void protected function removeContentItemTagMap(string $context): void
{ {
@ -978,7 +1044,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* @param string $context The view context * @param string $context The view context
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeActionLogConfig(string $context): void protected function removeActionLogConfig(string $context): void
{ {
@ -1008,7 +1074,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* Remove Asset Table Integrated * Remove Asset Table Integrated
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeAssetData(): void protected function removeAssetData(): void
{ {
@ -1036,7 +1102,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* Remove action logs extensions integrated * Remove action logs extensions integrated
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeActionLogsExtensions(): void protected function removeActionLogsExtensions(): void
{ {
@ -1066,7 +1132,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
* Remove remove database fix (if possible) * Remove remove database fix (if possible)
* *
* @return void * @return void
* @since 4.4.2 * @since 4.4.2
*/ */
protected function removeDatabaseAssetsRulesFix(): void protected function removeDatabaseAssetsRulesFix(): void
{ {
@ -1095,5 +1161,40 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
); );
} }
} }
}
/**
* Ensures that a class in the namespace is available.
* If the class is not already loaded, it attempts to load it via the specified autoloader.
*
* @param string $className The fully qualified name of the class to check.
*
* @return bool True if the class exists or was successfully loaded, false otherwise.
* @since 4.0.1
*/
protected function classExists(string $className): bool
{
if (class_exists($className, true))
{
return true;
}
// Autoloaders to check
$autoloaders = [###INSTALLER_POWER_AUTOLOADER_ARRAY###];
foreach ($autoloaders as $autoloader)
{
if (file_exists($autoloader))
{
require_once $autoloader;
if (class_exists($className, true))
{
return true;
}
}
}
return false;
}###INSTALLERMETHODS### }###INSTALLERMETHODS###
} }

View File

@ -277,7 +277,7 @@ class ###View###Controller extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -27,6 +27,86 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral view item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/** /**
* ###View### view display method * ###View### view display method
* *
@ -41,11 +121,11 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_###component###'); $this->params = ComponentHelper::getParams('com_###component###');
$this->useCoreUI = true; $this->useCoreUI = true;
// Assign the variables // Assign the variables
$this->form = $this->get('Form'); $this->form ??= $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles') ?? [];
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts') ?? [];
// get action permissions // get action permissions
$this->canDo = ###Component###Helper::getActions('###view###', $this->item); $this->canDo = ###Component###Helper::getActions('###view###', $this->item);
// get input // get input
@ -97,6 +177,9 @@ class HtmlView extends BaseHtmlView
protected function addToolbar(): void protected function addToolbar(): void
{ {
###ADDTOOLBAR### ###ADDTOOLBAR###
// now initiate the toolbar
$this->toolbar ??= Toolbar::getInstance();
} }
/** /**

View File

@ -36,6 +36,28 @@ class ###View###Model extends AdminModel
*/ */
protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###; protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###;
/**
* The styles array.
*
* @var array
* @since 4.3
*/
protected array $styles = [
'components/com_###component###/assets/css/site.css',
'components/com_###component###/assets/css/###view###.css'
];
/**
* The scripts array.
*
* @var array
* @since 4.3
*/
protected array $scripts = [
'components/com_###component###/assets/js/site.js',
'media/com_###component###/js/###view###.js'
];
/** /**
* @var string The prefix to use with controller messages. * @var string The prefix to use with controller messages.
* @since 1.6 * @since 1.6
@ -119,13 +141,47 @@ class ###View###Model extends AdminModel
} }
/** /**
* Method to get the script that have to be included on the form * Method to get the styles that have to be included on the view
* *
* @return string script files * @return array styles files
* @since 4.3
*/ */
public function getScript() public function getStyles(): array
{ {
return 'media/com_###component###/js/###view###.js'; return $this->styles;
}
/**
* Method to set the styles that have to be included on the view
*
* @return void
* @since 4.3
*/
public function setStyles(string $path): void
{
$this->styles[] = $path;
}
/**
* Method to get the script that have to be included on the view
*
* @return array script files
* @since 4.3
*/
public function getScripts(): array
{
return $this->scripts;
}
/**
* Method to set the script that have to be included on the view
*
* @return void
* @since 4.3
*/
public function setScript(string $path): void
{
$this->scripts[] = $path;
} }
/** /**

View File

@ -15,9 +15,13 @@ defined('_JCB_TEMPLATE') or die;
###BOM### ###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controller; namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controller;
use Joomla\Input\Input;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Controller\BaseController; use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Router\Route; use Joomla\CMS\Router\Route;
use Joomla\CMS\User\User;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
@ -31,13 +35,50 @@ use Joomla\CMS\Language\Text;
*/ */
class DisplayController extends BaseController class DisplayController extends BaseController
{ {
/**
* The allowed edit views.
*
* @var array
* @since 4.0.0
*/
protected array $allowed_edit_views = [###SITE_ALLOW_EDIT_VIEWS_ARRAY###
];
/**
* The application identity object.
*
* @var User
* @since 4.0.0
*/
protected $identity;
/**
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'default_task', 'model_path', and
* 'view_path' (this list is not meant to be comprehensive).
* @param MVCFactoryInterface|null $factory The factory.
* @param CMSApplication|null $app The Application for the dispatcher
* @param Input|null $input The Input object for the request
*
* @throws \Exception
* @since 3.0.1
*/
public function __construct($config = [], MVCFactoryInterface $factory = null, $app = null, $input = null)
{
$app ??= Factory::getApplication();
$this->identity ??= $app->getIdentity();
parent::__construct($config, $factory, $app, $input);
}
/** /**
* Method to display a view. * Method to display a view.
* *
* @param boolean $cachable If true, the view output will be cached. * @param boolean $cachable If true, the view output will be cached.
* @param boolean $urlparams An array of safe URL parameters and their variable types, for valid values see {@link InputFilter::clean()}. * @param boolean|array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link InputFilter::clean()}.
* *
* @return DisplayController This object to support chaining. * @return DisplayController This object to support chaining.
* @throws \Exception
* @since 1.5 * @since 1.5
*/ */
function display($cachable = false, $urlparams = false) function display($cachable = false, $urlparams = false)
@ -51,14 +92,13 @@ class DisplayController extends BaseController
$cachable = true; $cachable = true;
// ensure that the view is not cashable if edit view or if user is logged in // ensure that the view is not cashable if edit view or if user is logged in
$user = $this->app->getIdentity(); if ($this->identity->get('id') || $this->input->getMethod() === 'POST' || $isEdit)
if ($user->get('id') || $this->input->getMethod() === 'POST' || $isEdit)
{ {
$cachable = false; $cachable = false;
} }
// Check for edit form. // Check for edit form.
if ($isEdit && !$this->checkEditId('com_###component###.edit.'.$view, $id)) if ($isEdit && !$this->checkEditId($view, $id))
{ {
// check if item was opened from other than its own list view // check if item was opened from other than its own list view
$ref = $this->input->getCmd('ref', 0); $ref = $this->input->getCmd('ref', 0);
@ -68,12 +108,12 @@ class DisplayController extends BaseController
if ($refid > 0 && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref)) if ($refid > 0 && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{ {
// redirect to item of ref // redirect to item of ref
$this->setRedirect(Route::_('index.php?option=com_###component###&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); $this->setRedirect(Route::_('index.php?option=com_###component###&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false));
} }
elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref)) elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{ {
// redirect to ref // redirect to ref
$this->setRedirect(Route::_('index.php?option=com_###component###&view='.(string)$ref, false)); $this->setRedirect(Route::_('index.php?option=com_###component###&view=' . (string) $ref, false));
} }
else else
{ {
@ -115,18 +155,133 @@ class DisplayController extends BaseController
return $this; return $this;
} }
protected function checkEditView($view) /**
* Method to check whether an ID is in the edit list.
*
* @param string $context The view name.
* @param integer $id The ID of the record to add to the edit list.
*
* @return boolean True if the ID is in the edit list.
*
* @throws \Exception
* @since 3.0
*/
protected function checkEditId($context, $id)
{
if (parent::checkEditId("com_###component###.edit.{$context}", $id))
{
return true;
}
// check user edit access
if ($this->canEditId($context, $id))
{
$this->holdEditId("com_###component###.edit.{$context}", $id);
return true;
}
return false;
}
/**
* Method to check whether an ID is allowed to be edited by the active user.
*
* @param string $view The view name.
* @param integer $id The ID of the record to add to the edit list.
*
* @return boolean True if the ID is in the edit list.
*
* @since 5.0.2
*/
protected function canEditId($view, $id): bool
{
// check that this view is even allowed
$allowed = $this->getAllowedEditView($view);
if ($allowed === null)
{
return false;
}
// check if this item has custom function set for canEditId
if (isset($allowed['function'])
&& method_exists($this, $allowed['function'])
&& $this->{$allowed['function']}(['id' => $id], 'id'))
{
return true;
}
// check if this item can be accessed (and has access)
$access = true;
if (isset($allowed['access']))
{
$access = ($this->identity->authorise($allowed['access'], "com_###component###.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['access'], 'com_###component###'));
}
// check if this item can be edited
$edit = false;
if ($access && isset($allowed['edit']))
{
$edit = ($this->identity->authorise($allowed['edit'], "com_###component###.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['edit'], 'com_###component###'));
}
// check if this item can be edited by owner
if ($access && !$edit && isset($allowed['edit.own']))
{
$edit = ($this->identity->authorise($allowed['edit.own'], "com_###component###.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['edit.own'], 'com_###component###'));
}
return $edit;
}
/**
* Checks if the provided view is an edit view.
*
* This method verifies whether the given view name is recognized as an edit view.
* It uses the StringHelper::check() method to validate the input and then checks
* against a predefined list of edit views.
*
* @param string|null $view The name of the view to check.
*
* @return bool True if the view is an edit view, false otherwise.
* @since 4.0.0
*/
protected function checkEditView(?string $view): bool
{ {
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($view)) if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($view))
{ {
$views = [###SITE_EDIT_VIEW_ARRAY### // check if this is an edit view
]; if (isset($this->allowed_edit_views[$view]))
// check if this is a edit view
if (in_array($view,$views))
{ {
return true; return true;
} }
} }
return false; return false;
} }
/**
* Get the allowed edit view permission map
*
* @param string|null $view The name of the view to check.
*
* @return array|null The permissions map
* @since 5.0.2
*/
protected function getAllowedEditView(?string $view): ?array
{
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($view))
{
// check if this is an edit view
if (isset($this->allowed_edit_views[$view]))
{
return $this->allowed_edit_views[$view];
}
}
return null;
}###SITE_ALLOW_EDIT_VIEWS_FUNCTIONS###
} }

View File

@ -15,7 +15,7 @@ defined('_JCB_TEMPLATE') or die;
###BOM### ###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper; namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper;
###SITE_CUSTOM_POWER_AUTOLOADER### ###SITE_POWER_AUTOLOADER###
###SITE_HELPER_CLASS_HEADER### ###SITE_HELPER_CLASS_HEADER###

View File

@ -27,6 +27,54 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The user object.
*
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
* @since 3.10.11
*/
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
/** /**
* Display the view * Display the view
* *
@ -82,6 +130,7 @@ class HtmlView extends BaseHtmlView
{ {
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = Toolbar::getInstance(); $this->toolbar = Toolbar::getInstance();
}###SITE_GET_MODULE### }###SITE_GET_MODULE###

View File

@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controll
* *
* @since 1.6 * @since 1.6
*/ */
class ###SView###Controller extends FormController class ###SView###Controller extends Joomla___907ccae5_57a9_44b9_a8aa_5b905d1cd70f___Power
{ {
/** /**
* The prefix to use with controller messages. * The prefix to use with controller messages.
@ -107,14 +107,14 @@ class ###SView###Controller extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModelLegacy $model The data model object. * @param Joomla___6dce7a1b_cfc3_4c2a_837d_be9cbc902446___Power $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 12.2 * @since 12.2
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = []) protected function postSaveHook(Joomla___6dce7a1b_cfc3_4c2a_837d_be9cbc902446___Power $model, $validData = [])
{ {
} }
} }

View File

@ -27,6 +27,38 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###
*/ */
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 3.10.11
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 3.10.11
*/
protected array $scripts;
/**
* The user object.
*
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
* @since 3.10.11
*/
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
/** /**
* Display the view * Display the view
* *
@ -41,10 +73,10 @@ class HtmlView extends BaseHtmlView
$this->app ??= Factory::getApplication(); $this->app ??= Factory::getApplication();
$this->params = $this->app->getParams(); $this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive(); $this->menu = $this->app->getMenu()->getActive();
$this->styles = $this->get('Styles'); $this->styles = $this->get('Styles') ?? [];
$this->scripts = $this->get('Scripts'); $this->scripts = $this->get('Scripts') ?? [];
// get the user object // get the user object
$this->user ??= $this->app->getIdentity();###SITE_DIPLAY_METHOD### $this->user ??= $this->getCurrentUser();###SITE_DIPLAY_METHOD###
}###SITE_EXTRA_DIPLAY_METHODS### }###SITE_EXTRA_DIPLAY_METHODS###
/** /**
@ -82,8 +114,9 @@ class HtmlView extends BaseHtmlView
{ {
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url); ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
} }
// now initiate the toolbar // now initiate the toolbar
$this->toolbar = Toolbar::getInstance(); $this->toolbar ??= Toolbar::getInstance();
}###SITE_GET_MODULE### }###SITE_GET_MODULE###
/** /**

View File

@ -33,6 +33,12 @@
}, },
"tmpl": "tmpl" "tmpl": "tmpl"
}, },
"api": {
"src": {
"Controller": "Controller",
"View": "View"
}
},
"site": { "site": {
"assets": { "assets": {
"css": "css", "css": "css",
@ -182,6 +188,13 @@
"newName": "[[[Component]]]InstallerScript.php", "newName": "[[[Component]]]InstallerScript.php",
"type": "file" "type": "file"
}, },
"INSTALLER_AUTOLOADER_CLASS.php": {
"naam": "INSTALLER_AUTOLOADER_CLASS.php",
"path": "c0mp0n3nt/",
"rename": "new",
"newName": "[[[Component]]]InstallerPowerloader.php",
"type": "file"
},
"SITE_DISPATCHER.php": { "SITE_DISPATCHER.php": {
"naam": "SITE_DISPATCHER.php", "naam": "SITE_DISPATCHER.php",
"path": "c0mp0n3nt/site/src/Dispatcher", "path": "c0mp0n3nt/site/src/Dispatcher",
@ -557,6 +570,32 @@
"type": "javascript_file" "type": "javascript_file"
} }
}, },
"api": {
"API_VIEW_CONTROLLER.php": {
"path": "c0mp0n3nt/api/src/Controller",
"rename": "new",
"newName": "[[[Name]]]Controller.php",
"type": "single"
},
"API_VIEW_JSON.php": {
"path": "c0mp0n3nt/api/src/View/[[[Name]]]",
"rename": "new",
"newName": "JsonapiView.php",
"type": "single"
},
"API_VIEWS_CONTROLLER.php": {
"path": "c0mp0n3nt/api/src/Controller",
"rename": "new",
"newName": "[[[Name]]]Controller.php",
"type": "list"
},
"API_VIEWS_JSON.php": {
"path": "c0mp0n3nt/api/src/View/[[[Name]]]",
"rename": "new",
"newName": "JsonapiView.php",
"type": "list"
}
},
"site": { "site": {
"SITE_VIEWS_HTML.php": { "SITE_VIEWS_HTML.php": {
"path": "c0mp0n3nt/site/src/View/[[[Name]]]", "path": "c0mp0n3nt/site/src/View/[[[Name]]]",

View File

@ -113,7 +113,7 @@
multiple="false" multiple="false"
filter="CMD" filter="CMD"
required="true" required="true"
default="joomla.form.field.subform.repeatable-table"> default="repeatablejcb">
<!-- Option Set. --> <!-- Option Set. -->
<option value="joomla.form.field.subform.repeatable-table"> <option value="joomla.form.field.subform.repeatable-table">
COM_COMPONENTBUILDER_CONFIG_REPEATABLETABLE_JOOMLA</option> COM_COMPONENTBUILDER_CONFIG_REPEATABLETABLE_JOOMLA</option>
@ -134,6 +134,19 @@
folder="editors" folder="editors"
filter="cmd" filter="cmd"
/> />
<!-- Gitea_username Field. Type: Text. (joomla) -->
<field
type="text"
name="gitea_username"
label="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_LABEL"
size="128"
maxlength="50"
description="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_DESCRIPTION"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_HINT"
/>
<!-- Gitea_token Field. Type: Password. (joomla) --> <!-- Gitea_token Field. Type: Password. (joomla) -->
<field <field
type="password" type="password"
@ -189,6 +202,7 @@
label="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL" label="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="true" multiple="true"
default="" default=""
showon="manage_jcb_package_directories:1"> showon="manage_jcb_package_directories:1">
@ -222,6 +236,7 @@
label="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL" label="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="global" default="global"
showon="set_browser_storage:1"> showon="set_browser_storage:1">
@ -743,62 +758,7 @@
COM_COMPONENTBUILDER_CONFIG_NO</option> COM_COMPONENTBUILDER_CONFIG_NO</option>
</field> </field>
<!-- Note_super_powers_repositories Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_super_powers_repositories Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_super_powers_repositories" label="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_DESCRIPTION" heading="h4" class="alert alert-info note_super_powers_repositories" showon="powers_repository:1[AND]super_powers_repositories:1" /> <field type="note" name="note_super_powers_repositories" label="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_DESCRIPTION" heading="h4" class="alert alert-error note_super_powers_repositories" showon="powers_repository:1[AND]super_powers_repositories:1" />
<!-- Approved_paths Field. Type: Subform. (joomla) -->
<field
type="subform"
name="approved_paths"
label="COM_COMPONENTBUILDER_CONFIG_APPROVED_PATHS_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
icon="list"
max="30"
min="1"
showon="powers_repository:1[AND]super_powers_repositories:1">
<form hidden="true" name="list_approved_paths_modal" repeat="true">
<!-- Owner Field. Type: Text. (joomla) -->
<field
type="text"
name="owner"
label="COM_COMPONENTBUILDER_CONFIG_OWNER_LABEL"
size="70"
maxlength="150"
class="text_area span12"
readonly="false"
filter="CMD"
hint="COM_COMPONENTBUILDER_CONFIG_OWNER_HINT"
autocomplete="on"
/>
<!-- Repo Field. Type: Text. (joomla) -->
<field
type="text"
name="repo"
label="COM_COMPONENTBUILDER_CONFIG_REPO_LABEL"
size="70"
maxlength="150"
class="text_area span12"
readonly="false"
filter="CMD"
hint="COM_COMPONENTBUILDER_CONFIG_REPO_HINT"
autocomplete="on"
/>
<!-- Branch Field. Type: Text. (joomla) -->
<field
type="text"
name="branch"
label="COM_COMPONENTBUILDER_CONFIG_BRANCH_LABEL"
size="70"
maxlength="150"
default="default"
class="text_area span12"
readonly="false"
filter="CMD"
hint="COM_COMPONENTBUILDER_CONFIG_BRANCH_HINT"
autocomplete="on"
/>
</form>
</field>
<!-- Note_powers_repository_path Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_powers_repository_path Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_powers_repository_path" label="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_DESCRIPTION" heading="h4" class="alert alert-info note_powers_repository_path" showon="powers_repository:1" /> <field type="note" name="note_powers_repository_path" label="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_DESCRIPTION" heading="h4" class="alert alert-info note_powers_repository_path" showon="powers_repository:1" />
<!-- Local_powers_repository_path Field. Type: Text. (joomla) --> <!-- Local_powers_repository_path Field. Type: Text. (joomla) -->
@ -819,88 +779,6 @@
autocomplete="on" autocomplete="on"
showon="powers_repository:1" showon="powers_repository:1"
/> />
<!-- Add_custom_gitea_url Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_custom_gitea_url"
label="COM_COMPONENTBUILDER_CONFIG_ADD_CUSTOM_GITEA_URL_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_ADD_CUSTOM_GITEA_URL_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_GITVDMDEV</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_CUSTOMGITEA</option>
</field>
<!-- Note_custom_gitea_url Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_custom_gitea_url" label="COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_GITEA_URL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_GITEA_URL_DESCRIPTION" heading="h3" class="alert alert-success note_custom_gitea_url" showon="add_custom_gitea_url:2" />
<!-- Custom_gitea_url Field. Type: Url. (joomla) -->
<field
type="url"
name="custom_gitea_url"
label="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_LABEL"
size="70"
maxlength="150"
default="https://git.vdm.dev"
description="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_DESCRIPTION"
class="text_area"
filter="url"
validated="url"
scheme="http,https"
message="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_HINT"
autocomplete="on"
showon="add_custom_gitea_url:2"
/>
<!-- Custom_gitea_token Field. Type: Password. (joomla) -->
<field
type="password"
name="custom_gitea_token"
label="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_LABEL"
size="128"
description="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_DESCRIPTION"
message="Error! Please add token here."
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
hint="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_HINT"
autocomplete="off"
showon="add_custom_gitea_url:2"
/>
<!-- Super_powers_core_organisation_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="super_powers_core_organisation_note" label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_DESCRIPTION" heading="h4" class="alert alert-success super_powers_core_organisation_note" showon="add_custom_gitea_url:2" />
<!-- Super_powers_core_organisation Field. Type: Text. (joomla) -->
<field
type="text"
name="super_powers_core_organisation"
label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_LABEL"
size="70"
maxlength="150"
default="joomla"
description="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_DESCRIPTION"
class="text_area"
filter="WORD"
hint="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_HINT"
autocomplete="on"
showon="add_custom_gitea_url:2"
/>
<!-- Super_powers_core Field. Type: Text. (joomla) -->
<field
type="text"
name="super_powers_core"
label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_LABEL"
size="70"
maxlength="150"
default="joomla/super-powers"
class="text_area"
filter="PATH"
hint="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_HINT"
autocomplete="on"
showon="add_custom_gitea_url:2"
/>
</fieldset> </fieldset>
<fieldset <fieldset
name="compiler_custom_config" name="compiler_custom_config"
@ -913,6 +791,7 @@
label="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_LABEL" label="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
default="480-272"> default="480-272">
@ -1038,6 +917,7 @@
label="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_LABEL" label="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="2"> default="2">
<!-- Option Set. --> <!-- Option Set. -->
@ -1055,6 +935,7 @@
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL" label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
filter="INT" filter="INT"
required="true" required="true"
default="2"> default="2">
@ -1126,115 +1007,6 @@
COM_COMPONENTBUILDER_CONFIG_NO</option> COM_COMPONENTBUILDER_CONFIG_NO</option>
</field> </field>
</fieldset> </fieldset>
<fieldset
name="development_method_custom_config"
label="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD">
<!-- Development_method Field. Type: Radio. (joomla) -->
<field
type="radio"
name="development_method"
label="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_EXPANSION</option>
</field>
<!-- Note_development_method_default Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_development_method_default" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION" heading="h2" class="alert alert-info note_development_method_default" showon="development_method:1" />
<!-- Note_development_method_expansion Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_development_method_expansion" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION" heading="h2" class="alert alert-info note_development_method_expansion" showon="development_method:2" />
<!-- Expansion Field. Type: Subform. (joomla) -->
<field
type="subform"
name="expansion"
label="COM_COMPONENTBUILDER_CONFIG_EXPANSION_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
description="COM_COMPONENTBUILDER_CONFIG_EXPANSION_DESCRIPTION"
icon="list"
max="50"
min="1"
showon="development_method:2">
<form hidden="true" name="list_expansion_modal" repeat="true">
<!-- Component_id Field. Type: Joomlacomponent. (custom) -->
<field
type="joomlacomponent"
name="component_id"
label="COM_COMPONENTBUILDER_CONFIG_COMPONENT_ID_LABEL"
class="list_class"
multiple="false"
default="0"
button="false"
/>
<!-- Install Field. Type: List. (joomla) -->
<field
type="list"
name="install"
label="COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION"
class="list_class"
multiple="false"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_TRUE</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_FALSE</option>
</field>
<!-- Backup Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="backup"
label="COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL"
value="1"
description="COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION"
class="inputbox"
/>
<!-- Repository Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="repository"
label="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL"
value="1"
description="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION"
class="inputbox"
/>
<!-- Add_placeholders Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="add_placeholders"
label="COM_COMPONENTBUILDER_CONFIG_ADD_PLACEHOLDERS_LABEL"
value="1"
default=""
description="COM_COMPONENTBUILDER_CONFIG_ADD_PLACEHOLDERS_DESCRIPTION"
class="inputbox"
/>
</form>
</field>
<!-- Return_options_build Field. Type: Radio. (joomla) -->
<field
type="radio"
name="return_options_build"
label="COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_DESCRIPTION"
class="btn-group btn-group-yesno"
default="2"
showon="development_method:2">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_DISPLAY_MESSAGE</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN</option>
</field>
<!-- Expansioncronjob_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="expansioncronjob_note" label="COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_EXPANSIONCRONJOB_NOTE_DESCRIPTION" heading="h4" class="expansioncronjob_note" showon="development_method:2" />
</fieldset>
<fieldset <fieldset
name="auto_backup_custom_config" name="auto_backup_custom_config"
label="COM_COMPONENTBUILDER_CONFIG_AUTO_BACKUP"> label="COM_COMPONENTBUILDER_CONFIG_AUTO_BACKUP">
@ -1255,13 +1027,14 @@
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER</option> COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER</option>
</field> </field>
<!-- Cronjob_backup_server Field. Type: Servers. (custom) --> <!-- Cronjob_backup_server Field. Type: Cron_servers. (custom) -->
<field <field
type="servers" type="cron_servers"
name="cronjob_backup_server" name="cronjob_backup_server"
label="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_LABEL" label="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
showon="cronjob_backup_type:2" showon="cronjob_backup_type:2"
@ -1424,6 +1197,7 @@
label="COM_COMPONENTBUILDER_CONFIG_EXPORT_COMPANY_LABEL" label="COM_COMPONENTBUILDER_CONFIG_EXPORT_COMPANY_LABEL"
size="40" size="40"
maxlength="150" maxlength="150"
default="Vast Development Method"
description="COM_COMPONENTBUILDER_CONFIG_EXPORT_COMPANY_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_EXPORT_COMPANY_DESCRIPTION"
class="text_area" class="text_area"
required="true" required="true"
@ -1439,6 +1213,7 @@
label="COM_COMPONENTBUILDER_CONFIG_EXPORT_OWNER_LABEL" label="COM_COMPONENTBUILDER_CONFIG_EXPORT_OWNER_LABEL"
size="10" size="10"
maxlength="120" maxlength="120"
default="Llewellyn van der Merwe"
description="COM_COMPONENTBUILDER_CONFIG_EXPORT_OWNER_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_EXPORT_OWNER_DESCRIPTION"
class="text_area" class="text_area"
required="true" required="true"
@ -1454,6 +1229,7 @@
label="COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_LABEL" label="COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_LABEL"
size="40" size="40"
maxlength="150" maxlength="150"
default="joomla@vdm.io"
description="COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_DESCRIPTION"
class="text_area" class="text_area"
required="true" required="true"
@ -1470,6 +1246,7 @@
label="COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_LABEL" label="COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_LABEL"
size="60" size="60"
maxlength="150" maxlength="150"
default="https://dev.vdm.io/"
description="COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_DESCRIPTION"
class="text_area" class="text_area"
required="true" required="true"

View File

@ -120,6 +120,7 @@ class ComponentbuilderController extends BaseController
'language_translation' => 'language_translations', 'language_translation' => 'language_translations',
'language' => 'languages', 'language' => 'languages',
'server' => 'servers', 'server' => 'servers',
'repository' => 'repositories',
'help_document' => 'help_documents', 'help_document' => 'help_documents',
'admin_fields' => 'admins_fields', 'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions', 'admin_fields_conditions' => 'admins_fields_conditions',

View File

@ -20,8 +20,6 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Admin_views Admin Controller * Admin_views Admin Controller
@ -114,45 +112,4 @@ class ComponentbuilderControllerAdmin_views extends AdminController
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=admin_views', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=admin_views', false), $message, 'error');
return; return;
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
// set massage
$message = Text::_('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('admin_views.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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

@ -521,46 +521,6 @@ class ComponentbuilderControllerCompiler extends AdminController
return false; return false;
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
// set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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;
}
/** /**
* Clear tmp folder * Clear tmp folder
* *

View File

@ -20,8 +20,6 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Custom_codes Admin Controller * Custom_codes Admin Controller
@ -114,45 +112,4 @@ class ComponentbuilderControllerCustom_codes extends AdminController
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=custom_codes', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=custom_codes', false), $message, 'error');
return; return;
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
// set massage
$message = Text::_('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('custom_codes.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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

@ -20,8 +20,6 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Dynamic_gets Admin Controller * Dynamic_gets Admin Controller
@ -114,45 +112,4 @@ class ComponentbuilderControllerDynamic_gets extends AdminController
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false), $message, 'error');
return; return;
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
// set massage
$message = Text::_('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('dynamic_gets.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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

@ -20,8 +20,6 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Fields Admin Controller * Fields Admin Controller
@ -114,45 +112,4 @@ class ComponentbuilderControllerFields extends AdminController
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=fields', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=fields', false), $message, 'error');
return; return;
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
// set massage
$message = Text::_('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('fields.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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

@ -22,7 +22,6 @@ use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Joomla_components Admin Controller * Joomla_components Admin Controller
@ -117,46 +116,6 @@ class ComponentbuilderControllerJoomla_components extends AdminController
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
// set massage
$message = Text::_('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_components.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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;
}
/** /**
* Clear tmp folder * Clear tmp folder
* *

View File

@ -18,8 +18,6 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route; use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Joomla_plugins Admin Controller * Joomla_plugins Admin Controller
@ -51,46 +49,6 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
// set massage
$message = Text::_('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 = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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 * get Boilerplate
* *

View File

@ -49,6 +49,20 @@ class ComponentbuilderControllerJoomla_power extends FormController
parent::__construct($config); parent::__construct($config);
} }
/**
* Resets the specified Joomla power.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Joomla power.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified power.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -79,18 +93,98 @@ class ComponentbuilderControllerJoomla_power extends FormController
} }
elseif($user->authorise('power.reset', 'com_componentbuilder')) elseif($user->authorise('power.reset', 'com_componentbuilder'))
{ {
if (JoomlaPowerFactory::_('Joomlapower')->reset([$guid])) try {
{ if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->reset([$guid]))
// set success message {
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; // set success message
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET').'</p>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$status = 'success'; $message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET').'</p>';
$success = true; $status = 'success';
} $success = true;
else }
{ else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>'; $message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_power'
. $this->getRedirectToItemAppend($id), $success
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Joomla power.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Joomla power.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified power.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = Factory::getUser();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_POWER') . '</p>';
$status = 'error';
$success = false;
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('power.push', 'com_componentbuilder'))
{
try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Set')->items([$guid]))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
} }
} }

View File

@ -50,6 +50,18 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
return parent::getModel($name, $prefix, $config); return parent::getModel($name, $prefix, $config);
} }
/**
* Initializes all remote Joomla powers and syncs them with the local database.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to initialize the Joomla powers.
* 3. If the user is authorized, it attempts to initialize the remote Joomla powers.
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful initialization, false on failure.
*/
public function initPowers() public function initPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -66,19 +78,24 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
if($user->authorise('power.init', 'com_componentbuilder')) if($user->authorise('power.init', 'com_componentbuilder'))
{ {
if (JoomlaPowerFactory::_('Joomlapower')->init()) try {
{ if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->init())
// set success message {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS') . '</h1>'; // set success message
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '</p>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '</p>';
$status = 'success'; $status = 'success';
$success = true; $success = true;
} }
else else
{ {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED') . '</p>'; $message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
} }
} }
@ -89,6 +106,21 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
return $success; return $success;
} }
/**
* Resets the selected Joomla powers.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla powers.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla powers.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -121,18 +153,102 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
{ {
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid'); $guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
if (JoomlaPowerFactory::_('Joomlapower')->reset($guids)) try {
{ if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->reset($guids))
// set success message {
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; // set success message
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'</p>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$status = 'success'; $message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'</p>';
$success = true; $status = 'success';
} $success = true;
else }
{ else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>'; $message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Joomla powers.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla powers.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla powers.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
// check if user has the right
$user = Factory::getUser();
if($user->authorise('power.push', 'com_componentbuilder'))
{
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Set')->items($guids))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
} }
// set redirect // set redirect

View File

@ -49,6 +49,20 @@ class ComponentbuilderControllerPower extends FormController
parent::__construct($config); parent::__construct($config);
} }
/**
* Resets the specified power.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the power.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified power.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -79,7 +93,7 @@ class ComponentbuilderControllerPower extends FormController
} }
elseif($user->authorise('power.reset', 'com_componentbuilder')) elseif($user->authorise('power.reset', 'com_componentbuilder'))
{ {
if (PowerFactory::_('Superpower')->reset([$guid])) if (PowerFactory::_('Power.Remote.Get')->reset([$guid]))
{ {
// set success message // set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';

View File

@ -18,10 +18,8 @@ use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route; use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory; use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\GetHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Powers Admin Controller * Powers Admin Controller
@ -52,46 +50,18 @@ class ComponentbuilderControllerPowers extends AdminController
return parent::getModel($name, $prefix, $config); return parent::getModel($name, $prefix, $config);
} }
/** /**
* Run the Expansion * Initializes all remote powers and syncs them with the local database.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to initialize the powers.
* 3. If the user is authorized, it attempts to initialize the remote powers.
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful initialization, false on failure.
*/ */
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
// set massage
$message = Text::_('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('powers.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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;
}
public function initPowers() public function initPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -108,7 +78,7 @@ class ComponentbuilderControllerPowers extends AdminController
if($user->authorise('power.init', 'com_componentbuilder')) if($user->authorise('power.init', 'com_componentbuilder'))
{ {
if (PowerFactory::_('Superpower')->init()) if (PowerFactory::_('Power.Remote.Get')->init())
{ {
// set success message // set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS') . '</h1>';
@ -131,6 +101,21 @@ class ComponentbuilderControllerPowers extends AdminController
return $success; return $success;
} }
/**
* Resets the selected powers.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected powers.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected powers.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -163,7 +148,7 @@ class ComponentbuilderControllerPowers extends AdminController
{ {
$guids = GetHelper::vars('power', $pks, 'id', 'guid'); $guids = GetHelper::vars('power', $pks, 'id', 'guid');
if (PowerFactory::_('Superpower')->reset($guids)) if (PowerFactory::_('Power.Remote.Get')->reset($guids))
{ {
// set success message // set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';

View File

@ -0,0 +1,50 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/**
* Repositories Admin Controller
*/
class ComponentbuilderControllerRepositories extends AdminController
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_REPOSITORIES';
/**
* 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 = 'Repository', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -0,0 +1,329 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Repository Form Controller
*/
class ComponentbuilderControllerRepository extends FormController
{
/**
* 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 = [])
{
$this->view_list = 'Repositories'; // 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 = [])
{
// Get user object.
$user = Factory::getUser();
// Access check.
$access = $user->authorise('repository.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absence of better information, revert to the component permissions.
return $user->authorise('repository.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 = [], $key = 'id')
{
// get user object.
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('repository.access', 'com_componentbuilder.repository.' . (int) $recordId) && $user->authorise('repository.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('repository.edit', 'com_componentbuilder.repository.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('repository.edit.own', 'com_componentbuilder.repository.' . $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('repository.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('repository.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)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Repository', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=repositories' . $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) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$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(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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) && Uri::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(
Route::_(
$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(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'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 BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -20,8 +20,6 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session; use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** /**
* Validation_rules Admin Controller * Validation_rules Admin Controller
@ -114,45 +112,4 @@ class ComponentbuilderControllerValidation_rules extends AdminController
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error'); $this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=validation_rules', false), $message, 'error');
return; return;
} }
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=validation_rules', false);
// set massage
$message = Text::_('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 = Text::_('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(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && StringHelper::check($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = Text::_('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

@ -5673,8 +5673,8 @@ abstract class ComponentbuilderHelper
return MathHelper::sum($array, $scale); return MathHelper::sum($array, $scale);
} }
/** /**
* create plugin class name * create plugin class name
* *
* @input string The group name * @input string The group name
* @input string The name * @input string The name
@ -5683,7 +5683,7 @@ abstract class ComponentbuilderHelper
* *
* @since 3.0.9 * @since 3.0.9
* *
* @deprecated 4.0 - Use PluginHelper::safe($name, $group); * @deprecated 4.0 - Use PluginHelper::safeClassName($name, $group);
*/ */
public static function createPluginClassName($group, $name) public static function createPluginClassName($group, $name)
{ {
@ -6173,6 +6173,10 @@ abstract class ComponentbuilderHelper
{ {
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_SERVERS'), 'index.php?option=com_componentbuilder&view=servers', $submenu === 'servers'); \JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_SERVERS'), 'index.php?option=com_componentbuilder&view=servers', $submenu === 'servers');
} }
if ($user->authorise('repository.access', 'com_componentbuilder') && $user->authorise('repository.submenu', 'com_componentbuilder'))
{
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_REPOSITORIES'), 'index.php?option=com_componentbuilder&view=repositories', $submenu === 'repositories');
}
if ($user->authorise('help_document.access', 'com_componentbuilder') && $user->authorise('help_document.submenu', 'com_componentbuilder')) if ($user->authorise('help_document.access', 'com_componentbuilder') && $user->authorise('help_document.submenu', 'com_componentbuilder'))
{ {
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_componentbuilder&view=help_documents', $submenu === 'help_documents'); \JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_componentbuilder&view=help_documents', $submenu === 'help_documents');

File diff suppressed because one or more lines are too long

View File

@ -107,8 +107,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT="Admin Views Import"
COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT_DESC="Allows the users in this group to import import admin views" COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT_DESC="Allows the users in this group to import import admin views"
COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu" 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_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="Class Extendings Access"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC="Allows the users in this group to access access class extendings" 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="Class Extendings Batch Use"
@ -185,8 +183,6 @@ COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS="Compiler Compil
COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS_DESC="Allows the users in this group to access the compiler animations button." COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS_DESC="Allows the users in this group to access the compiler animations button."
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List" COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List"
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler" COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS="Compiler Run Expansion Button Access"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu" COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu"
COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to submenu of Compiler" COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to submenu of Compiler"
COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS="Compiler Translate Button Access" COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS="Compiler Translate Button Access"
@ -534,8 +530,6 @@ COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT="Dynamic Gets Import"
COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC="Allows the users in this group to import import dynamic gets" COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC="Allows the users in this group to import import dynamic gets"
COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU="Dynamic Gets Submenu" COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU="Dynamic Gets Submenu"
COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC="Allows the users in this group to submenu of dynamic get" COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC="Allows the users in this group to submenu of dynamic get"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS="Dynamic Get Run Expansion Button Access"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_EDIT_CREATED_BY="Edit Created By" COM_COMPONENTBUILDER_EDIT_CREATED_BY="Edit Created By"
COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by." COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by."
COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date" COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date"
@ -594,8 +588,6 @@ COM_COMPONENTBUILDER_FIELDTYPES_IMPORT="Fieldtypes Import"
COM_COMPONENTBUILDER_FIELDTYPES_IMPORT_DESC="Allows the users in this group to import import fieldtypes" COM_COMPONENTBUILDER_FIELDTYPES_IMPORT_DESC="Allows the users in this group to import import fieldtypes"
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu" COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu"
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to submenu of fieldtype" COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to submenu of fieldtype"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS="Field Run Expansion Button Access"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC="Allows the users in this group to access get snippets." COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC="Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access" COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
@ -674,8 +666,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the export jcb packages button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the export jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the import jcb packages button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the import jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS="Joomla Component Run Expansion Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS="Joomla Modules Access" COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS="Joomla Modules Access"
COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS_DESC="Allows the users in this group to access access joomla modules" COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS_DESC="Allows the users in this group to access access joomla modules"
COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE="Joomla Modules Batch Use" COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE="Joomla Modules Batch Use"
@ -746,8 +736,6 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION="Joomla Modules Updates
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version joomla modules updates" COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version joomla modules updates"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS="Joomla Module Get Snippets Button Access" COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS="Joomla Module Get Snippets Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_JOOMLA_MODULE_RUN_EXPANSION_BUTTON_ACCESS="Joomla Module Run Expansion Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_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="Joomla Plugins Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC="Allows the users in this group to access access joomla plugins" 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="Joomla Plugins Batch Use"
@ -824,8 +812,6 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS="Joomla Plugin Methods
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS_DESC="Allows the users in this group to access the methods button." 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="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_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_JOOMLA_POWERS_ACCESS="Joomla Powers Access" COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS="Joomla Powers Access"
COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC="Allows the users in this group to access access joomla powers" COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC="Allows the users in this group to access access joomla powers"
COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE="Joomla Powers Batch Use" COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE="Joomla Powers Batch Use"
@ -850,6 +836,8 @@ COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU="Joomla Powers Submenu"
COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of joomla power" COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of joomla power"
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS="Joomla Power Init Button Access" COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS="Joomla Power Init Button Access"
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button." COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS="Joomla Power Push Button Access"
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access" COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access"
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button." COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access" COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
@ -1063,8 +1051,30 @@ COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS="Power Init Button Access"
COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button." COM_COMPONENTBUILDER_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS="Power Reset Button Access" COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS="Power Reset Button Access"
COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button." COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS="Power Run Expansion Button Access" COM_COMPONENTBUILDER_REPOSITORIES_ACCESS="Repositories Access"
COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC="Allows the users in this group to access access repositories"
COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE="Repositories Batch Use"
COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch repositories"
COM_COMPONENTBUILDER_REPOSITORIES_CREATE="Repositories Create"
COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC="Allows the users in this group to create create repositories"
COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST="Repositories Dashboard List"
COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of repository"
COM_COMPONENTBUILDER_REPOSITORIES_DELETE="Repositories Delete"
COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC="Allows the users in this group to delete delete repositories"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT="Repositories Edit"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY="Repositories Edit Created By"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by repositories"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE="Repositories Edit Created Date"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created repositories"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC="Allows the users in this group to edit the repository"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN="Repositories Edit Own"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own repositories created by them"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE="Repositories Edit State"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the repository"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION="Repositories Edit Version"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version repositories"
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU="Repositories Submenu"
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC="Allows the users in this group to submenu of repository"
COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access" COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access"
COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search." COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search."
COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access" COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access"
@ -1224,6 +1234,4 @@ 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="Validation Rules Import"
COM_COMPONENTBUILDER_VALIDATION_RULES_IMPORT_DESC="Allows the users in this group to import import validation rules" 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="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

@ -31,7 +31,6 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'store', 'store',
'medium_encryption_note', 'medium_encryption_note',
'basic_encryption_note', 'basic_encryption_note',
'note_whmcs_encryption',
'note_expert_field_save_mode', 'note_expert_field_save_mode',
'initiator_on_save_model', 'initiator_on_save_model',
'initiator_on_get_model', 'initiator_on_get_model',

View File

@ -19,7 +19,7 @@ use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults // set the defaults
$items = $displayData->vxtfields; $items = $displayData->vxsfields;
$user = Factory::getUser(); $user = Factory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL

View File

@ -30,12 +30,6 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'author', 'author',
'email', 'email',
'website', 'website',
'add_license',
'license_type',
'note_whmcs_lisencing_note',
'whmcs_key',
'whmcs_url',
'whmcs_buy_link',
'license', 'license',
'bom', 'bom',
'image', 'image',

View File

@ -26,8 +26,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'description', 'settings',
'settings' 'description'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: []; $hiddenFields = $displayData->get('hidden_fields') ?: [];

View File

@ -30,6 +30,8 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description', 'description',
'extends', 'extends',
'extends_custom', 'extends_custom',
'extendsinterfaces',
'extendsinterfaces_custom',
'implements', 'implements',
'implements_custom', 'implements_custom',
'namespace', 'namespace',

View File

@ -0,0 +1,46 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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',
'target',
'access_repo'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?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 <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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(
'type',
'base',
'username',
'token'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?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,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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(
'organisation',
'repository',
'read_branch',
'write_branch'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?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 <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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(
'guid',
'title',
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?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 <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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') ?: [];
?>
<?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

@ -86,10 +86,18 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -235,10 +235,18 @@ class ComponentbuilderModelAdmin_view extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -1259,7 +1259,7 @@ class ComponentbuilderModelAjax extends ListModel
array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'fields' => array('params' => 'custom_admin_view_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW'), array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'fields' => array('params' => 'custom_admin_view_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW'),
array('table' => 'joomla_component', 'tables' => 'joomla_components', 'fields' => array('params' => 'joomla_component_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT'), array('table' => 'joomla_component', 'tables' => 'joomla_components', 'fields' => array('params' => 'joomla_component_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT'),
array('table' => 'component_dashboard', 'tables' => 'components_dashboard', 'fields' => array('params' => 'component_dashboard_headers:power_:power', 'joomla_component' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD', 'linked_name' => 'system_name'), array('table' => 'component_dashboard', 'tables' => 'components_dashboard', 'fields' => array('params' => 'component_dashboard_headers:power_:power', 'joomla_component' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD', 'linked_name' => 'system_name'),
array('table' => 'power', 'tables' => 'powers', 'fields' => array('extends' => 'GUID', 'implements' => 'ARRAY', 'use_selection' => 'use', 'load_selection' => 'load', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_POWER') array('table' => 'power', 'tables' => 'powers', 'fields' => array('extends' => 'GUID', 'extendsinterfaces' => 'ARRAY', 'implements' => 'ARRAY', 'use_selection' => 'use', 'load_selection' => 'load', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_POWER')
) )
); );

View File

@ -90,10 +90,18 @@ class ComponentbuilderModelClass_extends extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -94,10 +94,18 @@ class ComponentbuilderModelClass_method extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -91,10 +91,18 @@ class ComponentbuilderModelClass_property extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -94,10 +94,18 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -95,10 +95,18 @@ class ComponentbuilderModelComponent_router extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -37,7 +37,7 @@ class ComponentbuilderModelComponentbuilder extends ListModel
$icons = []; $icons = [];
// view groups array // view groups array
$viewGroups = array( $viewGroups = array(
'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents') 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.repositories', 'png.help_documents')
); );
// view access array // view access array
$viewAccess = [ $viewAccess = [
@ -155,6 +155,11 @@ class ComponentbuilderModelComponentbuilder extends ListModel
'server.access' => 'server.access', 'server.access' => 'server.access',
'servers.submenu' => 'server.submenu', 'servers.submenu' => 'server.submenu',
'servers.dashboard_list' => 'server.dashboard_list', 'servers.dashboard_list' => 'server.dashboard_list',
'repository.create' => 'repository.create',
'repositories.access' => 'repository.access',
'repository.access' => 'repository.access',
'repositories.submenu' => 'repository.submenu',
'repositories.dashboard_list' => 'repository.dashboard_list',
'help_document.create' => 'help_document.create', 'help_document.create' => 'help_document.create',
'help_documents.access' => 'help_document.access', 'help_documents.access' => 'help_document.access',
'help_document.access' => 'help_document.access', 'help_document.access' => 'help_document.access',

View File

@ -152,10 +152,18 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -106,10 +106,18 @@ class ComponentbuilderModelCustom_code extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -146,10 +146,18 @@ class ComponentbuilderModelDynamic_get extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -71,7 +71,6 @@ class ComponentbuilderModelField extends AdminModel
'store', 'store',
'medium_encryption_note', 'medium_encryption_note',
'basic_encryption_note', 'basic_encryption_note',
'note_whmcs_encryption',
'note_expert_field_save_mode', 'note_expert_field_save_mode',
'initiator_on_save_model', 'initiator_on_save_model',
'initiator_on_get_model', 'initiator_on_get_model',
@ -140,10 +139,18 @@ class ComponentbuilderModelField extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {
@ -215,6 +222,12 @@ class ComponentbuilderModelField extends AdminModel
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->on_get_model_field))
{
// base64 Decode on_get_model_field.
$item->on_get_model_field = base64_decode($item->on_get_model_field);
}
if (!empty($item->on_save_model_field)) if (!empty($item->on_save_model_field))
{ {
// base64 Decode on_save_model_field. // base64 Decode on_save_model_field.
@ -227,10 +240,10 @@ class ComponentbuilderModelField extends AdminModel
$item->initiator_on_get_model = base64_decode($item->initiator_on_get_model); $item->initiator_on_get_model = base64_decode($item->initiator_on_get_model);
} }
if (!empty($item->initiator_on_save_model)) if (!empty($item->javascript_view_footer))
{ {
// base64 Decode initiator_on_save_model. // base64 Decode javascript_view_footer.
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model); $item->javascript_view_footer = base64_decode($item->javascript_view_footer);
} }
if (!empty($item->css_views)) if (!empty($item->css_views))
@ -245,24 +258,18 @@ class ComponentbuilderModelField extends AdminModel
$item->css_view = base64_decode($item->css_view); $item->css_view = base64_decode($item->css_view);
} }
if (!empty($item->on_get_model_field))
{
// base64 Decode on_get_model_field.
$item->on_get_model_field = base64_decode($item->on_get_model_field);
}
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->javascript_views_footer)) if (!empty($item->javascript_views_footer))
{ {
// base64 Decode javascript_views_footer. // base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer); $item->javascript_views_footer = base64_decode($item->javascript_views_footer);
} }
if (!empty($item->initiator_on_save_model))
{
// base64 Decode initiator_on_save_model.
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model);
}
if (!empty($item->xml)) if (!empty($item->xml))
{ {
// JSON Decode xml. // JSON Decode xml.
@ -1172,6 +1179,12 @@ class ComponentbuilderModelField extends AdminModel
$data['xml'] = (string) json_encode($data['xml']); $data['xml'] = (string) json_encode($data['xml']);
} }
// Set the on_get_model_field string to base64 string.
if (isset($data['on_get_model_field']))
{
$data['on_get_model_field'] = base64_encode($data['on_get_model_field']);
}
// Set the on_save_model_field string to base64 string. // Set the on_save_model_field string to base64 string.
if (isset($data['on_save_model_field'])) if (isset($data['on_save_model_field']))
{ {
@ -1184,10 +1197,10 @@ class ComponentbuilderModelField extends AdminModel
$data['initiator_on_get_model'] = base64_encode($data['initiator_on_get_model']); $data['initiator_on_get_model'] = base64_encode($data['initiator_on_get_model']);
} }
// Set the initiator_on_save_model string to base64 string. // Set the javascript_view_footer string to base64 string.
if (isset($data['initiator_on_save_model'])) if (isset($data['javascript_view_footer']))
{ {
$data['initiator_on_save_model'] = base64_encode($data['initiator_on_save_model']); $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
} }
// Set the css_views string to base64 string. // Set the css_views string to base64 string.
@ -1202,24 +1215,18 @@ class ComponentbuilderModelField extends AdminModel
$data['css_view'] = base64_encode($data['css_view']); $data['css_view'] = base64_encode($data['css_view']);
} }
// Set the on_get_model_field string to base64 string.
if (isset($data['on_get_model_field']))
{
$data['on_get_model_field'] = base64_encode($data['on_get_model_field']);
}
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the javascript_views_footer string to base64 string. // Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer'])) if (isset($data['javascript_views_footer']))
{ {
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
} }
// Set the initiator_on_save_model string to base64 string.
if (isset($data['initiator_on_save_model']))
{
$data['initiator_on_save_model'] = base64_encode($data['initiator_on_save_model']);
}
// Set the Params Items to data // Set the Params Items to data
if (isset($data['params']) && is_array($data['params'])) if (isset($data['params']) && is_array($data['params']))
{ {

View File

@ -346,7 +346,6 @@ class ComponentbuilderModelFields extends ListModel
2 => 'COM_COMPONENTBUILDER_FIELD_BASE64', 2 => 'COM_COMPONENTBUILDER_FIELD_BASE64',
3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY', 3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY',
5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY', 5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY',
4 => 'COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION',
6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM' 6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM'
); );
// Now check if value is found in this array // Now check if value is found in this array
@ -721,22 +720,22 @@ class ComponentbuilderModelFields extends ListModel
continue; continue;
} }
// decode on_get_model_field
$item->on_get_model_field = base64_decode($item->on_get_model_field);
// decode on_save_model_field // decode on_save_model_field
$item->on_save_model_field = base64_decode($item->on_save_model_field); $item->on_save_model_field = base64_decode($item->on_save_model_field);
// decode initiator_on_get_model // decode initiator_on_get_model
$item->initiator_on_get_model = base64_decode($item->initiator_on_get_model); $item->initiator_on_get_model = base64_decode($item->initiator_on_get_model);
// decode initiator_on_save_model // decode javascript_view_footer
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model); $item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode css_views // decode css_views
$item->css_views = base64_decode($item->css_views); $item->css_views = base64_decode($item->css_views);
// decode css_view // decode css_view
$item->css_view = base64_decode($item->css_view); $item->css_view = base64_decode($item->css_view);
// decode on_get_model_field
$item->on_get_model_field = base64_decode($item->on_get_model_field);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_views_footer // decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer); $item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode initiator_on_save_model
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model);
// unset the values we don't want exported. // unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);

View File

@ -39,7 +39,7 @@ class JFormFieldAdminsviews extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = Factory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminviews_system_name'))); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminviews_system_name')));
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); $query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
@ -52,7 +52,7 @@ class JFormFieldAdminsviews extends JFormFieldList
{ {
foreach($items as $item) foreach($items as $item)
{ {
$options[] = JHtml::_('select.option', $item->id, $item->adminviews_system_name); $options[] = Html::_('select.option', $item->id, $item->adminviews_system_name);
} }
} }

View File

@ -16,6 +16,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Filesystem\Folder;
// import the list field type // import the list field type
jimport('joomla.form.helper'); jimport('joomla.form.helper');
@ -49,7 +50,7 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
// now check if there are files in the folder // now check if there are files in the folder
foreach ($localfolders as $localfolder) foreach ($localfolders as $localfolder)
{ {
if (is_dir($localfolder) && $folders = \Joomla\Filesystem\Folder::folders($localfolder)) if (is_dir($localfolder) && $folders = Folder::folders($localfolder))
{ {
if ($this->multiple === false) if ($this->multiple === false)
{ {
@ -57,7 +58,7 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
} }
foreach ($folders as $folder) foreach ($folders as $folder)
{ {
$options[] = Html::_('select.option', $folder, StringHelper::safe($folder, 'W')); $options[] = Html::_('select.option', StringHelper::safe($folder), StringHelper::safe($folder, 'W'));
} }
} }
} }

View File

@ -39,24 +39,27 @@ class JFormFieldAdminviews extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the database object.
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminview_system_name'))); $query = $db->getQuery(true);
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminview_system_name')));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
$query->order('a.system_name ASC'); $query->where($db->quoteName('a.published') . ' >= 1');
$db->setQuery((string)$query); $query->order('a.system_name ASC');
$items = $db->loadObjectList(); $db->setQuery((string)$query);
$options = array(); $items = $db->loadObjectList();
if ($items) $options = [];
{ if ($items)
$options[] = JHtml::_('select.option', '', 'Select an option'); {
foreach($items as $item) if ($this->multiple === false)
{ {
$options[] = JHtml::_('select.option', $item->id, $item->adminview_system_name); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
} foreach($items as $item)
{
return $options; $options[] = Html::_('select.option', $item->id, $item->adminview_system_name);
}
}
return $options;
} }
} }

View File

@ -0,0 +1,170 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Cron_servers Form Field class for the Componentbuilder component
*/
class JFormFieldCron_servers extends JFormFieldList
{
/**
* The cron_servers field type.
*
* @var string
*/
public $type = 'cron_servers';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$set_button = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($set_button === 'true')
{
$button = array();
$script = array();
$button_code_name = $this->getAttribute('name');
// get the input from url
$app = Factory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referral if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;
$refJ .= '&return=' . $_return;
}
// get button label
$button_label = trim($button_code_name);
$button_label = preg_replace('/_+/', ' ', $button_label);
$button_label = preg_replace('/\s+/', ' ', $button_label);
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
$button_label = ucfirst(strtolower($button_label));
// get user object
$user = Factory::getUser();
// only add if user allowed to create server
if ($user->authorise('server.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build Create button
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_componentbuilder&amp;view=server&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit server
if ($user->authorise('server.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build edit button
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 3px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) {
e.preventDefault();
var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val();
".$button_code_name."Button(".$button_code_name."Value);
});
var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val();
".$button_code_name."Button(".$button_code_name."Value);
});
function ".$button_code_name."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$button_code_name."Create').hide();
// show edit button
jQuery('#".$button_code_name."Edit').show();
var url = 'index.php?option=com_componentbuilder&view=servers&task=server.edit&id='+value+'".$refJ."';
jQuery('#".$button_code_name."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$button_code_name."Create').show();
// hide edit button
jQuery('#".$button_code_name."Edit').hide();
}
}";
}
// check if button was created for server field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = Factory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get the databse object.
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','cronjob_backup_server_name', 'protocol')));
$query->from($db->quoteName('#__componentbuilder_server', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = [];
if ($items)
{
if ($this->multiple === false)
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
}
foreach($items as $item)
{
$item->protocol = ($item->protocol == 2) ? Text::_('SFTP') : Text::_('FTP');
$options[] = Html::_('select.option', $item->id, $item->cronjob_backup_server_name .' ['.$item->protocol.']');
}
}
return $options;
}
}

View File

@ -39,23 +39,27 @@ class JFormFieldCustomadminviews extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the databse object.
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','customadminview_system_name'))); $query = $db->getQuery(true);
$query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a')); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','customadminview_system_name')));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a'));
$query->order('a.system_name ASC'); $query->where($db->quoteName('a.published') . ' >= 1');
$db->setQuery((string)$query); $query->order('a.system_name ASC');
$items = $db->loadObjectList(); $db->setQuery((string)$query);
$options = array(); $items = $db->loadObjectList();
if ($items) $options = [];
{ if ($items)
$options[] = JHtml::_('select.option', '', 'Select an option'); {
foreach($items as $item) if ($this->multiple === false)
{ {
$options[] = JHtml::_('select.option', $item->id, $item->customadminview_system_name); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
} foreach($items as $item)
{
$options[] = Html::_('select.option', $item->id, $item->customadminview_system_name);
}
}
return $options; return $options;
} }
} }

View File

@ -39,24 +39,29 @@ class JFormFieldDynamicgets extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the databse object.
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','dynamic_get_name','type'))); $query = $db->getQuery(true);
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a')); $query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','dynamic_get_name','type')));
$query->where($db->quoteName('a.published') . ' = 1'); $query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
$query->order('a.name ASC'); $query->where($db->quoteName('a.published') . ' >= 1');
$db->setQuery((string)$query); $query->order('a.name ASC');
$items = $db->loadObjectList(); $db->setQuery((string)$query);
$options = array(); $items = $db->loadObjectList();
if ($items) $options = [];
{ if ($items)
$model = ComponentbuilderHelper::getModel('dynamic_gets'); {
foreach($items as $item) $model = ComponentbuilderHelper::getModel('dynamic_gets');
{ if ($this->multiple === false)
$type = $model->selectionTranslation($item->type,'gettype'); {
$options[] = JHtml::_('select.option', $item->id, $item->dynamic_get_name . ' (' . JText::_($type) . ')' ); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
} foreach($items as $item)
{
$type = $model->selectionTranslation($item->type, 'gettype');
$options[] = Html::_('select.option', $item->id, $item->dynamic_get_name . ' (' . Text::_($type) . ')');
}
}
return $options; return $options;
} }
} }

View File

@ -52,7 +52,7 @@ class JFormFieldFilebehaviour extends JFormFieldList
} }
$options[] = JHtml::_('select.option', '2', JText::_('COM_COMPONENTBUILDER_CONDITIONS')); $options[] = JHtml::_('select.option', '2', JText::_('COM_COMPONENTBUILDER_CONDITIONS'));
$options[] = JHtml::_('select.option', '3', JText::_('COM_COMPONENTBUILDER_CUSTOM_SCRIPT')); $options[] = JHtml::_('select.option', '3', JText::_('COM_COMPONENTBUILDER_CUSTOM_SCRIPT'));
$options[] = JHtml::_('select.option', '0', JText::_('COM_COMPONENTBUILDER_DO_NOT_ADD')); $options[] = JHtml::_('select.option', '0', JText::_('COM_COMPONENTBUILDER_DO_NOT_ADD'));
return $options; return $options;
} }
} }

View File

@ -144,11 +144,11 @@ class JFormFieldInterfacepowers extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
// Get the user object. // Get the user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Get the databse object. // Get the databse object.
$db = JFactory::getDBO(); $db = Factory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','implements_name','system_name','type','version'))); $query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','extendsinterfaces_name','system_name','type','version')));
$query->from($db->quoteName('#__componentbuilder_power', 'a')); $query->from($db->quoteName('#__componentbuilder_power', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->where($db->quoteName('a.type') . ' = ' . $db->quote('interface')); $query->where($db->quoteName('a.type') . ' = ' . $db->quote('interface'));
@ -165,7 +165,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
} }
} }
// get the input // get the input
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
// get the id // get the id
$power_id = $jinput->getInt('id', 0); $power_id = $jinput->getInt('id', 0);
// if we have an id we remove all classes of the same namespace and name // if we have an id we remove all classes of the same namespace and name
@ -176,19 +176,24 @@ class JFormFieldInterfacepowers extends JFormFieldList
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
// set the other option to enter text // if none was found, we add this to set an alternative to set custom
$options[] = JHtml::_('select.option', -1, JText::_('COM_COMPONENTBUILDER_SET_CUSTOM')); if (!$items)
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_NONE_FOUND'));
}
if ($items) if ($items)
{ {
if ($this->multiple === false) if ($this->multiple === false)
{ {
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
foreach($items as $item) foreach($items as $item)
{ {
$options[] = JHtml::_('select.option', $item->guid, $item->system_name . ' (v' . $item->version . ') [' . $item->type . ' ' . $item->implements_name . ']'); $options[] = Html::_('select.option', $item->guid, $item->system_name . ' [' . $item->type . ' ' . $item->extendsinterfaces_name . '] (v' . $item->version . ')');
} }
} }
// set the other option to enter text
$options[] = Html::_('select.option', -1, Text::_('COM_COMPONENTBUILDER_SET_CUSTOM'));
return $options; return $options;
} }
} }

View File

@ -39,22 +39,27 @@ class JFormFieldLibraryreadonly extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the databse object.
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.name'),array('id','library_name'))); $query = $db->getQuery(true);
$query->from($db->quoteName('#__componentbuilder_library', 'a')); $query->select($db->quoteName(array('a.id','a.name'),array('id','library_name')));
$query->order('a.name ASC'); $query->from($db->quoteName('#__componentbuilder_library', 'a'));
$db->setQuery((string)$query); $query->where($db->quoteName('a.published') . ' >= 1');
$items = $db->loadObjectList(); $query->order('a.name ASC');
$options = array(); $db->setQuery((string)$query);
if ($items) $items = $db->loadObjectList();
{ $options = [];
$options[] = JHtml::_('select.option', '', 'Select an option'); if ($items)
foreach($items as $item) {
{ if ($this->multiple === false)
$options[] = JHtml::_('select.option', $item->id, $item->library_name); {
} $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
foreach($items as $item)
{
$options[] = Html::_('select.option', $item->id, $item->library_name);
}
}
return $options; return $options;
} }
} }

View File

@ -143,25 +143,30 @@ class JFormFieldMaingets extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the databse object.
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','main_get_name','type'))); $query = $db->getQuery(true);
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a')); $query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','main_get_name','type')));
$query->where($db->quoteName('a.published') . ' = 1'); $query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
$query->where('( '.$db->quoteName('a.gettype') . ' = 1 OR ' . $db->quoteName('a.gettype') . ' = 2 )'); $query->where($db->quoteName('a.published') . ' = 1');
$query->order('a.name ASC'); $query->where('( '.$db->quoteName('a.gettype') . ' = 1 OR ' . $db->quoteName('a.gettype') . ' = 2 )');
$db->setQuery((string)$query); $query->order('a.name ASC');
$items = $db->loadObjectList(); $db->setQuery((string)$query);
$options = array(); $items = $db->loadObjectList();
if ($items) $options = [];
{ if ($items)
$model = ComponentbuilderHelper::getModel('dynamic_gets'); {
foreach($items as $item) $model = ComponentbuilderHelper::getModel('dynamic_gets');
{ if ($this->multiple === false)
$type = $model->selectionTranslation($item->type,'gettype'); {
$options[] = JHtml::_('select.option', $item->id, $item->main_get_name . ' (' . JText::_($type) . ')' ); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
} foreach($items as $item)
{
$type = $model->selectionTranslation($item->type,'gettype');
$options[] = Html::_('select.option', $item->id, $item->main_get_name . ' (' . Text::_($type) . ')');
}
}
return $options; return $options;
} }
} }

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfilterbase Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfilterbase extends JFormFieldList
{
/**
* The repositoriesfilterbase field type.
*
* @var string
*/
public $type = 'repositoriesfilterbase';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('base'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('base') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_BASE_URL') . ' -');
if ($_results)
{
$_results = array_unique($_results);
foreach ($_results as $base)
{
// Now add the base and its text to the options array
$_filter[] = Html::_('select.option', $base, $base);
}
}
return $_filter;
}
}

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfilterorganisation Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfilterorganisation extends JFormFieldList
{
/**
* The repositoriesfilterorganisation field type.
*
* @var string
*/
public $type = 'repositoriesfilterorganisation';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('organisation'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('organisation') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ORGANISATION') . ' -');
if ($_results)
{
$_results = array_unique($_results);
foreach ($_results as $organisation)
{
// Now add the organisation and its text to the options array
$_filter[] = Html::_('select.option', $organisation, $organisation);
}
}
return $_filter;
}
}

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfilterrepository Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfilterrepository extends JFormFieldList
{
/**
* The repositoriesfilterrepository field type.
*
* @var string
*/
public $type = 'repositoriesfilterrepository';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('repository'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('repository') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_REPOSITORY') . ' -');
if ($_results)
{
$_results = array_unique($_results);
foreach ($_results as $repository)
{
// Now add the repository and its text to the options array
$_filter[] = Html::_('select.option', $repository, $repository);
}
}
return $_filter;
}
}

View File

@ -0,0 +1,75 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfiltertarget Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfiltertarget extends JFormFieldList
{
/**
* The repositoriesfiltertarget field type.
*
* @var string
*/
public $type = 'repositoriesfiltertarget';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('target'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('target') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_CONTENT') . ' -');
if ($_results)
{
// get repositoriesmodel
$_model = ComponentbuilderHelper::getModel('repositories');
$_results = array_unique($_results);
foreach ($_results as $target)
{
// Translate the target selection
$_text = $_model->selectionTranslation($target,'target');
// Now add the target and its text to the options array
$_filter[] = Html::_('select.option', $target, Text::_($_text));
}
}
return $_filter;
}
}

View File

@ -143,24 +143,28 @@ class JFormFieldServers extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the databse object. (prime)
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','name', 'protocol'))); $query = $db->getQuery(true);
$query->from($db->quoteName('#__componentbuilder_server', 'a')); $query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','update_server_name', 'protocol')));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->from($db->quoteName('#__componentbuilder_server', 'a'));
$query->order('a.name ASC'); $query->where($db->quoteName('a.published') . ' >= 1');
$db->setQuery((string)$query); $query->order('a.name ASC');
$items = $db->loadObjectList(); $db->setQuery((string)$query);
$options = array(); $items = $db->loadObjectList();
if ($items) $options = [];
{ if ($items)
$options[] = JHtml::_('select.option', '', 'Select an option'); {
foreach($items as $item) if ($this->multiple === false)
{ {
$item->protocol = ($item->protocol == 2) ? JText::_('SFTP') : JText::_('FTP'); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
$options[] = JHtml::_('select.option', $item->id, $item->name.' ['.$item->protocol.']'); }
} foreach($items as $item)
} {
$item->protocol = ($item->protocol == 2) ? Text::_('SFTP') : Text::_('FTP');
$options[] = Html::_('select.option', $item->id, $item->update_server_name .' ['.$item->protocol.']');
}
}
return $options; return $options;
} }
} }

View File

@ -16,6 +16,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Filesystem\Folder;
// import the list field type // import the list field type
jimport('joomla.form.helper'); jimport('joomla.form.helper');
@ -49,7 +50,7 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
// now check if there are files in the folder // now check if there are files in the folder
foreach ($localfolders as $localfolder) foreach ($localfolders as $localfolder)
{ {
if (is_dir($localfolder) && $folders = \Joomla\Filesystem\Folder::folders($localfolder)) if (is_dir($localfolder) && $folders = Folder::folders($localfolder))
{ {
if ($this->multiple === false) if ($this->multiple === false)
{ {
@ -57,7 +58,7 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
} }
foreach ($folders as $folder) foreach ($folders as $folder)
{ {
$options[] = Html::_('select.option', $folder, StringHelper::safe($folder, 'W')); $options[] = Html::_('select.option', StringHelper::safe($folder), StringHelper::safe($folder, 'W'));
} }
} }
} }

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
// import the list field type // import the list field type
jimport('joomla.form.helper'); jimport('joomla.form.helper');
@ -143,29 +144,34 @@ class JFormFieldSnippets extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the databse object.
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.name','b.name','c.name'),array('id','snippet_name','type','library'))); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','b.name','c.name'),array('id','snippet_name','type','library')));
$query->from($db->quoteName('#__componentbuilder_snippet', 'a')); $query->from($db->quoteName('#__componentbuilder_snippet', 'a'));
// From the componentbuilder_snippet_type table. // From the componentbuilder_snippet_type table.
$query->join('LEFT', $db->quoteName('#__componentbuilder_snippet_type', 'b') . ' ON (' . $db->quoteName('a.type') . ' = ' . $db->quoteName('b.id') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_snippet_type', 'b') . ' ON (' . $db->quoteName('a.type') . ' = ' . $db->quoteName('b.id') . ')');
// From the componentbuilder_library table. // From the componentbuilder_library table.
$query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'c') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('c.id') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'c') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('c.id') . ')');
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->order('c.ordering ASC'); $query->order('c.ordering ASC');
$query->order('b.name ASC'); $query->order('b.name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = [];
if ($items) if ($items)
{ {
foreach($items as $item) if ($this->multiple === false)
{ {
$lib = (isset($item->library) && ComponentbuilderHelper::checkString($item->library)) ? ' (' . $item->library . ')' :''; $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
$type = (isset($item->type) && ComponentbuilderHelper::checkString($item->type)) ? $item->type :JText::_('COM_COMPONENTBUILDER_NO_TYPE'); }
$options[] = JHtml::_('select.option', $item->id, $type . ' - ' . $item->snippet_name . $lib ); foreach($items as $item)
} {
} $lib = (isset($item->library) && StringHelper::check($item->library)) ? ' (' . $item->library . ')' :'';
$type = (isset($item->type) && StringHelper::check($item->type)) ? $item->type :Text::_('COM_COMPONENTBUILDER_NO_TYPE');
$options[] = Html::_('select.option', $item->id, $type . ' - ' . $item->snippet_name . $lib);
}
}
return $options; return $options;
} }
} }

View File

@ -39,23 +39,27 @@ class JFormFieldSnippettype extends JFormFieldList
*/ */
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); // Get the databse object.
$query = $db->getQuery(true); $db = Factory::getDBO();
$query->select($db->quoteName(array('a.id','a.name'),array('id','type_name'))); $query = $db->getQuery(true);
$query->from($db->quoteName('#__componentbuilder_snippet_type', 'a')); $query->select($db->quoteName(array('a.id','a.name'),array('id','type_name')));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->from($db->quoteName('#__componentbuilder_snippet_type', 'a'));
$query->order('a.name ASC'); $query->where($db->quoteName('a.published') . ' >= 1');
$db->setQuery((string)$query); $query->order('a.name ASC');
$items = $db->loadObjectList(); $db->setQuery((string)$query);
$options = array(); $items = $db->loadObjectList();
if ($items) $options = [];
{ if ($items)
$options[] = JHtml::_('select.option', '', 'Select an option'); {
foreach($items as $item) if ($this->multiple === false)
{ {
$options[] = JHtml::_('select.option', $item->id, $item->type_name); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
} foreach($items as $item)
{
$options[] = Html::_('select.option', $item->id, $item->type_name);
}
}
return $options; return $options;
} }
} }

View File

@ -15,7 +15,6 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\Component\Helper;
jimport('joomla.form.helper'); jimport('joomla.form.helper');
\JFormHelper::loadFieldClass('checkboxes'); \JFormHelper::loadFieldClass('checkboxes');
@ -33,69 +32,41 @@ class JFormFieldSuperpowerpaths extends JFormFieldCheckboxes
// A DynamicCheckboxes@ Field // A DynamicCheckboxes@ Field
/** /**
* Method to get the data to be passed to the layout for rendering. * Method to get the field options.
* *
* @return array * @return array The field option objects.
* *
* @since 3.5 * @since 3.7.0
*/ */
protected function getLayoutData() protected function getOptions()
{ {
$data = parent::getLayoutData(); // Get the databse object.
$db = Factory::getDBO();
// True if the field has 'value' set. In other words, it has been stored, don't use the default values. $query = $db->getQuery(true);
$hasValue = (isset($this->value) && !empty($this->value)); $query->select($db->quoteName(array('a.repository', 'a.organisation')))
->from($db->quoteName('#__componentbuilder_repository', 'a'))
// If a value has been stored, use it. Otherwise, use the defaults. ->where($db->quoteName('a.published') . ' >= 1')
$checkedOptions = $hasValue ? $this->value : $this->checkedOptions; ->where($db->quoteName('a.target') . ' = 1') // super powers
->order($db->quoteName('a.ordering') . ' ASC');
// get the form options $db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = []; $options = [];
if ($items)
// get the component params
$params = Helper::getParams();
$activate = $params->get('super_powers_repositories', 0);
// set the default
$default = $params->get('super_powers_core', 'joomla/super-powers');
// must have one / in the path
if (strpos($default, '/') !== false)
{ {
$tmp = new \stdClass; if ($this->multiple === false)
$tmp->text = $tmp->value = trim($default);
$tmp->checked = false;
$options[$tmp->value] = $tmp;
}
if ($activate == 1)
{
$subform = $params->get($this->fieldname);
// add the paths found in global settings
if (is_object($subform))
{ {
foreach ($subform as $value) $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
{ }
if (isset($value->owner) && strlen($value->owner) > 1 && foreach($items as $item)
isset($value->repo) && strlen($value->repo) > 1) {
{ $path = $item->organisation . '/' . $item->repository;
$tmp = new \stdClass; $options[] = Html::_('select.option', $path, $path);
$tmp->text = $tmp->value = trim($value->owner) . '/' . trim($value->repo);
$tmp->checked = false;
$options[$tmp->value] = $tmp;
}
}
} }
} }
else
$extraData = array( {
'checkedOptions' => is_array($checkedOptions) ? $checkedOptions : explode(',', (string) $checkedOptions), $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_NO_ACTIVE_REPOSITORIES_FOUND'));
'hasValue' => $hasValue, }
'options' => array_values($options) return $options;
);
return array_merge($data, $extraData);
} }
} }

View File

@ -113,10 +113,18 @@ class ComponentbuilderModelFieldtype extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {
@ -257,7 +265,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
* *
* @return mixed An array of data items on success, false on failure. * @return mixed An array of data items on success, false on failure.
*/ */
public function getVxtfields() public function getVxsfields()
{ {
// Get the user object. // Get the user object.
$user = Factory::getUser(); $user = Factory::getUser();
@ -399,13 +407,13 @@ class ComponentbuilderModelFieldtype extends AdminModel
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// convert datatype // convert datatype
$item->datatype = $this->selectionTranslationVxtfields($item->datatype, 'datatype'); $item->datatype = $this->selectionTranslationVxsfields($item->datatype, 'datatype');
// convert indexes // convert indexes
$item->indexes = $this->selectionTranslationVxtfields($item->indexes, 'indexes'); $item->indexes = $this->selectionTranslationVxsfields($item->indexes, 'indexes');
// convert null_switch // convert null_switch
$item->null_switch = $this->selectionTranslationVxtfields($item->null_switch, 'null_switch'); $item->null_switch = $this->selectionTranslationVxsfields($item->null_switch, 'null_switch');
// convert store // convert store
$item->store = $this->selectionTranslationVxtfields($item->store, 'store'); $item->store = $this->selectionTranslationVxsfields($item->store, 'store');
} }
} }
@ -419,7 +427,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
* *
* @return string The translatable string. * @return string The translatable string.
*/ */
public function selectionTranslationVxtfields($value,$name) public function selectionTranslationVxsfields($value,$name)
{ {
// Array of datatype language strings // Array of datatype language strings
if ($name === 'datatype') if ($name === 'datatype')
@ -487,7 +495,6 @@ class ComponentbuilderModelFieldtype extends AdminModel
2 => 'COM_COMPONENTBUILDER_FIELD_BASE64', 2 => 'COM_COMPONENTBUILDER_FIELD_BASE64',
3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY', 3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY',
5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY', 5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY',
4 => 'COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION',
6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM' 6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM'
); );
// Now check if value is found in this array // Now check if value is found in this array

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL" label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="" default=""
required="true" required="true"
@ -125,7 +126,7 @@
name="tab" name="tab"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_LABEL" label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_DESCRIPTION"
class="fieldMedium" layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="1" default="1"
button="false" button="false"

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