From 9eb4af502746ca8f0fbb4a2e3f59c98579768e30 Mon Sep 17 00:00:00 2001 From: aB0t Date: Tue, 9 Sep 2025 20:17:46 +0000 Subject: [PATCH] Release of v5.1.2-alpha4 Add Joomla 6 build option. --- CHANGELOG.md | 15 +- ComponentbuilderInstallerScript.php | 2 +- README.md | 6 +- admin/README.txt | 6 +- admin/forms/joomla_component.xml | 4 +- .../en-GB/en-GB.com_componentbuilder.ini | 3 +- admin/sql/install.mysql.utf8.sql | 4 +- admin/src/View/Compiler/HtmlView.php | 6 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 6 +- .../JoomlaSix/ComHelperClass/CreateUser.php | 128 ++ .../JoomlaSix/ComHelperClass/index.html | 1 + .../JoomlaSix/Controller/AllowAdd.php | 129 ++ .../JoomlaSix/Controller/AllowEdit.php | 300 ++++ .../JoomlaSix/Controller/AllowEditViews.php | 243 ++++ .../JoomlaSix/Controller/index.html | 1 + .../JoomlaSix/Model/CanDelete.php | 87 ++ .../JoomlaSix/Model/CanEditState.php | 108 ++ .../JoomlaSix/Model/CheckInNow.php | 109 ++ .../Architecture/JoomlaSix/Model/index.html | 1 + .../JoomlaSix/Module/Dispatcher.php | 170 +++ .../Architecture/JoomlaSix/Module/Helper.php | 151 ++ .../Architecture/JoomlaSix/Module/Library.php | 154 ++ .../Architecture/JoomlaSix/Module/MainXML.php | 570 ++++++++ .../JoomlaSix/Module/Provider.php | 114 ++ .../JoomlaSix/Module/Template.php | 242 ++++ .../Architecture/JoomlaSix/Module/index.html | 1 + .../JoomlaSix/Plugin/Extension.php | 246 ++++ .../Architecture/JoomlaSix/Plugin/MainXML.php | 570 ++++++++ .../JoomlaSix/Plugin/Provider.php | 106 ++ .../Architecture/JoomlaSix/Plugin/index.html | 1 + .../Compiler/Component/JoomlaSix/Settings.php | 748 ++++++++++ .../Compiler/Component/JoomlaSix/index.html | 1 + .../src/Componentbuilder/Compiler/Config.php | 5 +- .../Extension/JoomlaSix/InstallScript.php | 528 +++++++ .../Compiler/Extension/JoomlaSix/index.html | 1 + .../Compiler/Field/JoomlaSix/CoreField.php | 129 ++ .../Compiler/Field/JoomlaSix/CoreRule.php | 125 ++ .../Compiler/Field/JoomlaSix/InputButton.php | 349 +++++ .../Compiler/Field/JoomlaSix/index.html | 1 + .../Compiler/JoomlaSix/Event.php | 108 ++ .../Compiler/JoomlaSix/Header.php | 651 +++++++++ .../Compiler/JoomlaSix/History.php | 212 +++ .../Compiler/JoomlaSix/index.html | 1 + .../Compiler/Joomlamodule/JoomlaSix/Data.php | 1075 ++++++++++++++ .../Joomlamodule/JoomlaSix/Infusion.php | 435 ++++++ .../Joomlamodule/JoomlaSix/Structure.php | 1264 +++++++++++++++++ .../Joomlamodule/JoomlaSix/index.html | 1 + .../Compiler/Joomlaplugin/JoomlaSix/Data.php | 1051 ++++++++++++++ .../Joomlaplugin/JoomlaSix/Infusion.php | 392 +++++ .../Joomlaplugin/JoomlaSix/Structure.php | 827 +++++++++++ .../Joomlaplugin/JoomlaSix/index.html | 1 + .../Compiler/Model/JoomlaSix/Customtabs.php | 240 ++++ .../Compiler/Model/JoomlaSix/index.html | 1 + .../Service/ArchitectureComHelperClass.php | 17 + .../Service/ArchitectureController.php | 70 +- .../Compiler/Service/ArchitectureModel.php | 58 + .../Compiler/Service/ArchitectureModule.php | 140 ++ .../Compiler/Service/ArchitecturePlugin.php | 72 + .../Compiler/Service/Component.php | 26 + .../Compiler/Service/Event.php | 17 + .../Compiler/Service/Extension.php | 20 +- .../Compiler/Service/Field.php | 38 + .../Compiler/Service/Header.php | 28 + .../Compiler/Service/History.php | 20 + .../Compiler/Service/Joomlamodule.php | 91 ++ .../Compiler/Service/Joomlaplugin.php | 92 +- .../Compiler/Service/Model.php | 23 + .../src/Componentbuilder/Search/Config.php | 4 +- .../Componentbuilder/Service/CoreRules.php | 17 + .../VDM.Joomla/src/Utilities/UploadHelper.php | 3 +- 71 files changed, 12333 insertions(+), 39 deletions(-) create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/CreateUser.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowAdd.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEdit.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEditViews.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanDelete.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanEditState.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CheckInNow.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Dispatcher.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Helper.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Library.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/MainXML.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Provider.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Template.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Extension.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/MainXML.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Provider.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/Settings.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/InstallScript.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreField.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreRule.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/InputButton.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Event.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Header.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/History.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Data.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Infusion.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Structure.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Data.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Infusion.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Structure.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/Customtabs.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/index.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 731804487..dbdf3d1f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,6 @@ -# v5.1.2-alpha3 +# v5.1.2-alpha4 -- Migrates view HTML classes to use getModel() directly instead of the deprecated magic get() calls to model methods. -- Refactores event handling (contentPrepare, titlePrepare, contentBeforeDisplay, contentAfterDisplay) to use Joomla 5’s native event dispatcher via the model’s new getDispatcher() method. -- Updates table classes to properly support NULL values, both in the store() method and in table variable definitions. #1245 -- Extractes the setAutoCheckIn() and setCheckInCall() logic into a dedicated CheckInNow class for cleaner design. -- Replace all direct $app->input property calls with the recommended $app->getInput() method across the entire codebase. +- Add Joomla 6 build option # v5.1.2-alpha @@ -12,7 +8,12 @@ - Add native module builder for Joomla 4/5 - Refactor dynamic get methods into dedicated classes - Move Joomla DB handling into compiler injector flow -- Fix auto-check(in) method for Joomla 4/5 compatibility +- Fix auto-check(in) method for Joomla 4/5 compatibility +- Migrates view HTML classes to use getModel() directly instead of the deprecated magic get() calls to model methods. +- Refactores event handling (contentPrepare, titlePrepare, contentBeforeDisplay, contentAfterDisplay) to use Joomla 5's native event dispatcher via the model’s new getDispatcher() method. +- Updates table classes to properly support NULL values, both in the store() method and in table variable definitions. #1245 +- Extractes the setAutoCheckIn() and setCheckInCall() logic into a dedicated CheckInNow class for cleaner design. +- Replace all direct $app->input property calls with the recommended $app->getInput() method across the entire codebase. # v5.1.1 diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index 9b637fcd9..3c5a1eae7 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

Upgrade to Version 5.1.2-alpha3 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 5.1.2-alpha4 Was Successful! Let us know if anything is not working as expected.

'; // Add/Update component in the action logs extensions table. $this->setActionLogsExtensions(); diff --git a/README.md b/README.md index d3e911815..5e945f818 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x - and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator-it's a **full-stack development pipeline for Joomla extensions**. -You can install this component easily. The latest release (**5.1.2-alpha3**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. +You can install this component easily. The latest release (**5.1.2-alpha4**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. Upgrades are seamless through Joomla's built-in extension update mechanism. @@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig * **Company:** [Vast Development Method](https://dev.vdm.io) * **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io) * **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder) -* **Created:** 30th April, 2015 · **Last Build:** 3rd September, 2025 · **Version:** 5.1.2-alpha3 +* **Created:** 30th April, 2015 · **Last Build:** 9th September, 2025 · **Version:** 5.1.2-alpha4 * **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved. -* **Lines:** 1156347 · **Fields:** 2091 · **Files:** 7831 · **Folders:** 740 +* **Lines:** 1197549 · **Fields:** 2091 · **Files:** 7998 · **Folders:** 752 > Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions. diff --git a/admin/README.txt b/admin/README.txt index d3e911815..5e945f818 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x - and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator-it's a **full-stack development pipeline for Joomla extensions**. -You can install this component easily. The latest release (**5.1.2-alpha3**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. +You can install this component easily. The latest release (**5.1.2-alpha4**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access. Upgrades are seamless through Joomla's built-in extension update mechanism. @@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig * **Company:** [Vast Development Method](https://dev.vdm.io) * **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io) * **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder) -* **Created:** 30th April, 2015 · **Last Build:** 3rd September, 2025 · **Version:** 5.1.2-alpha3 +* **Created:** 30th April, 2015 · **Last Build:** 9th September, 2025 · **Version:** 5.1.2-alpha4 * **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved. -* **Lines:** 1156347 · **Fields:** 2091 · **Files:** 7831 · **Folders:** 740 +* **Lines:** 1197549 · **Fields:** 2091 · **Files:** 7998 · **Folders:** 752 > Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions. diff --git a/admin/forms/joomla_component.xml b/admin/forms/joomla_component.xml index 5bd472223..e486225cc 100644 --- a/admin/forms/joomla_component.xml +++ b/admin/forms/joomla_component.xml @@ -640,10 +640,10 @@ type="number" name="preferred_joomla_version" label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PREFERRED_JOOMLA_VERSION_LABEL" - default="3" + default="5" class="text_area" min="3" - max="5" + max="6" step="1" /> diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index c363d2291..2a04326b3 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -3294,7 +3294,7 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_STATE_DESCRIPTION="Set the release COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_STATE_HINT="stable" COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_STATE_LABEL="Release State" COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_DESCRIPTION="Set the release target version" -COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_HINT="5\.[0123]" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_HINT="5\.[01234]" COM_COMPONENTBUILDER_COMPONENT_UPDATES_UPDATE_TARGET_VERSION_LABEL="Update Server Release Target Version" COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_DESCRIPTION="Enter Download Link" COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_HINT="http://www.example.com/file.zip" @@ -6911,6 +6911,7 @@ COM_COMPONENTBUILDER_JOOMLA_POWER_SYSTEM_NAME_LABEL="System Name" COM_COMPONENTBUILDER_JOOMLA_POWER_SYSTEM_NAME_MESSAGE="Error! Please add some text here." COM_COMPONENTBUILDER_JOOMLA_POWER_VERSION_DESC="A count of the number of times this Joomla Power has been revised." COM_COMPONENTBUILDER_JOOMLA_POWER_VERSION_LABEL="Version" +COM_COMPONENTBUILDER_JOOMLA_SIX="Joomla 6" COM_COMPONENTBUILDER_JOOMLA_SOCIAL_FEED="Joomla! Social Feed" COM_COMPONENTBUILDER_JOOMLA_THREE="Joomla 3" COM_COMPONENTBUILDER_JOOMLA_VERSION="Joomla Version" diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 76b8b3fde..bac268fc2 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -2121,7 +2121,7 @@ INSERT INTO `#__componentbuilder_joomla_plugin` (`id`, `add_head`, `add_php_meth (28, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 'ae2fafb4-e84b-4534-ba9c-6c9e1700b318', 'This plugin is used to load PreUpVer on your website. So it adds https://cdn.jsdelivr.net/gh/Llewellynvdm/PreUpVer@1.0.0/dist/js/preupver.min.js to the header of your website. See: https://git.vdm.dev/Llewellyn/PreUpVer for more details.', '{}', 'dd6580c4-6bbb-4d13-a868-0b38fbb6a66e', 'dXNlIEpvb21sYVxDTVNcUGx1Z2luXENNU1BsdWdpbjsNCnVzZSBKb29tbGFcQ01TXEh0bWxcSFRNTEhlbHBlcjsNCg==', '3f139f81-0697-4392-b065-6426adaa7ac6', '{\"method_selection0\":{\"method\":\"c4450b88-658c-4b19-a4a9-c82d14c12d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lvbio6IFtbW3BsdWdpbi52ZXJzaW9uXV1dDQorICpDb3B5cmlnaHQqOiAjIyNDT1BZUklHSFQjIyMNCisgKkxpY2Vuc2UqOiAjIyNMSUNFTlNFIyMjDQoNCj4gVGhpcyAqKnBsdWdpbioqIHdhcyBidWlsZCB3aXRoIGEgSm9vbWxhIFtBdXRvbWF0ZWQgQ29tcG9uZW50IEJ1aWxkZXJdKGh0dHBzOi8vd3d3Lmpvb21sYWNvbXBvbmVudGJ1aWxkZXIuY29tKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8p', 0, '', '', 'PreUpVer Loader', 0, 1, '', '', 1, '2023-11-28 09:01:02', '2024-08-06 20:58:28', 6, 0, 2), (46, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'ae2fafb4-e84b-4534-ba9c-6c9e1700b318', 'Add Access Token to easy update [[[Component]]]', '{}', '5236660d-5dee-492b-925c-15b96cb6ea44', 'dXNlIEpvb21sYVxDTVNcVXJpXFVyaTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXENNU1xDb21wb25lbnRcQ29tcG9uZW50SGVscGVyOw==', '93940067-92d1-4cc2-b4e2-d3fc118d99bd', '{\"method_selection0\":{\"method\":\"e64853c8-beaa-482f-993c-920d73563210\"}}', 'CS8qKg0KCSAqIEFmZmVjdHMgY29uc3RydWN0b3IgYmVoYXZpb3VyLiBJZiB0cnVlLCBsYW5ndWFnZSBmaWxlcyB3aWxsIGJlIGxvYWRlZCBhdXRvbWF0aWNhbGx5Lg0KCSAqDQoJICogQHZhciAgICBib29sZWFuDQoJICogQHNpbmNlICAxLjAuMA0KCSAqLw0KCXByb3RlY3RlZCAgJGF1dG9sb2FkTGFuZ3VhZ2UgPSB0cnVlOw0KDQoJLyoqDQoJICogb25JbnN0YWxsZXJCZWZvcmVQYW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ZiBbW1tjb21wb25lbnRdXV0gaGFzIG5vdCBiZWVuIHNldCwgeW91IGNhbiBzZXQgdGhpcyBhY2Nlc3MgdG9rZW4gaW4gdGhlIDxhIGhyZWY9JXMgPmdsb2JhbCBvcHRpb25zIHRhYjwvYT4uIiwNCgkJCQkJCSRnZXRfYWNjZXNzX3Rva2VuX3VybCwNCgkJCQkJCSRzZXRfYWNjZXNzX3Rva2VuX3VybA0KCQkJCQkpLA0KCQkJCQknbm90aWNlJw0KCQkJCSk7DQoJCQl9DQoJCX0NCgl9', 'componentbuilder', '', '', '', 'Ly8=', '', '', '', '3.0.0', '{\"property_selection0\":{\"property\":\"437b3159-1408-4fa2-91b0-8b5e5b7527a3\"}}', 'WW91IGNhbiB1c2UgYWxsIHRoZSBub3JtYWwgbWFya2Rvd24sIGluY2x1ZGluZyB0aGUgcGxhY2UtaG9sZGVycy4=', 0, '', '', 'Update (git.vdm.dev) J5', 0, 1, '', '', 1, '2024-03-10 17:27:35', '2024-12-17 10:06:31', 9, 0, 9), (66, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, '204d6d55-d4c7-4162-bd2c-39d19302b406', 'The plugin to fully integrate componentbuilder with the privacy suite of Joomla.', '{}', '8aa96d76-94e3-47d1-8dd8-f430b72ed0f7', 'dXNlIEpvb21sYVxVdGlsaXRpZXNcQXJyYXlIZWxwZXI7DQp1c2UgSm9vbWxhXENvbXBvbmVudFxQcml2YWN5XEFkbWluaXN0cmF0b3JcUGx1Z2luXFByaXZhY3lQbHVnaW47DQp1c2UgSm9vbWxhXERhdGFiYXNlXERhdGFiYXNlQXdhcmVUcmFpdDs=', '2d8677ea-cda3-48d3-828d-da656c52dbe1', '{\"method_selection0\":{\"method\":\"ddc9d897-8902-4ac3-bf38-f37e6af1a46a\"},\"method_selection1\":{\"method\":\"3692862c-6688-4afe-809e-c6677b318fea\"},\"method_selection2\":{\"method\":\"1e9e7ad9-ea31-43a2-a288-ffaa4bec5101\"}}', 'CXVzZ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},\"property_selection1\":{\"property\":\"a89d86a3-08b0-49bb-a21c-24c04ee2a280\"},\"property_selection2\":{\"property\":\"af756e64-0781-4f35-a6f3-2917ccd7ca4c\"}}', 'IyAjIyNQTFVHSU5fTkFNRSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIyMjREVTQ1JJUFRJT04jIyMNCg0KIyBCdWlsZCBEZXRhaWxzDQoNCisgKkNvbXBhbnkqOiBbIyMjQ09NUEFOWU5BTUUjIyNdKCMjI0FVVEhPUldFQlNJVEUjIyMpDQorICpBdXRob3IqOiBbIyMjQVVUSE9SIyMjXShtYWlsdG86IyMjQVVUSE9SRU1BSUwjIyMpDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw==', 0, '', '', 'Global Privacy J5', 0, 1, 'https://www.vdm.io/updates/componentbuilder_global_privacy.xml', NULL, 1, '2024-09-16 14:55:27', '2024-09-16 15:50:11', 2, 0, 1), -(67, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'ae2fafb4-e84b-4534-ba9c-6c9e1700b318', 'Register [[[ComponentNamespace]]] Commands\r\n\r\n@since 4.0.0', '{}', '5df401b4-c9a6-42c8-b50d-87f67c8a15f3', 'IyMjUE9XRVJfQVVUT0xPQURFUiMjIw0KDQp1c2UgSm9vbWxhXEFwcGxpY2F0aW9uXEFwcGxpY2F0aW9uRXZlbnRzOw0KdXNlIEpvb21sYVxDTVNcUGx1Z2luXENNU1BsdWdpbjsNCnVzZSBKb29tbGFcRXZlbnRcU3Vic2NyaWJlckludGVyZmFjZTsNCnVzZSBKb29tbGFcQ01TXEZhY3Rvcnk7DQp1c2UgSm9vbWxhXENNU1xDb25zb2xlXExvYWRlclxXcml0YWJsZUxvYWRlckludGVyZmFjZTs=', '3f139f81-0697-4392-b065-6426adaa7ac6', '{}', 'CS8qKg0KCSAqI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WRlcg0KCQlGYWN0b3J5OjpnZXRDb250YWluZXIoKQ0KCQkJLT5nZXQoV3JpdGFibGVMb2FkZXJJbnRlcmZhY2U6OmNsYXNzKQ0KCQkJLT5hZGQoJ1tbW2NvbXBvbmVudF1dXTpJdGVtOmltcG9ydCcsICRzZXJ2aWNlSWQpOw0KCX0=', '[[[ComponentNamespace]]]Commands', '', '', '', '', '', '', '', '1.0.0', '{}', 'WW91IGNhbiB1c2UgYWxsIHRoZSBub3JtYWwgbWFya2Rvd24sIGluY2x1ZGluZyB0aGUgcGxhY2UtaG9sZGVycy4=', 0, '', '', 'Component Commands', 0, 3, '', NULL, 1, '2020-02-06 15:09:34', '2025-02-25 10:56:09', 6, 0, 10); +(67, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'ae2fafb4-e84b-4534-ba9c-6c9e1700b318', 'Register [[[ComponentNamespace]]] Commands\r\n\r\n@since 4.0.0', '{}', '5df401b4-c9a6-42c8-b50d-87f67c8a15f3', 'IyMjUE9XRVJfQVVUT0xPQURFUiMjIw0KDQp1c2UgSm9vbWxhXEFwcGxpY2F0aW9uXEFwcGxpY2F0aW9uRXZlbnRzOw0KdXNlIEpvb21sYVxDTVNcUGx1Z2luXENNU1BsdWdpbjsNCnVzZSBKb29tbGFcRXZlbnRcU3Vic2NyaWJlckludGVyZmFjZTsNCnVzZSBKb29tbGFcQ01TXEZhY3Rvcnk7DQp1c2UgSm9vbWxhXENNU1xDb25zb2xlXExvYWRlclxXcml0YWJsZUxvYWRlckludGVyZmFjZTs=', '3f139f81-0697-4392-b065-6426adaa7ac6', '{}', 'CS8qKg0KCSAqIFJldHVybnMgYW4gYXJyYXkgb2YgZXZlbnRzIHRoaXMgcGx1Z2luIGlzIHN1YnNjcmliaW5nIHRvLg0KCSAqDQoJICogQHJldHVybiBhcnJheQ0KCSAqIEBzaW5jZSA0LjAuMA0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gZ2V0U3Vic2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ponentNamespace]]]Commands', '', '', '', 'CQkJLy8gY2hlY2sgdGhhdCBbW1tjb21wb25lbnRdXV0gaXMgaW5zdGFsbGVkDQoJCQlpZiAoIWlzX2RpcihKUEFUSF9BRE1JTklTVFJBVE9SIC4gJy9jb21wb25lbnRzL2NvbV9bW1tjb21wb25lbnRdXV0nKSkNCgkJCXsNCgkJCQkkYXBwLT5lbnF1ZXVlTWVzc2FnZSgnW1tbY29tcG9uZW50X2Fjcm9ueW1dXV0gbXVzdCBmaXJzdCBiZSBpbnN0YWxsZWQgZnJvbSA8YSBocmVmPSJbW1tnZXRfY29tcG9uZW50X2xpbmtdXV0iIHRhcmdldD0iX2JsYW5rIj5bW1tjb21wb25lbnRfbGlua19uYW1lXV1dPC9hPi4nLCAnZXJyb3InKTsNCgkJCQlyZXR1cm4gZmFsc2U7DQoJCQl9', '', '', '', '1.0.0', '{}', 'WW91IGNhbiB1c2UgYWxsIHRoZSBub3JtYWwgbWFya2Rvd24sIGluY2x1ZGluZyB0aGUgcGxhY2UtaG9sZGVycy4=', 0, '', '', 'Component Commands', 0, 3, '', NULL, 1, '2020-02-06 15:09:34', '2025-09-09 19:17:31', 7, 0, 10); -- -- Dumping data for table `#__componentbuilder_joomla_power` @@ -2163,7 +2163,7 @@ INSERT INTO `#__componentbuilder_power` (`id`, `guid`, `system_name`, `name`, `t (18, '91004529-94a9-4590-b842-e7c6b624ecf5', 'Utilities Object Helper', 'ObjectHelper', 'abstract class', 'Some object tricks\r\n\r\n@since 3.0.9', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICAzcmQgU2VwdGVtYmVyLCAyMDIwDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL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w0KCQkJfQ0KCQl9DQoJfQ0KDQoJLyoqDQoJICogUmVjdXJzaXZlbHkgc29ydCBhbiBhcnJheSBieSBrZXkuDQoJICoNCgkgKiBAcGFyYW0gYXJyYXkgICRhcnJheSAgVGhlIGFycmF5IHRvIHNvcnQuDQoJICoNCgkgKiBAcmV0dXJuIHZvaWQNCgkgKiBAc2luY2UgIDUuMC4yDQoJICovDQoJcHJvdGVjdGVkIHN0YXRpYyBmdW5jdGlvbiByZWN1cnNpdmVLc29ydChhcnJheSAmJGFycmF5KTogdm9pZA0KCXsNCgkJa3NvcnQoJGFycmF5KTsNCg0KCQlmb3JlYWNoICgkYXJyYXkgYXMgJiR2YWx1ZSkNCgkJew0KCQkJaWYgKGlzX2FycmF5KCR2YWx1ZSkpDQoJCQl7DQoJCQkJc2VsZjo6cmVjdXJzaXZlS3NvcnQoJHZhbHVlKTsNCgkJCX0NCgkJfQ0KCX0NCg==', '{}', '{}', '', 1, '2022-03-09 00:35:23', 25, 0, 1), (21, '9c513baf-b279-43fd-ae29-a585c8cbc4f0', 'Utilities GuidHelper', 'GuidHelper', 'abstract class', 'Global Unique ID Helper\r\n\r\n@since 3.0.9', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICAzcmQgU2VwdGVtYmVyLCAyMDIwDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL2dpdC52ZG0uZGV2L2pvb21sYS9Db21wb25lbnQtQnVpbGRlcj4NCiAqIEBjb3B5cmlnaHQgIENvcHlyaWdodCAoQykgMjAxNSBWYXN0IERldmVsb3BtZW50IE1ldGhvZC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCiAqIEBsaWNlbnNlICAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBvciBsYXRlcjsgc2VlIExJQ0VOU0UudHh0DQogKi8NCg==', '1.0.0', 0, '', '', '', '', '', '[[[NamespacePrefix]]]\\Joomla\\Utilities.GuidHelper', 1, '{}', '{}', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTs=', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"}}', 'CS8qKg0KCSAqIFJldHVybnMgYSBHVUlEdjQgc3RyaW5nDQoJICogDQoJICogVGhhbmtzIHRvIERhdmUgUGVhcnNvbiAoYW5kIG90aGVyKQ0KCSAqIGh0dHBzOi8vd3d3LnBocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLmNvbS1jcmVhdGUtZ3VpZC5waHAjMTE5MTY4IA0KCSAqDQoJICogVXNlcyB0aGUgYmVzdCBjcnlwdG9ncmFwaGljYWxseSBzZWN1cmUgbWV0aG9kDQoJICogZm9yIGFsbCBzdXBwb3J0ZWQgcGxhdGZvcm1zIHdpdGggZmFsbGJhY2sgdG8gYW4gb2xkZXIsDQoJICogbGVzcyBzZWN1cmUgdmVyc2lvbi4NCgkgKg0KCSAqIEBwYXJhbSBib29sICR0cmltDQoJICoNCgkgKiBAcmV0dXJuIHN0cmluZw0KCSAqDQoJICogQHNpbmNlICAzLjAuOQ0KCSAqLw0KCXB1YmxpYyBzdGF0aWMgZnVuY3Rpb24gZ2V0KGJvb2wgJHRyaW0gPSB0cnVlKTogc3RyaW5nDQoJew0KCQkvLyBXaW5kb3dzDQoJCWlmIChmdW5jdGlvbl9leGlzdHMoJ2NvbV9jcmVhdGVfZ3VpZCcpKQ0KCQl7DQoJCQlpZiAoJHRyaW0pDQoJCQl7DQoJCQkJcmV0dXJuIHRyaW0oY29tX2NyZWF0ZV9ndWlkKCksICd7fScpOw0KCQkJfQ0KCQkJcmV0dXJuIGNvbV9jcmVhdGVfZ3VpZCgpOw0KC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WZcZF17OH0oLVthLWZcZF17NH0pezR9W2EtZlxkXXs4fSg/KDEpXH0pJC9pIiwgJGd1aWQpOw0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQo=', '{\"load_selection0\":{\"load\":\"0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a\"},\"load_selection1\":{\"load\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\"}}', '{}', '', 1, '2022-03-12 01:27:10', 21, 0, 1), (23, '640b5352-fb09-425f-a26e-cd44eda03f15', 'Utilities Component Helper', 'Helper', 'abstract class', 'Some component helper\r\n\r\n@since 3.0.11', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICAzcmQgU2VwdGVtYmVyLCAyMDIwDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL2dpdC52ZG0uZGV2L2pvb21sYS9Db21wb25lbnQtQnVpbGRlcj4NCiAqIEBjb3B5cmlnaHQgIENvcHlyaWdodCAoQykgMjAxNSBWYXN0IERldmVsb3BtZW50IE1ldGhvZC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCiAqIEBsaWNlbnNlICAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBvciBsYXRlcjsgc2VlIExJQ0VOU0UudHh0DQogKi8NCg==', '1.0.0', 0, '', '', '', '', '', '[[[NamespacePrefix]]]\\Joomla\\Utilities.Component.Helper', 1, '{}', '{}', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXENvbXBvbmVudFxDb21wb25lbnRIZWxwZXI7DQp1c2UgSm9vbWxhXENNU1xNVkNcTW9kZWxcQmFzZURhdGFiY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kvLyBDaGVjayBpZiAkcGF0aCBzdGFydHMgd2l0aCBKUEFUSF9TSVRFIHBhdGgNCgkJZWxzZWlmIChzdHJfc3RhcnRzX3dpdGgoJHBhdGgsIEpQQVRIX1NJVEUgLiAnL2NvbXBvbmVudHMvJykpDQoJCXsNCgkJCXJldHVybiAnU2l0ZSc7DQoJCX0NCgkJcmV0dXJuICdBZG1pbmlzdHJhdG9yJzsNCgl9', '{}', '{}', '', 1, '2022-05-13 05:36:32', 45, 0, 1), -(25, 'd7600b43-771a-4747-9f5d-952765721799', 'Utilities UploadHelper', 'UploadHelper', 'abstract class', 'Upload Helper\r\n\r\n@since 3.0.11', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICAzcmQgU2VwdGVtYmVyLCAyMDIwDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL2dpdC52ZG0uZGV2L2pvb21sYS9Db21wb25lbnQtQnVpbGRlcj4NCiAqIEBjb3B5cmlnaHQgIENvcHlyaWdodCAoQykgMjAxNSBWYXN0IERldmVsb3BtZW50IE1ldGhvZC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCiAqIEBsaWNlbnNlICAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBvciBsYXRlcjsgc2VlIExJQ0VOU0UudHh0DQogKi8NCg==', '1.0.0', 0, '', '', '', '', '', '[[[NamespacePrefix]]]\\Joomla\\Utilities.UploadHelper', 1, '{}', '{}', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXEZpbGVzeXN0ZW1cRmlsZTsNCnVzZSBKb29tbGFcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXEZpbGVzeXN0ZW1cUGF0aDs=', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\",\"as\":\"default\"},\"use_selection2\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', 'CS8qKg0KCSAqIFRydWUgdG8gdXNlIHN0cmVhbXMNCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIGJvb2wgJHVzZVN0cmVhbXMgPSBmYWxzZTsNCg0KCS8qKg0KCSAqIEFsbG93IHRoZSB1cGxvYWQgb2YgdW5zYWZlIGZpbGVzDQoJICoNCgkgKiBAdmFyICAgIGJvb2wNCgkgKg0KCSAqIEBzaW5jZSAgMy4wLjExDQoJICovDQoJcHVibGljIHN0YXRpYyBib29sICRhbGxvd1Vuc2FmZSA9IGZhbHNlOw0KDQoJLyoqDQoJICogT3B0aW9ucyB0byBJbnB1dEZpbHRlcjo6aXNTYWZlRmlsZQ0KCSAqDQoJICogQHZhciAgICBhcnJheQ0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIGFycmF5ICRzYWZlRmlsZU9wdGlvbnMgPSBbXTsNCg0KCS8qKg0KCSAqIFNldCB0aGUgZXJyb3IgYmVoYXZpb3INCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIGJvb2wgJGVucXVldWVFcnJvciA9IHRydWU7DQoNCgkvKioNCgkgKiBMZWdhbCBGb3JtYXRzDQoJICoNCgkgKiBAdmFyICAgIGFycmF5DQoJICoNCgkgKiBAc2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vaWQNCgkgKiBAc2luY2UgIDMuMC4xMQ0KCSAqLw0KCXByb3RlY3RlZCBzdGF0aWMgZnVuY3Rpb24gc2V0RXJyb3Ioc3RyaW5nICRtZXNzYWdlKTogdm9pZA0KCXsNCgkJaWYgKHN0YXRpYzo6JGVucXVldWVFcnJvcikNCgkJew0KCQkJRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKS0+ZW5xdWV1ZU1lc3NhZ2UoJG1lc3NhZ2UsICdlcnJvcicpOw0KCQl9DQoJCWVsc2UNCgkJew0KCQkJc3RhdGljOjokZXJyb3JzW10gPSAkbWVzc2FnZTsNCgkJfQ0KCX0=', '{}', '{}', '', 1, '2022-05-16 13:20:50', 60, 0, 1), +(25, 'd7600b43-771a-4747-9f5d-952765721799', 'Utilities UploadHelper', 'UploadHelper', 'abstract class', 'Upload Helper\r\n\r\n@since 3.0.11', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICAzcmQgU2VwdGVtYmVyLCAyMDIwDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL2dpdC52ZG0uZGV2L2pvb21sYS9Db21wb25lbnQtQnVpbGRlcj4NCiAqIEBjb3B5cmlnaHQgIENvcHlyaWdodCAoQykgMjAxNSBWYXN0IERldmVsb3BtZW50IE1ldGhvZC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCiAqIEBsaWNlbnNlICAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBvciBsYXRlcjsgc2VlIExJQ0VOU0UudHh0DQogKi8NCg==', '1.0.0', 0, '', '', '', '', '', '[[[NamespacePrefix]]]\\Joomla\\Utilities.UploadHelper', 1, '{}', '{}', 'dXNlIEpvb21sYVxDTVNcRmFjdG9yeTsNCnVzZSBKb29tbGFcQ01TXExhbmd1YWdlXFRleHQ7DQp1c2UgSm9vbWxhXEZpbGVzeXN0ZW1cRmlsZTsNCnVzZSBKb29tbGFcRmlsZXN5c3RlbVxGb2xkZXI7DQp1c2UgSm9vbWxhXEZpbGVzeXN0ZW1cUGF0aDs=', '{\"use_selection0\":{\"use\":\"640b5352-fb09-425f-a26e-cd44eda03f15\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"f11dc790-713e-4706-9a85-a318ed3ad56e\",\"as\":\"default\"},\"use_selection2\":{\"use\":\"1f28cb53-60d9-4db1-b517-3c7dc6b429ef\",\"as\":\"default\"}}', 'CS8qKg0KCSAqIFRydWUgdG8gdXNlIHN0cmVhbXMNCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIGJvb2wgJHVzZVN0cmVhbXMgPSBmYWxzZTsNCg0KCS8qKg0KCSAqIEFsbG93IHRoZSB1cGxvYWQgb2YgdW5zYWZlIGZpbGVzDQoJICoNCgkgKiBAdmFyICAgIGJvb2wNCgkgKg0KCSAqIEBzaW5jZSAgMy4wLjExDQoJICovDQoJcHVibGljIHN0YXRpYyBib29sICRhbGxvd1Vuc2FmZSA9IGZhbHNlOw0KDQoJLyoqDQoJICogT3B0aW9ucyB0byBJbnB1dEZpbHRlcjo6aXNTYWZlRmlsZQ0KCSAqDQoJICogQHZhciAgICBhcnJheQ0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdGljIGFycmF5ICRzYWZlRmlsZU9wdGlvbnMgPSBbXTsNCg0KCS8qKg0KCSAqIFNldCB0aGUgZXJyb3IgYmVoYXZpb3INCgkgKg0KCSAqIEB2YXIgICAgYm9vbA0KCSAqDQoJICogQHNpbmNlICAzLjAuMTENCgkgKi8NCglwdWJsaWMgc3RhdG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KFBhdGg6OmNsZWFuKCRmdWxsUGF0aCkpOw0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9DQoNCgkvKioNCgkgKiBTZXQgdGhlIGVycm9ycw0KCSAqDQoJICogQHBhcmFtICBzdHJpbmcgICAgICAgICRtZXNzYWdlICAgVGhlIGVycm9yIG1lc3NhZ2UNCgkgKg0KCSAqIEByZXR1cm4gIHZvaWQNCgkgKiBAc2luY2UgIDMuMC4xMQ0KCSAqLw0KCXByb3RlY3RlZCBzdGF0aWMgZnVuY3Rpb24gc2V0RXJyb3Ioc3RyaW5nICRtZXNzYWdlKTogdm9pZA0KCXsNCgkJaWYgKHN0YXRpYzo6JGVucXVldWVFcnJvcikNCgkJew0KCQkJRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKS0+ZW5xdWV1ZU1lc3NhZ2UoJG1lc3NhZ2UsICdlcnJvcicpOw0KCQl9DQoJCWVsc2UNCgkJew0KCQkJc3RhdGljOjokZXJyb3JzW10gPSAkbWVzc2FnZTsNCgkJfQ0KCX0=', '{}', '{}', '', 1, '2022-05-16 13:20:50', 61, 0, 1), (26, 'f11dc790-713e-4706-9a85-a318ed3ad56e', 'Utilities MimeHelper', 'MimeHelper', 'abstract class', 'Mime Helper\r\n\r\n@since 3.0.11', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICAzcmQgU2VwdGVtYmVyLCAyMDIwDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL2dpdC52ZG0uZGV2L2pvb21sYS9Db21wb25lbnQtQnVpbGRlcj4NCiAqIEBjb3B5cmlnaHQgIENvcHlyaWdodCAoQykgMjAxNSBWYXN0IERldmVsb3BtZW50IE1ldGhv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xdWljayBsb29rdXANCgkJaWYgKCFlbXB0eSgkZXh0ZW5zaW9uKSAmJiBpc3NldChzZWxmOjokZmlsZUV4dGVuc2lvblRvTWltZVR5cGVbJGV4dGVuc2lvbl0pKQ0KCQl7DQoJCQlyZXR1cm4gc2VsZjo6JGZpbGVFeHRlbnNpb25Ub01pbWVUeXBlWyRleHRlbnNpb25dOw0KCQl9DQoNCgkJLy8gRmFsbGJhY2sgdG8gYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtIGlmIGV4dGVuc2lvbiBpcyB1bmtub3duDQoJCXJldHVybiAnYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtJzsNCgl9', '{}', '{}', '', 1, '2022-05-16 14:27:38', 12, 0, 1), (29, 'c4a188de-ad78-4a6d-9d5b-01866846d701', 'JCB.Service.Spreadsheet', 'Spreadsheet', 'class', 'Spreadsheet Service Provider\r\n\r\n@since 5.0.3', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICA0dGggU2VwdGVtYmVyLCAyMDIyDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL2dpdC52ZG0uZGV2L2pvb21sYS9Db21wb25lbnQtQnVpbGRlcj4NCiAqIEBjb3B5cmlnaHQgIENvcHlyaWdodCAoQykgMjAxNSBWYXN0IERldmVsb3BtZW50IE1ldGhvZC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCiAqIEBsaWNlbnNlICAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBvciBsYXRlcjsgc2VlIExJQ0VOU0UudHh0DQogKi8NCg==', '1.0.0', 0, '', '', '', '{\"0\":\"-1\"}', 'ServiceProviderInterface', '[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Service.Spreadsheet', 1, '{}', '{}', 'dXNlIEpvb21sYVxESVxDb250YWluZXI7DQp1c2UgSm9vbWxhXERJXFNlcnZpY2VQcm92aWRlckludGVyZmFjZTs=', '{\"use_selection0\":{\"use\":\"fd3f322a-082d-4579-93ad-3352c5adfc71\",\"as\":\"default\"},\"use_selection1\":{\"use\":\"e250638e-4a50-41f9-9172-db3e7f174d26\",\"as\":\"default\"},\"use_selection2\":{\"use\":\"c4169332-3914-400e-b861-972b2d465963\",\"as\":\"default\"},\"use_selection3\":{\"use\":\"dcb0e061-f337-44f7-87f2-f5c5fb9ce917\",\"as\":\"default\"}}', 'CS8qKg0KCSAqIFJlZ2lzdGVycyB0aGUgc2VydmljZSBwcm92aWRlciB3aXRoIGEgREkgY29udGFpbmVyLg0KCSAqDQoJICogQHBhcmFtICAgQ29udGFpbmVyICAkY29udGFpbmVyICBUaGUgREkgY29udGFpbmVyLg0KCSAqDQoJICogQHJldHVybiAgdm9pZA0KCSAqIEBzaW5jZSA1LjAuMw0KCSAqLw0KCXB1YmxpYyBmdW5jdGlvbiByZWdpc3RlcihDb250YWluZXIgJGNvbnRhaW5lcikNCgl7DQoJCSRjb250YWluZXItPmFsaWFzKEhlYWRlcjo6Y2xhc3MsICdTcHJlYWRzaGVldC5IZWFkZXInKQ0KCQkJLT5zaGFyZSgnU3ByZWFkc2hlZXQuSGVhZGVyJywgWyR0aGlzLCAnZ2V0SGVhZGVyJ10sIHRydWUpOw0KDQoJCSRjb250YWluZXItPmFsaWFzKEV4cG9ydGVyOjpjbGFzcywgJ1NwcmVhZHNoZWV0LkV4cG9ydGVyJykNCgkJCS0+c2hhcmUoJ1NwcmVhZHNoZWV0LkV4cG9ydGVyJywgWyR0aGlzLCAnZ2V0RXhwb3J0ZXInXSwgdHJ1ZSk7DQoNCgkJJGNvbnRhaW5lci0+YWxpYXMoSW1wb3J0ZXI6OmNsYXNzLCAnU3ByZWFkc2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qIEByZXR1cm4gIEltcG9ydGVyDQoJICogQHNpbmNlIDUuMC4zDQoJICovDQoJcHVibGljIGZ1bmN0aW9uIGdldEltcG9ydGVyKENvbnRhaW5lciAkY29udGFpbmVyKTogSW1wb3J0ZXINCgl7DQoJCXJldHVybiBuZXcgSW1wb3J0ZXIoDQoJCQkkY29udGFpbmVyLT5nZXQoJ1NwcmVhZHNoZWV0LkZpbGVSZWFkZXInKQ0KCQkpOw0KCX0NCg0KCS8qKg0KCSAqIEdldCBUaGUgRmlsZVJlYWRlciBDbGFzcy4NCgkgKg0KCSAqIEBwYXJhbSAgIENvbnRhaW5lciAgJGNvbnRhaW5lciAgVGhlIERJIGNvbnRhaW5lci4NCgkgKg0KCSAqIEByZXR1cm4gIEZpbGVSZWFkZXINCgkgKiBAc2luY2UgNS4wLjMNCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gZ2V0RmlsZVJlYWRlcihDb250YWluZXIgJGNvbnRhaW5lcik6IEZpbGVSZWFkZXINCgl7DQoJCXJldHVybiBuZXcgRmlsZVJlYWRlcigpOw0KCX0=', '{}', '{}', '', 1, '2022-07-09 10:21:53', 19, 0, 1), (103, '8aef58c1-3f70-4bd4-b9e4-3f29fcd41cff', 'VDM.Interfaces.ModelInterface', 'ModelInterface', 'interface', 'Model Interface\r\n\r\n@since 3.2.0', 2, 'LyoqDQogKiBAcGFja2FnZSAgICBKb29tbGEuQ29tcG9uZW50LkJ1aWxkZXINCiAqDQogKiBAY3JlYXRlZCAgICA0dGggU2VwdGVtYmVyLCAyMDIyDQogKiBAYXV0aG9yICAgICBMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZSA8aHR0cHM6Ly9kZXYudmRtLmlvPg0KICogQGdpdCAgICAgICAgSm9vbWxhIENvbXBvbmVudCBCdWlsZGVyIDxodHRwczovL2dpdC52ZG0uZGV2L2pvb21sYS9Db21wb25lbnQtQnVpbGRlcj4NCiAqIEBjb3B5cmlnaHQgIENvcHlyaWdodCAoQykgMjAxNSBWYXN0IERldmVsb3BtZW50IE1ldGhvZC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCiAqIEBsaWNlbnNlICAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBvciBsYXRlcjsgc2VlIExJQ0VOU0UudHh0DQogKi8NCg==', '1.0.0', 0, '', '', '', '', '', '[[[NamespacePrefix]]]\\Joomla\\Interfaces.ModelInterface', 0, '{}', '{}', '', '{}', 'CS8qKg0KCSAqIFNldCB0aGUgY3VycmVudCBhY3RpdmUgdGFibGUNCgkgKg0KCSAqIEBwYXJhbSBzdHJpbmcgICR0YWJsZSBUaGUgdGFibGUgdGhhdCBzaG91bGQgYmUgYWN0aXZlDQoJICoNCgkgKiBAcmV0dXJuIHNlbGYNCgkgKiBAc2luY2UgMy4yLjINCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gdGFibGUoc3RyaW5nICR0YWJsZSk6IHNlbGY7DQoNCgkvKioNCgkgKiBNb2RlbCB0aGUgdmFsdWUNCgkgKiAgICAgICAgICBFeGFtcGxlOiAkdGhpcy0+dmFsdWUodmFsdWUsICd2YWx1ZV9rZXknLCAndGFibGVfbmFtZScpOw0KCSAqDQoJICogQHBhcmFtICAgbWl4ZWQgICAgICAgICAgJHZhbHVlICAgIFRoZSB2YWx1ZSB0byBtb2RlbA0KCSAqIEBwYXJhbSAgIHN0cmluZyAgICAgICAgICRmaWVsZCAgICBUaGUgZmllbGQga2V5DQoJICogQHBhcmFtICAgc3RyaW5nfG51bGwgICAgJHRhYmxlICAgIFRoZSB0YWJsZQ0KCSAqDQoJICogQHJldHVybiAgbWl4ZWQNCgkgKiBAc2luY2UgMy4yLjANCgkgKi8NCglwdWJsaWMgZnVuY3Rpb24gdmFsdWUoJHZhbHVlLCBzdHJpbmcgJGZpZWxkLCA/c3RyaW5nICR0YWJsZSA9IG51bGwpOw0KDQoJLyoqDQoJICogTW9kZWwgYSB2YWx1ZSBvZiBtdWx0aXBsZSB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:07', 21, 0, 1), diff --git a/admin/src/View/Compiler/HtmlView.php b/admin/src/View/Compiler/HtmlView.php index f5d54a80b..cf9b9c3f4 100644 --- a/admin/src/View/Compiler/HtmlView.php +++ b/admin/src/View/Compiler/HtmlView.php @@ -28,6 +28,7 @@ use Joomla\CMS\Layout\LayoutHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\FormHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\Version; // No direct access to this file \defined('_JEXEC') or die; @@ -341,12 +342,13 @@ class HtmlView extends BaseHtmlView 'label' => 'COM_COMPONENTBUILDER_JOOMLA_VERSION', 'class' => 'list_class', 'description' => 'COM_COMPONENTBUILDER_WHAT_VERSION_OF_JOOMLA_WOULD_YOU_LIKE_TO_TARGET', - 'default' => '3']; + 'default' => (string) Version::MAJOR_VERSION]; // start the joomla versions options $options = [ '3' => 'COM_COMPONENTBUILDER_JOOMLA_THREE', '4' => 'COM_COMPONENTBUILDER_JOOMLA_FOUR', - '5' => 'COM_COMPONENTBUILDER_JOOMLA_FIVE' + '5' => 'COM_COMPONENTBUILDER_JOOMLA_FIVE', + '6' => 'COM_COMPONENTBUILDER_JOOMLA_SIX' ]; // add to form diff --git a/componentbuilder.xml b/componentbuilder.xml index 4847fd958..4330c29ce 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 3rd September, 2025 + 9th September, 2025 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 5.1.2-alpha3 + 5.1.2-alpha4 Component Builder (v.5.1.2-alpha3) +

Component Builder (v.5.1.2-alpha4)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 0ffea8c44..00780680d 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -152,7 +152,7 @@ 5.1.2-alpha https://dev.vdm.io - https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha3.zip + https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha4.zip alpha @@ -167,10 +167,10 @@ pkg_component_builder package admininstrator - 5.1.2-alpha3 + 5.1.2-alpha4 https://dev.vdm.io - https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha3.zip + https://github.com/joomengine/pkg-component-builder/archive/refs/tags/v5.1.2-alpha4.zip alpha diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/CreateUser.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/CreateUser.php new file mode 100644 index 000000000..7cfbdb1dc --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/CreateUser.php @@ -0,0 +1,128 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\ComHelperClass; + + +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\ComHelperClass\CreateUserInterface; + + +/** + * Helper Class Create User Class for Joomla 6 + * + * @since 5.1.2 + */ +final class CreateUser implements CreateUserInterface +{ + /** + * Generates the method definition for creating or updating a user based on the provided parameters. + * + * This method returns a string representation of a PHP function that includes various + * steps for handling user creation and updates, depending on the mode (site registration or admin registration). + * + * @param $add Determines whether to generate the user creation method or not. + * If true, the method will be generated and returned as a string. + * + * @since 5.1.2 + * @return string The generated method code as a string if $add is true. + * Returns an empty string if $add is false. + */ + public function get($add): string + { + if ($add) + { + $method = []; + $method[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**"; + $method[] = Indent::_(1) . " * Save user details by either creating a new user or updating an existing user."; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) + . " * @param array \$credentials ['name' => string, 'username' => string, 'email' => string, 'password' => string, 'password2' => string]"; + $method[] = Indent::_(1) . " * @param int \$autologin"; + $method[] = Indent::_(1) + . " * @param array \$params ['useractivation' => int, 'sendpassword' => int, 'allowUserRegistration' => int]"; + $method[] = Indent::_(1) + . " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration; 2 = Custom Helper Method Called registerUser"; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @return int User ID on success"; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @throws \InvalidArgumentException If required credentials are missing."; + $method[] = Indent::_(1) . " * @throws \RuntimeException If the user update or creation fails."; + $method[] = Indent::_(1) . " * @throws Super__"."_1c10a5f1_204d_4f17_ad9f_0e0684f2030d___Power If the user is not found."; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @since 3.0.0"; + $method[] = Indent::_(1) . " * @deprecated 4.3 Use Super__"."_7832a726_87b6_4e95_887e_7b725d3fab8f___Power::create(\$credentials, \$autologin, \$params, \$mode);"; + $method[] = Indent::_(1) . " */"; + $method[] = Indent::_(1) + . "public static function createUser(\$credentials, \$autologin = 0,"; + $method[] = Indent::_(2) . "\$params = ["; + $method[] = Indent::_(3) + . "'useractivation' => 0, 'sendpassword' => 1"; + $method[] = Indent::_(2) . "], \$mode = 1"; + $method[] = Indent::_(1) . ")"; + $method[] = Indent::_(1) . "{"; + $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Create a user with the UserHelper class (Super---7832a726_87b6_4e95_887e_7b725d3fab8f---Power)"; + $method[] = Indent::_(2) + . "return Super__"."_7832a726_87b6_4e95_887e_7b725d3fab8f___Power::create(\$credentials, \$autologin, \$params, \$mode);"; + $method[] = Indent::_(1) . "}"; + + $method[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**"; + $method[] = Indent::_(1) . " * Update the given component params."; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @param string|null \$option The optional extension element name."; + $method[] = Indent::_(1) . " * @param string \$target The parameter name to be updated."; + $method[] = Indent::_(1) . " * @param mixed \$value The value to set for the parameter."; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @since 3.0.0"; + $method[] = Indent::_(1) . " * @deprecated 4.3 Use Super__"."_640b5352_fb09_425f_a26e_cd44eda03f15___Power::setParams(\$target, \$value, \$option);"; + $method[] = Indent::_(1) . " */"; + $method[] = PHP_EOL . Indent::_(1) + . "public static function setParams(\$option, \$target, \$value)"; + $method[] = Indent::_(1) . "{"; + $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Sets a parameter value for the given target in the specified option's params"; + $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " (Super---640b5352_fb09_425f_a26e_cd44eda03f15---Power)"; + $method[] = Indent::_(2) + . "return Super__"."_640b5352_fb09_425f_a26e_cd44eda03f15___Power::setParams(\$target, \$value, \$option);"; + $method[] = Indent::_(1) . "}"; + + $method[] = PHP_EOL . Indent::_(1) . "/**"; + $method[] = Indent::_(1) . " * Update user details"; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @param array \$userDetails Array containing user details to be updated"; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @return int Updated user ID on success."; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @throws \RuntimeException If user update fails."; + $method[] = Indent::_(1) . " *"; + $method[] = Indent::_(1) . " * @since 3.0.0"; + $method[] = Indent::_(1) . " * @deprecated 4.3 Use Super__"."_7832a726_87b6_4e95_887e_7b725d3fab8f___Power::update(\$userDetails);"; + $method[] = Indent::_(1) . " */"; + $method[] = Indent::_(1) + . "public static function updateUser(\$userDetails): int"; + $method[] = Indent::_(1) . "{"; + $method[] = Indent::_(2) + . "//" . Line::_(__Line__, __Class__) + . " Update user details with the UserHelper class (Super---7832a726_87b6_4e95_887e_7b725d3fab8f---Power)"; + $method[] = Indent::_(2) . "return Super__"."_7832a726_87b6_4e95_887e_7b725d3fab8f___Power::update(\$userDetails);"; + $method[] = Indent::_(1) . "}"; + + // return the help method + return implode(PHP_EOL, $method); + } + + return ''; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/ComHelperClass/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowAdd.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowAdd.php new file mode 100644 index 000000000..335a08c74 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowAdd.php @@ -0,0 +1,129 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Controller; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowAddInterface; + + +/** + * Controller Allow Add Class for Joomla 6 + * + * @since 5.1.2 + */ +final class AllowAdd implements AllowAddInterface +{ + /** + * The Component code name. + * + * @var String + * @since 3.2.0 + */ + protected String $component; + + /** + * The Permission Class. + * + * @var Permission + * @since 3.2.0 + */ + protected Permission $permission; + + /** + * The Dispenser Class. + * + * @var Dispenser + * @since 3.2.0 + */ + protected Dispenser $dispenser; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Permission $permission The Permission Class. + * @param Dispenser $dispenser The Dispenser Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, Permission $permission, + Dispenser $dispenser) + { + $this->component = $config->component_code_name; + $this->permission = $permission; + $this->dispenser = $dispenser; + } + + /** + * Get Allow Add Function Code + * + * @param string $nameSingleCode The single code name of the view. + * + * @since 3.2.0 + * @return string The allow add method code + */ + public function get(string $nameSingleCode): string + { + $allow = []; + + // prepare custom permission script + $custom_allow = $this->dispenser->get( + 'php_allowadd', $nameSingleCode, '', null, true + ); + + $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Get user object."; + $allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();"; + // check if the item has permissions. + if ($this->permission->globalExist($nameSingleCode, 'core.access')) + { + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Access check."; + $allow[] = Indent::_(2) . "\$access = \$user->authorise('" + . $this->permission->getGlobal($nameSingleCode, 'core.access') + . "', 'com_" . $this->component . "');"; + $allow[] = Indent::_(2) . "if (!\$access)"; + $allow[] = Indent::_(2) . "{"; + $allow[] = Indent::_(3) . "return false;"; + $allow[] = Indent::_(2) . "}"; + } + + // load custom permission script + $allow[] = $custom_allow; + + // check if the item has permissions. + if ($this->permission->globalExist($nameSingleCode, 'core.create')) + { + // setup the default script + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " In the absence of better information, revert to the component permissions."; + $allow[] = Indent::_(2) . "return \$user->authorise('" + . $this->permission->getGlobal($nameSingleCode, 'core.create') + . "', \$this->option);"; + } + else + { + // setup the default script + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " In the absence of better information, revert to the component permissions."; + $allow[] = Indent::_(2) . "return parent::allowAdd(\$data);"; + } + + return implode(PHP_EOL, $allow); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEdit.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEdit.php new file mode 100644 index 000000000..13664180f --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEdit.php @@ -0,0 +1,300 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Controller; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Category; +use VDM\Joomla\Componentbuilder\Compiler\Builder\CategoryOtherName; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowEditInterface; + + +/** + * Controller Allow Edit Class for Joomla 6 + * + * @since 5.1.2 + */ +final class AllowEdit implements AllowEditInterface +{ + /** + * The Component code name. + * + * @var String + * @since 3.2.0 + */ + protected String $component; + + /** + * The Permission Class. + * + * @var Permission + * @since 3.2.0 + */ + protected Permission $permission; + + /** + * The Dispenser Class. + * + * @var Dispenser + * @since 3.2.0 + */ + protected Dispenser $dispenser; + + /** + * The Category Class. + * + * @var Category + * @since 3.2.0 + */ + protected Category $category; + + /** + * The CategoryOtherName Class. + * + * @var CategoryOtherName + * @since 3.2.0 + */ + protected CategoryOtherName $categoryothername; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Permission $permission The Permission Class. + * @param Dispenser $dispenser The Dispenser Class. + * @param Category $category The Category Class. + * @param CategoryOtherName $categoryothername The CategoryOtherName Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, Permission $permission, + Dispenser $dispenser, Category $category, + CategoryOtherName $categoryothername) + { + $this->component = $config->component_code_name; + $this->permission = $permission; + $this->dispenser = $dispenser; + $this->category = $category; + $this->categoryothername = $categoryothername; + } + + /** + * Get Allow Edit Function Code + * + * @param string $nameSingleCode The single code name of the view. + * @param string $nameListCode The list code name of the view. + * + * @since 3.2.0 + * @return string The allow edit method code + */ + public function get(string $nameSingleCode, string $nameListCode): string + { + $allow = []; + + // prepare custom permission script + $customAllow = $this->dispenser->get( + 'php_allowedit', $nameSingleCode + ); + + if ($this->category->exists("{$nameListCode}")) + { + // check if category has another name + $otherViews = $this->categoryothername-> + get($nameListCode . '.views', $nameListCode); + $otherView = $this->categoryothername-> + get($nameListCode . '.view', $nameSingleCode); + // setup the category script + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " get user object."; + $allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();"; + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " get record id."; + $allow[] = Indent::_(2) + . "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;"; + // load custom permission script + $allow[] = $customAllow; + // check if the item has permissions. + if ($this->permission->globalExist($otherView, 'core.access')) + { + $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_( + __LINE__,__CLASS__ + ) . " Access check."; + $allow[] = Indent::_(2) . "\$access = (\$user->authorise('" + . $this->permission->getGlobal($otherView, 'core.access') + . "', 'com_" . $this->component . "." . $otherView + . ".' . (int) \$recordId) && \$user->authorise('" + . $this->permission->getGlobal($otherView, 'core.access') + . "', 'com_" . $this->component . "'));"; + $allow[] = Indent::_(2) . "if (!\$access)"; + $allow[] = Indent::_(2) . "{"; + $allow[] = Indent::_(3) . "return false;"; + $allow[] = Indent::_(2) . "}"; + } + $allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)"; + $allow[] = Indent::_(2) . "{"; + $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " The record has been set. Check the record permissions."; + // check if the item has permissions. + $allow[] = Indent::_(3) . "\$permission = \$user->authorise('" + . $this->permission->getAction($otherView, 'core.edit') . "', 'com_" . $this->component . "." + . $otherView . ".' . (int) \$recordId);"; + $allow[] = Indent::_(3) . "if (!\$permission)"; + $allow[] = Indent::_(3) . "{"; + // check if the item has permissions. + $allow[] = Indent::_(4) . "if (\$user->authorise('" + . $this->permission->getAction($otherView, 'core.edit.own') . "', 'com_" . $this->component . "." + . $otherView . ".' . \$recordId))"; + $allow[] = Indent::_(4) . "{"; + $allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__) + . " Fallback on edit.own. Now test the owner is the user."; + $allow[] = Indent::_(5) + . "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;"; + $allow[] = Indent::_(5) . "if (empty(\$ownerId))"; + $allow[] = Indent::_(5) . "{"; + $allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__) + . " Need to do a lookup from the model."; + $allow[] = Indent::_(6) + . "\$record = \$this->getModel()->getItem(\$recordId);"; + $allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))"; + $allow[] = Indent::_(6) . "{"; + $allow[] = Indent::_(7) . "return false;"; + $allow[] = Indent::_(6) . "}"; + $allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;"; + $allow[] = Indent::_(5) . "}"; + $allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__) + . " If the owner matches 'me' then do the test."; + $allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)"; + $allow[] = Indent::_(5) . "{"; + // check if the item has permissions. + $allow[] = Indent::_(6) . "if (\$user->authorise('" + . $this->permission->getGlobal($otherView, 'core.edit.own') . "', 'com_" . $this->component . "'))"; + $allow[] = Indent::_(6) . "{"; + $allow[] = Indent::_(7) . "return true;"; + $allow[] = Indent::_(6) . "}"; + $allow[] = Indent::_(5) . "}"; + $allow[] = Indent::_(4) . "}"; + $allow[] = Indent::_(4) . "return false;"; + $allow[] = Indent::_(3) . "}"; + $allow[] = Indent::_(2) . "}"; + if ($this->permission->globalExist($otherView, 'core.edit')) + { + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Since there is no permission, revert to the component permissions."; + $allow[] = Indent::_(2) . "return \$user->authorise('" + . $this->permission->getGlobal($otherView, 'core.edit') . "', \$this->option);"; + } + else + { + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Since there is no permission, revert to the component permissions."; + $allow[] = Indent::_(2) + . "return parent::allowEdit(\$data, \$key);"; + } + } + else + { + // setup the category script + $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " get user object."; + $allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();"; + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " get record id."; + $allow[] = Indent::_(2) + . "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;"; + // load custom permission script + $allow[] = $customAllow; + // check if the item has permissions. + if ($this->permission->actionExist($nameSingleCode, 'core.access')) + { + $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_( + __LINE__,__CLASS__ + ) . " Access check."; + $allow[] = Indent::_(2) . "\$access = (\$user->authorise('" + . $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "." + . $nameSingleCode + . ".' . (int) \$recordId) && \$user->authorise('" + . $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "'));"; + $allow[] = Indent::_(2) . "if (!\$access)"; + $allow[] = Indent::_(2) . "{"; + $allow[] = Indent::_(3) . "return false;"; + $allow[] = Indent::_(2) . "}"; + } + $allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)"; + $allow[] = Indent::_(2) . "{"; + $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " The record has been set. Check the record permissions."; + // check if the item has permissions. + $allow[] = Indent::_(3) . "\$permission = \$user->authorise('" + . $this->permission->getAction($nameSingleCode, 'core.edit') . "', 'com_" . $this->component . "." + . $nameSingleCode . ".' . (int) \$recordId);"; + $allow[] = Indent::_(3) . "if (!\$permission)"; + $allow[] = Indent::_(3) . "{"; + // check if the item has permissions. + $allow[] = Indent::_(4) . "if (\$user->authorise('" + . $this->permission->getAction($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "." + . $nameSingleCode . ".' . \$recordId))"; + $allow[] = Indent::_(4) . "{"; + $allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__) + . " Now test the owner is the user."; + $allow[] = Indent::_(5) + . "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;"; + $allow[] = Indent::_(5) . "if (empty(\$ownerId))"; + $allow[] = Indent::_(5) . "{"; + $allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__) + . " Need to do a lookup from the model."; + $allow[] = Indent::_(6) + . "\$record = \$this->getModel()->getItem(\$recordId);"; + $allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))"; + $allow[] = Indent::_(6) . "{"; + $allow[] = Indent::_(7) . "return false;"; + $allow[] = Indent::_(6) . "}"; + $allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;"; + $allow[] = Indent::_(5) . "}"; + $allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__) + . " If the owner matches 'me' then allow."; + $allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)"; + $allow[] = Indent::_(5) . "{"; + // check if the item has permissions. + $allow[] = Indent::_(6) . "if (\$user->authorise('" + . $this->permission->getGlobal($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "'))"; + $allow[] = Indent::_(6) . "{"; + $allow[] = Indent::_(7) . "return true;"; + $allow[] = Indent::_(6) . "}"; + $allow[] = Indent::_(5) . "}"; + $allow[] = Indent::_(4) . "}"; + $allow[] = Indent::_(4) . "return false;"; + $allow[] = Indent::_(3) . "}"; + $allow[] = Indent::_(2) . "}"; + if ($this->permission->globalExist($nameSingleCode, 'core.edit')) + { + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Since there is no permission, revert to the component permissions."; + $allow[] = Indent::_(2) . "return \$user->authorise('" + . $this->permission->getGlobal($nameSingleCode, 'core.edit') . "', \$this->option);"; + } + else + { + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Since there is no permission, revert to the component permissions."; + $allow[] = Indent::_(2) + . "return parent::allowEdit(\$data, \$key);"; + } + } + + return implode(PHP_EOL, $allow); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEditViews.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEditViews.php new file mode 100644 index 000000000..5b6b54544 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/AllowEditViews.php @@ -0,0 +1,243 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Controller; + + +use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Category; +use VDM\Joomla\Componentbuilder\Compiler\Builder\CategoryOtherName; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowEditViewsInterface; + + +/** + * Controller Allow Edit Views Class for Joomla 6 + * + * @since 5.1.2 + */ +final class AllowEditViews implements AllowEditViewsInterface +{ + /** + * The Permission Class. + * + * @var Permission + * @since 5.0.2 + */ + protected Permission $permission; + + /** + * The Dispenser Class. + * + * @var Dispenser + * @since 5.0.2 + */ + protected Dispenser $dispenser; + + /** + * The Category Class. + * + * @var Category + * @since 5.0.2 + */ + protected Category $category; + + /** + * The CategoryOtherName Class. + * + * @var CategoryOtherName + * @since 5.0.2 + */ + protected CategoryOtherName $categoryothername; + + /** + * Constructor. + * + * @param Permission $permission The Permission Class. + * @param Dispenser $dispenser The Dispenser Class. + * @param Category $category The Category Class. + * @param CategoryOtherName $categoryothername The CategoryOtherName Class. + * + * @since 5.0.2 + */ + public function __construct(Permission $permission, + Dispenser $dispenser, Category $category, + CategoryOtherName $categoryothername) + { + $this->permission = $permission; + $this->dispenser = $dispenser; + $this->category = $category; + $this->categoryothername = $categoryothername; + } + + /** + * Get Array Code + * + * @param array $views + * + * @since 5.0.2 + * @return string The array of Code (string) + */ + public function getArray(array $views): string + { + $allow = []; + foreach ($views as $nameSingleCode => $nameListCode) + { + $allow[] = $this->getViewArray($nameSingleCode, $nameListCode); + } + + if ($allow === []) + { + return ''; + } + + return PHP_EOL . Indent::_(2) . implode("," . PHP_EOL . Indent::_(2), $allow); + } + + /** + * Get Custom Function Code + * + * @param array $views + * + * @since 5.0.2 + * @return string The functions of Code (string) + */ + public function getFunctions(array $views): string + { + $allow = []; + foreach ($views as $nameSingleCode => $nameListCode) + { + if (($function = $this->getViewFunction($nameSingleCode, $nameListCode)) !== null) + { + $allow[] = $function; + } + } + + if ($allow === []) + { + return ''; + } + + return PHP_EOL . PHP_EOL . implode(PHP_EOL . PHP_EOL, $allow); + } + + /** + * Get View Permissions Array Code + * + * @param string $nameSingleCode The single code name of the view. + * @param string $nameListCode The list code name of the view. + * + * @since 3.2.0 + * @return string The allow edit method code + */ + protected function getViewArray(string $nameSingleCode, string $nameListCode): string + { + $allow = []; + + // prepare custom permission script + $customAllow = $this->dispenser->get( + 'php_allowedit', $nameSingleCode + ); + + if ($customAllow !== '') + { + $allow[] = Indent::_(3) . "'function' => 'allowEdit_{$nameSingleCode}'"; + } + + if ($this->category->exists("{$nameListCode}")) + { + // check if category has another name + $otherView = $this->categoryothername-> + get($nameListCode . '.view', $nameSingleCode); + + // check if the item has permissions. + if ($this->permission->globalExist($otherView, 'core.access')) + { + $access = $this->permission->getGlobal($otherView, 'core.access'); + $allow[] = Indent::_(3) . "'access' => '{$access}'"; + } + $edit = $this->permission->getAction($otherView, 'core.edit'); + $allow[] = Indent::_(3) . "'edit' => '{$edit}'"; + + $edit_own = $this->permission->getAction($otherView, 'core.edit.own'); + $allow[] = Indent::_(3) . "'edit.own' => '{$edit_own}'"; + } + else + { + // check if the item has permissions. + if ($this->permission->actionExist($nameSingleCode, 'core.access')) + { + $access = $this->permission->getAction($nameSingleCode, 'core.access'); + $allow[] = Indent::_(3) . "'access' => '{$access}'"; + } + $edit = $this->permission->getAction($nameSingleCode, 'core.edit'); + $allow[] = Indent::_(3) . "'edit' => '{$edit}'"; + + $edit_own = $this->permission->getAction($nameSingleCode, 'core.edit.own'); + $allow[] = Indent::_(3) . "'edit.own' => '{$edit_own}'"; + } + + return "'{$nameSingleCode}' => [" . PHP_EOL . implode(',' . PHP_EOL, $allow) . PHP_EOL . Indent::_(2) . ']'; + } + + /** + * Get View Permissions Function Code + * + * @param string $nameSingleCode The single code name of the view. + * @param string $nameListCode The list code name of the view. + * + * @since 3.2.0 + * @return string|null The allow edit method code + */ + protected function getViewFunction(string $nameSingleCode, string $nameListCode): ?string + { + $allow = []; + + // prepare custom permission script + $customAllow = $this->dispenser->get( + 'php_allowedit', $nameSingleCode + ); + + if ($customAllow !== '') + { + // setup the function + $allow[] = Indent::_(1) . '/**'; + $allow[] = Indent::_(1) . " * Method to check if you can edit an existing {$nameSingleCode} record."; + $allow[] = Indent::_(1) . ' *'; + $allow[] = Indent::_(1) . ' * @param array $data An array of input data.'; + $allow[] = Indent::_(1) . ' * @param string $key The name of the key for the primary key.'; + $allow[] = Indent::_(1) . ' *'; + $allow[] = Indent::_(1) . ' * @return boolean'; + $allow[] = Indent::_(1) . ' *'; + $allow[] = Indent::_(1) . ' * @since 5.0.2'; + $allow[] = Indent::_(1) . ' */'; + $allow[] = Indent::_(1) . "protected function allowEdit_{$nameSingleCode}(\$data = [], \$key = 'id')"; + $allow[] = Indent::_(1) . '{'; + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " get user object."; + $allow[] = Indent::_(2) . "\$user = \$this->identity;"; + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " get record id."; + $allow[] = Indent::_(2) + . "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;"; + // load custom permission script + $allow[] = $customAllow; + $allow[] = Indent::_(1) . '}'; + + return implode(PHP_EOL, $allow); + } + + return null; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Controller/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanDelete.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanDelete.php new file mode 100644 index 000000000..55748a381 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanDelete.php @@ -0,0 +1,87 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Model; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanDeleteInterface; + + +/** + * Model Can Delete Class for Joomla 6 + * + * @since 5.1.2 + */ +final class CanDelete implements CanDeleteInterface +{ + /** + * The Component code name. + * + * @var String + * @since 3.2.0 + */ + protected String $component; + + /** + * The Permission Class. + * + * @var Permission + * @since 3.2.0 + */ + protected Permission $permission; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Permission $permission The Permission Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, Permission $permission) + { + $this->component = $config->component_code_name; + $this->permission = $permission; + } + + /** + * Get Can Delete Function Code + * + * @param string $nameSingleCode The single code name of the view. + * + * @since 3.2.0 + * @return string The can delete method code + */ + public function get(string $nameSingleCode): string + { + $allow = []; + + // setup the default script + $allow[] = PHP_EOL . Indent::_(2) . "if (empty(\$record->id) || (\$record->published != -2))"; + $allow[] = Indent::_(2) . "{"; + $allow[] = Indent::_(3) . "return false;"; + $allow[] = Indent::_(2) . "}" . PHP_EOL; + + // check if the item has permissions. + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " The record has been set. Check the record permissions."; + $allow[] = Indent::_(2) . "return \$this->getCurrentUser()->authorise('" + . $this->permission->getAction($nameSingleCode, 'core.delete') . "', 'com_" . $this->component . "." + . $nameSingleCode . ".' . (int) \$record->id);"; + + return implode(PHP_EOL, $allow); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanEditState.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanEditState.php new file mode 100644 index 000000000..25a79815d --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CanEditState.php @@ -0,0 +1,108 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Model; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanEditStateInterface; + + +/** + * Model Can Edit State Class for Joomla 6 + * + * @since 5.1.2 + */ +final class CanEditState implements CanEditStateInterface +{ + /** + * The Component code name. + * + * @var String + * @since 3.2.0 + */ + protected String $component; + + /** + * The Permission Class. + * + * @var Permission + * @since 3.2.0 + */ + protected Permission $permission; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Permission $permission The Permission Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, Permission $permission) + { + $this->component = $config->component_code_name; + $this->permission = $permission; + } + + /** + * Get Can Edit State Function Code + * + * @param string $nameSingleCode The single code name of the view. + * + * @since 3.2.0 + * @return string The can edit state method code + */ + public function get(string $nameSingleCode): string + { + $allow = []; + + // setup the default script + $allow[] = PHP_EOL . Indent::_(2) . "\$user = \$this->getCurrentUser();"; + $allow[] = Indent::_(2) + . "\$recordId = \$record->id ?? 0;"; + $allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)"; + $allow[] = Indent::_(2) . "{"; + $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " The record has been set. Check the record permissions."; + // check if the item has permissions. + $allow[] = Indent::_(3) . "\$permission = \$user->authorise('" + . $this->permission->getAction($nameSingleCode, 'core.edit.state') + . "', 'com_" . $this->component . "." . $nameSingleCode . ".' . (int) \$recordId);"; + $allow[] = Indent::_(3) + . "if (!\$permission && !is_null(\$permission))"; + $allow[] = Indent::_(3) . "{"; + $allow[] = Indent::_(4) . "return false;"; + $allow[] = Indent::_(3) . "}"; + $allow[] = Indent::_(2) . "}"; + if ($this->permission->globalExist($nameSingleCode, 'core.edit.state')) + { + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " In the absence of better information, revert to the component permissions."; + $allow[] = Indent::_(2) . "return \$user->authorise('" + . $this->permission->getGlobal($nameSingleCode, 'core.edit.state') . "', 'com_" . $this->component + . "');"; + } + else + { + $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " In the absence of better information, revert to the component permissions."; + $allow[] = Indent::_(2) + . "return parent::canEditState(\$record);"; + } + + return implode(PHP_EOL, $allow); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CheckInNow.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CheckInNow.php new file mode 100644 index 000000000..8cbaf8ec4 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/CheckInNow.php @@ -0,0 +1,109 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Model; + + +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CheckInNowInterface; + + +/** + * Check In Now Method for Joomla 6 + * + * @since 5.1.2 + */ +final class CheckInNow implements CheckInNowInterface +{ + /** + * Get the generated call snippet that invokes the check-in method. + * + * @return string The code that calls the generated method. + * @since 5.1.2 + */ + public function getCall(): string + { + $call = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check in items"; + $call .= PHP_EOL . Indent::_(2) . "\$this->checkInNow();" . PHP_EOL; + + return $call; + } + + /** + * Build the full `checkInNow()` method code for the given view/table. + * + * @param string $view The view/table suffix (e.g. 'items'). + * @param string $component The component name (without 'com_'). + * + * @return string The full method code as a string. + * @since 5.1.2 + */ + public function getMethod($view, $component): string + { + $checkin = PHP_EOL . PHP_EOL . Indent::_(1) . "/**"; + $checkin .= PHP_EOL . Indent::_(1) . " * Build an SQL query to check in all items left checked out longer then a set time."; + $checkin .= PHP_EOL . Indent::_(1) . " *"; + $checkin .= PHP_EOL . Indent::_(1) . " * @return void"; + $checkin .= PHP_EOL . Indent::_(1) . " * @throws \DateMalformedStringException"; + $checkin .= PHP_EOL . Indent::_(1) . " * @since 3.2.0"; + $checkin .= PHP_EOL . Indent::_(1) . " */"; + $checkin .= PHP_EOL . Indent::_(1) . "protected function checkInNow(): void"; + $checkin .= PHP_EOL . Indent::_(1) . "{"; + $checkin .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Get set check in time"; + $checkin .= PHP_EOL . Indent::_(2) . "\$time = Joomla__"."_aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_" . $component . "')->get('check_in');"; + $checkin .= PHP_EOL . PHP_EOL . Indent::_(2) . "if (\$time)"; + $checkin .= PHP_EOL . Indent::_(2) . "{"; + $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__LINE__,__CLASS__) . " Get a db connection."; + $checkin .= PHP_EOL . Indent::_(3) . "\$db = \$this->getDatabase();"; + $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Reset query."; + $checkin .= PHP_EOL . Indent::_(3) . "\$query = \$db->getQuery(true);"; + $checkin .= PHP_EOL . Indent::_(3) . "\$query->select('*');"; + $checkin .= PHP_EOL . Indent::_(3) . "\$query->from(\$db->quoteName('#__" . $component . "_" . $view . "'));"; + $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Only select items that are checked out."; + + $checkin .= PHP_EOL . Indent::_(3) . "\$query->where($db->quoteName('checked_out') . ' >= 0');"; + + $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Query only to see if we have a rows"; + $checkin .= PHP_EOL . Indent::_(3) . "\$db->setQuery(\$query, 0, 1);"; + $checkin .= PHP_EOL . Indent::_(3) . "\$db->execute();"; + $checkin .= PHP_EOL . Indent::_(3) . "if (\$db->getNumRows())"; + $checkin .= PHP_EOL . Indent::_(3) . "{"; + $checkin .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " Get target date in the past."; + $checkin .= PHP_EOL . Indent::_(4) . "\$date = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getDate()->modify(\$time)->toSql();"; + $checkin .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " Reset query."; + $checkin .= PHP_EOL . Indent::_(4) . "\$query = \$db->getQuery(true);"; + $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "//" . Line::_(__LINE__,__CLASS__) . " Fields to update."; + $checkin .= PHP_EOL . Indent::_(4) . "\$fields = ["; + + $checkin .= PHP_EOL . Indent::_(5) . "\$db->quoteName('checked_out_time') . ' = NULL',"; + $checkin .= PHP_EOL . Indent::_(5) . "\$db->quoteName('checked_out') . ' = NULL'"; + + $checkin .= PHP_EOL . Indent::_(4) . "];"; + $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "//" . Line::_(__LINE__,__CLASS__) . " Conditions for which records should be updated."; + $checkin .= PHP_EOL . Indent::_(4) . "\$conditions = ["; + + $checkin .= PHP_EOL . Indent::_(5) . "\$db->quoteName('checked_out') . ' = 0 OR ' . \$db->quoteName('checked_out') . ' > 0',"; + + $checkin .= PHP_EOL . Indent::_(5) . "\$db->quoteName('checked_out_time') . ' < ' . \$db->quote(\$date)"; + $checkin .= PHP_EOL . Indent::_(4) . "];"; + $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "//" . Line::_(__LINE__,__CLASS__) . " Check table."; + $checkin .= PHP_EOL . Indent::_(4) . "\$query->update(\$db->quoteName('#__" . $component . "_" . $view . "'))->set(\$fields)->where(\$conditions); "; + $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "\$db->setQuery(\$query);"; + $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "\$db->execute();"; + $checkin .= PHP_EOL . Indent::_(3) . "}"; + $checkin .= PHP_EOL . Indent::_(2) . "}"; + $checkin .= PHP_EOL . Indent::_(1) . "}"; + + return $checkin; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Model/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Dispatcher.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Dispatcher.php new file mode 100644 index 000000000..1ee06182b --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Dispatcher.php @@ -0,0 +1,170 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module; + + +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne as Builder; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\LibraryInterface as Library; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\DispatcherInterface; + + +/** + * Module Dispatcher Class for Joomla 6 + * + * @since 5.1.2 + */ +final class Dispatcher implements DispatcherInterface +{ + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.1.2 + */ + protected Placeholder $placeholder; + + /** + * The ContentOne Class. + * + * @var Builder + * @since 5.1.2 + */ + protected Builder $builder; + + /** + * The Library Class. + * + * @var Library + * @since 5.1.2 + */ + protected Library $library; + + /** + * The Namespace Prefix + * + * @var string + * @since 5.0.0 + */ + protected string $NamespacePrefix; + + /** + * Constructor. + * + * @param Placeholder $placeholder The Placeholder Class. + * @param Builder $builder The ContentOne Class. + * @param Library $library The Library Class. + * + * @since 5.1.2 + */ + public function __construct(Placeholder $placeholder, Builder $builder, Library $library) + { + $this->placeholder = $placeholder; + $this->builder = $builder; + $this->library = $library; + + // set some global values + $this->NamespacePrefix = $this->placeholder->get('NamespacePrefix'); + } + + /** + * Get the updated placeholder content for the given module. + * + * @param object $module The module object containing the necessary data. + * + * @return string The updated placeholder content. + * @since 5.1.2 + */ + public function get(object $module): string + { + $dispatcher = []; + $dispatcher[] = "/**"; + $dispatcher[] = " *" . Line::_(__LINE__, __CLASS__) . " Dispatcher class for {$module->official_name}"; + $dispatcher[] = " *"; + $dispatcher[] = " * @since 5.3.0"; + $dispatcher[] = " */"; + + $library = $this->library->get($module); + + if (empty($module->layout_data) && empty($module->add_class_helper) && empty($module->custom_get) && empty($library)) + { + $dispatcher[] = "class Dispatcher extends AbstractModuleDispatcher {}"; + return implode(PHP_EOL, $dispatcher). PHP_EOL; + } + + if ($module->add_class_helper == 1 || $module->custom_get) + { + $dispatcher[] = "class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface"; + $dispatcher[] = "{"; + $dispatcher[] = Indent::_(1) . "use HelperFactoryAwareTrait;"; + } + else + { + $dispatcher[] = "class Dispatcher extends AbstractModuleDispatcher"; + $dispatcher[] = "{"; + } + + $dispatcher[] = ""; + $dispatcher[] = Indent::_(1) . "/**"; + $dispatcher[] = Indent::_(1) . " *" . Line::_(__LINE__, __CLASS__) . " Returns the layout data."; + $dispatcher[] = Indent::_(1) . " *"; + $dispatcher[] = Indent::_(1) . " * @return array"; + $dispatcher[] = Indent::_(1) . " *"; + $dispatcher[] = Indent::_(1) . " * @since 5.3.0"; + $dispatcher[] = Indent::_(1) . " */"; + $dispatcher[] = Indent::_(1) . "protected function getLayoutData(): array"; + $dispatcher[] = Indent::_(1) . "{"; + $dispatcher[] = Indent::_(2) . "\$data = parent::getLayoutData();"; + $dispatcher[] = ""; + + if ($module->add_class_helper == 1) + { + $dispatcher[] = Indent::_(2) . "\$data['helper'] = \$this->getHelperFactory()->getHelper('{$module->class_helper_name}', \$data);"; + } + elseif ($module->add_class_helper == 2) + { + $dispatcher[] = Indent::_(2) . "\$data['helper'] = \\{$this->NamespacePrefix}\\Module\\{$module->namespace}\\{$module->target_client_namespace}\\Helper\\{$module->class_helper_name}::class;"; + } + + if ($module->custom_get) + { + $dispatcher[] = Indent::_(2) . "\$data['data'] = \$this->getHelperFactory()->getHelper('{$module->class_data_name}', \$data);"; + } + + // load the libraries + if (!empty($library)) + { + $dispatcher[] = ""; + $dispatcher[] = Indent::_(2) . $library; + } + + // load the custom code here + if (!empty($module->layout_data)) + { + $dispatcher[] = ""; + $dispatcher[] = $module->layout_data; + } + + $dispatcher[] = ""; + $dispatcher[] = Indent::_(2) . "return \$data;"; + $dispatcher[] = Indent::_(1) . "}"; + $dispatcher[] = "}"; + + return $this->placeholder->update( + implode(PHP_EOL, $dispatcher). PHP_EOL, + $this->builder->allActive() + ); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Helper.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Helper.php new file mode 100644 index 000000000..6290cd010 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Helper.php @@ -0,0 +1,151 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module; + + +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\HelperInterface; + + +/** + * Module Helper Code Joomla 6 + * + * @since 5.1.2 + */ +final class Helper implements HelperInterface +{ + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.1.2 + */ + protected Placeholder $placeholder; + + /** + * The ContentOne Class. + * + * @var ContentOne + * @since 5.1.2 + */ + protected ContentOne $contentone; + + /** + * Constructor. + * + * @param Placeholder $placeholder The Placeholder Class. + * @param ContentOne $contentone The ContentOne Class. + * + * @since 5.1.2 + */ + public function __construct(Placeholder $placeholder, ContentOne $contentone) + { + $this->placeholder = $placeholder; + $this->contentone = $contentone; + } + + /** + * Get Module Helper Class code + * + * @param object $module The module object + * + * @return string The helper class code + * @since 5.1.2 + */ + public function get(object $module): string + { + $type = trim((string) ($module->class_helper_type ?? 'class')); + $name = trim((string) ($module->class_helper_name ?? 'Helper')); + $body = (string) ($module->class_helper_code ?? ''); + $implements = ''; + + if ($this->usesDatabaseFeatures($body)) + { + $implements = ' implements DatabaseAwareInterface'; + + if (!str_contains($body, 'use DatabaseAwareTrait;')) + { + $body = Indent::_(1) . 'use DatabaseAwareTrait;' . PHP_EOL . PHP_EOL . $body; + } + } + + $code = PHP_EOL . $type . ' ' . $name . $implements . PHP_EOL . '{' . PHP_EOL . $body . PHP_EOL . '}' . PHP_EOL; + + return $this->placeholder->update($code, $this->contentone->allActive()); + } + + /** + * Get Module Helper Header code + * + * @param object $module The module object + * + * @return string The helper header code + * @since 5.1.2 + */ + public function header(object $module): string + { + $code = (string) trim($module->class_helper_header ?? ''); + $body = trim((string) ($module->class_helper_code ?? '')); + + if ($this->usesDatabaseFeatures($body)) + { + if ($code === '') + { + $code = 'use Joomla\\Database\\DatabaseAwareInterface;' . + PHP_EOL . 'use Joomla\\Database\\DatabaseAwareTrait;'; + } + else + { + if (!str_contains($code, '\\DatabaseAwareInterface;')) + { + $code .= PHP_EOL . 'use Joomla\\Database\\DatabaseAwareInterface;'; + } + + if (!str_contains($code, '\\DatabaseAwareTrait;')) + { + $code .= PHP_EOL . 'use Joomla\\Database\\DatabaseAwareTrait;'; + } + } + } + + if ($code === '') + { + return ''; + } + + return $this->placeholder->update( + PHP_EOL . $code, $this->contentone->allActive() + ); + } + + /** + * Determine if the helper body uses database features. + * + * @param string $body The helper class body. + * + * @return bool + * @since 5.1.2 + */ + protected function usesDatabaseFeatures(string $body): bool + { + if ($body === '') + { + return false; + } + + return str_contains($body, '$this->getDatabase(') + || str_contains($body, 'use DatabaseAwareTrait;'); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Library.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Library.php new file mode 100644 index 000000000..c64668223 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Library.php @@ -0,0 +1,154 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module; + + +use VDM\Joomla\Componentbuilder\Compiler\Builder\LibraryManager; +use VDM\Joomla\Componentbuilder\Compiler\Library\Document; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\LibraryInterface; + + +/** + * Module Library Joomla 6 + * + * @since 5.1.2 + */ +final class Library implements LibraryInterface +{ + /** + * The LibraryManager Class. + * + * @var LibraryManager + * @since 5.1.2 + */ + protected LibraryManager $librarymanager; + + /** + * The Document Class. + * + * @var Document + * @since 5.1.2 + */ + protected Document $document; + + /** + * The Registry Class. + * + * @var Registry + * @since 5.1.2 + */ + protected Registry $registry; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.1.2 + */ + protected Placeholder $placeholder; + + /** + * The ContentOne Class. + * + * @var ContentOne + * @since 5.1.2 + */ + protected ContentOne $contentone; + + /** + * Constructor. + * + * @param LibraryManager $librarymanager The LibraryManager Class. + * @param Document $document The Document Class. + * @param Registry $registry The Registry Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param ContentOne $contentone The ContentOne Class. + * + * @since 5.1.2 + */ + public function __construct(LibraryManager $librarymanager, Document $document, + Registry $registry, Placeholder $placeholder, + ContentOne $contentone) + { + $this->librarymanager = $librarymanager; + $this->document = $document; + $this->registry = $registry; + $this->placeholder = $placeholder; + $this->contentone = $contentone; + } + + /** + * Get the module's library loading code. + * + * @param object $module The module object + * + * @return string The generated code to load libraries into the document. + * @since 5.1.2 + */ + public function get(object $module): string + { + $data = $this->librarymanager->get($module->key . '.' . $module->code_name); + + if ($data === null) + { + return ''; + } + + $code = '// ' . Line::_(__LINE__, __CLASS__) . ' get the document object' . PHP_EOL; + $code .= '$document = $this->app->getDocument();'; + + $found = false; + + foreach ($data as $id => $item) + { + $library = $this->registry->get("builder.libraries.{$id}"); + + if (!is_object($library)) + { + continue; + } + + if (!empty($library->document) && StringHelper::check($library->document)) + { + $code .= PHP_EOL . $library->document; + $found = true; + } + elseif (isset($library->how)) + { + $code .= $this->document->get($id); + $found = true; + } + } + + if (!$found) + { + return ''; + } + + // Normalize and inject placeholders + $lines = explode(PHP_EOL, $code); + $trimmed = array_map('trim', $lines); + $normalized = str_replace('$this->document->', '$document->', implode(PHP_EOL . Indent::_(2), $trimmed)); + + return $this->placeholder->update( + $this->placeholder->update_($normalized), + $this->contentone->allActive() + ); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/MainXML.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/MainXML.php new file mode 100644 index 000000000..78a9345cc --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/MainXML.php @@ -0,0 +1,570 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module; + + +use Joomla\Filesystem\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Language; +use VDM\Joomla\Componentbuilder\Compiler\Language\Set; +use VDM\Joomla\Componentbuilder\Compiler\Language\Purge; +use VDM\Joomla\Componentbuilder\Compiler\Language\Translation; +use VDM\Joomla\Componentbuilder\Compiler\Language\Multilingual; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; +use VDM\Joomla\Componentbuilder\Compiler\Creator\FieldsetExtension; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Languages; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Multilingual as BuilderMultilingual; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Interfaces\Architecture\Module\MainXMLInterface; + + +/** + * Joomla 6 Module Main XML Class + * + * @since 5.1.2 + */ +final class MainXML implements MainXMLInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 5.1.2 + */ + protected Config $config; + + /** + * The Language Class. + * + * @var Language + * @since 5.1.2 + */ + protected Language $language; + + /** + * The Set Class. + * + * @var Set + * @since 5.1.2 + */ + protected Set $set; + + /** + * The Purge Class. + * + * @var Purge + * @since 5.1.2 + */ + protected Purge $purge; + + /** + * The Translation Class. + * + * @var Translation + * @since 5.1.2 + */ + protected Translation $translation; + + /** + * The Multilingual Class. + * + * @var Multilingual + * @since 5.1.2 + */ + protected Multilingual $multilingual; + + /** + * The EventInterface Class. + * + * @var Event + * @since 5.1.2 + */ + protected Event $event; + + /** + * The FieldsetExtension Class. + * + * @var FieldsetExtension + * @since 5.1.2 + */ + protected FieldsetExtension $fieldsetextension; + + /** + * The ContentOne Class. + * + * @var ContentOne + * @since 5.1.2 + */ + protected ContentOne $contentone; + + /** + * The Languages Class. + * + * @var Languages + * @since 5.1.2 + */ + protected Languages $languages; + + /** + * The Multilingual Class. + * + * @var BuilderMultilingual + * @since 5.1.2 + */ + protected BuilderMultilingual $buildermultilingual; + + /** + * The Counter Class. + * + * @var Counter + * @since 5.1.2 + */ + protected Counter $counter; + + /** + * The File Class. + * + * @var File + * @since 5.1.2 + */ + protected File $file; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Language $language The Language Class. + * @param Set $set The Set Class. + * @param Purge $purge The Purge Class. + * @param Translation $translation The Translation Class. + * @param Multilingual $multilingual The Multilingual Class. + * @param Event $event The EventInterface Class. + * @param FieldsetExtension $fieldsetextension The FieldsetExtension Class. + * @param ContentOne $contentone The ContentOne Class. + * @param Languages $languages The Languages Class. + * @param BuilderMultilingual $buildermultilingual The Multilingual Class. + * @param Counter $counter The Counter Class. + * @param File $file The File Class. + * + * @since 5.1.2 + */ + public function __construct(Config $config, Language $language, Set $set, Purge $purge, + Translation $translation, Multilingual $multilingual, + Event $event, FieldsetExtension $fieldsetextension, + ContentOne $contentone, Languages $languages, + BuilderMultilingual $buildermultilingual, + Counter $counter, File $file) + { + $this->config = $config; + $this->language = $language; + $this->set = $set; + $this->purge = $purge; + $this->translation = $translation; + $this->multilingual = $multilingual; + $this->event = $event; + $this->fieldsetextension = $fieldsetextension; + $this->contentone = $contentone; + $this->languages = $languages; + $this->buildermultilingual = $buildermultilingual; + $this->counter = $counter; + $this->file = $file; + } + + /** + * Generates the main XML for the module. + * + * @param object $module The module object. + * + * @return string The generated XML. + * @since 5.1.2 + */ + public function get(object $module): string + { + $config_fields = $this->buildConfigFields($module); + $add_component_path = $this->shouldAddComponentPath($module); + $language_files = $this->generateLanguageFiles($module); + + $xml = $this->generateScriptAndSqlXml($module); + $xml .= $this->generateLanguageXml($module, $language_files); + $xml .= $this->generateFileXml($module, $language_files); + $xml .= $this->generateConfigXml($module, $config_fields, $add_component_path); + $xml .= $this->generateUpdateServerXml($module); + + return $xml; + } + + /** + * Build configuration fields XML. + * + * @param object $module The module object. + * + * @return array The configuration fields. + * @since 5.1.2 + */ + protected function buildConfigFields(object $module): array + { + $configFields = []; + if (!isset($module->config_fields) || !ArrayHelper::check($module->config_fields)) + { + return $configFields; + } + + $dbKey = 'yyy'; + $addScriptsField = true; + + foreach ($module->config_fields as $fieldName => $fieldsets) + { + foreach ($fieldsets as $fieldset => $fields) + { + $xmlFields = $this->fieldsetextension->get($module, $fields, $dbKey); + + if ($addScriptsField && $module->add_scripts_field) + { + $xmlFields .= PHP_EOL . Indent::_(2) . ''; + $addScriptsField = false; + } + + if (isset($xmlFields) && StringHelper::check($xmlFields)) + { + $configFields["{$fieldName}{$fieldset}"] = $xmlFields; + } + $dbKey++; + } + } + + return $configFields; + } + + /** + * Determine if the component path should be added. + * + * @param object $module The module object. + * + * @return bool True if the component path should be added, false otherwise. + * @since 5.1.2 + */ + protected function shouldAddComponentPath(object $module): bool + { + if (!isset($module->config_fields) || !ArrayHelper::check($module->config_fields) || + !isset($module->fieldsets_paths) || !ArrayHelper::check($module->fieldsets_paths)) + { + return false; + } + + foreach ($module->config_fields as $fieldName => $fieldsets) + { + foreach ($fieldsets as $fieldset => $fields) + { + if (isset($module->fieldsets_paths["{$fieldName}{$fieldset}"]) && + $module->fieldsets_paths["{$fieldName}{$fieldset}"] == 1) + { + return true; + } + } + } + + return false; + } + + /** + * Generate XML for script and SQL files. + * + * @param object $module The module object. + * + * @return string The XML for script and SQL files. + * @since 5.1.2 + */ + protected function generateScriptAndSqlXml(object $module): string + { + $xml = ''; + + if ($module->add_install_script) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . 'script.php'; + } + + if ($module->add_sql) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(3) . 'sql/mysql/install.sql'; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + if ($module->add_sql_uninstall) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(3) . 'sql/mysql/uninstall.sql'; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + return $xml; + } + + /** + * Generate XML for language files. + * + * @param object $module The module object. + * @param array $languageFiles The language files. + * + * @return string The XML for language files. + * @since 5.1.2 + */ + protected function generateLanguageXml(object $module, array $languageFiles): string + { + $xml = ''; + + if (ArrayHelper::check($languageFiles)) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + + foreach ($languageFiles as $tag) + { + $xml .= PHP_EOL . Indent::_(2) . "{$tag}/{$module->file_name}.ini"; + $xml .= PHP_EOL . Indent::_(2) . "{$tag}/{$module->file_name}.sys.ini"; + } + + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + return $xml; + } + + /** + * Generate the XML for the files. + * + * @param object $module The module object. + * @param array $languageFiles The language files. + * + * @return string The XML for the files. + * @since 5.1.2 + */ + protected function generateFileXml(object $module, array $languageFiles): string + { + $files = Folder::files($module->folder_path); + $folders = Folder::folders($module->folder_path); + $ignore = ['services', 'sql', 'language', 'script.php', "{$module->file_name}.xml", "{$module->file_name}.php"]; + + $xml = PHP_EOL . PHP_EOL . Indent::_(1) . ''; + + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . "file_name}\">services"; + + foreach ($files as $file) + { + if (!in_array($file, $ignore)) + { + $xml .= PHP_EOL . Indent::_(2) . "{$file}"; + } + } + + if (!empty($languageFiles)) + { + $xml .= PHP_EOL . Indent::_(2) . 'language'; + } + + if ($module->add_sql || $module->add_sql_uninstall) + { + $xml .= PHP_EOL . Indent::_(2) . 'sql'; + } + + foreach ($folders as $folder) + { + if (!in_array($folder, $ignore)) + { + $xml .= PHP_EOL . Indent::_(2) . "{$folder}"; + } + } + + $xml .= PHP_EOL . Indent::_(1) . ''; + + return $xml; + } + + /** + * Generate XML for configuration fields. + * + * @param object $module The module object. + * @param array $configFields The configuration fields. + * @param bool $addComponentPath Whether to add the component path. + * + * @return string The XML for configuration fields. + * @since 5.1.2 + */ + protected function generateConfigXml(object $module, array $configFields, bool $addComponentPath): string + { + if (!isset($module->config_fields) || !ArrayHelper::check($configFields)) + { + return ''; + } + + $xml = PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= $addComponentPath ? PHP_EOL . Indent::_(1) . ''; + + if ($addComponentPath) + { + $namespace = $this->config->namespace_prefix . '\\Component\\' . $this->contentone->get('ComponentNamespace') . '\\Administrator'; + $xml .= PHP_EOL . Indent::_(3) . "addruleprefix=\"{$namespace}\\Rule\""; + $xml .= PHP_EOL . Indent::_(3) . "addfieldprefix=\"{$namespace}\\Field\">"; + $xml .= PHP_EOL . Indent::_(1) . '>'; + } + + foreach ($module->config_fields as $fieldName => $fieldsets) + { + $xml .= PHP_EOL . Indent::_(1) . ""; + + foreach ($fieldsets as $fieldset => $fields) + { + $label = $module->fieldsets_label["{$fieldName}{$fieldset}"] ?? $fieldset; + + $xml .= PHP_EOL . Indent::_(1) . "

"; + + if (isset($configFields["{$fieldName}{$fieldset}"])) + { + $xml .= $configFields["{$fieldName}{$fieldset}"]; + } + + $xml .= PHP_EOL . Indent::_(1) . '
'; + } + + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + $xml .= PHP_EOL . Indent::_(1) . ''; + + return $xml; + } + + /** + * Generate XML for update servers. + * + * @param object $module The module object. + * + * @return string The XML for update servers. + * @since 5.1.2 + */ + protected function generateUpdateServerXml(object $module): string + { + $xml = ''; + + if ($module->add_update_server) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . "official_name}\">{$module->update_server_url}"; + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + return $xml; + } + + /** + * Generate language files. + * + * @param object $module The module object. + * + * @return array The language files. + * @since 5.1.2 + */ + protected function generateLanguageFiles(object $module): array + { + $languageFiles = []; + + if (!$this->language->exist($module->key)) + { + return $languageFiles; + } + + $langContent = $this->language->getTarget($module->key); + $this->event->trigger('jcb_ce_onBeforeBuildModuleLang', [&$module, &$langContent]); + + $values = array_unique($langContent); + $this->buildermultilingual->set('modules', $this->multilingual->get($values)); + + $langTag = $this->config->get('lang_tag', 'en-GB'); + $this->languages->set("modules.{$langTag}.all", $langContent); + $this->language->setTarget($module->key, null); + + $this->set->execute($values, $module->guid, 'modules'); + $this->purge->execute($values, $module->guid, 'modules'); + + $this->event->trigger('jcb_ce_onBeforeBuildModuleLangFiles', [&$module]); + + if ($this->languages->IsArray('modules')) + { + foreach ($this->languages->get('modules') as $tag => $areas) + { + $tag = trim($tag); + foreach ($areas as $area => $languageStrings) + { + $fileName = "{$module->file_name}.ini"; + $fileSysName = "{$module->file_name}.sys.ini"; + $total = count($values); + if ($this->translation->check($tag, $languageStrings, $total, $fileName)) + { + $lang = array_map( + fn($langString, $placeholder) => "{$placeholder}=\"{$langString}\"", + array_values($languageStrings), + array_keys($languageStrings) + ); + + $path = "{$module->folder_path}/language/{$tag}/"; + + if (!is_dir($path)) + { + Folder::create($path); + $this->counter->folder++; + } + + $this->file->write($path . $fileName, implode(PHP_EOL, $lang)); + $this->file->write($path . $fileSysName, implode(PHP_EOL, $lang)); + + $this->counter->line += count($lang); + unset($lang); + + $languageFiles[$tag] = $tag; + } + } + } + } + + return $languageFiles; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Provider.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Provider.php new file mode 100644 index 000000000..b1e8cb2b4 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Provider.php @@ -0,0 +1,114 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module; + + +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne as Builder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\ProviderInterface; + + +/** + * Module Provider Class for Joomla 6 + * + * @since 5.1.2 + */ +final class Provider implements ProviderInterface +{ + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.1.2 + */ + protected Placeholder $placeholder; + + /** + * The ContentOne Class. + * + * @var Builder + * @since 5.1.2 + */ + protected Builder $builder; + + /** + * The Namespace Prefix + * + * @var string + * @since 5.1.2 + */ + protected string $NamespacePrefix; + + /** + * Constructor. + * + * @param Placeholder $placeholder The Placeholder Class. + * @param Builder $builder The Content One Class. + * + * @since 5.1.2 + */ + public function __construct(Placeholder $placeholder, Builder $builder) + { + $this->placeholder = $placeholder; + $this->builder = $builder; + + // set some global values + $this->NamespacePrefix = $this->placeholder->get('NamespacePrefix'); + } + + /** + * Get the updated provider for the given module. + * + * @param object $module The module object containing the necessary data. + * + * @return string The provider content. + * + * @since 5.1.2 + */ + public function get(object $module): string + { + $provider = []; + $provider[] = "/**"; + $provider[] = " *" . Line::_(__Line__, __Class__) . " The {$module->official_name} module service provider"; + $provider[] = " *"; + $provider[] = " * @since 5.4.0"; + $provider[] = " */"; + $provider[] = "return new class () implements ServiceProviderInterface {"; + $provider[] = Indent::_(1) . "/**"; + $provider[] = Indent::_(1) . " *" . Line::_(__Line__, __Class__) . " Registers the service provider with a DI container."; + $provider[] = Indent::_(1) . " *"; + $provider[] = Indent::_(1) . " * @param Container \$container The DI container."; + $provider[] = Indent::_(1) . " *"; + $provider[] = Indent::_(1) . " * @return void"; + $provider[] = Indent::_(1) . " * @since 5.4.0"; + $provider[] = Indent::_(1) . " */"; + $provider[] = Indent::_(1) . "public function register(Container \$container)"; + $provider[] = Indent::_(1) . "{"; + $provider[] = Indent::_(2) . "\$container->registerServiceProvider(new ModuleDispatcherFactory('\\\\{$this->NamespacePrefix}\\\\Module\\\\{$module->namespace}'));"; + if ($module->add_class_helper == 1 || $module->custom_get) + { + $provider[] = Indent::_(2) . "\$container->registerServiceProvider(new HelperFactory('\\\\{$this->NamespacePrefix}\\\\Module\\\\{$module->namespace}\\\\{$module->target_client_namespace}\\\\Helper'));"; + } + $provider[] = ''; + $provider[] = Indent::_(2) . "\$container->registerServiceProvider(new Module());"; + $provider[] = Indent::_(1) . "}"; + $provider[] = "};"; + + return $this->placeholder->update( + implode(PHP_EOL, $provider). PHP_EOL, + $this->builder->allActive() + ); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Template.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Template.php new file mode 100644 index 000000000..d3b8a3fdc --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/Template.php @@ -0,0 +1,242 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface as Header; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Customcode\DispenserInterface as Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Builder\TemplateData; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentMulti; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\TemplateInterface; + + +/** + * Module Template Joomla 6 + * + * @since 5.1.2 + */ +final class Template implements TemplateInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 5.1.2 + */ + protected Config $config; + + /** + * The Header Class. + * + * @var Header + * @since 5.1.2 + */ + protected Header $header; + + /** + * The Dispenser Class. + * + * @var Dispenser + * @since 5.1.2 + */ + protected Dispenser $dispenser; + + /** + * The TemplateData Class. + * + * @var TemplateData + * @since 5.1.2 + */ + protected TemplateData $templatedata; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.1.2 + */ + protected Placeholder $placeholder; + + /** + * The ContentOne Class. + * + * @var ContentOne + * @since 5.1.2 + */ + protected ContentOne $contentone; + + /** + * The ContentMulti Class. + * + * @var ContentMulti + * @since 5.1.2 + */ + protected ContentMulti $contentmulti; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Header $header The Header Class. + * @param Dispenser $dispenser The Dispenser Class. + * @param TemplateData $templatedata The TemplateData Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param ContentOne $contentone The ContentOne Class. + * @param ContentMulti $contentmulti The ContentMulti Class. + * + * @since 5.1.2 + */ + public function __construct(Config $config, Header $header, Dispenser $dispenser, + TemplateData $templatedata, Placeholder $placeholder, + ContentOne $contentone, ContentMulti $contentmulti) + { + $this->config = $config; + $this->header = $header; + $this->dispenser = $dispenser; + $this->templatedata = $templatedata; + $this->placeholder = $placeholder; + $this->contentone = $contentone; + $this->contentmulti = $contentmulti; + } + + /** + * Get the updated placeholder default template content for the given module. + * + * @param object $module The module object containing the necessary data. + * @param string $key The dispenser key for this given module. + * + * @return string The updated placeholder content. + * @since 5.1.2 + */ + public function default(object $module, string $key): string + { + // add any css from the fields + $default = $this->dispenser->get( + 'css_views', + $key, + PHP_EOL . '' . PHP_EOL + ); + + // now add the body + $body = trim((string) ($module->default ?? '')); + if (!empty($body)) + { + $default .= PHP_EOL . $body . PHP_EOL; + } + + // add any JavaScript from the fields + $default .= $this->dispenser->get( + 'views_footer', + $key, + PHP_EOL . '' . PHP_EOL + ); + + // return the default content for the model default area + return $this->placeholder->update( + $default, + $this->contentone->allActive() + ); + } + + /** + * Get the updated placeholder default header template content for the given module. + * + * @param object $module The module object containing the necessary data. + * + * @return string The updated placeholder content. + * @since 5.1.2 + */ + public function header(object $module): string + { + // first add the header + $add_default_header = (int) ($module->add_default_header ?? 0); + $default = $add_default_header === 1 ? trim((string) ($module->default_header ?? '')) : ''; + + if (empty($default)) + { + return ''; + } + + // return the header for the model default area + return PHP_EOL . PHP_EOL . $this->placeholder->update($default, $this->contentone->allActive()); + } + + /** + * Get the updated placeholder extra template content for the given module. + * + * @param object $module The module object containing the necessary data. + * + * @return void + * @since 5.1.2 + */ + public function extra(object $module): void + { + // Build the data key and fetch template data once + $data = $this->templatedata->get($module->key . '.' . $module->code_name); + + // Nothing to do if there's no data + if (!is_array($data) || $data === []) + { + return; + } + + // Cache these to avoid repeated calls + $activePlaceholders = $this->contentone->allActive(); + + // --- HEADER (text) --- + $header = (string) ($this->header->get('module.extra.template.header', $module->class_name) ?? ''); + if ($header !== '') + { + $header = PHP_EOL . PHP_EOL . $this->placeholder->update($header, $activePlaceholders); + } + + foreach ($data as $template => $item) + { + $target = StringHelper::safe("MODDEFAULT_HEADER_{$template}", 'U'); + $key = $module->key . '|' . $target; + $this->contentmulti->set($key, $header); + + // --- HEADER CODE (php_view) --- + $phpView = trim((string) ($item['php_view'] ?? '')); + $headerCode = ($phpView === '') + ? '' + : PHP_EOL . $this->placeholder->update($phpView, $activePlaceholders); + + $target = StringHelper::safe("MODDEFAULT_HEADER_CODE_{$template}", 'U'); + $key = $module->key . '|' . $target; + $this->contentmulti->set($key, $headerCode); + + // --- BODY (html) --- + $html = (string) ($item['html'] ?? ''); + $body = ($html === '') + ? PHP_EOL + : PHP_EOL . $this->placeholder->update($html, $activePlaceholders); + + $target = StringHelper::safe("MODDEFAULT_{$template}", 'U'); + $key = $module->key . '|' . $target; + $this->contentmulti->set($key, $body); + } + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Module/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Extension.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Extension.php new file mode 100644 index 000000000..f5219783e --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Extension.php @@ -0,0 +1,246 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Plugin; + + +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne as Builder; +use VDM\Joomla\Componentbuilder\Power\Parser; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Plugin\ExtensionInterface; + + +/** + * Plugin Extension Class for Joomla 6 + * + * @since 5.1.2 + */ +final class Extension implements ExtensionInterface +{ + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.0.2 + */ + protected Placeholder $placeholder; + + /** + * The ContentOne Class. + * + * @var Builder + * @since 5.0.2 + */ + protected Builder $builder; + + /** + * The Parser Class. + * + * @var Parser + * @since 5.0.2 + */ + protected Parser $parser; + + /** + * Constructor. + * + * @param Placeholder $placeholder The Placeholder Class. + * @param Builder $builder The Content One Class. + * @param Parser $parser The Parser Class. + * + * @since 5.0.2 + */ + public function __construct(Placeholder $placeholder, Builder $builder, Parser $parser) + { + $this->placeholder = $placeholder; + $this->builder = $builder; + $this->parser = $parser; + } + + /** + * Get the updated placeholder content for the given plugin. + * + * @param object $plugin The plugin object containing the necessary data. + * + * @return string The updated placeholder content. + * + * @since 5.0.2 + */ + public function get(object $plugin): string + { + $add_subscriber_interface = $this->addNeededMethods($plugin->main_class_code); + + $extension = []; + $extension[] = $plugin->comment . PHP_EOL . 'final class '; + $extension[] = $plugin->class_name . ' extends ' . $plugin->extends; + if ($add_subscriber_interface) + { + $extension[] = ' implements Joomla__' . '_c06c5116_6b9d_487c_9b09_5094ec4506a3___Power'; + } + $extension[] = PHP_EOL . '{' . PHP_EOL; + $extension[] = $plugin->main_class_code; + $extension[] = PHP_EOL . '}' . PHP_EOL; + + return $this->placeholder->update( + implode('', $extension), + $this->builder->allActive() + ); + } + + /** + * Ensures that the required methods are present in the plugin code. + * + * This method checks the plugin's code for the presence of required methods, + * particularly the method that indicates implementation of the SubscriberInterface. + * If the necessary method is missing, it adds it to the code. + * + * @param string $code The main code of the plugin, passed by reference. + * + * @return bool Returns true if the SubscriberInterface implementation is added or already present, false otherwise. + * + * @since 5.0.2 + */ + protected function addNeededMethods(string &$code): bool + { + // Parse the code to extract its structure, particularly its methods. + $code_structure = $this->parser->code($code); + + if (empty($code_structure['methods'])) + { + return false; + } + + // Check if methods are defined and if getSubscribedEvents is not present. + if (!$this->getSubscribedEvents($code_structure['methods'])) + { + // Attempt to add the getSubscribedEvents method. + $method = $this->addGetSubscribedEvents($code_structure['methods']); + if ($method !== null) + { + // Append the new method to the code and indicate that the interface must be added. + $code .= $method; + + return true; + } + + // Return false if the event method could not be added. + return false; + } + + // Return true if getSubscribedEvents is already present. + return true; + } + + /** + * Add the getSubscribedEvents method + * + * @param array $methods The plugin methods. + * + * @return string|null The getSubscribedEvents code + * + * @since 5.0.2 + */ + protected function addGetSubscribedEvents(array $methods): ?string + { + $events = []; + $counter = 0; + foreach ($methods as $method) + { + if ($this->validEventName($method)) + { + $events[$method['name']] = Indent::_(3) . "'{$method['name']}' => '{$method['name']}'"; + + // autoloaded when method start with 'on' + // so we can ignore adding the getSubscribedEvents + if (substr($method['name'], 0, 2) === 'on') + { + $counter++; + } + } + } + + if ($events === [] || $counter == count($events)) + { + return null; + } + + $method = []; + $method[] = PHP_EOL . PHP_EOL . Indent::_(1) . '/**'; + $method[] = Indent::_(1) . ' * Returns an array of events this subscriber will listen to.'; + $method[] = Indent::_(1) . ' *'; + $method[] = Indent::_(1) . ' * @return array'; + $method[] = Indent::_(1) . ' *'; + $method[] = Indent::_(1) . ' * @since 5.0.0'; + $method[] = Indent::_(1) . ' */'; + $method[] = Indent::_(1) . 'public static function getSubscribedEvents(): array'; + $method[] = Indent::_(1) . '{'; + $method[] = Indent::_(2) . 'return ['; + $method[] = implode(',' . PHP_EOL, $events); + $method[] = Indent::_(2) . '];'; + $method[] = Indent::_(1) . '}'; + + return implode(PHP_EOL, $method); + } + + /** + * Validates if a method name is a valid event name for a Joomla plugin. + * + * The method must meet the following criteria: + * - It must be public, not static, and not abstract. + * - It must not be a magic method (i.e., should not start with '__'). + * + * @param array $method The method details, including 'name', 'access', 'static', and 'abstract'. + * + * @return bool Returns true if the method is a valid event name, otherwise false. + * + * @since 5.0.2 + */ + protected function validEventName(array $method): bool + { + // Check if the method is public, static, and not abstract + if ($method['access'] !== 'public' || $method['static'] || $method['abstract']) + { + return false; + } + + // Check if the method is a magic method (starts with '__') + if (substr($method['name'], 0, 2) === '__') + { + return false; + } + + // If all checks pass, the method is a valid event name + return true; + } + + /** + * Check if the getSubscribedEvents is set + * + * @param array $methods The plugin methods. + * + * @return bool + * + * @since 5.0.2 + */ + protected function getSubscribedEvents(array $methods): bool + { + foreach ($methods as $method) + { + if ($method['name'] === 'getSubscribedEvents' && $method['static'] && !$method['abstract']) + { + return true; + } + } + return false; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/MainXML.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/MainXML.php new file mode 100644 index 000000000..58c1faad7 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/MainXML.php @@ -0,0 +1,570 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Plugin; + + +use Joomla\Filesystem\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Language; +use VDM\Joomla\Componentbuilder\Compiler\Language\Set; +use VDM\Joomla\Componentbuilder\Compiler\Language\Purge; +use VDM\Joomla\Componentbuilder\Compiler\Language\Translation; +use VDM\Joomla\Componentbuilder\Compiler\Language\Multilingual; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; +use VDM\Joomla\Componentbuilder\Compiler\Creator\FieldsetExtension; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Languages; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Multilingual as BuilderMultilingual; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Interfaces\Architecture\Plugin\MainXMLInterface; + + +/** + * Joomla 6 Plugin Main XML Class + * + * @since 5.1.2 + */ +final class MainXML implements MainXMLInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 5.0.2 + */ + protected Config $config; + + /** + * The Language Class. + * + * @var Language + * @since 5.0.2 + */ + protected Language $language; + + /** + * The Set Class. + * + * @var Set + * @since 5.0.2 + */ + protected Set $set; + + /** + * The Purge Class. + * + * @var Purge + * @since 5.0.2 + */ + protected Purge $purge; + + /** + * The Translation Class. + * + * @var Translation + * @since 5.0.2 + */ + protected Translation $translation; + + /** + * The Multilingual Class. + * + * @var Multilingual + * @since 5.0.2 + */ + protected Multilingual $multilingual; + + /** + * The EventInterface Class. + * + * @var Event + * @since 5.0.2 + */ + protected Event $event; + + /** + * The FieldsetExtension Class. + * + * @var FieldsetExtension + * @since 5.0.2 + */ + protected FieldsetExtension $fieldsetextension; + + /** + * The ContentOne Class. + * + * @var ContentOne + * @since 5.0.2 + */ + protected ContentOne $contentone; + + /** + * The Languages Class. + * + * @var Languages + * @since 5.0.2 + */ + protected Languages $languages; + + /** + * The Multilingual Class. + * + * @var BuilderMultilingual + * @since 5.0.2 + */ + protected BuilderMultilingual $buildermultilingual; + + /** + * The Counter Class. + * + * @var Counter + * @since 5.0.2 + */ + protected Counter $counter; + + /** + * The File Class. + * + * @var File + * @since 5.0.2 + */ + protected File $file; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Language $language The Language Class. + * @param Set $set The Set Class. + * @param Purge $purge The Purge Class. + * @param Translation $translation The Translation Class. + * @param Multilingual $multilingual The Multilingual Class. + * @param Event $event The EventInterface Class. + * @param FieldsetExtension $fieldsetextension The FieldsetExtension Class. + * @param ContentOne $contentone The ContentOne Class. + * @param Languages $languages The Languages Class. + * @param BuilderMultilingual $buildermultilingual The Multilingual Class. + * @param Counter $counter The Counter Class. + * @param File $file The File Class. + * + * @since 5.0.2 + */ + public function __construct(Config $config, Language $language, Set $set, Purge $purge, + Translation $translation, Multilingual $multilingual, + Event $event, FieldsetExtension $fieldsetextension, + ContentOne $contentone, Languages $languages, + BuilderMultilingual $buildermultilingual, + Counter $counter, File $file) + { + $this->config = $config; + $this->language = $language; + $this->set = $set; + $this->purge = $purge; + $this->translation = $translation; + $this->multilingual = $multilingual; + $this->event = $event; + $this->fieldsetextension = $fieldsetextension; + $this->contentone = $contentone; + $this->languages = $languages; + $this->buildermultilingual = $buildermultilingual; + $this->counter = $counter; + $this->file = $file; + } + + /** + * Generates the main XML for the plugin. + * + * @param object $plugin The plugin object. + * + * @return string The generated XML. + * @since 5.0.2 + */ + public function get(object $plugin): string + { + $config_fields = $this->buildConfigFields($plugin); + $add_component_path = $this->shouldAddComponentPath($plugin); + $language_files = $this->generateLanguageFiles($plugin); + + $xml = $this->generateScriptAndSqlXml($plugin); + $xml .= $this->generateLanguageXml($plugin, $language_files); + $xml .= $this->generateFileXml($plugin, $language_files); + $xml .= $this->generateConfigXml($plugin, $config_fields, $add_component_path); + $xml .= $this->generateUpdateServerXml($plugin); + + return $xml; + } + + /** + * Build configuration fields XML. + * + * @param object $plugin The plugin object. + * + * @return array The configuration fields. + * @since 5.0.2 + */ + protected function buildConfigFields(object $plugin): array + { + $configFields = []; + if (!isset($plugin->config_fields) || !ArrayHelper::check($plugin->config_fields)) + { + return $configFields; + } + + $dbKey = 'yy'; + + foreach ($plugin->config_fields as $fieldName => $fieldsets) + { + foreach ($fieldsets as $fieldset => $fields) + { + $xmlFields = $this->fieldsetextension->get($plugin, $fields, $dbKey); + if (isset($xmlFields) && StringHelper::check($xmlFields)) + { + $configFields["{$fieldName}{$fieldset}"] = $xmlFields; + } + $dbKey++; + } + } + + return $configFields; + } + + /** + * Determine if the component path should be added. + * + * @param object $plugin The plugin object. + * + * @return bool True if the component path should be added, false otherwise. + * @since 5.0.2 + */ + protected function shouldAddComponentPath(object $plugin): bool + { + if (!isset($plugin->config_fields) || !ArrayHelper::check($plugin->config_fields) || + !isset($plugin->fieldsets_paths) || !ArrayHelper::check($plugin->fieldsets_paths)) + { + return false; + } + + foreach ($plugin->config_fields as $fieldName => $fieldsets) + { + foreach ($fieldsets as $fieldset => $fields) + { + if (isset($plugin->fieldsets_paths["{$fieldName}{$fieldset}"]) && + $plugin->fieldsets_paths["{$fieldName}{$fieldset}"] == 1) + { + return true; + } + } + } + + return false; + } + + /** + * Generate XML for script and SQL files. + * + * @param object $plugin The plugin object. + * + * @return string The XML for script and SQL files. + * @since 5.0.2 + */ + protected function generateScriptAndSqlXml(object $plugin): string + { + $xml = ''; + + if ($plugin->add_install_script) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . 'script.php'; + } + + if ($plugin->add_sql) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(3) . 'sql/mysql/install.sql'; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + if ($plugin->add_sql_uninstall) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(3) . 'sql/mysql/uninstall.sql'; + $xml .= PHP_EOL . Indent::_(2) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + return $xml; + } + + /** + * Generate XML for language files. + * + * @param object $plugin The plugin object. + * @param array $languageFiles The language files. + * + * @return string The XML for language files. + * @since 5.0.2 + */ + protected function generateLanguageXml(object $plugin, array $languageFiles): string + { + $xml = ''; + + if (ArrayHelper::check($languageFiles)) + { + $xml .= PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + + foreach ($languageFiles as $addTag) + { + $xml .= PHP_EOL . Indent::_(2) . '' . $addTag . '/plg_' + . strtolower((string) $plugin->group) . '_' . + (string) $plugin->file_name + . '.ini'; + $xml .= PHP_EOL . Indent::_(2) . '' . $addTag . '/plg_' + . strtolower((string) $plugin->group) . '_' . + (string) $plugin->file_name + . '.sys.ini'; + } + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + return $xml; + } + + /** + * Generate the XML for the files. + * + * @param object $plugin The plugin object. + * @param array $languageFiles The language files. + * + * @return string The XML for the files. + * @since 5.0.2 + */ + protected function generateFileXml(object $plugin, array $languageFiles): string + { + $files = Folder::files($plugin->folder_path); + $folders = Folder::folders($plugin->folder_path); + $ignore = ['sql', 'language', 'script.php', "{$plugin->file_name}.xml"]; + + $xml = PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . "context_name}\">services"; + + foreach ($files as $file) + { + if (!in_array($file, $ignore)) + { + $xml .= PHP_EOL . Indent::_(2) . "{$file}"; + } + } + + if (!empty($languageFiles)) + { + // $xml .= PHP_EOL . Indent::_(2) . 'language'; + } + + if ($plugin->add_sql || $plugin->add_sql_uninstall) + { + $xml .= PHP_EOL . Indent::_(2) . 'sql'; + } + + foreach ($folders as $folder) + { + if (!in_array($folder, $ignore)) + { + $xml .= PHP_EOL . Indent::_(2) . "{$folder}"; + } + } + + $xml .= PHP_EOL . Indent::_(1) . ''; + + return $xml; + } + + /** + * Generate XML for configuration fields. + * + * @param object $plugin The plugin object. + * @param array $configFields The configuration fields. + * @param bool $addComponentPath Whether to add the component path. + * + * @return string The XML for configuration fields. + * @since 5.0.2 + */ + protected function generateConfigXml(object $plugin, array $configFields, bool $addComponentPath): string + { + if (!isset($plugin->config_fields) || !ArrayHelper::check($configFields)) + { + return ''; + } + + $xml = PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= $addComponentPath ? PHP_EOL . Indent::_(1) . ''; + + if ($addComponentPath) + { + $namespace = $this->config->namespace_prefix . '\\Component\\' . $this->contentone->get('ComponentNamespace') . '\\Administrator'; + $xml .= PHP_EOL . Indent::_(3) . "addruleprefix=\"{$namespace}\\Rule\""; + $xml .= PHP_EOL . Indent::_(3) . "addfieldprefix=\"{$namespace}\\Field\">"; + $xml .= PHP_EOL . Indent::_(1) . '>'; + } + + foreach ($plugin->config_fields as $fieldName => $fieldsets) + { + $xml .= PHP_EOL . Indent::_(1) . ""; + + foreach ($fieldsets as $fieldset => $fields) + { + $label = $plugin->fieldsets_label["{$fieldName}{$fieldset}"] ?? $fieldset; + + $xml .= PHP_EOL . Indent::_(1) . "
"; + + if (isset($configFields["{$fieldName}{$fieldset}"])) + { + $xml .= $configFields["{$fieldName}{$fieldset}"]; + } + + $xml .= PHP_EOL . Indent::_(1) . '
'; + } + + $xml .= PHP_EOL . Indent::_(1) . '
'; + } + + $xml .= PHP_EOL . Indent::_(1) . ''; + + return $xml; + } + + /** + * Generate XML for update servers. + * + * @param object $plugin The plugin object. + * + * @return string The XML for update servers. + * @since 5.0.2 + */ + protected function generateUpdateServerXml(object $plugin): string + { + $xml = ''; + + if ($plugin->add_update_server) + { + $xml = PHP_EOL . PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + $xml .= PHP_EOL . Indent::_(2) . '' . $plugin->update_server_url . ''; + $xml .= PHP_EOL . Indent::_(1) . ''; + } + + return $xml; + } + + /** + * Generate language files. + * + * @param object $plugin The plugin object. + * + * @return array The language files. + * @since 5.0.2 + */ + protected function generateLanguageFiles(object $plugin): array + { + $languageFiles = []; + + if (!$this->language->exist($plugin->key)) + { + return $languageFiles; + } + + $langContent = $this->language->getTarget($plugin->key); + $this->event->trigger('jcb_ce_onBeforeBuildPluginLang', [&$plugin, &$langContent]); + + $values = array_unique($langContent); + $this->buildermultilingual->set('plugins', $this->multilingual->get($values)); + + $langTag = $this->config->get('lang_tag', 'en-GB'); + $this->languages->set("plugins.{$langTag}.all", $langContent); + $this->language->setTarget($plugin->key, null); + + $this->set->execute($values, $plugin->guid, 'plugins'); + $this->purge->execute($values, $plugin->guid, 'plugins'); + + $this->event->trigger('jcb_ce_onBeforeBuildPluginLangFiles', [&$plugin]); + + if ($this->languages->IsArray('plugins')) + { + foreach ($this->languages->get('plugins') as $tag => $areas) + { + $tag = trim($tag); + foreach ($areas as $area => $languageStrings) + { + $fileName = "plg_" . strtolower((string)$plugin->group) . '_' . $plugin->file_name . '.ini'; + $total = count($values); + if ($this->translation->check($tag, $languageStrings, $total, $fileName)) + { + $lang = array_map( + fn($langString, $placeholder) => "{$placeholder}=\"{$langString}\"", + array_values($languageStrings), + array_keys($languageStrings) + ); + + $path = "{$plugin->folder_path}/language/{$tag}/"; + + if (!is_dir($path)) + { + Folder::create($path); + $this->counter->folder++; + } + + $this->file->write($path . $fileName, implode(PHP_EOL, $lang)); + $this->file->write( + $path . 'plg_' . strtolower((string)$plugin->group) . '_' . $plugin->file_name . '.sys.ini', + implode(PHP_EOL, $lang) + ); + + $this->counter->line += count($lang); + unset($lang); + + $languageFiles[$tag] = $tag; + } + } + } + } + + return $languageFiles; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Provider.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Provider.php new file mode 100644 index 000000000..54f0aeaf4 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/Provider.php @@ -0,0 +1,106 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Plugin; + + +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne as Builder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Plugin\ProviderInterface; + + +/** + * Plugin Provider Class for Joomla 6 + * + * @since 5.1.2 + */ +final class Provider implements ProviderInterface +{ + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.0.2 + */ + protected Placeholder $placeholder; + + /** + * The ContentOne Class. + * + * @var Builder + * @since 5.0.2 + */ + protected Builder $builder; + + /** + * Constructor. + * + * @param Placeholder $placeholder The Placeholder Class. + * @param Builder $builder The Content One Class. + * + * @since 5.0.2 + */ + public function __construct(Placeholder $placeholder, Builder $builder) + { + $this->placeholder = $placeholder; + $this->builder = $builder; + } + + /** + * Get the updated provider for the given plugin. + * + * @param object $plugin The plugin object containing the necessary data. + * + * @return string The provider content. + * + * @since 5.0.2 + */ + public function get(object $plugin): string + { + $group = strtolower((string) $plugin->group); + + $provider = []; + $provider[] = PHP_EOL . PHP_EOL . "return new class () implements ServiceProviderInterface {"; + $provider[] = Indent::_(1) . "/**"; + $provider[] = Indent::_(1) . "*" . Line::_(__Line__, __Class__) + . " Registers the service provider with a DI container."; + $provider[] = Indent::_(1) . "*"; + $provider[] = Indent::_(1) . "* @param Container \$container The DI container."; + $provider[] = Indent::_(1) . "*"; + $provider[] = Indent::_(1) . "* @return void"; + $provider[] = Indent::_(1) . "* @since 4.3.0"; + $provider[] = Indent::_(1) . "*/"; + $provider[] = Indent::_(1) . "public function register(Container \$container)"; + $provider[] = Indent::_(1) . "{"; + $provider[] = Indent::_(2) . "\$container->set("; + $provider[] = Indent::_(3) . "PluginInterface::class,"; + $provider[] = Indent::_(3) . "function (Container \$container) {"; + $provider[] = Indent::_(4) . "\$plugin = new {$plugin->class_name}("; + $provider[] = Indent::_(5) . "\$container->get(DispatcherInterface::class),"; + $provider[] = Indent::_(5) . "(array) PluginHelper::getPlugin('{$group}', '{$plugin->context_name}')"; + $provider[] = Indent::_(4) . ");"; + $provider[] = Indent::_(4) . "\$plugin->setApplication(Factory::getApplication());"; + $provider[] = $plugin->service_provider ?? ''; // to add extra plug-in suff + $provider[] = Indent::_(4) . "return \$plugin;"; + $provider[] = Indent::_(3) . "}"; + $provider[] = Indent::_(2) . ");"; + $provider[] = Indent::_(1) . "}"; + $provider[] = "};"; + + return $this->placeholder->update( + implode(PHP_EOL, $provider). PHP_EOL, + $this->builder->allActive() + ); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Architecture/JoomlaSix/Plugin/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/Settings.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/Settings.php new file mode 100644 index 000000000..3560bcd5d --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/Settings.php @@ -0,0 +1,748 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Component\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Component; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Dynamicpath; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Pathfix; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Component\SettingsInterface; + + +/** + * Compiler Component Joomla 6 Settings + * + * @since 5.1.2 + */ +final class Settings implements SettingsInterface +{ + /** + * The standard folders + * + * @var array + * @since 3.2.0 + */ + protected array $standardFolders = [ + 'site', + 'admin', + 'media' + ]; + + /** + * The standard root files + * + * @var array + * @since 3.2.0 + */ + protected array $standardRootFiles = [ + 'access.xml', + 'config.xml', + 'controller.php', + 'index.html', + 'README.txt' + ]; + + /** + * Compiler Joomla Version Data + * + * @var object|null + * @since 3.2.0 + */ + protected ?object $data = null; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The compiler registry + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * Compiler Event + * + * @var EventInterface + * @since 3.2.0 + */ + protected EventInterface $event; + + /** + * Compiler Placeholder + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * Compiler Component + * + * @var Component + * @since 3.2.0 + **/ + protected Component $component; + + /** + * Compiler Utilities Paths + * + * @var Paths + * @since 3.2.0 + */ + protected Paths $paths; + + /** + * Compiler Component Dynamic Path + * + * @var Dynamicpath + * @since 3.2.0 + **/ + protected Dynamicpath $dynamicpath; + + /** + * Compiler Component Pathfix + * + * @var Pathfix + * @since 3.2.0 + **/ + protected Pathfix $pathfix; + + /** + * Constructor + * + * @param Config|null $config The compiler config object. + * @param Registry|null $registry The compiler registry object. + * @param EventInterface|null $event The compiler event api object. + * @param Placeholder|null $placeholder The compiler placeholder object. + * @param Component|null $component The component class. + * @param Paths|null $paths The compiler paths object. + * @param Dynamicpath|null $dynamicpath The compiler dynamic path object. + * @param Pathfix|null $pathfix The compiler path fixing object. + * + * @since 3.2.0 + */ + public function __construct(?Config $config = null, ?Registry $registry = null, + ?EventInterface $event = null, ?Placeholder $placeholder = null, + ?Component $component = null, ?Paths $paths = null, + ?Dynamicpath $dynamicpath = null, ?Pathfix $pathfix = null) + { + $this->config = $config ?: Compiler::_('Config'); + $this->registry = $registry ?: Compiler::_('Registry'); + $this->event = $event ?: Compiler::_('Event'); + $this->placeholder = $placeholder ?: Compiler::_('Placeholder'); + $this->component = $component ?: Compiler::_('Component'); + $this->paths = $paths ?: Compiler::_('Utilities.Paths'); + $this->dynamicpath = $dynamicpath ?: Compiler::_('Utilities.Dynamicpath'); + $this->pathfix = $pathfix ?: Compiler::_('Utilities.Pathfix'); + + // add component endpoint file to stander list of root files + $this->standardRootFiles[] = $this->component->get('name_code') . '.php'; + } + + /** + * Check if data set is loaded + * + * @return bool + * @since 3.2.0 + */ + public function exists(): bool + { + if (!$this->isSet()) + { + // load the data + $this->data = $this->get(); + + if (!$this->isSet()) + { + return false; + } + } + + return true; + } + + /** + * Get Joomla - Folder Structure to Create + * + * @return object The version related structure + * @since 3.2.0 + */ + public function structure(): object + { + return $this->data->create; + } + + /** + * Get Joomla - Move Multiple Structure + * + * @return object The version related multiple structure + * @since 3.2.0 + */ + public function multiple(): object + { + return $this->data->move->dynamic; + } + + /** + * Get Joomla - Move Single Structure + * + * @return object The version related single structure + * @since 3.2.0 + */ + public function single(): object + { + return $this->data->move->static; + } + + /** + * Check if Folder is a Standard Folder + * + * @param string $folder The folder name + * + * @return bool true if the folder exists + * @since 3.2.0 + */ + public function standardFolder(string $folder): bool + { + return in_array($folder, $this->standardFolders); + } + + /** + * Check if File is a Standard Root File + * + * @param string $file The file name + * + * @return bool true if the file exists + * @since 3.2.0 + */ + public function standardRootFile(string $file): bool + { + return in_array($file, $this->standardRootFiles); + } + + /** + * Check if Data is Set + * + * @return bool + * @since 3.2.0 + */ + private function isSet(): bool + { + return is_object($this->data) && + isset($this->data->create) && + isset($this->data->move) && + isset($this->data->move->static) && + isset($this->data->move->dynamic); + } + + /** + * get the Joomla Version Data + * + * @return object|null The version data + * @since 3.2.0 + */ + private function get(): ?object + { + // override option + $customSettings = $this->paths->template_path . '/settings_' . + $this->config->component_code_name . '.json'; + + // get the data + $version_data = $this->readJsonFile($customSettings); + + if (is_null($version_data) || !$this->isValidData($version_data)) + { + return null; + } + + $this->loadExtraFolders(); + $this->loadExtraFiles(); + + $this->addFolders($version_data); + $this->addFiles($version_data); + + // Trigger Event: jcb_ce_onAfterSetJoomlaVersionData + $this->event->trigger( + 'jcb_ce_onAfterSetJoomlaVersionData', [&$version_data] + ); + + return $version_data; + } + + /** + * Read the Json file data + * + * @param string $filePath + * + * @return object|null The version data + * @since 3.2.0 + */ + private function readJsonFile(string $filePath): ?object + { + if (FileHelper::exists($filePath)) + { + $jsonContent = FileHelper::getContent($filePath); + } + else + { + $jsonContent = FileHelper::getContent($this->paths->template_path . '/settings.json'); + } + + if (JsonHelper::check($jsonContent)) + { + return json_decode((string) $jsonContent); + } + + return null; + } + + /** + * Check if this is valid data + * + * @param object $versionData + * + * @return bool + * @since 3.2.0 + */ + private function isValidData(object $versionData): bool + { + return isset($versionData->create) && + isset($versionData->move) && + isset($versionData->move->static) && + isset($versionData->move->dynamic); + } + + /** + * Add Extra/Dynamic folders + * + * @return void + * @since 3.2.0 + */ + private function loadExtraFolders() + { + if ($this->component->isArray('folders') || + $this->config->get('add_eximport', false) || + $this->config->get('uikit', 0) || + $this->config->get('footable', false)) + { + $this->addImportViewFolder(); + // $this->addPhpSpreadsheetFolder(); // soon + $this->addUikitFolder(); + $this->addFooTableFolder(); + } + } + + /** + * Add Import and Export Folder + * + * @return void + * @since 3.2.0 + */ + private function addImportViewFolder() + { + if ($this->config->get('add_eximport', false)) + { + // soon + } + } + + /** + * Add Php Spreadsheet Folder + * + * @return void + * @since 3.2.0 + */ + private function addPhpSpreadsheetFolder() + { + // move the phpspreadsheet Folder (TODO we must move this to a library package) + if ($this->config->get('add_eximport', false)) + { + $this->component->appendArray('folders', [ + 'folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor', + 'path' => '/libraries/phpspreadsheet/', + 'rename' => 0 + ]); + } + } + + /** + * Add Uikit Folders + * + * @return void + * @since 3.2.0 + */ + private function addUikitFolder() + { + $uikit = $this->config->get('uikit', 0); + if (2 == $uikit || 1 == $uikit) + { + // move the UIKIT Folder into place + $this->component->appendArray('folders', [ + 'folder' => 'uikit-v2', + 'path' => 'media', + 'rename' => 0 + ]); + } + if (2 == $uikit || 3 == $uikit) + { + // move the UIKIT-3 Folder into place + $this->component->appendArray('folders', [ + 'folder' => 'uikit-v3', + 'path' => 'media', + 'rename' => 0 + ]); + } + } + + /** + * Add Foo Table Folder + * + * @return void + * @since 3.2.0 + */ + private function addFooTableFolder() + { + if (!$this->config->get('footable', false)) + { + return; + } + + $footable_version = $this->config->get('footable_version', 2); + + if (2 == $footable_version) + { + // move the footable folder into place + $this->component->appendArray('folders', [ + 'folder' => 'footable-v2', + 'path' => 'media', + 'rename' => 0 + ]); + } + elseif (3 == $footable_version) + { + // move the footable folder into place + $this->component->appendArray('folders', [ + 'folder' => 'footable-v3', + 'path' => 'media', + 'rename' => 0 + ]); + } + } + + /** + * Add Extra/Dynamic files + * + * @return void + * @since 3.2.0 + */ + private function loadExtraFiles() + { + if ($this->component->isArray('files') || + $this->config->get('google_chart', false)) + { + $this->addGoogleChartFiles(); + } + } + + /** + * Add Google Chart Files + * + * @return void + * @since 3.2.0 + */ + private function addGoogleChartFiles() + { + if ($this->config->get('google_chart', false)) + { + // move the google chart files + $this->component->appendArray('files', [ + 'file' => 'google.jsapi.js', + 'path' => 'media/js', + 'rename' => 0 + ]); + $this->component->appendArray('files', [ + 'file' => 'chartbuilder.php', + 'path' => 'admin/helpers', + 'rename' => 0 + ]); + } + } + + /** + * Add Folders + * + * @param object $versionData + * + * @return void + * @since 3.2.0 + */ + private function addFolders(object &$versionData) + { + if (!$this->component->isArray('folders')) + { + return; + } + + // pointer tracker + $pointer_tracker = 'h'; + foreach ($this->component->get('folders') as $custom) + { + // check type of target type + $_target_type = 'c0mp0n3nt'; + if (isset($custom['target_type'])) + { + $_target_type = $custom['target_type']; + } + + // for good practice + $this->pathfix->set( + $custom, ['path', 'folder', 'folderpath'] + ); + + // fix custom path + if (isset($custom['path']) + && StringHelper::check($custom['path'])) + { + $custom['path'] = trim((string) $custom['path'], '/'); + } + + // by default custom path is true + $customPath = 'custom'; + + // set full path if this is a full path folder + if (!isset($custom['folder']) && isset($custom['folderpath'])) + { + // update the dynamic path + $custom['folderpath'] = $this->dynamicpath->update( + $custom['folderpath'] + ); + + // set the folder path with / if does not have a drive/windows full path + $custom['folder'] = (preg_match( + '/^[a-z]:/i', $custom['folderpath'] + )) ? trim($custom['folderpath'], '/') + : '/' . trim($custom['folderpath'], '/'); + + // remove the file path + unset($custom['folderpath']); + + // triget fullpath + $customPath = 'full'; + } + + // make sure we use the correct name + $pathArray = (array) explode('/', (string) $custom['path']); + $lastFolder = end($pathArray); + + // only rename folder if last has folder name + if (isset($custom['rename']) && $custom['rename'] == 1) + { + $custom['path'] = str_replace( + '/' . $lastFolder, '', (string) $custom['path'] + ); + $rename = 'new'; + $newname = $lastFolder; + } + elseif ('full' === $customPath) + { + // make sure we use the correct name + $folderArray = (array) explode('/', (string) $custom['folder']); + $lastFolder = end($folderArray); + $rename = 'new'; + $newname = $lastFolder; + } + else + { + $rename = false; + $newname = ''; + } + + // insure we have no duplicates + $key_pointer = StringHelper::safe( + $custom['folder'] + ) . '_f' . $pointer_tracker; + + $pointer_tracker++; + + // fix custom path + $custom['path'] = ltrim((string) $custom['path'], '/'); + + // set new folder to object + $versionData->move->static->{$key_pointer} = new \stdClass(); + $versionData->move->static->{$key_pointer}->naam = str_replace('//', '/', (string) $custom['folder']); + $versionData->move->static->{$key_pointer}->path = $_target_type . '/' . $custom['path']; + $versionData->move->static->{$key_pointer}->rename = $rename; + $versionData->move->static->{$key_pointer}->newName = $newname; + $versionData->move->static->{$key_pointer}->type = 'folder'; + $versionData->move->static->{$key_pointer}->custom = $customPath; + + // set the target if type and id is found + if (isset($custom['target_id']) && isset($custom['target_type'])) + { + $versionData->move->static->{$key_pointer}->_target = [ + 'key' => $custom['target_id'] . '_' . $custom['target_type'], + 'type' => $custom['target_type'] + ]; + } + } + + $this->component->remove('folders'); + } + + /** + * Add Files + * + * @param object $versionData + * + * @return void + * @since 3.2.0 + */ + private function addFiles(object &$versionData) + { + if (!$this->component->isArray('files')) { + return; + } + + // pointer tracker + $pointer_tracker = 'h'; + foreach ($this->component->get('files') as $custom) + { + // check type of target type + $_target_type = 'c0mp0n3nt'; + if (isset($custom['target_type'])) + { + $_target_type = $custom['target_type']; + } + + // for good practice + $this->pathfix->set( + $custom, ['path', 'file', 'filepath'] + ); + + // by default custom path is true + $customPath = 'custom'; + + // set full path if this is a full path file + if (!isset($custom['file']) && isset($custom['filepath'])) + { + // update the dynamic path + $custom['filepath'] = $this->dynamicpath->update( + $custom['filepath'] + ); + + // set the file path with / if does not have a drive/windows full path + $custom['file'] = (preg_match('/^[a-z]:/i', $custom['filepath'])) + ? trim($custom['filepath'], '/') : '/' . trim($custom['filepath'], '/'); + + // remove the file path + unset($custom['filepath']); + + // triget fullpath + $customPath = 'full'; + } + + // make sure we have not duplicates + $key_pointer = StringHelper::safe( + $custom['file'] + ) . '_g' . $pointer_tracker; + + $pointer_tracker++; + + // set new file to object + $versionData->move->static->{$key_pointer} = new \stdClass(); + $versionData->move->static->{$key_pointer}->naam = str_replace('//', '/', (string) $custom['file']); + + // update the dynamic component name placholders in file names + $custom['path'] = $this->placeholder->update_( + $custom['path'] + ); + + // get the path info + $pathInfo = pathinfo((string) $custom['path']); + if (isset($pathInfo['extension']) && $pathInfo['extension']) + { + $pathInfo['dirname'] = trim($pathInfo['dirname'], '/'); + + // set the info + $versionData->move->static->{$key_pointer}->path = $_target_type . '/' . $pathInfo['dirname']; + $versionData->move->static->{$key_pointer}->rename = 'new'; + $versionData->move->static->{$key_pointer}->newName = $pathInfo['basename']; + } + elseif ('full' === $customPath) + { + // fix custom path + $custom['path'] = ltrim((string) $custom['path'], '/'); + + // get file array + $fileArray = (array) explode('/', (string) $custom['file']); + + // set the info + $versionData->move->static->{$key_pointer}->path = $_target_type . '/' . $custom['path']; + $versionData->move->static->{$key_pointer}->rename = 'new'; + $versionData->move->static->{$key_pointer}->newName = end($fileArray); + } + else + { + // fix custom path + $custom['path'] = ltrim((string) $custom['path'], '/'); + + // set the info + $versionData->move->static->{$key_pointer}->path = $_target_type . '/' . $custom['path']; + $versionData->move->static->{$key_pointer}->rename = false; + } + + $versionData->move->static->{$key_pointer}->type = 'file'; + $versionData->move->static->{$key_pointer}->custom = $customPath; + + // set the target if type and id is found + if (isset($custom['target_id']) + && isset($custom['target_type'])) + { + $versionData->move->static->{$key_pointer}->_target = [ + 'key' => $custom['target_id'] . '_' . $custom['target_type'], + 'type' => $custom['target_type'] + ]; + } + + // check if file should be updated + if (!isset($custom['notnew']) || $custom['notnew'] == 0 + || $custom['notnew'] != 1) + { + $this->registry->appendArray('files.not.new', $key_pointer); + } + else + { + // update the file content + $this->registry->set('update.file.content.' . $key_pointer, true); + } + } + + $this->component->remove('files'); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Component/JoomlaSix/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php index a7e2b254c..f05425b7a 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php @@ -383,7 +383,7 @@ class Config extends ComponentConfig */ protected function getJoomlaversion(): int { - return $this->input->post->get('joomla_version', 3, 'INT'); + return $this->input->post->get('joomla_version', 5, 'INT'); } /** @@ -397,7 +397,8 @@ class Config extends ComponentConfig return [ 3 => ['folder_key' => 3, 'xml_version' => '3.10'], 4 => ['folder_key' => 4, 'xml_version' => '4.0'], - 5 => ['folder_key' => 4, 'xml_version' => '5.0'] // for now we build 4 and 5 from same templates ;) + 5 => ['folder_key' => 4, 'xml_version' => '5.0'], // for now we build 4 and 5 from same templates ;), + 6 => ['folder_key' => 4, 'xml_version' => '6.0'] // for now we build 4 and 6 from same templates ;) ]; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/InstallScript.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/InstallScript.php new file mode 100644 index 000000000..7aed32dcb --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/InstallScript.php @@ -0,0 +1,528 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Extension\InstallInterface; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface; + + +/** + * Loading the Extension Installation Script Class + * + * @since 5.1.2 + */ +final class InstallScript implements GetScriptInterface +{ + /** + * The extension + * + * @var InstallInterface|Object + * @since 3.2.0 + */ + protected object $extension; + + /** + * The methods + * + * @var array + * @since 3.2.0 + */ + protected array $methods = ['php_script', 'php_preflight', 'php_postflight', 'php_method']; + + /** + * The types + * + * @var array + * @since 3.2.0 + */ + protected array $types = ['construct', 'install', 'update', 'uninstall', 'discover_install']; + + /** + * The construct bucket + * + * @var array + * @since 3.2.0 + */ + protected array $construct = []; + + /** + * The install bucket + * + * @var array + * @since 3.2.0 + */ + protected array $install = []; + + /** + * The update bucket + * + * @var array + * @since 3.2.0 + */ + protected array $update = []; + + /** + * The uninstall bucket + * + * @var array + * @since 3.2.0 + */ + protected array $uninstall = []; + + /** + * The preflight switch + * + * @var bool + * @since 3.2.0 + */ + protected bool $preflightActive = false; + + /** + * The preflight bucket + * + * @var array + * @since 3.2.0 + */ + protected array $preflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []]; + + /** + * The postflight switch + * + * @var bool + * @since 3.2.0 + */ + protected bool $postflightActive = false; + + /** + * The postflight bucket + * + * @var array + * @since 3.2.0 + */ + protected array $postflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []]; + + /** + * The paths of the old plugin class files + * + * @var array + * @since 5.0.2 + */ + protected array $removeFilePaths = []; + + /** + * The paths of the old plugin folders + * + * @var array + * @since 5.0.2 + */ + protected array $removeFolderPaths = []; + + /** + * get install script + * + * @param Object $extension The extension object + * + * @return string + * @since 3.2.0 + */ + public function get(object $extension): string + { + // purge the object + $this->rest(); + + // set the remove path + $this->removeFilePaths = $extension->remove_file_paths ?? []; + $this->removeFolderPaths = $extension->remove_folder_paths ?? []; + + // loop over methods and types + foreach ($this->methods as $method) + { + foreach ($this->types as $type) + { + if (isset($extension->{'add_' . $method . '_' . $type}) + && $extension->{'add_' . $method . '_' . $type} == 1 + && StringHelper::check( + $extension->{$method . '_' . $type} + )) + { + // add to the main methods + if ('php_method' === $method || 'php_script' === $method) + { + $this->{$type}[] = $extension->{$method . '_' . $type}; + } + else + { + // get the flight key + $flight = str_replace('php_', '', (string) $method); + // load the script to our bucket + $this->{$flight . 'Bucket'}[$type][] = $extension->{$method . '_' . $type}; + // show that the method is active + $this->{$flight . 'Active'} = true; + } + } + } + } + + $this->extension = $extension; + + // return the class + return $this->build(); + } + + /** + * Reset all bucket at the start of each build + * + * @return void + * @since 3.2.0 + */ + protected function rest(): void + { + $this->removeFilePaths = []; + $this->removeFolderPaths = []; + $this->construct = []; + $this->install = []; + $this->update = []; + $this->uninstall = []; + $this->preflightActive = false; + $this->preflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []]; + $this->postflightActive = false; + $this->postflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []]; + } + + /** + * build the install class + * + * @return string + * @since 3.2.0 + */ + protected function build(): string + { + // start build + $script = $this->head(); + + // load constructor if set + $script .= $this->construct(); + + // load install method if set + $script .= $this->main('install'); + + // load update method if set + $script .= $this->main('update'); + + // load uninstall method if set + $script .= $this->main('uninstall'); + + // load preflight method if set + $script .= $this->flight('preflight'); + + // load postflight method if set + $script .= $this->flight('postflight'); + + // load remove files method + $script .= $this->removeFiles(); + + // close the class + $script .= PHP_EOL . '}' . PHP_EOL; + + return $script; + } + + /** + * get install script head + * + * @return string + * @since 3.2.0 + */ + protected function head(): string + { + // get the extension + $extension = $this->extension; + + // start build + $script = PHP_EOL . 'use Joomla\CMS\Factory;'; + $script .= PHP_EOL . 'use Joomla\CMS\Version;'; + $script .= PHP_EOL . 'use Joomla\CMS\Installer\InstallerAdapter;'; + $script .= PHP_EOL . 'use Joomla\CMS\Language\Text;'; + $script .= PHP_EOL . 'use Joomla\Filesystem\File;'; + $script .= PHP_EOL . 'use Joomla\Filesystem\Folder;' . PHP_EOL; + $script .= PHP_EOL . '/**'; + $script .= PHP_EOL . ' * ' . $extension->official_name + . ' script file.'; + $script .= PHP_EOL . ' *'; + $script .= PHP_EOL . ' * @package ' . $extension->class_name; + $script .= PHP_EOL . ' */'; + $script .= PHP_EOL . 'class ' . $extension->installer_class_name; + $script .= PHP_EOL . '{'; + + return $script; + } + + /** + * get constructor + * + * @return string + * @since 3.2.0 + */ + protected function construct(): string + { + // the __construct script + $script = PHP_EOL . Indent::_(1) . '/**'; + $script .= PHP_EOL . Indent::_(1) . ' *' . Line::_(__Line__, __Class__) + .' The CMS Application.'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) . ' * @since 4.4.2'; + $script .= PHP_EOL . Indent::_(1) . ' */'; + $script .= PHP_EOL . Indent::_(1) . 'protected $app;'; + + $script .= PHP_EOL . PHP_EOL . Indent::_(1) . '/**'; + $script .= PHP_EOL . Indent::_(1) . ' *' . Line::_(__Line__, __Class__) + .' A list of files to be deleted'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) . ' * @var array'; + $script .= PHP_EOL . Indent::_(1) . ' * @since 3.6'; + $script .= PHP_EOL . Indent::_(1) . ' */'; + $script .= PHP_EOL . Indent::_(1) . 'protected array $deleteFiles = [];'; + + $script .= PHP_EOL . PHP_EOL . Indent::_(1) . '/**'; + $script .= PHP_EOL . Indent::_(1) . ' *' . Line::_(__Line__, __Class__) + .' A list of folders to be deleted'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) . ' * @var array'; + $script .= PHP_EOL . Indent::_(1) . ' * @since 3.6'; + $script .= PHP_EOL . Indent::_(1) . ' */'; + $script .= PHP_EOL . Indent::_(1) . 'protected array $deleteFolders = [];'; + + $script .= PHP_EOL . PHP_EOL . Indent::_(1) . '/**'; + $script .= PHP_EOL . Indent::_(1) . ' * Constructor'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) + . ' * @param InstallerAdapter $adapter The object responsible for running this script'; + $script .= PHP_EOL . Indent::_(1) . ' */'; + $script .= PHP_EOL . Indent::_(1) + . 'public function __construct($adapter)'; + $script .= PHP_EOL . Indent::_(1) . '{'; + + $script .= PHP_EOL . Indent::_(2) . '//' . Line::_(__Line__, __Class__) + . ' get application'; + $script .= PHP_EOL . Indent::_(2) + . '$this->app = Factory::getApplication();' . PHP_EOL; + + if (ArrayHelper::check($this->construct)) + { + $script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $this->construct); + } + + // check if custom remove file is set + if ($this->removeFilePaths !== [] && strpos($script, '$this->deleteFiles') === false) + { + // add the default delete files + foreach ($this->removeFilePaths as $filePath) + { + $script .= PHP_EOL . Indent::_(2) . "if (is_file(JPATH_ROOT . '$filePath'))"; + $script .= PHP_EOL . Indent::_(2) . "{"; + $script .= PHP_EOL . Indent::_(3) . "\$this->deleteFiles[] = '$filePath';"; + $script .= PHP_EOL . Indent::_(2) . "}"; + } + } + + // check if custom remove file is set + if ($this->removeFolderPaths !== [] && strpos($script, '$this->deleteFolders') === false) + { + // add the default delete folders + foreach ($this->removeFolderPaths as $folderPath) + { + $script .= PHP_EOL . Indent::_(2) . "if (is_dir(JPATH_ROOT . '$folderPath'))"; + $script .= PHP_EOL . Indent::_(2) . "{"; + $script .= PHP_EOL . Indent::_(3) . "\$this->deleteFolders[] = '$folderPath';"; + $script .= PHP_EOL . Indent::_(2) . "}"; + } + } + + // close the function + $script .= PHP_EOL . Indent::_(1) . '}'; + + // add remove files + $this->preflightBucket['bottom'][] = Indent::_(2) . '//' . Line::_(__Line__, __Class__) + .' remove old files and folders'; + $this->preflightBucket['bottom'][] = Indent::_(2) . '$this->removeFiles();'; + + return $script; + } + + /** + * build main methods + * + * @param string $name the method being called + * + * @return string + * @since 3.2.0 + */ + protected function main(string $name): string + { + // return empty string if not set + if (!ArrayHelper::check($this->{$name})) + { + return ''; + } + // load the install method + $script = PHP_EOL . PHP_EOL . Indent::_(1) . '/**'; + $script .= PHP_EOL . Indent::_(1) . " * Called on $name"; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) + . ' * @param InstallerAdapter $adapter The object responsible for running this script'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) + . ' * @return boolean True on success'; + $script .= PHP_EOL . Indent::_(1) . ' */'; + $script .= PHP_EOL . Indent::_(1) . 'public function ' + . $name . '($adapter)'; + $script .= PHP_EOL . Indent::_(1) . '{'; + $script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $this->{$name}); + // return true + if ('uninstall' !== $name) + { + $script .= PHP_EOL . Indent::_(2) . 'return true;'; + } + // close the function + $script .= PHP_EOL . Indent::_(1) . '}'; + + return $script; + } + + /** + * build flight methods + * + * @param string $name the method being called + * + * @return string + * @since 3.2.0 + */ + protected function flight(string $name): string + { + // the pre/post function types + $script = PHP_EOL . PHP_EOL . Indent::_(1) . '/**'; + $script .= PHP_EOL . Indent::_(1) + . ' * Called before any type of action'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) + . ' * @param string $route Which action is happening (install|uninstall|discover_install|update)'; + $script .= PHP_EOL . Indent::_(1) + . ' * @param InstallerAdapter $adapter The object responsible for running this script'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) + . ' * @return boolean True on success'; + $script .= PHP_EOL . Indent::_(1) . ' */'; + $script .= PHP_EOL . Indent::_(1) . 'public function ' + . $name . '($route, $adapter)'; + $script .= PHP_EOL . Indent::_(1) . '{'; + $script .= PHP_EOL . Indent::_(2) . '//' . Line::_(__Line__, __Class__) + . ' set application to local method var, just use $this->app in future [we will drop $app in J6]'; + $script .= PHP_EOL . Indent::_(2) + . '$app = $this->app;' . PHP_EOL; + + // add the default version check (TODO) must make this dynamic + if ('preflight' === $name) + { + $script .= PHP_EOL . Indent::_(2) . '//' . Line::_(__Line__, __Class__) + .' the default for both install and update'; + $script .= PHP_EOL . Indent::_(2) + . '$jversion = new Version();'; + $script .= PHP_EOL . Indent::_(2) + . "if (!\$jversion->isCompatible('5.0.0'))"; + $script .= PHP_EOL . Indent::_(2) . '{'; + $script .= PHP_EOL . Indent::_(3) + . "\$app->enqueueMessage('Please upgrade to at least Joomla! 5.0.0 before continuing!', 'error');"; + $script .= PHP_EOL . Indent::_(3) . 'return false;'; + $script .= PHP_EOL . Indent::_(2) . '}' . PHP_EOL; + } + + if (!empty($this->{$name . 'Active'})) + { + // now add the scripts + foreach ($this->{$name . 'Bucket'} as $route => $_script) + { + if (ArrayHelper::check($_script) && $route !== 'bottom') + { + // set the if and script + $script .= PHP_EOL . Indent::_(2) . "if ('" . $route + . "' === \$route)"; + $script .= PHP_EOL . Indent::_(2) . '{'; + $script .= PHP_EOL . implode( + PHP_EOL . PHP_EOL, $_script + ); + $script .= PHP_EOL . Indent::_(2) . '}' . PHP_EOL; + } + } + } + + if (isset($this->{$name . 'Bucket'}['bottom']) && ArrayHelper::check($this->{$name . 'Bucket'}['bottom'])) + { + $script .= PHP_EOL . implode( + PHP_EOL , $this->{$name . 'Bucket'}['bottom'] + ) . PHP_EOL; + } + + // return true + $script .= PHP_EOL . Indent::_(2) . 'return true;'; + // close the function + $script .= PHP_EOL . Indent::_(1) . '}'; + + return $script; + } + + /** + * build remove files methods + * + * @return string + * @since 5.0.2 + */ + protected function removeFiles(): string + { + $script = PHP_EOL . PHP_EOL . Indent::_(1) . '/**'; + $script .= PHP_EOL . Indent::_(1) . ' * Remove the files and folders in the given array from'; + $script .= PHP_EOL . Indent::_(1) . ' *'; + $script .= PHP_EOL . Indent::_(1) . ' * @return void'; + $script .= PHP_EOL . Indent::_(1) . ' * @since 5.0.2'; + $script .= PHP_EOL . Indent::_(1) . ' */'; + $script .= PHP_EOL . Indent::_(1) . 'protected function removeFiles()'; + $script .= PHP_EOL . Indent::_(1) . '{'; + $script .= PHP_EOL . Indent::_(2) . 'if (!empty($this->deleteFiles))'; + $script .= PHP_EOL . Indent::_(2) . '{'; + $script .= PHP_EOL . Indent::_(3) . 'foreach ($this->deleteFiles as $file)'; + $script .= PHP_EOL . Indent::_(3) . '{'; + $script .= PHP_EOL . Indent::_(4) . 'if (is_file(JPATH_ROOT . $file) && !File::delete(JPATH_ROOT . $file))'; + $script .= PHP_EOL . Indent::_(4) . '{'; + $script .= PHP_EOL . Indent::_(5) . 'echo Text::sprintf(\'JLIB_INSTALLER_ERROR_FILE_FOLDER\', $file) . \'
\';'; + $script .= PHP_EOL . Indent::_(4) . '}'; + $script .= PHP_EOL . Indent::_(3) . '}'; + $script .= PHP_EOL . Indent::_(2) . '}'; + $script .= PHP_EOL . PHP_EOL . Indent::_(2) . 'if (!empty($this->deleteFolders))'; + $script .= PHP_EOL . Indent::_(2) . '{'; + $script .= PHP_EOL . Indent::_(3) . 'foreach ($this->deleteFolders as $folder)'; + $script .= PHP_EOL . Indent::_(3) . '{'; + $script .= PHP_EOL . Indent::_(4) . 'if (is_dir(JPATH_ROOT . $folder) && !Folder::delete(JPATH_ROOT . $folder))'; + $script .= PHP_EOL . Indent::_(4) . '{'; + $script .= PHP_EOL . Indent::_(5) . 'echo Text::sprintf(\'JLIB_INSTALLER_ERROR_FILE_FOLDER\', $folder) . \'
\';'; + $script .= PHP_EOL . Indent::_(4) . '}'; + $script .= PHP_EOL . Indent::_(3) . '}'; + $script .= PHP_EOL . Indent::_(2) . '}'; + $script .= PHP_EOL . Indent::_(1) . '}'; + + return $script; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaSix/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreField.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreField.php new file mode 100644 index 000000000..07fda62f5 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreField.php @@ -0,0 +1,129 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaSix; + + +use Joomla\Filesystem\Folder; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreFieldInterface; + + +/** + * Core Joomla 6 Fields + * + * @since 5.1.2 + */ +final class CoreField implements CoreFieldInterface +{ + /** + * Local Core Joomla Fields + * + * @var array|null + * @since 3.2.0 + **/ + protected array $fields = []; + + /** + * Local Core Joomla Fields Path + * + * @var array + * @since 3.2.0 + **/ + protected array $paths = []; + + /** + * Constructor + * + * @since 3.2.0 + */ + public function __construct() + { + // set the path to the form validation fields + $this->paths[] = JPATH_LIBRARIES . '/src/Form/Field'; + } + + /** + * Get the Array of Existing Validation Field Names + * + * @param bool $lowercase Switch to set fields lowercase + * + * @return array + * @since 3.2.0 + */ + public function get(bool $lowercase = false): array + { + if ($this->fields === []) + { + // check if the path exist + foreach ($this->paths as $path) + { + $this->set($path); + } + } + + // return fields if found + if ($this->fields !== []) + { + // check if the names should be all lowercase + if ($lowercase) + { + return array_map( + fn($item): string => strtolower((string) $item), + $this->fields + ); + } + + return $this->fields; + } + + // return empty array + return []; + } + + /** + * Set the fields found in a path + * + * @param string $path The path to load fields from + * @return void + * @since 3.2.0 + */ + private function set(string $path): void + { + // Check if the path exists + if (!is_dir($path)) + { + return; + } + + // Load all PHP files in this path + $fields = Folder::files($path, '\.php$', true, true); + + // Process the files to extract field names + $processedFields = array_map(function ($name) { + $fileName = basename($name); + + // Remove 'Field.php' if it exists or just '.php' otherwise + if (substr($fileName, -9) === 'Field.php') + { + return str_replace('Field.php', '', $fileName); + } + else + { + return str_replace('.php', '', $fileName); + } + }, $fields); + + // Merge with existing fields and remove duplicates + $this->fields = array_unique(array_merge($processedFields, $this->fields)); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreRule.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreRule.php new file mode 100644 index 000000000..ef2d127b4 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/CoreRule.php @@ -0,0 +1,125 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaSix; + + +use Joomla\Filesystem\Folder; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreRuleInterface; + + +/** + * Core Joomla 6 Field Rules + * + * @since 5.1.2 + */ +final class CoreRule implements CoreRuleInterface +{ + /** + * Local Core Joomla Rules + * + * @var array + * @since 3.2.0 + **/ + protected array $rules = []; + + /** + * Local Core Joomla Rules Path + * + * @var string + * @since 3.2.0 + **/ + protected string $path; + + /** + * Constructor + * + * @since 3.2.0 + */ + public function __construct() + { + // set the path to the form validation rules + $this->path = JPATH_LIBRARIES . '/src/Form/Rule'; + } + + /** + * Get the Array of Existing Validation Rule Names + * + * @param bool $lowercase Switch to set rules lowercase + * + * @return array + * @since 3.2.0 + */ + public function get(bool $lowercase = false): array + { + if ($this->rules === []) + { + $this->set($this->path); + } + + // return rules if found + if ($this->rules !== []) + { + // check if the names should be all lowercase + if ($lowercase) + { + return array_map( + fn($item): string => strtolower((string) $item), + $this->rules + ); + } + + return $this->rules; + } + + // return empty array + return []; + } + + /** + * Set the rules found in a path + * + * @param string $path The path to load rules from + * @return void + * @since 3.2.0 + */ + private function set(string $path): void + { + // Check if the path exists + if (!is_dir($path)) + { + return; + } + + // Load all PHP files in this path + $rules = Folder::files($path, '\.php$', true, true); + + // Process the files to extract rule names + $processedRules = array_map(function ($name) { + $fileName = basename($name); + + // Remove 'Rule.php' if it exists or just '.php' otherwise + if (substr($fileName, -8) === 'Rule.php') + { + return str_replace('Rule.php', '', $fileName); + } + else + { + return str_replace('.php', '', $fileName); + } + }, $rules); + + // Merge with existing rules and remove duplicates + $this->rules = array_unique(array_merge($processedRules, $this->rules)); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/InputButton.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/InputButton.php new file mode 100644 index 000000000..f72f39109 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/InputButton.php @@ -0,0 +1,349 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\InputButtonInterface; + + +/** + * Joomla 6 Compiler Field Input Button + * + * @since 5.1.2 + */ +final class InputButton implements InputButtonInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * The Permission Class. + * + * @var Permission + * @since 3.2.0 + */ + protected Permission $permission; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param Permission $permission The Permission Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, Placeholder $placeholder, + Permission $permission) + { + $this->config = $config; + $this->placeholder = $placeholder; + $this->permission = $permission; + } + + /** + * get Add Button To List Field Input (getInput tweak) + * + * @param array $fieldData The field custom data + * + * @return string of getInput class on success empty string otherwise + * @since 3.2.0 + */ + public function get(array $fieldData): string + { + // make sure hte view values are set + if (isset($fieldData['add_button']) + && ($fieldData['add_button'] === 'true' + || 1 == $fieldData['add_button']) + && isset($fieldData['view']) + && isset($fieldData['views']) + && StringHelper::check($fieldData['view']) + && StringHelper::check($fieldData['views'])) + { + // set local component + $local_component = "com_" . $this->config->component_code_name; + // check that the component value is set + if (!isset($fieldData['component']) + || !StringHelper::check( + $fieldData['component'] + )) + { + $fieldData['component'] = $local_component; + } + // check that the component has the com_ value in it + if (strpos((string) $fieldData['component'], 'com_') === false + || strpos((string) $fieldData['component'], '=') !== false) + { + $fieldData['component'] = "com_" . $fieldData['component']; + } + // make sure the component is update if # # # or [ [ [ component placeholder is used + if (strpos((string) $fieldData['component'], (string) Placefix::h()) !== false + || strpos((string) $fieldData['component'], (string) Placefix::b()) !== false) // should not be needed... but + { + $fieldData['component'] = $this->placeholder->update_( + $fieldData['component'] + ); + } + // get core permissions + $coreLoad = false; + // add ref tags + $refLoad = true; + // fall back on the field component + $component = $fieldData['component']; + // check if we should add ref tags (since it only works well on local views) + if ($local_component !== $component) + { + // do not add ref tags + $refLoad = false; + } + // start building the add buttons/s + $addButton = array(); + $addButton[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**"; + $addButton[] = Indent::_(1) . " * Override to add new button"; + $addButton[] = Indent::_(1) . " *"; + $addButton[] = Indent::_(1) + . " * @return string The field input markup."; + $addButton[] = Indent::_(1) . " *"; + $addButton[] = Indent::_(1) . " * @since 3.2"; + $addButton[] = Indent::_(1) . " */"; + $addButton[] = Indent::_(1) . "protected function getInput()"; + $addButton[] = Indent::_(1) . "{"; + $addButton[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " see if we should add buttons"; + $addButton[] = Indent::_(2) + . "\$set_button = \$this->getAttribute('button');"; + $addButton[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " get html"; + $addButton[] = Indent::_(2) . "\$html = parent::getInput();"; + $addButton[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " if true set button"; + $addButton[] = Indent::_(2) . "if (\$set_button === 'true')"; + $addButton[] = Indent::_(2) . "{"; + $addButton[] = Indent::_(3) . "\$button = array();"; + $addButton[] = Indent::_(3) . "\$script = array();"; + $addButton[] = Indent::_(3) + . "\$button_code_name = \$this->getAttribute('name');"; + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " get the input from url"; + $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();"; + $addButton[] = Indent::_(3) . "\$jinput = method_exists(\$app, 'getInput') ? \$app->getInput() : \$app->input;"; + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " get the view name & id"; + $addButton[] = Indent::_(3) + . "\$values = \$jinput->getArray(array("; + $addButton[] = Indent::_(4) . "'id' => 'int',"; + $addButton[] = Indent::_(4) . "'view' => 'word'"; + $addButton[] = Indent::_(3) . "));"; + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " check if new item"; + $addButton[] = Indent::_(3) . "\$ref = '';"; + $addButton[] = Indent::_(3) . "\$refJ = '';"; + if ($refLoad) + { + $addButton[] = Indent::_(3) + . "if (!is_null(\$values['id']) && strlen(\$values['view']))"; + $addButton[] = Indent::_(3) . "{"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " only load referral if not new item."; + $addButton[] = Indent::_(4) + . "\$ref = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; + $addButton[] = Indent::_(4) + . "\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " get the return value."; + $addButton[] = Indent::_(4) + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; + $addButton[] = Indent::_(4) + . "\$_return = urlencode(base64_encode(\$_uri));"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " load return value."; + $addButton[] = Indent::_(4) + . "\$ref .= '&return=' . \$_return;"; + $addButton[] = Indent::_(4) + . "\$refJ .= '&return=' . \$_return;"; + $addButton[] = Indent::_(3) . "}"; + } + else + { + $addButton[] = Indent::_(3) + . "if (!is_null(\$values['id']) && strlen(\$values['view']))"; + $addButton[] = Indent::_(3) . "{"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " only load field details if not new item."; + $addButton[] = Indent::_(4) + . "\$ref = '&field=' . \$values['view'] . '&field_id=' . \$values['id'];"; + $addButton[] = Indent::_(4) + . "\$refJ = '&field=' . \$values['view'] . '&field_id=' . \$values['id'];"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " get the return value."; + $addButton[] = Indent::_(4) + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; + $addButton[] = Indent::_(4) + . "\$_return = urlencode(base64_encode(\$_uri));"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " load return value."; + $addButton[] = Indent::_(4) + . "\$ref = '&return=' . \$_return;"; + $addButton[] = Indent::_(4) + . "\$refJ = '&return=' . \$_return;"; + $addButton[] = Indent::_(3) . "}"; + } + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " get button label"; + $addButton[] = Indent::_(3) + . "\$button_label = trim(\$button_code_name);"; + $addButton[] = Indent::_(3) + . "\$button_label = preg_replace('/_+/', ' ', \$button_label);"; + $addButton[] = Indent::_(3) + . "\$button_label = preg_replace('/\s+/', ' ', \$button_label);"; + $addButton[] = Indent::_(3) + . "\$button_label = preg_replace(\"/[^A-Za-z ]/\", '', \$button_label);"; + $addButton[] = Indent::_(3) + . "\$button_label = ucfirst(strtolower(\$button_label));"; + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " get user object"; + $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();"; + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " only add if user allowed to create " . $fieldData['view']; + // check if the item has permissions. + $addButton[] = Indent::_(3) . "if (\$user->authorise('" + . $this->permission->getGlobal($fieldData['view'], 'core.create') + . "', '" . $component . "') && \$app->isClient('administrator')) // TODO for now only in admin area."; + $addButton[] = Indent::_(3) . "{"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " build Create button"; + $addButton[] = Indent::_(4) + . "\$button[] = 'config->lang_prefix + . "_CREATE_NEW_S', \$button_label).'\" style=\"border-radius: 0px 4px 4px 0px;\""; + $addButton[] = Indent::_(5) . "href=\"index.php?option=" + . $fieldData['component'] . "&view=" . $fieldData['view'] + . "&layout=edit'.\$ref.'\" >"; + $addButton[] = Indent::_(5) + . "';"; + $addButton[] = Indent::_(3) . "}"; + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " only add if user allowed to edit " . $fieldData['view']; + // check if the item has permissions. + $addButton[] = Indent::_(3) . "if (\$user->authorise('" + . $this->permission->getGlobal($fieldData['view'], 'core.edit') + . "', '" . $component . "') && \$app->isClient('administrator')) // TODO for now only in admin area."; + $addButton[] = Indent::_(3) . "{"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " build edit button"; + $addButton[] = Indent::_(4) + . "\$button[] = 'config->lang_prefix + . "_EDIT_S', \$button_label).'\" style=\"display: none; border-radius: 0px 4px 4px 0px;\" href=\"#\" >"; + $addButton[] = Indent::_(5) + . "';"; + + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " build script"; +$addButton[] = Indent::_(4) . "\$script[] = \""; + $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; + $addButton[] = Indent::_(6) + . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');"; + $addButton[] = Indent::_(6) + . "if (!\".\$button_code_name.\"Field) { return; }"; + $addButton[] = Indent::_(6) + . "\".\$button_code_name.\"Field.addEventListener('change', function(e) {"; + $addButton[] = Indent::_(7) . "e.preventDefault();"; + $addButton[] = Indent::_(7) + . "let \".\$button_code_name.\"Value = this.value;"; + $addButton[] = Indent::_(7) + . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; + $addButton[] = Indent::_(6) . "});"; + $addButton[] = Indent::_(6) + . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;"; + $addButton[] = Indent::_(6) + . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; + $addButton[] = Indent::_(5) . "});"; + $addButton[] = Indent::_(5) + . "function \".\$button_code_name.\"Button(value) {"; + $addButton[] = Indent::_(6) + . "var createButton = document.getElementById('\".\$button_code_name.\"Create');"; + $addButton[] = Indent::_(6) + . "var editButton = document.getElementById('\".\$button_code_name.\"Edit');"; + $addButton[] = Indent::_(6) + . "if (value > 0) {"; // TODO not ideal since value may not be an (int) + $addButton[] = Indent::_(7) . "// hide the create button"; + $addButton[] = Indent::_(7) + . "createButton.style.display = 'none';"; + $addButton[] = Indent::_(7) . "// show edit button"; + $addButton[] = Indent::_(7) + . "editButton.style.display = 'block';"; + $addButton[] = Indent::_(7) . "let url = 'index.php?option=" + . $fieldData['component'] . "&view=" . $fieldData['views'] + . "&task=" . $fieldData['view'] + . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID + $addButton[] = Indent::_(7) + . "editButton.setAttribute('href', url);"; + $addButton[] = Indent::_(6) . "} else {"; + $addButton[] = Indent::_(7) . "// show the create button"; + $addButton[] = Indent::_(7) + . "createButton.style.display = 'block';"; + $addButton[] = Indent::_(7) . "// hide edit button"; + $addButton[] = Indent::_(7) + . "editButton.style.display = 'none';"; + $addButton[] = Indent::_(6) . "}"; + $addButton[] = Indent::_(5) . "}\";"; + + $addButton[] = Indent::_(3) . "}"; + $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " check if button was created for " . $fieldData['view'] + . " field."; + $addButton[] = Indent::_(3) + . "if (is_array(\$button) && count(\$button) > 0)"; + $addButton[] = Indent::_(3) . "{"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " Load the needed script."; + $addButton[] = Indent::_(4) + . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();"; + $addButton[] = Indent::_(4) + . "\$document->addScriptDeclaration(implode(' ',\$script));"; + $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) + . " return the button attached to input field."; + $addButton[] = Indent::_(4) + . "return '
' .\$html . implode('',\$button).'
';"; + $addButton[] = Indent::_(3) . "}"; + $addButton[] = Indent::_(2) . "}"; + $addButton[] = Indent::_(2) . "return \$html;"; + $addButton[] = Indent::_(1) . "}"; + + return implode(PHP_EOL, $addButton); + } + + return ''; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaSix/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Event.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Event.php new file mode 100644 index 000000000..8344ae999 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Event.php @@ -0,0 +1,108 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaSix; + + +use Joomla\CMS\Factory; +use Joomla\CMS\Plugin\PluginHelper; +use Joomla\Event\DispatcherInterface; +use Joomla\Registry\Registry; +use VDM\Joomla\Utilities\Component\Helper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; + + +/** + * Compiler Events + * + * @since 5.1.2 + */ +class Event implements EventInterface +{ + /** + * event plug-in trigger switch + * + * @var boolean + * @since 3.2.0 + */ + protected $activePlugins = false; + + /** + * The dispatcher to get events + * + * @since 5.0.2 + */ + protected $dispatcher; + + /** + * Constructor + * + * @param Registry|null $params The component parameters + * + * @since 3.2.0 + */ + public function __construct(?Registry $params = null) + { + // Set the params + $params = $params ?: Helper::getParams('com_componentbuilder'); + // get active plugins + if (($plugins = $params->get('compiler_plugin', false)) + !== false) + { + foreach ($plugins as $plugin) + { + // get possible plugins + if (PluginHelper::isEnabled('extension', $plugin)) + { + // Import the appropriate plugin group. + PluginHelper::importPlugin('extension', $plugin); + // activate events + $this->activePlugins = true; + } + } + } + + $this->dispatcher = Factory::getContainer()->get(DispatcherInterface::class); + } + + /** + * Trigger an event + * + * @param string $event The event to trigger + * @param mixed $data The values to pass to the event/plugin + * + * @return void + * @throws \Exception + * @since 3.2.0 + */ + public function trigger(string $event, $data = null) + { + // only execute if plugins were loaded (active) + if ($this->activePlugins) + { + try + { + $data ??= []; + $listeners = $this->dispatcher->getListeners($event); + foreach ($listeners as $listener) + { + // Call the listener with the unpacked arguments + $listener(...$data); + } + } + catch (\Exception $e) + { + throw new \Exception("Error processing event '$event': " . $e->getMessage()); + } + } + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Header.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Header.php new file mode 100644 index 000000000..41032b8d4 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/Header.php @@ -0,0 +1,651 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Language; +use VDM\Joomla\Componentbuilder\Compiler\Builder\UikitComp; +use VDM\Joomla\Componentbuilder\Compiler\Builder\AdminFilterType; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Category; +use VDM\Joomla\Componentbuilder\Compiler\Builder\AccessSwitchList; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Filter; +use VDM\Joomla\Componentbuilder\Compiler\Builder\Tags; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface; + + +/** + * Build headers for all Joomla 6 files + * + * @since 5.1.2 + */ +final class Header implements HeaderInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The EventInterface Class. + * + * @var Event + * @since 3.2.0 + */ + protected Event $event; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * The Language Class. + * + * @var Language + * @since 3.2.0 + */ + protected Language $language; + + /** + * The UikitComp Class. + * + * @var UikitComp + * @since 3.2.0 + */ + protected UikitComp $uikitcomp; + + /** + * The AdminFilterType Class. + * + * @var AdminFilterType + * @since 3.2.0 + */ + protected AdminFilterType $adminfiltertype; + + /** + * The Category Class. + * + * @var Category + * @since 3.2.0 + */ + protected Category $category; + + /** + * The AccessSwitchList Class. + * + * @var AccessSwitchList + * @since 3.2.0 + */ + protected AccessSwitchList $accessswitchlist; + + /** + * The Filter Class. + * + * @var Filter + * @since 3.2.0 + */ + protected Filter $filter; + + /** + * The Tags Class. + * + * @var Tags + * @since 3.2.0 + */ + protected Tags $tags; + + /** + * The Header Context array + * + * @var array + * @since 3.2.0 + */ + protected array $headers = []; + + /** + * List of disallowed context strings. + * + * @var array + * @since 5.1.2 + */ + protected array $disallowedContexts = [ + 'admin.helper', + 'site.helper', + 'plugin.extension.header', + 'plugin.provider.header', + 'module.provider.header', + 'module.dispatcher.header', + 'module.dynamicgets.header', + 'module.helper.header', + 'module.default.template.header', + 'module.extra.template.header', + ]; + + /** + * The Namespace Prefix + * + * @var string + * @since 3.2.0 + */ + protected string $NamespacePrefix; + + /** + * The Component Name (in code) + * + * @var string + * @since 3.2.0 + */ + protected string $ComponentName; + + /** + * The Component Namespace (in code) + * + * @var string + * @since 3.2.0 + */ + protected string $ComponentNamespace; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Event $event The EventInterface Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param Language $language The Language Class. + * @param UikitComp $uikitcomp The UikitComp Class. + * @param AdminFilterType $adminfiltertype The AdminFilterType Class. + * @param Category $category The Category Class. + * @param AccessSwitchList $accessswitchlist The AccessSwitchList Class. + * @param Filter $filter The Filter Class. + * @param Tags $tags The Tags Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, Event $event, Placeholder $placeholder, + Language $language, UikitComp $uikitcomp, + AdminFilterType $adminfiltertype, Category $category, + AccessSwitchList $accessswitchlist, Filter $filter, + Tags $tags) + { + $this->config = $config; + $this->event = $event; + $this->placeholder = $placeholder; + $this->language = $language; + $this->uikitcomp = $uikitcomp; + $this->adminfiltertype = $adminfiltertype; + $this->category = $category; + $this->accessswitchlist = $accessswitchlist; + $this->filter = $filter; + $this->tags = $tags; + + // set some global values + $this->NamespacePrefix = $this->placeholder->get('NamespacePrefix'); + $this->ComponentName = $this->placeholder->get('Component'); + $this->ComponentNamespace = $this->placeholder->get('ComponentNamespace'); + } + + /** + * Get the headers for a file + * + * @param string $context The name of the context + * @param string $codeName The view, views, or layout code name + * + * @return string The header string to place in the header of the file + * @since 3.2.0 + */ + public function get(string $context, string $codeName): string + { + // get static headers + $headers = $this->getHeaders($context); + + // add to all except the helper classes + if ($this->isAllowedContext($context)) + { + $target = 'Administrator'; + if ($this->config->get('build_target', 'admin') === 'site') + { + $target = 'Site'; + } + + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\{$target}\\Helper\\{$this->ComponentName}Helper;"; + + // we will add more as needed + switch ($context) + { + case 'site.view.model': + case 'site.views.model': + case 'site.view.html': + case 'site.views.html': + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Site\\Helper\\RouteHelper;"; + break; + + default: + break; + } + } + + // get dynamic headers + switch ($context) + { + case 'admin.view.html': + case 'admin.views.html': + case 'custom.admin.view.html': + case 'custom.admin.views.html': + case 'site.admin.view.html': + case 'site.view.html': + case 'site.views.html': + if ((2 == $this->config->uikit || 1 == $this->config->uikit) + && $this->uikitcomp->exists($codeName)) + { + $headers[] = 'use Joomla\Filesystem\File;'; + } + break; + + case 'admin.view': + case 'custom.admin.view': + case 'custom.admin.views': + case 'site.admin.view': + $headers[] = ''; + $headers[] = '/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */'; + $headers[] = '$wa = $this->getDocument()->getWebAssetManager();'; + $headers[] = '$wa->useScript(\'keepalive\')->useScript(\'form.validate\');'; + $headers[] = 'Html::_(\'bootstrap.tooltip\');'; + break; + + case 'admin.view.model': + case 'site.admin.view.model': + case 'custom.admin.view.model': + case 'site.view.model': + case 'admin.views.model': + case 'site.views.model': + $headers[] = 'use Joomla\CMS\Helper\TagsHelper;'; + break; + + case 'plugin.provider.header': + $headers[] = "use {$this->NamespacePrefix}\\Plugin\\[[[PluginGroupNamespace]]]\\[[[PluginNamespace]]]\\Extension\\{$codeName};"; + break; + + default: + break; + } + + // Trigger Event: jcb_ce_setClassHeader + $this->event->trigger( + 'jcb_ce_setClassHeader', [&$context, &$codeName, &$headers] + ); + + // return the headers + return $this->placeholder->update_(implode(PHP_EOL, $headers)); + } + + /** + * Get the headers for a file + * + * @param string $context The name of the context + * + * @return array The header string to place in the header of the file + * @since 3.2.0 + */ + protected function getHeaders(string $context): array + { + if (isset($this->headers[$context])) + { + return $this->headers[$context]; + } + + // set the defaults + $headers = []; + $headers[] = 'use Joomla\CMS\Factory;'; + $headers[] = 'use Joomla\CMS\Language\Text;'; + + switch ($context) + { + case 'admin.component': + $headers[] = 'use Joomla\CMS\Access\Exception\NotAllowed;'; + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\MVC\Controller\BaseController;'; + break; + + case 'admin.helper': + case 'site.helper': + $headers[] = 'use Joomla\CMS\Access\Access;'; + $headers[] = 'use Joomla\CMS\Access\Rules as AccessRules;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\Filesystem\File;'; + $headers[] = 'use Joomla\CMS\Language\Language;'; + $headers[] = 'use Joomla\CMS\MVC\Model\BaseDatabaseModel;'; + $headers[] = 'use Joomla\CMS\Object\CMSObject;'; + $headers[] = 'use Joomla\CMS\Session\Session;'; + $headers[] = 'use Joomla\CMS\Table\Table;'; + $headers[] = 'use Joomla\CMS\Uri\Uri;'; + $headers[] = 'use Joomla\CMS\Version;'; + $headers[] = 'use Joomla\Database\DatabaseInterface;'; + $headers[] = 'use Joomla\Registry\Registry;'; + $headers[] = 'use Joomla\String\StringHelper;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + break; + + case 'admin.layout': + case 'site.layout': + case 'custom.admin.layout': + case 'override.layout': + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Layout\LayoutHelper;'; + break; + + case 'admin.view': + case 'custom.admin.view': + case 'custom.admin.views': + case 'site.admin.view': + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Layout\LayoutHelper;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + break; + + case 'admin.view.controller': + $headers[] = 'use Joomla\CMS\Form\FormFactoryInterface;'; + $headers[] = 'use Joomla\CMS\Application\CMSApplication;'; + $headers[] = 'use Joomla\CMS\MVC\Factory\MVCFactoryInterface;'; + $headers[] = 'use Joomla\Input\Input;'; + case 'site.admin.view.controller': + $headers[] = 'use Joomla\CMS\Versioning\VersionableControllerTrait;'; + case 'site.view.controller': + $headers[] = 'use Joomla\CMS\MVC\Controller\FormController;'; + $headers[] = 'use Joomla\CMS\MVC\Model\BaseDatabaseModel;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + $headers[] = 'use Joomla\CMS\Session\Session;'; + $headers[] = 'use Joomla\CMS\Uri\Uri;'; + break; + + case 'admin.view.html': + case 'admin.views.html': + case 'site.admin.view.html': + $headers[] = 'use Joomla\CMS\Toolbar\Toolbar;'; + $headers[] = 'use Joomla\CMS\Form\FormHelper;'; + $headers[] = 'use Joomla\CMS\Session\Session;'; + $headers[] = 'use Joomla\CMS\Uri\Uri;'; + $headers[] = 'use Joomla\CMS\User\User;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Layout\FileLayout;'; + $headers[] = 'use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;'; + $headers[] = 'use Joomla\CMS\Plugin\PluginHelper;'; + $headers[] = 'use Joomla\CMS\Toolbar\ToolbarHelper;'; + $headers[] = 'use Joomla\CMS\Document\Document;'; + break; + + case 'site.view.html': + case 'site.views.html': + $headers[] = 'use Joomla\CMS\Toolbar\Toolbar;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Layout\FileLayout;'; + $headers[] = 'use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;'; + $headers[] = 'use Joomla\CMS\Plugin\PluginHelper;'; + $headers[] = 'use Joomla\CMS\Toolbar\ToolbarHelper;'; + $headers[] = 'use Joomla\CMS\Document\Document;'; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Site\\Helper\\HeaderCheck;"; + break; + + case 'custom.admin.view.html': + case 'custom.admin.views.html': + $target = 'Administrator'; + if ($this->config->get('build_target', 'admin') === 'site') + { + $target = 'Site'; + } + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Layout\FileLayout;'; + $headers[] = 'use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;'; + $headers[] = 'use Joomla\CMS\Plugin\PluginHelper;'; + $headers[] = 'use Joomla\CMS\Toolbar\ToolbarHelper;'; + $headers[] = 'use Joomla\CMS\User\User;'; + $headers[] = 'use Joomla\CMS\Document\Document;'; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\{$target}\\Helper\\HeaderCheck;"; + break; + + case 'admin.view.model': + case 'site.admin.view.model': + $headers[] = 'use Joomla\CMS\Application\CMSApplicationInterface;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\Form\Form;'; + $headers[] = 'use Joomla\CMS\Filter\InputFilter;'; + $headers[] = 'use Joomla\CMS\Filter\OutputFilter;'; + $headers[] = 'use Joomla\CMS\MVC\Model\AdminModel;'; + $headers[] = 'use Joomla\CMS\MVC\Factory\MVCFactoryInterface;'; + $headers[] = 'use Joomla\CMS\Table\Table;'; + $headers[] = 'use Joomla\CMS\UCM\UCMType;'; + $headers[] = 'use Joomla\CMS\Versioning\VersionableModelTrait;'; + $headers[] = 'use Joomla\CMS\User\User;'; + $headers[] = 'use Joomla\Registry\Registry;'; + $headers[] = 'use Joomla\String\StringHelper;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + $headers[] = 'use Joomla\Input\Input;'; + break; + + case 'admin.views.modal': + $headers[] = 'use Joomla\CMS\Session\Session;'; + case 'admin.views': + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Layout\LayoutHelper;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + break; + + case 'admin.views.controller': + case 'custom.admin.views.controller': + case 'dashboard.controller': + $headers[] = 'use Joomla\CMS\MVC\Controller\AdminController;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + $headers[] = 'use Joomla\CMS\Session\Session;'; + break; + + case 'ajax.admin.model': + case 'ajax.site.model': + $headers[] = 'use Joomla\CMS\Application\CMSApplicationInterface;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Layout\LayoutHelper;'; + $headers[] = 'use Joomla\CMS\MVC\Model\ListModel;'; + $headers[] = 'use Joomla\CMS\MVC\Factory\MVCFactoryInterface;'; + $headers[] = 'use Joomla\CMS\Plugin\PluginHelper;'; + $headers[] = 'use Joomla\CMS\User\User;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + $headers[] = 'use Joomla\Input\Input;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + $headers[] = 'use Joomla\CMS\Session\Session;'; + $headers[] = 'use Joomla\CMS\Uri\Uri;'; + $headers[] = 'use Joomla\Registry\Registry;'; + break; + + case 'dashboard.model': + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Session\Session;'; + $headers[] = 'use Joomla\CMS\Uri\Uri;'; + case 'admin.views.model': + case 'custom.admin.views.model': + case 'site.views.model': + $headers[] = 'use Joomla\CMS\Application\CMSApplicationInterface;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\MVC\Model\ListModel;'; + $headers[] = 'use Joomla\CMS\MVC\Factory\MVCFactoryInterface;'; + $headers[] = 'use Joomla\CMS\Plugin\PluginHelper;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + $headers[] = 'use Joomla\CMS\User\User;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + $headers[] = 'use Joomla\Input\Input;'; + break; + + case 'custom.admin.view.controller': + case 'import.controller': + case 'import.custom.controller': + $headers[] = 'use Joomla\CMS\MVC\Controller\BaseController;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + $headers[] = 'use Joomla\CMS\Session\Session;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + break; + + case 'custom.admin.view.model': + case 'site.view.model': + $headers[] = 'use Joomla\CMS\Application\CMSApplicationInterface;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\MVC\Model\ItemModel;'; + $headers[] = 'use Joomla\CMS\MVC\Factory\MVCFactoryInterface;'; + $headers[] = 'use Joomla\CMS\Plugin\PluginHelper;'; + $headers[] = 'use Joomla\CMS\Router\Route;'; + $headers[] = 'use Joomla\CMS\Uri\Uri;'; + $headers[] = 'use Joomla\CMS\User\User;'; + $headers[] = 'use Joomla\Input\Input;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + + break; + case 'import.custom.model': + case 'import.model': + $headers[] = 'use Joomla\Filesystem\File;'; + $headers[] = 'use Joomla\Filesystem\Folder;'; + $headers[] = 'use Joomla\Filesystem\Path;'; + $headers[] = 'use Joomla\CMS\Filter\OutputFilter;'; + $headers[] = 'use Joomla\CMS\Installer\InstallerHelper;'; + $headers[] = 'use Joomla\CMS\MVC\Model\BaseDatabaseModel;'; + $headers[] = 'use Joomla\String\StringHelper;'; + $headers[] = 'use Joomla\Utilities\ArrayHelper;'; + $headers[] = 'use PhpOffice\PhpSpreadsheet\IOFactory;'; + break; + + case 'dashboard.view': + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + break; + + case 'dashboard.view.html': + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;'; + $headers[] = 'use Joomla\CMS\Toolbar\ToolbarHelper;'; + $headers[] = 'use Joomla\CMS\Document\Document;'; + break; + + case 'site.router': + $headers[] = 'use Joomla\CMS\Application\SiteApplication;'; + $headers[] = 'use Joomla\CMS\Categories\CategoryFactoryInterface;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\Component\Router\RouterView;'; + $headers[] = 'use Joomla\CMS\Component\Router\RouterViewConfiguration;'; + $headers[] = 'use Joomla\CMS\Component\Router\Rules\MenuRules;'; + $headers[] = 'use Joomla\CMS\Component\Router\Rules\NomenuRules;'; + $headers[] = 'use Joomla\CMS\Component\Router\Rules\StandardRules;'; + $headers[] = 'use Joomla\CMS\Menu\AbstractMenu;'; + $headers[] = 'use Joomla\Database\DatabaseInterface;'; + $headers[] = 'use Joomla\Database\ParameterType;'; + $headers[] = 'use Joomla\Registry\Registry;'; + break; + + case 'site.view': + case 'site.views': + $headers[] = 'use Joomla\CMS\Router\Route;'; + $headers[] = 'use Joomla\CMS\Layout\LayoutHelper;'; + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + break; + + case 'form.custom.field': + $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; + $headers[] = 'use Joomla\CMS\Component\ComponentHelper;'; + $headers[] = 'use Joomla\CMS\Form\Field\###FORM_EXTENDS###;'; + break; + + case 'module.provider.header': + $headers = []; + $headers[] = 'use Joomla\CMS\Extension\Service\Provider\HelperFactory;'; + $headers[] = 'use Joomla\CMS\Extension\Service\Provider\Module;'; + $headers[] = 'use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory;'; + $headers[] = 'use Joomla\DI\ServiceProviderInterface;'; + $headers[] = 'use Joomla\DI\Container;'; + break; + case 'module.dispatcher.header': + $headers = []; + $headers[] = 'use Joomla\CMS\Dispatcher\AbstractModuleDispatcher;'; + $headers[] = 'use Joomla\CMS\Helper\HelperFactoryAwareInterface;'; + $headers[] = 'use Joomla\CMS\Helper\HelperFactoryAwareTrait;'; + break; + case 'module.dynamicgets.header': + $headers = []; + $headers[] = 'use Joomla\CMS\Application\CMSApplicationInterface;'; + $headers[] = 'use Joomla\Database\DatabaseAwareInterface;'; + $headers[] = 'use Joomla\Database\DatabaseAwareTrait;'; + $headers[] = 'use Joomla\Registry\Registry;'; + $headers[] = 'use Joomla\Input\Input;'; + break; + + case 'plugin.extension.header': + $headers = []; + break; + case 'plugin.provider.header': + $headers = []; + $headers[] = 'use Joomla\CMS\Factory;'; + $headers[] = 'use Joomla\CMS\Plugin\PluginHelper;'; + $headers[] = 'use Joomla\CMS\Extension\PluginInterface;'; + $headers[] = 'use Joomla\Event\DispatcherInterface;'; + $headers[] = 'use Joomla\DI\ServiceProviderInterface;'; + $headers[] = 'use Joomla\DI\Container;'; + break; + + case 'api.view.controller': + case 'api.views.controller': + $headers = []; + $headers[] = 'use Joomla\CMS\Factory;'; + $headers[] = 'use Joomla\CMS\MVC\Controller\ApiController;'; + break; + + case 'api.view.json': + case 'api.views.json': + $headers = []; + $headers[] = 'use Joomla\CMS\Factory;'; + $headers[] = 'use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;'; + break; + + default: + break; + } + + $this->headers[$context] = $headers; + + return $headers; + } + + /** + * Determine if the given context is allowed. + * + * Returns true if the context is not in the disallowed list, + * false if the context is disallowed. + * + * @param string $context The context string to evaluate. + * + * @return bool True if allowed, false if disallowed. + * @since 5.1.2 + */ + protected function isAllowedContext(string $context): bool + { + return !in_array($context, $this->disallowedContexts, true); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/History.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/History.php new file mode 100644 index 000000000..484e151f3 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/History.php @@ -0,0 +1,212 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaSix; + + +use Joomla\Database\DatabaseInterface; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface; + + +/** + * Compiler History + * + * @since 5.1.2 + */ +final class History implements HistoryInterface +{ + /** + * History Item Object + * + * @var object|null + * @since 3.2.0 + */ + protected ?object $tmp; + + /** + * Compiler Config + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * Joomla Database Class. + * + * @var DatabaseInterface + * @since 5.1.2 + **/ + protected DatabaseInterface $db; + + /** + * Constructor + * + * @param Config $config The compiler config object. + * @param DatabaseInterface $db The Joomla Database Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, DatabaseInterface $db) + { + $this->config = $config; + $this->db = $db; + } + + /** + * Get Item History object + * + * @param string $type The type of item + * @param int $id The item ID + * + * @return ?object The history + * @since 3.2.0 + */ + public function get(string $type, int $id): ?object + { + // quick class object to store old history object + $this->tmp = null; + // Create a new query object. + $query = $this->db->getQuery(true); + + $query->select('h.*'); + $query->from('#__history AS h'); + $query->where( + $this->db->quoteName('h.item_id') . ' = ' . $this->db->quote('com_componentbuilder.' . $type . '.' . (int) $id) + ); + $query->order('h.save_date DESC'); + $this->db->setQuery($query, 0, 1); + $this->db->execute(); + if ($this->db->getNumRows()) + { + // new version of this item found + // so we need to mark it as the last compiled version + $newActive = $this->db->loadObject(); + // set the new version watch + $this->set($newActive, 1); + } + // Get last compiled verion + $query = $this->db->getQuery(true); + + $query->select('h.*'); + $query->from('#__history AS h'); + $query->where( + $this->db->quoteName('h.item_id') . ' = ' . $this->db->quote('com_componentbuilder.' . $type . '.' . (int) $id) + ); + $query->where('h.keep_forever = 1'); + $query->where('h.version_note LIKE ' . $this->db->quote('%component%')); + // make sure it does not return the active version + if (isset($newActive) && isset($newActive->version_id)) + { + $query->where('h.version_id != ' . (int) $newActive->version_id); + } + $query->order('h.save_date DESC'); + $this->db->setQuery($query); + $this->db->execute(); + if ($this->db->getNumRows()) + { + // the old active version was found + // so we may need to do an SQL update + // and unmark the old compiled version + $oldActives = $this->db->loadObjectList(); + foreach ($oldActives as $oldActive) + { + // remove old version watch + $this->set($oldActive, 0); + } + } + + // return the last used history record or null. + return $this->tmp; + } + + /** + * Set Item History Watch + * + * @param Object $object The history object + * @param int $action The action to take + * 0 = remove watch + * 1 = add watch + * + * @return bool + * @since 3.2.0 + */ + protected function set(object $object, int $action): bool + { + // check the note + if (JsonHelper::check($object->version_note)) + { + $version_note = json_decode((string) $object->version_note, true); + } + else + { + $version_note = array('component' => []); + } + // set watch + switch ($action) + { + case 0: + // remove watch + if (isset($version_note['component']) + && ($key = array_search( + $this->config->component_id, $version_note['component'] + )) !== false) + { + // last version that was used to build/compile + $this->tmp = json_decode((string) $object->version_data); + // remove it from this component + unset($version_note['component'][$key]); + } + else + { + // since it was not found, no need to update anything + return true; + } + break; + case 1: + // add watch + if (!in_array($this->config->component_id, $version_note['component'])) + { + $version_note['component'][] = $this->config->component_id; + } + else + { + // since it is there already, no need to update anything + return true; + } + break; + } + // check if we need to still keep this locked + if (isset($version_note['component']) + && ArrayHelper::check($version_note['component'])) + { + // insure component ids are only added once per item + $version_note['component'] = array_unique( + $version_note['component'] + ); + // we may change this, little risky (but since JCB does not have history notes it should be okay for now) + $object->version_note = json_encode($version_note); + $object->keep_forever = '1'; + } + else + { + $object->version_note = ''; + $object->keep_forever = '0'; + } + + // run the update + return $this->db->updateObject('#__history', $object, 'version_id'); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaSix/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Data.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Data.php new file mode 100644 index 000000000..5a0108878 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Data.php @@ -0,0 +1,1075 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaSix; + + +use Joomla\CMS\Factory; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\Database\DatabaseInterface; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Customcode; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Language; +use VDM\Joomla\Componentbuilder\Compiler\Field; +use VDM\Joomla\Componentbuilder\Compiler\Field\Name as Fieldname; +use VDM\Joomla\Componentbuilder\Compiler\Model\Filesfolders; +use VDM\Joomla\Componentbuilder\Compiler\Model\Libraries; +use VDM\Joomla\Componentbuilder\Compiler\Dynamicget\Data as Dynamicget; +use VDM\Joomla\Componentbuilder\Compiler\Templatelayout\Data as Templatelayout; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\String\ClassfunctionHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\GuidHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\ModuleDataInterface; + + +/** + * Joomla 6 Module Data Class + * + * @since 5.1.2 + */ +final class Data implements ModuleDataInterface +{ + /** + * Compiler Joomla Plugins Data + * + * @var array + * @since 3.2.0 + */ + protected array $data = []; + + /** + * Tracking GUID index + * + * @var array + * @since 5.0.4 + */ + protected array $index = []; + + /** + * The Config Class. + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The Customcode Class. + * + * @var Customcode + * @since 3.2.0 + */ + protected Customcode $customcode; + + /** + * The Gui Class. + * + * @var Gui + * @since 3.2.0 + */ + protected Gui $gui; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * The Language Class. + * + * @var Language + * @since 3.2.0 + */ + protected Language $language; + + /** + * The Field Class. + * + * @var Field + * @since 3.2.0 + */ + protected Field $field; + + /** + * The Name Class. + * + * @var Fieldname + * @since 3.2.0 + */ + protected Fieldname $fieldname; + + /** + * The Filesfolders Class. + * + * @var Filesfolders + * @since 3.2.0 + */ + protected Filesfolders $filesfolders; + + /** + * The Libraries Class. + * + * @var Libraries + * @since 3.2.0 + */ + protected Libraries $libraries; + + /** + * The Data Class. + * + * @var Dynamicget + * @since 3.2.0 + */ + protected Dynamicget $dynamicget; + + /** + * The Data Class. + * + * @var Templatelayout + * @since 3.2.0 + */ + protected Templatelayout $templatelayout; + + /** + * Joomla Database Class. + * + * @var DatabaseInterface + * @since 5.1.2 + **/ + protected DatabaseInterface $db; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Customcode $customcode The Customcode Class. + * @param Gui $gui The Gui Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param Language $language The Language Class. + * @param Field $field The Field Class. + * @param Fieldname $fieldname The Name Class. + * @param Filesfolders $filesfolders The Filesfolders Class. + * @param Libraries $libraries The Libraries Class. + * @param Dynamicget $dynamicget The Data Class. + * @param Templatelayout $templatelayout The Data Class. + * @param DatabaseInterface $db The Joomla Database Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, Customcode $customcode, Gui $gui, + Placeholder $placeholder, Language $language, + Field $field, Fieldname $fieldname, + Filesfolders $filesfolders, Libraries $libraries, + Dynamicget $dynamicget, Templatelayout $templatelayout, + DatabaseInterface $db) + { + $this->config = $config; + $this->customcode = $customcode; + $this->gui = $gui; + $this->placeholder = $placeholder; + $this->language = $language; + $this->field = $field; + $this->fieldname = $fieldname; + $this->filesfolders = $filesfolders; + $this->libraries = $libraries; + $this->dynamicget = $dynamicget; + $this->templatelayout = $templatelayout; + $this->db = $db; + } + + /** + * Get the Joomla Module/s + * + * @param int|string|null $module The module id/guid + * + * @return object|array|null if ID|GUID found it returns object, if no ID|GUID given it returns all set + * @since 3.2.0 + */ + public function get($module = null) + { + if ($module === null && $this->exists()) + { + return $this->data; + } + elseif ($this->exists($module)) + { + $id = $this->index[$module]; + return $this->data[$id]; + } + + return null; + } + + /** + * Check if the Joomla Module/s exists + * + * @param int|string|null $module The module id|guid + * + * @return bool if ID|GUID found it returns true, if no ID|GUID given it returns true if any are set + * @since 3.2.0 + */ + public function exists($module = null): bool + { + if ($module === null) + { + return ArrayHelper::check($this->data); + } + elseif (isset($this->index[$module])) + { + return true; + } + + return $this->set($module); + } + + /** + * Set the module + * + * @param mixed $module The module ID/GUID + * + * @return bool true on success + * @since 5.0.4 + */ + public function set($module): bool + { + if (!GuidHelper::valid($module) && !is_numeric($module)) + { + return false; + } + elseif (isset($this->index[$module])) + { + return true; + } + + if (GuidHelper::valid($module)) + { + $query = $this->getQuery($module, 'guid'); + } + else + { + $query = $this->getQuery($module); + } + + $data = $this->getData($query); + + if ($data !== null) + { + $this->data[$data->id] = $data; + $this->index[$data->id] = $data->id; + $this->index[$data->guid] = $data->id; + + return true; + } + + return false; + } + + /** + * get current plugin data query + * + * @param mixed $value The plugin ID/GUID + * @param string $key The type of value + * + * @return string The plugin data query + * @since 5.0.4 + */ + private function getQuery($value, string $key = 'id') + { + // Create a new query object. + $query = $this->db->getQuery(true); + + $query->select('a.*'); + $query->select( + $this->db->quoteName( + array( + 'f.addfiles', + 'f.addfolders', + 'f.addfilesfullpath', + 'f.addfoldersfullpath', + 'f.addurls', + 'u.version_update', + 'u.id' + ), array( + 'addfiles', + 'addfolders', + 'addfilesfullpath', + 'addfoldersfullpath', + 'addurls', + 'version_update', + 'version_update_id' + ) + ) + ); + // from these tables + $query->from('#__componentbuilder_joomla_module AS a'); + $query->join( + 'LEFT', $this->db->quoteName( + '#__componentbuilder_joomla_module_updates', 'u' + ) . ' ON (' . $this->db->quoteName('a.guid') . ' = ' + . $this->db->quoteName('u.joomla_module') . ')' + ); + $query->join( + 'LEFT', $this->db->quoteName( + '#__componentbuilder_joomla_module_files_folders_urls', 'f' + ) . ' ON (' . $this->db->quoteName('a.guid') . ' = ' + . $this->db->quoteName('f.joomla_module') . ')' + ); + $query->where($this->db->quoteName('a.' . $key) . ' = ' . $this->db->quote($value)); + $query->where($this->db->quoteName('a.published') . ' >= 1'); + + return $query; + } + + /** + * get module data + * + * @param string $query The module query + * + * @return object|null The module data + * @since 5.0.4 + */ + private function getData($query): ?object + { + $this->db->setQuery($query); + $this->db->execute(); + if ($this->db->getNumRows()) + { + // get the module data + $module = $this->db->loadObject(); + $id = $module->id; + + // tweak system to set stuff to the module domain + $_backup_target = $this->config->build_target; + $_backup_lang = $this->config->lang_target; + $_backup_langPrefix = $this->config->lang_prefix; + + // set some keys + $module->target_type = 'M0dUl3'; + $module->key = $module->id . '_' . $module->target_type; + + // update to point to module + $this->config->build_target = $module->key; + $this->config->lang_target = $module->key; + + // set version if not set + if (empty($module->module_version)) + { + $module->module_version = '1.0.0'; + } + + // set target client + if ($module->target == 2) + { + $module->target_client = 'administrator'; + $module->target_client_namespace = 'Administrator'; + } + else + { + // default is site area + $module->target_client = 'site'; + $module->target_client_namespace = 'Site'; + } + + // set GUI mapper + $guiMapper = [ + 'table' => 'joomla_module', + 'id' => (int) $id, + 'type' => 'php' + ]; + + // update the name if it has dynamic values + $module->name = $this->placeholder->update_( + $this->customcode->update($module->name) + ); + + // set safe class function name + $module->code_name = ClassfunctionHelper::safe( + $module->name + ); + + // alias of code name + $module->class_name = ucfirst( + $module->code_name + ); + + // set module namespace + $module->namespace = $module->class_name; + + // set official name + $module->official_name = StringHelper::safe( + $module->name, 'W' + ); + $this->config->set('lang_prefix', 'MOD_' . strtoupper((string) $module->code_name)); + + // set lang prefix + $module->lang_prefix = $this->config->lang_prefix; + + // set module class name + $module->class_helper_name = ucfirst((string) $module->code_name) + . 'Helper'; + $module->class_data_name = ucfirst((string) $module->code_name) + . 'Data'; + + // set module install class name + $module->installer_class_name = 'mod_' . ucfirst( + (string) $module->code_name + ) . 'InstallerScript'; + + // set module folder name + $module->folder_name = 'mod_' . strtolower((string) $module->code_name); + + // set the zip name + $module->zip_name = $module->folder_name . '_v' . str_replace( + '.', '_', (string) $module->module_version + ) . '__J' . $this->config->joomla_version; + + // set module file name + $module->file_name = $module->folder_name; + + // set module context + $module->context = $module->file_name . '.' . $module->id; + + // set official_name lang strings + $this->language->set( + $module->key, $this->config->lang_prefix, $module->official_name + ); + + // set some placeholder for this module + $this->placeholder->set('Module_name', $module->official_name); + $this->placeholder->set('Module', ucfirst( + (string) $module->code_name + )); + $this->placeholder->set('module', strtolower( + (string) $module->code_name + )); + $this->placeholder->set('module.version', $module->module_version); + $this->placeholder->set('module_version', str_replace( + '.', '_', (string) $module->module_version + )); + // set description (TODO) add description field to module + if (!isset($module->description) + || !StringHelper::check( + $module->description + )) + { + $module->description = ''; + } + else + { + $module->description = $this->placeholder->update_( + $this->customcode->update($module->description) + ); + $this->language->set( + $module->key, $module->lang_prefix . '_DESCRIPTION', + $module->description + ); + $module->description = '

' . $module->description + . '

'; + } + + // get author name + $project_author = $this->config->project_author; + + // set the description + $module->xml_description = "

" . $module->official_name + . " (v." . $module->module_version + . ")

" + . $module->description . "

Created by " . trim( + (string) OutputFilter::cleanText($project_author) + ) . "
Development started " + . Factory::getDate($module->created)->format("jS F, Y") + . "

"; + + // set xml description + $this->language->set( + $module->key, $module->lang_prefix . '_XML_DESCRIPTION', + $module->xml_description + ); + + // update the readme if set + if ($module->addreadme == 1 && !empty($module->readme)) + { + $module->readme = $this->placeholder->update_( + $this->customcode->update(base64_decode((string) $module->readme)) + ); + } + else + { + $module->addreadme = 0; + unset($module->readme); + } + + // get the custom_get + $module->custom_get = (isset($module->custom_get) + && JsonHelper::check($module->custom_get)) + ? json_decode((string) $module->custom_get, true) : null; + + if (ArrayHelper::check($module->custom_get)) + { + $module->custom_get = $this->dynamicget->get( + $module->custom_get, $module->key, $module->key + ); + } + else + { + $module->custom_get = null; + } + + // set helper class details + if ($module->add_class_helper >= 1 + && StringHelper::check( + $module->class_helper_code + )) + { + if ($module->add_class_helper_header == 1 + && StringHelper::check( + $module->class_helper_header + )) + { + // set GUI mapper field + $guiMapper['field'] = 'class_helper_header'; + // base64 Decode code + $module->class_helper_header = PHP_EOL + . $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode( + (string) $module->class_helper_header + ) + ) + ), + $guiMapper + ) . PHP_EOL; + } + else + { + $module->add_class_helper_header = 0; + $module->class_helper_header = ''; + } + // set GUI mapper field + $guiMapper['field'] = 'class_helper_code'; + // base64 Decode code + $module->class_helper_code = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $module->class_helper_code) + ) + ), + $guiMapper + ); + // set class type + if ($module->add_class_helper == 2) + { + $module->class_helper_type = 'abstract class '; + } + else + { + $module->class_helper_type = 'class '; + } + } + else + { + $module->add_class_helper = 0; + $module->class_helper_code = ''; + $module->class_helper_header = ''; + } + + // base64 Decode layout_data + if (isset($module->layout_data) + && StringHelper::check($module->layout_data)) + { + // set GUI mapper field + $guiMapper['field'] = 'layout_data'; + $module->layout_data = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $module->layout_data) + ) + ), + $guiMapper + ); + + // check if we have template or layouts to load + $this->templatelayout->set( + $module->layout_data , $module->code_name + ); + } + else + { + $module->layout_data = ''; + } + + // base64 Decode mod_code + if (isset($module->mod_code) + && StringHelper::check($module->mod_code)) + { + // set GUI mapper field + $guiMapper['field'] = 'mod_code'; + $module->mod_code = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $module->mod_code) + ) + ), + $guiMapper + ); + + // check if we have template or layouts to load + $this->templatelayout->set( + $module->mod_code , $module->code_name + ); + } + else + { + $module->mod_code = "// get the module class sfx"; + $module->mod_code .= PHP_EOL + . "\$moduleclass_sfx = htmlspecialchars(\$params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');"; + $module->mod_code .= PHP_EOL . "// load the default Tmpl"; + $module->mod_code .= PHP_EOL + . "require JModuleHelper::getLayoutPath('mod_" + . strtolower((string) $module->code_name) + . "', \$params->get('layout', 'default'));"; + } + + // base64 Decode default header + if (isset($module->default_header) + && StringHelper::check( + $module->default_header + ) && $module->add_default_header == 1) + { + // set GUI mapper field + $guiMapper['field'] = 'default_header'; + $module->default_header = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $module->default_header) + ) + ), + $guiMapper + ); + } + else + { + $module->add_default_header = 0; + $module->default_header = ''; + } + + // base64 Decode default + if (isset($module->default) + && StringHelper::check($module->default)) + { + // set GUI mapper field + $guiMapper['field'] = 'default'; + $guiMapper['type'] = 'html'; + $module->default = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $module->default) + ) + ), + $guiMapper + ); + + // check if we have template or layouts to load + $this->templatelayout->set( + $module->default , $module->code_name + ); + } + else + { + $module->default = '

No Tmpl set

'; + } + + // start the config array + $module->config_fields = []; + // create the form arrays + $module->form_files = []; + $module->fieldsets_label = []; + $module->fieldsets_paths = []; + $module->add_rule_path = []; + $module->add_field_path = []; + // set global fields rule to default component path + $module->fields_rules_paths = 1; + // set the fields data + $module->fields = (isset($module->fields) + && JsonHelper::check($module->fields)) + ? json_decode((string) $module->fields, true) : null; + if (ArrayHelper::check($module->fields)) + { + // ket global key + $key = $module->key; + $dynamic_fields = array('fieldset' => 'basic', + 'fields_name' => 'params', + 'file' => 'config'); + foreach ($module->fields as $n => &$form) + { + if (isset($form['fields']) + && ArrayHelper::check( + $form['fields'] + )) + { + // make sure the dynamic_field is set to dynamic_value by default + foreach ( + $dynamic_fields as $dynamic_field => + $dynamic_value + ) + { + if (!isset($form[$dynamic_field]) + || !StringHelper::check( + $form[$dynamic_field] + )) + { + $form[$dynamic_field] = $dynamic_value; + } + else + { + if ('fields_name' === $dynamic_field + && strpos((string) $form[$dynamic_field], '.') + !== false) + { + $form[$dynamic_field] + = $form[$dynamic_field]; + } + else + { + $form[$dynamic_field] + = StringHelper::safe( + $form[$dynamic_field] + ); + } + } + } + // check if field is external form file + if (!isset($form['module']) || $form['module'] != 1) + { + // now build the form key + $unique = $form['file'] . $form['fields_name'] + . $form['fieldset']; + } + else + { + // now build the form key + $unique = $form['fields_name'] + . $form['fieldset']; + } + // set global fields rule path switches + if ($module->fields_rules_paths == 1 + && isset($form['fields_rules_paths']) + && $form['fields_rules_paths'] == 2) + { + $module->fields_rules_paths = 2; + } + // set where to path is pointing + $module->fieldsets_paths[$unique] + = $form['fields_rules_paths']; + // check for extra rule paths + if (isset($form['addrulepath']) + && ArrayHelper::check($form['addrulepath'])) + { + foreach ($form['addrulepath'] as $add_rule_path) + { + if (StringHelper::check($add_rule_path['path'])) + { + $module->add_rule_path[$unique] = $add_rule_path['path']; + } + } + } + // check for extra field paths + if (isset($form['addfieldpath']) + && ArrayHelper::check($form['addfieldpath'])) + { + foreach ($form['addfieldpath'] as $add_field_path) + { + if (StringHelper::check($add_field_path['path'])) + { + $module->add_field_path[$unique] = $add_field_path['path']; + } + } + } + // add the label if set to lang + if (isset($form['label']) + && StringHelper::check( + $form['label'] + )) + { + $module->fieldsets_label[$unique] + = $this->language->key($form['label']); + } + // build the fields + $form['fields'] = array_map( + function ($field) use ($key, $unique) { + // make sure the alias and title is 0 + $field['alias'] = 0; + $field['title'] = 0; + // set the field details + $this->field->set( + $field, $key, $key, $unique + ); + // update the default if set + if (StringHelper::check( + $field['custom_value'] + ) + && isset($field['settings'])) + { + if (($old_default + = GetHelper::between( + $field['settings']->xml, + 'default="', '"', false + )) !== false) + { + // replace old default + $field['settings']->xml + = str_replace( + 'default="' . $old_default + . '"', 'default="' + . $field['custom_value'] . '"', + (string) $field['settings']->xml + ); + } + else + { + // add the default (hmmm not ideal but okay it should work) + $field['settings']->xml + = 'default="' + . $field['custom_value'] . '" ' + . $field['settings']->xml; + } + } + unset($field['custom_value']); + + // return field + return $field; + }, array_values($form['fields']) + ); + // check if field is external form file + if (!isset($form['module']) || $form['module'] != 1) + { + // load the form file + if (!isset($module->form_files[$form['file']])) + { + $module->form_files[$form['file']] + = []; + } + if (!isset($module->form_files[$form['file']][$form['fields_name']])) + { + $module->form_files[$form['file']][$form['fields_name']] + = []; + } + if (!isset($module->form_files[$form['file']][$form['fields_name']][$form['fieldset']])) + { + $module->form_files[$form['file']][$form['fields_name']][$form['fieldset']] + = []; + } + // do some house cleaning (for fields) + foreach ($form['fields'] as $field) + { + // so first we lock the field name in + $this->fieldname->get( + $field, $module->key, $unique + ); + // add the fields to the global form file builder + $module->form_files[$form['file']][$form['fields_name']][$form['fieldset']][] + = $field; + } + // remove form + unset($module->fields[$n]); + } + else + { + // load the config form + if (!isset($module->config_fields[$form['fields_name']])) + { + $module->config_fields[$form['fields_name']] + = []; + } + if (!isset($module->config_fields[$form['fields_name']][$form['fieldset']])) + { + $module->config_fields[$form['fields_name']][$form['fieldset']] + = []; + } + // do some house cleaning (for fields) + foreach ($form['fields'] as $field) + { + // so first we lock the field name in + $this->fieldname->get( + $field, $module->key, $unique + ); + // add the fields to the config builder + $module->config_fields[$form['fields_name']][$form['fieldset']][] + = $field; + } + // remove form + unset($module->fields[$n]); + } + } + else + { + unset($module->fields[$n]); + } + } + } + unset($module->fields); + + // set files and folders + $this->filesfolders->set($module); + + // set libraries + $this->libraries->set($module->code_name, $module); + + // add PHP in module install + $module->add_install_script = true; + $addScriptMethods = [ + 'php_script', + 'php_preflight', + 'php_postflight', + 'php_method' + ]; + $addScriptTypes = [ + 'install', + 'update', + 'uninstall' + ]; + // the next are php placeholders + $guiMapper['type'] = 'php'; + foreach ($addScriptMethods as $scriptMethod) + { + foreach ($addScriptTypes as $scriptType) + { + if (isset($module->{'add_' . $scriptMethod . '_' . $scriptType}) + && $module->{'add_' . $scriptMethod . '_' . $scriptType} == 1 + && StringHelper::check( + $module->{$scriptMethod . '_' . $scriptType} + )) + { + // set GUI mapper field + $guiMapper['field'] = $scriptMethod . '_' . $scriptType; + $module->{$scriptMethod . '_' . $scriptType} = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode( + (string) $module->{$scriptMethod . '_' . $scriptType} + ) + ) + ), + $guiMapper + ); + } + else + { + unset($module->{$scriptMethod . '_' . $scriptType}); + $module->{'add_' . $scriptMethod . '_' . $scriptType} = 0; + } + } + } + + // add_sql + if ($module->add_sql == 1 + && StringHelper::check($module->sql)) + { + $module->sql = $this->placeholder->update_( + $this->customcode->update(base64_decode((string) $module->sql)) + ); + } + else + { + unset($module->sql); + $module->add_sql = 0; + } + + // add_sql_uninstall + if ($module->add_sql_uninstall == 1 + && StringHelper::check( + $module->sql_uninstall + )) + { + $module->sql_uninstall = $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $module->sql_uninstall) + ) + ); + } + else + { + unset($module->sql_uninstall); + $module->add_sql_uninstall = 0; + } + + // update the URL of the update_server if set + if ($module->add_update_server == 1 + && StringHelper::check( + $module->update_server_url + )) + { + $module->update_server_url = $this->placeholder->update_( + $this->customcode->update($module->update_server_url) + ); + } + + // add the update/sales server FTP details if that is the expected protocol + $serverArray = array('update_server', 'sales_server'); + foreach ($serverArray as $server) + { + if ($module->{'add_' . $server} == 1 + && is_numeric( + $module->{$server} + ) + && $module->{$server} > 0) + { + // get the server protocol + $module->{$server . '_protocol'} + = GetHelper::var( + 'server', (int) $module->{$server}, 'id', 'protocol' + ); + } + else + { + $module->{$server} = 0; + // only change this for sales server (update server can be added locally to the zip file) + if ('sales_server' === $server) + { + $module->{'add_' . $server} = 0; + } + $module->{$server . '_protocol'} = 0; + } + } + + // set the update server stuff (TODO) + // update_server_xml_path + // update_server_xml_file_name + + // rest globals + $this->config->build_target = $_backup_target; + $this->config->lang_target = $_backup_lang; + $this->config->lang_prefix = $_backup_langPrefix; + + $this->placeholder->remove('Module_name'); + $this->placeholder->remove('Module'); + $this->placeholder->remove('module'); + $this->placeholder->remove('module.version'); + $this->placeholder->remove('module_version'); + + return $module; + } + + return null; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Infusion.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Infusion.php new file mode 100644 index 000000000..d88b42377 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Infusion.php @@ -0,0 +1,435 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\ProviderInterface as Provider; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\DispatcherInterface as Dispatcher; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\TemplateInterface as Template; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\HelperInterface as Helper; +use VDM\Joomla\Componentbuilder\Interfaces\Architecture\Module\MainXMLInterface as MainXML; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\ModuleDataInterface as Data; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface as Header; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface as InstallScript; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentMulti; +use VDM\Joomla\Componentbuilder\Compiler\Creator\FieldsetExtension; +use VDM\Joomla\Componentbuilder\Compiler\Dynamicget\Methods; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Interfaces\Module\InfusionInterface; + + +/** + * Joomla 6 module Infusion Class + * + * @since 5.1.2 + */ +final class Infusion implements InfusionInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 5.1.2 + */ + protected Config $config; + + /** + * The Provider Class. + * + * @var Provider + * @since 5.1.2 + */ + protected Provider $provider; + + /** + * The Dispatcher Class. + * + * @var Dispatcher + * @since 5.1.2 + */ + protected Dispatcher $dispatcher; + + /** + * The Template Class. + * + * @var Template + * @since 5.1.2 + */ + protected Template $template; + + /** + * The Helper Class. + * + * @var Helper + * @since 5.1.2 + */ + protected Helper $helper; + + /** + * The MainXML Class. + * + * @var MainXML + * @since 5.1.2 + */ + protected MainXML $mainxml; + + /** + * The ModuleData Class. + * + * @var Data + * @since 5.1.2 + */ + protected Data $data; + + /** + * The Header Class. + * + * @var Header + * @since 5.1.2 + */ + protected Header $header; + + /** + * The Event Class. + * + * @var Event + * @since 5.1.2 + */ + protected Event $event; + + /** + * The Install Class. + * + * @var InstallScript + * @since 5.1.2 + */ + protected InstallScript $installscript; + + /** + * The ContentMulti Class. + * + * @var ContentMulti + * @since 5.1.2 + */ + protected ContentMulti $contentmulti; + + /** + * The FieldsetExtension Class. + * + * @var FieldsetExtension + * @since 5.1.2 + */ + protected FieldsetExtension $fieldsetextension; + + /** + * The Methods Class. + * + * @var Methods + * @since 5.1.2 + */ + protected Methods $methods; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Provider $provider The Provider Class. + * @param Dispatcher $dispatcher The Dispatcher Class. + * @param Template $template The Template Class. + * @param Helper $helper The Helper Class. + * @param MainXML $mainxml The MainXML Class. + * @param Data $data The ModuleData Class. + * @param Header $header The Header Class. + * @param Event $event The Event Class. + * @param InstallScript $installscript The GetScript Class. + * @param ContentMulti $contentmulti The ContentMulti Class. + * @param FieldsetExtension $fieldsetextension The FieldsetExtension Class. + * @param Methods $methods The Methods Class. + * + * @since 5.1.2 + */ + public function __construct(Config $config, Provider $provider, Dispatcher $dispatcher, + Template $template, Helper $helper, MainXML $mainxml, + Data $data, Header $header, Event $event, + InstallScript $installscript, ContentMulti $contentmulti, + FieldsetExtension $fieldsetextension, Methods $methods) + { + $this->config = $config; + $this->provider = $provider; + $this->dispatcher = $dispatcher; + $this->template = $template; + $this->helper = $helper; + $this->mainxml = $mainxml; + $this->data = $data; + $this->header = $header; + $this->event = $event; + $this->installscript = $installscript; + $this->contentmulti = $contentmulti; + $this->fieldsetextension = $fieldsetextension; + $this->methods = $methods; + } + + /** + * Infuse the module data into the content. + * + * @return void + * @since 5.1.2 + */ + public function set(): void + { + if (!$this->data->exists()) + { + return; + } + + foreach ($this->data->get() as $module) + { + if (!ObjectHelper::check($module)) + { + continue; + } + + $this->triggerBeforeInfusionEvent($module); + $this->setModuleConfiguration($module); + $this->setProviderCode($module); + $this->setDispatcherCode($module); + $this->setDynamicGets($module); + $this->setHelperCode($module); + $this->setDefaultTemplates($module); + $this->setInstallScript($module); + $this->setFieldsets($module); + $this->setMainXml($module); + $this->triggerAfterInfusionEvent($module); + } + } + + /** + * Set core configuration from module data. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setModuleConfiguration(object $module): void + { + $this->config->build_target = $module->key; + $this->config->lang_target = $module->key; + $this->config->set('lang_prefix', $module->lang_prefix); + } + + /** + * Set the provider provider code. + * + * @param object $module The module object being processed. + * + * @return void + * @since 5.1.2 + */ + protected function setProviderCode($module): void + { + $header = trim((string) ($this->header->get('module.provider.header', $module->class_name) ?? '')); + if ($header !== '') + { + $header = PHP_EOL . PHP_EOL . $header; + } + $this->contentmulti->set("{$module->key}|PROVIDER_CLASS_HEADER", $header); + + $providerContent = $this->provider->get($module); + $this->contentmulti->set("{$module->key}|PROVIDER_CLASS", $providerContent); + } + + /** + * Set dispatcher-generated module code. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setDispatcherCode(object $module): void + { + $header = trim((string) ($this->header->get('module.dispatcher.header', $module->class_name) ?? '')); + if ($header !== '') + { + $header = PHP_EOL . PHP_EOL . $header; + } + $this->contentmulti->set("{$module->key}|DISPATCHER_CLASS_HEADER", $header); + + $code = $this->dispatcher->get($module); + $this->contentmulti->set("{$module->key}|DISPATCHER_CLASS", $code); + } + + /** + * Set dynamically generated get methods (dynamicGets). + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setDynamicGets(object $module): void + { + if ($module->custom_get) + { + $header = trim((string) ($this->header->get('module.dynamicgets.header', $module->class_name) ?? '')); + if ($header !== '') + { + $header = PHP_EOL . PHP_EOL . $header; + } + $this->contentmulti->set("{$module->key}|DYNAMICGETS_HEADER", $header); + + $code = $this->methods->get($module, $module->key); + $this->contentmulti->set("{$module->key}|DYNAMICGETS", $code); + } + } + + /** + * Set helper class code if enabled. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setHelperCode(object $module): void + { + if ($module->add_class_helper >= 1) + { + $header = trim((string) ($this->header->get('module.helper.header', $module->class_name) ?? '')); + $header .= $this->helper->header($module); + if (!empty($header)) + { + $header = PHP_EOL . PHP_EOL . trim($header); + } + $this->contentmulti->set("{$module->key}|HELPER_CLASS_HEADER", $header); + + $code = $this->helper->get($module); + $this->contentmulti->set("{$module->key}|HELPER_CLASS", $code); + } + } + + /** + * Set default and extra templates. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setDefaultTemplates(object $module): void + { + $header = trim((string) ($this->header->get('module.default.template.header', $module->class_name) ?? '')); + if ($header !== '') + { + $header = PHP_EOL . PHP_EOL . $header; + } + $this->contentmulti->set("{$module->key}|MODDEFAULT_HEADER", $header); + + $header_code = $this->template->header($module); + $this->contentmulti->set("{$module->key}|MODDEFAULT_HEADER_CODE", $header_code); + + $code = $this->template->default($module, $module->key); + $this->contentmulti->set("{$module->key}|MODDEFAULT", $code); + + $this->template->extra($module); + } + + /** + * Set install script content if required. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setInstallScript(object $module): void + { + if ($module->add_install_script) + { + $this->contentmulti->set("{$module->key}|INSTALLCLASS", + $this->installscript->get($module)); + } + } + + /** + * Set all fieldset content based on form files. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setFieldsets(object $module): void + { + if (!isset($module->form_files) || !ArrayHelper::check($module->form_files)) + { + return; + } + + foreach ($module->form_files as $file => $files) + { + foreach ($files as $field_name => $fieldsets) + { + foreach ($fieldsets as $fieldset => $fields) + { + $key = "{$module->key}|FIELDSET_{$file}{$field_name}{$fieldset}"; + $content = $this->fieldsetextension->get($module, $fields); + $this->contentmulti->set($key, $content); + } + } + } + } + + /** + * Set main XML configuration content. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setMainXml(object $module): void + { + $this->contentmulti->set("{$module->key}|MAINXML", $this->mainxml->get($module)); + } + + /** + * Trigger before-infusion event. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function triggerBeforeInfusionEvent(object &$module): void + { + $this->event->trigger('jcb_ce_onBeforeInfuseModuleData', [&$module]); + } + + /** + * Trigger after-infusion event. + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function triggerAfterInfusionEvent(object &$module): void + { + $this->event->trigger('jcb_ce_onAfterInfuseModuleData', [&$module]); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Structure.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Structure.php new file mode 100644 index 000000000..60ac9874e --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/Structure.php @@ -0,0 +1,1264 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\ModuleDataInterface as Module; +use VDM\Joomla\Componentbuilder\Compiler\Component; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Builder\TemplateData; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Componentbuilder\Interfaces\Module\StructureInterface; + + +/** + * Joomla 6 Module Structure Builder Class + * + * @since 5.1.2 + */ +final class Structure implements StructureInterface +{ + /** + * The Data Class. + * + * @var Module + * @since 5.1.2 + */ + protected Module $module; + + /** + * The Component Class. + * + * @var Component + * @since 5.1.2 + */ + protected Component $component; + + /** + * The Config Class. + * + * @var Config + * @since 5.1.2 + */ + protected Config $config; + + /** + * The Registry Class. + * + * @var Registry + * @since 5.1.2 + */ + protected Registry $registry; + + /** + * The Dispenser Class. + * + * @var Dispenser + * @since 5.1.2 + */ + protected Dispenser $dispenser; + + /** + * The EventInterface Class. + * + * @var Event + * @since 5.1.2 + */ + protected Event $event; + + /** + * The Counter Class. + * + * @var Counter + * @since 5.1.2 + */ + protected Counter $counter; + + /** + * The Folder Class. + * + * @var Folder + * @since 5.1.2 + */ + protected Folder $folder; + + /** + * The File Class. + * + * @var File + * @since 5.1.2 + */ + protected File $file; + + /** + * The Files Class. + * + * @var Files + * @since 5.1.2 + */ + protected Files $files; + + /** + * The TemplateData Class. + * + * @var TemplateData + * @since 5.1.2 + */ + protected TemplateData $templatedata; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.0.0 + */ + protected Placeholder $placeholder; + + /** + * The Namespace Prefix + * + * @var string + * @since 5.0.0 + */ + protected string $NamespacePrefix; + + /** + * The Component Namespace (in code) + * + * @var string + * @since 3.2.0 + */ + protected string $ComponentNamespace; + + /** + * Constructor. + * + * @param Module $module The Data Class. + * @param Component $component The Component Class. + * @param Config $config The Config Class. + * @param Registry $registry The Registry Class. + * @param Dispenser $dispenser The Dispenser Class. + * @param Event $event The EventInterface Class. + * @param Counter $counter The Counter Class. + * @param Folder $folder The Folder Class. + * @param File $file The File Class. + * @param Files $files The Files Class. + * @param TemplateData $templatedata The TemplateData Class. + * @param Placeholder $placeholder The Placeholder Class. + * + * @since 5.1.2 + */ + public function __construct(Module $module, Component $component, Config $config, + Registry $registry, Dispenser $dispenser, Event $event, + Counter $counter, Folder $folder, File $file, + Files $files, TemplateData $templatedata, Placeholder $placeholder) + { + $this->module = $module; + $this->component = $component; + $this->config = $config; + $this->registry = $registry; + $this->dispenser = $dispenser; + $this->event = $event; + $this->counter = $counter; + $this->folder = $folder; + $this->file = $file; + $this->files = $files; + $this->templatedata = $templatedata; + $this->placeholder = $placeholder; + + // set some global values + $this->NamespacePrefix = $this->placeholder->get('NamespacePrefix'); + $this->ComponentNamespace = $this->placeholder->get('ComponentNamespace'); + } + + /** + * Build the Modules files, folders, url's and config + * + * @return void + * @since 5.1.2 + */ + public function build() + { + if ($this->module->exists()) + { + $component_context = $this->config->component_context; + $modules = $this->module->get(); + + // Trigger Event: jcb_ce_onBeforeSetModules + $this->event->trigger( + 'jcb_ce_onBeforeBuildModules', + array(&$component_context, &$modules) + ); + + foreach ($modules as $module) + { + if (ObjectHelper::check($module) + && isset($module->folder_name) + && StringHelper::check($module->folder_name)) + { + // module path + $this->modulePath($module); + + // set the module paths + $this->registry->set('dynamic_paths.' . $module->key, $module->folder_path); + + // make sure there is no old build + $this->folder->remove($module->folder_path); + + // create the main module folder + $this->folder->create($module->folder_path); + + // set service provider class file + $this->setServiceProviderClassFile($module); + + // set dispatcher class file + $this->setDispatcherClassFile($module); + + // create the dynamic gets file + $this->setDynamicGets($module); + + // set helper file + $this->setHelperFile($module); + + // set main xml file + $this->setMainXmlFile($module); + + // set tmpl folder + $this->folder->create($module->folder_path . '/tmpl'); + + // set default file + $this->setDefaultFile($module); + + // set custom default files + $this->setTemplateFiles($module); + + // set install script if needed + $this->setInstallScript($module); + + // set readme if found + $this->setReadme($module); + + // set the CSS and JavaScript in form + $this->setCssJsForm($module); + + // set rules folders if needed + if (isset($module->fields_rules_paths) + && $module->fields_rules_paths == 2) + { + // create rules folder + $this->folder->create($module->folder_path . '/src/Rule'); + + // create fields folder + $this->folder->create($module->folder_path . '/src/Field'); + } + + // set forms folder/files if needed + $this->setForms($module); + + // set SQL stuff if needed + $this->setSQL($module); + + // create the language folder + $this->folder->create($module->folder_path . '/language'); + + // also create the lang tag folder + $this->folder->create( + $module->folder_path . '/language/' . $this->config->get('lang_tag', 'en-GB') + ); + + // check if this module has files + $this->setFiles($module); + + // check if this module has folders + $this->setFolders($module); + + // check if this module has urls + $this->setUrls($module); + } + } + } + } + + /** + * get the module xml template + * + * @param object $module The module object + * + * @return string + * @since 5.1.2 + */ + protected function getXML(object $module): string + { + $xml = ''; + $xml .= PHP_EOL . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('BUILDDATE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOR') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOREMAIL') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHORWEBSITE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('COPYRIGHT') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('LICENSE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $module->module_version . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . "{$this->NamespacePrefix}\\Module\\{$module->namespace}" . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix . '_XML_DESCRIPTION'; + $xml .= Placefix::_h('MAINXML'); + $xml .= PHP_EOL . ''; + + return $xml; + } + + /** + * get the module admin custom script field + * + * @param object $module + * @param array $fieldScriptBucket + * + * @return string + * @since 5.1.2 + * + */ + protected function getCustomScriptField(object $module, array $fieldScriptBucket): string + { + $form_field_class = []; + $form_field_class[] = Placefix::_h('BOM') . PHP_EOL; + $form_field_class[] = PHP_EOL . "use Joomla\CMS\Form\FormField;"; + $form_field_class[] = "use Joomla\CMS\Factory;"; + $form_field_class[] = PHP_EOL . "//" . Line::_(__Line__, __Class__) + . " No direct access to this file"; + $form_field_class[] = "defined('_JEXEC') or die('Restricted access');"; + $form_field_class[] = PHP_EOL + . "class {$module->class_name}engine extends FormField"; + $form_field_class[] = "{"; + $form_field_class[] = Indent::_(1) + . "protected \$type = '{$module->code_name}engine';"; + $form_field_class[] = PHP_EOL . Indent::_(1) + . "protected function getLabel()"; + $form_field_class[] = Indent::_(1) . "{"; + $form_field_class[] = Indent::_(2) . "return;"; + $form_field_class[] = Indent::_(1) . "}"; + $form_field_class[] = PHP_EOL . Indent::_(1) + . "protected function getInput()"; + $form_field_class[] = Indent::_(1) . "{"; + $form_field_class[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Get the document"; + $form_field_class[] = Indent::_(2) + . "\$document = Factory::getApplication()->getDocument();"; + $form_field_class[] = implode(PHP_EOL, $fieldScriptBucket); + $form_field_class[] = Indent::_(2) . "return; // noting for now :)"; + $form_field_class[] = Indent::_(1) . "}"; + $form_field_class[] = "}"; + + return implode(PHP_EOL, $form_field_class); + } + + /** + * Set the module path + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function modulePath(object &$module): void + { + $module->folder_path = $this->config->get( + 'compiler_path', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/compiler' + ) . '/' . $module->folder_name; + } + + /** + * Set the service provider class file + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setServiceProviderClassFile(object $module): void + { + // create services folder + $this->folder->create($module->folder_path . '/services'); + + $file_details = [ + 'path' => $module->folder_path . '/services/provider.php', + 'name' => 'provider.php', + 'zip' => 'services/provider.php' + ]; + + $this->file->write( + $file_details['path'], + 'files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + + /** + * set the dispatcher class path + * + * @param object $module The Module object + * + * @return void + * @since 5.1.2 + */ + protected function setDispatcherClassFile(object $module): void + { + // create extension folder + $this->folder->create($module->folder_path . '/src/Dispatcher'); + + $file_details = [ + 'path' => $module->folder_path . '/src/Dispatcher/Dispatcher.php', + 'name' => 'Dispatcher.php', + 'zip' => 'src/Dispatcher/Dispatcher.php' + ]; + + $this->file->write( + $file_details['path'], + 'NamespacePrefix}\\Module\\{$module->namespace}\\{$module->target_client_namespace}\\Dispatcher;" . + Placefix::_h('DISPATCHER_CLASS_HEADER') . + PHP_EOL . PHP_EOL . '// No direct access to this file' . PHP_EOL . + "defined('_JEXEC') or die('Restricted access');" . + PHP_EOL . PHP_EOL . + Placefix::_h('DISPATCHER_CLASS') + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + + /** + * Set the dynamic gets file + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setDynamicGets(object $module): void + { + if ($module->custom_get) + { + // create helper folder + $this->folder->create($module->folder_path . '/src/Helper/'); + + $file_details = [ + 'path' => "{$module->folder_path}/src/Helper/{$module->class_data_name}.php", + 'name' => '{$module->class_data_name}.php', + 'zip' => "src/Helper/{$module->class_data_name}.php" + ]; + + $this->file->write( + $file_details['path'], + 'NamespacePrefix}\\Module\\{$module->namespace}\\{$module->target_client_namespace}\\Helper;" . + Placefix::_h('DYNAMICGETS_HEADER') . + PHP_EOL . PHP_EOL . '// No direct access to this file' . PHP_EOL . + "defined('_JEXEC') or die('Restricted access');" . + PHP_EOL . PHP_EOL . '/**' . PHP_EOL . ' * Module ' . $module->official_name . ' Data Helper' + . PHP_EOL . ' */' . PHP_EOL . "final class " . $module->class_data_name . " implements DatabaseAwareInterface" + . PHP_EOL . "{" + + . PHP_EOL . Indent::_(1) . 'use DatabaseAwareTrait;' . PHP_EOL + + . PHP_EOL . Indent::_(1) . '/**' + . PHP_EOL . Indent::_(1) . ' *' . Line::_(__LINE__, __CLASS__) . ' The module instance' + . PHP_EOL . Indent::_(1) . ' *' + . PHP_EOL . Indent::_(1) . ' * @var \stdClass' + . PHP_EOL . Indent::_(1) . ' * @since 5.1.2' + . PHP_EOL . Indent::_(1) . ' */' + . PHP_EOL . Indent::_(1) . 'protected $module;' . PHP_EOL + + . PHP_EOL . Indent::_(1) . '/**' + . PHP_EOL . Indent::_(1) . ' * The application instance' + . PHP_EOL . Indent::_(1) . ' *' + . PHP_EOL . Indent::_(1) . ' * @var CMSApplicationInterface' + . PHP_EOL . Indent::_(1) . ' * @since 5.1.2' + . PHP_EOL . Indent::_(1) . ' */' + . PHP_EOL . Indent::_(1) . 'protected $app;' . PHP_EOL + + . PHP_EOL . Indent::_(1) . '/**' + . PHP_EOL . Indent::_(1) . ' * The input instance' + . PHP_EOL . Indent::_(1) . ' *' + . PHP_EOL . Indent::_(1) . ' * @var Input' + . PHP_EOL . Indent::_(1) . ' * @since 5.1.2' + . PHP_EOL . Indent::_(1) . ' */' + . PHP_EOL . Indent::_(1) . 'protected $input;' . PHP_EOL + + . PHP_EOL . Indent::_(1) . '/**' + . PHP_EOL . Indent::_(1) . ' * The params instance' + . PHP_EOL . Indent::_(1) . ' *' + . PHP_EOL . Indent::_(1) . ' * @var Registry' + . PHP_EOL . Indent::_(1) . ' * @since 5.1.2' + . PHP_EOL . Indent::_(1) . ' */' + . PHP_EOL . Indent::_(1) . 'protected $params;' . PHP_EOL + + . PHP_EOL . Indent::_(1) . '/**' + . PHP_EOL . Indent::_(1) . ' * The template instance' + . PHP_EOL . Indent::_(1) . ' *' + . PHP_EOL . Indent::_(1) . ' * @var string' + . PHP_EOL . Indent::_(1) . ' * @since 5.1.2' + . PHP_EOL . Indent::_(1) . ' */' + . PHP_EOL . Indent::_(1) . 'protected $template;' . PHP_EOL + + . PHP_EOL . Indent::_(1) . '/**' + . PHP_EOL . Indent::_(1) . ' * Module ' . $module->official_name . ' constructor.' + . PHP_EOL . Indent::_(1) . ' *' + . PHP_EOL . Indent::_(1) . ' * @param array $config The config' + . PHP_EOL . Indent::_(1) . ' *' + . PHP_EOL . Indent::_(1) . ' * @since 5.1.2' + . PHP_EOL . Indent::_(1) . ' */' + . PHP_EOL . Indent::_(1) . 'public function __construct(array $config)' + . PHP_EOL . Indent::_(1) . '{' + . PHP_EOL . Indent::_(2) . '$this->module = $config[\'module\'] ?? null;' + . PHP_EOL . Indent::_(2) . '$this->app = $config[\'app\'] ?? null;' + . PHP_EOL . Indent::_(2) . '$this->input = $config[\'input\'] ?? null;' + . PHP_EOL . Indent::_(2) . '$this->params = $config[\'params\'] ?? null;' + . PHP_EOL . Indent::_(2) . '$this->template = $config[\'template\'] ?? null;' + . PHP_EOL . Indent::_(1) . '}' + + . Placefix::_h('DYNAMICGETS') + + . PHP_EOL . "}" + . PHP_EOL + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + + /** + * Set the helper file + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setHelperFile(object $module): void + { + if ($module->add_class_helper >= 1) + { + // create helper folder + $this->folder->create($module->folder_path . '/src/Helper/'); + + $file_details = [ + 'path' => "{$module->folder_path}/src/Helper/{$module->class_helper_name}.php", + 'name' => '{$module->class_helper_name}.php', + 'zip' => "src/Helper/{$module->class_helper_name}.php" + ]; + + $this->file->write( + $file_details['path'], + 'NamespacePrefix}\\Module\\{$module->namespace}\\{$module->target_client_namespace}\\Helper;" . + Placefix::_h('HELPER_CLASS_HEADER') . + PHP_EOL . PHP_EOL . '// No direct access to this file' . PHP_EOL . + "defined('_JEXEC') or die('Restricted access');" . + PHP_EOL . Placefix::_h('HELPER_CLASS') + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + + /** + * Set the main XML file + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setMainXmlFile(object $module): void + { + $file_details = [ + 'path' => $module->folder_path . '/' . $module->file_name . '.xml', + 'name' => $module->file_name . '.xml', + 'zip' => $module->file_name . '.xml' + ]; + + $this->file->write( + $file_details['path'], + $this->getXML($module) + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + + /** + * Set the main default template file + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setDefaultFile(object $module): void + { + $file_details = [ + 'path' => $module->folder_path . '/tmpl/default.php', + 'name' => 'default.php', + 'zip' => 'tmpl/default.php' + ]; + + $this->file->write( + $file_details['path'], + '' . + Placefix::_h('MODDEFAULT') + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + + /** + * Set the additional template files + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setTemplateFiles(object $module): void + { + if (($data_ = $this->templatedata-> + get($module->key . '.' . $module->code_name)) !== null) + { + foreach ($data_ as $template => $data) + { + $file_details = [ + 'path' => $module->folder_path . "/tmpl/default_{$template}.php", + 'name' => "default_{$template}.php", + 'zip' => "tmpl/default_{$template}.php" + ]; + + $this->file->write( + $file_details['path'], + '' . + Placefix::_h(StringHelper::safe("MODDEFAULT_{$template}", 'U')) + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + } + + /** + * Set the install script file + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setInstallScript(object $module): void + { + if ($module->add_install_script) + { + $file_details = [ + 'path' => $module->folder_path . '/script.php', + 'name' => 'script.php', + 'zip' => 'script.php' + ]; + + $this->file->write( + $file_details['path'], + 'files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + + /** + * Set the readme file + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setReadme(object $module): void + { + if ($module->addreadme) + { + $file_details = [ + 'path' => $module->folder_path . '/README.md', + 'name' => 'README.md', + 'zip' => 'README.md' + ]; + + $this->file->write($file_details['path'], $module->readme); + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + + /** + * Set the css and javascript in form + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setCssJsForm(object $module): void + { + // check if we have custom fields needed for scripts + $field_script_bucket = []; + + // add any css from the fields + $this->setCssForm($module, $field_script_bucket); + + // add any JavaScript from the fields + $this->setJsForm($module, $field_script_bucket); + + // add the custom script field + if (!empty($field_script_bucket)) + { + $file_details = [ + 'path' => $module->folder_path . "/src/Field/{$module->class_name}engine.php", + 'name' => "{$module->class_name}engine.php", + 'zip' => "src/Field/{$module->class_name}engine.php" + ]; + + $this->file->write( + $file_details['path'], + $this->getCustomScriptField( + $module, + $field_script_bucket + ) + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + + /** + * Set the css in form + * + * @param object $module + * @param array $bucket + * + * @return void + * @since 5.1.2 + */ + protected function setCssForm(object $module, array &$bucket): void + { + if (($css = $this->dispenser->get('css_view', $module->key)) !== null && + StringHelper::check($css)) + { + // make sure this script does not have PHP + if (strpos((string) $css, 'folder->create($module->folder_path . '/assets/css'); + + // add the CSS file + $file_details = [ + 'path' => $module->folder_path . "/assets/css/{$module->class_name}engine.css", + 'name' => "{$module->class_name}engine.css", + 'zip' => "assets/css/{$module->class_name}engine.css" + ]; + + $this->file->write( + $file_details['path'], + Placefix::_h('BOM') . PHP_EOL + . PHP_EOL . $css + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + + // add the field script + $bucket[] = Indent::_(2) . "//" + . Line::_(__Line__, __Class__) . " Custom CSS"; + $bucket[] = Indent::_(2) + . "Html::_('stylesheet', '" + . "modules/{$module->folder_name}" + . "/assets/css/{$module->class_name}engine.css', ['version' => 'auto', 'relative' => true]);"; + } + } + } + + /** + * Set the javascript in form + * + * @param object $module + * @param array $bucket + * + * @return void + * @since 5.1.2 + */ + protected function setJsForm(object $module, array &$bucket): void + { + if (($javascript = $this->dispenser->get('view_footer', $module->key)) !== null + && StringHelper::check($javascript)) + { + // make sure this script does not have PHP + if (strpos((string) $javascript, 'folder->create($module->folder_path . '/assets/js'); + + // add the CSS file + $file_details = [ + 'path' => $module->folder_path . "/assets/js/{$module->class_name}engine.js", + 'name' => "{$module->class_name}engine.js", + 'zip' => "assets/js/{$module->class_name}engine.js" + ]; + + $this->file->write( + $file_details['path'], + Placefix::_h('BOM') . PHP_EOL + . PHP_EOL . $javascript + ); + + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + + // add the field script + $bucket[] = Indent::_(2) . "//" + . Line::_(__Line__, __Class__) . " Custom JS"; + $bucket[] = Indent::_(2) + . "Html::_('script', '" + . "/modules/{$module->folder_name}" + . "/assets/js/{$module->class_name}engine.js', ['version' => 'auto', 'relative' => true]);"; + } + } + } + + /** + * Set the form folders and files as needed + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setForms(object $module): void + { + if (isset($module->form_files) + && ArrayHelper::check($module->form_files)) + { + // create forms folder + $this->folder->create($module->folder_path . '/forms'); + + // set the template files + foreach ($module->form_files as $file => $fields) + { + // set file details + $file_details = [ + 'path' => $module->folder_path . '/forms/' . $file . '.xml', + 'name' => $file . '.xml', + 'zip' => 'forms/' . $file . '.xml' + ]; + + // build basic XML + $xml = ''; + $xml .= PHP_EOL . ''; + + // search if we must add the component path + $add_component_path = false; + foreach ($fields as $field_name => $fieldsets) + { + if (!$add_component_path) + { + foreach ($fieldsets as $fieldset => $field) + { + if (!$add_component_path + && isset($module->fieldsets_paths[$file . $field_name . $fieldset]) + && $module->fieldsets_paths[$file . $field_name . $fieldset] == 1) + { + $add_component_path = true; + } + } + } + } + + // only add if part of the component field types path is required + if ($add_component_path) + { + $xml .= PHP_EOL . ''; + } + else + { + $xml .= PHP_EOL . '
'; + } + + // add the fields + foreach ($fields as $field_name => $fieldsets) + { + // check if we have an double fields naming set + $field_name_inner = ''; + $field_name_outer = $field_name; + if (strpos((string)$field_name, '.') !== false) + { + $field_names = explode('.', (string)$field_name); + if (count((array)$field_names) == 2) + { + $field_name_outer = $field_names[0]; + $field_name_inner = $field_names[1]; + } + } + $xml .= PHP_EOL . Indent::_(1) + . ''; + foreach ($fieldsets as $fieldset => $field) + { + // default to the field set name + $label = $fieldset; + if (isset($module->fieldsets_label[$file . $field_name . $fieldset])) + { + $label = $module->fieldsets_label[$file . $field_name . $fieldset]; + } + + // add path to module rules and custom fields + if (isset($module->fieldsets_paths[$file . $field_name . $fieldset]) + && ($module->fieldsets_paths[$file . $field_name . $fieldset] == 2 + || $module->fieldsets_paths[$file . $field_name . $fieldset] == 3)) + { + if ($module->target == 2) + { + if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) + { + $module->add_rule_path[$file . $field_name . $fieldset] = + "{$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Administrator\\Rule"; + } + + if (!isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $module->add_field_path[$file . $field_name . $fieldset] = + "{$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Administrator\\Field"; + } + } + else + { + if (!isset($module->add_rule_path[$file . $field_name . $fieldset])) + { + $module->add_rule_path[$file . $field_name . $fieldset] = + "{$this->NamespacePrefix}\\Module\\{$module->namespace}\\Rule"; + } + + if (!isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $module->add_field_path[$file . $field_name . $fieldset] = + "{$this->NamespacePrefix}\\Module\\{$module->namespace}\\Field"; + } + } + } + + // add path to module rules and custom fields + if (isset($module->add_rule_path[$file . $field_name . $fieldset]) + || isset($module->add_field_path[$file . $field_name . $fieldset])) + { + + $xml .= PHP_EOL . Indent::_(1) . ''; + + $xml .= PHP_EOL . Indent::_(1) . '
add_rule_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addruleprefix="' . $module->add_rule_path[$file . $field_name . $fieldset] . '"'; + } + + if (isset($module->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addfieldprefix="' . $module->add_field_path[$file . $field_name . $fieldset] . '"'; + } + + $xml .= PHP_EOL . Indent::_(1) . '>'; + } + else + { + $xml .= PHP_EOL . Indent::_(1) . '
'; + } + + // check if we have an inner field set + if (StringHelper::check($field_name_inner)) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + + // add the placeholder of the fields + $xml .= Placefix::_h('FIELDSET_' . $file . $field_name . $fieldset); + + // check if we have an inner field set + if (StringHelper::check($field_name_inner)) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + $xml .= PHP_EOL . Indent::_(1) + . '
'; + } + $xml .= PHP_EOL . Indent::_(1) . ''; + } + $xml .= PHP_EOL . ''; + + // add xml to file + $this->file->write($file_details['path'], $xml); + $this->files->appendArray($module->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + } + + /** + * Set the sql stuff + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setSQL(object $module): void + { + if ($module->add_sql || $module->add_sql_uninstall) + { + // create SQL folder + $this->folder->create($module->folder_path . '/sql'); + + // create mysql folder + $this->folder->create( + $module->folder_path . '/sql/mysql' + ); + + // now set the install file + if ($module->add_sql) + { + $this->file->write( + $module->folder_path . '/sql/mysql/install.sql', + $module->sql + ); + + // count the file created + $this->counter->file++; + } + + // now set the uninstall file + if ($module->add_sql_uninstall) + { + $this->file->write( + $module->folder_path + . '/sql/mysql/uninstall.sql', + $module->sql_uninstall + ); + + // count the file created + $this->counter->file++; + } + } + } + + /** + * Set the files + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setFiles(object $module): void + { + if (isset($module->files) + && ArrayHelper::check($module->files)) + { + // add to component files + foreach ($module->files as $file) + { + // set the pathfinder + $file['target_type'] = $module->target_type; + $file['target_id'] = $module->id; + + $this->component->appendArray('files', $file); + } + } + } + + /** + * Set the folders + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setFolders(object $module): void + { + if (isset($module->folders) + && ArrayHelper::check($module->folders)) + { + // add to component folders + foreach ($module->folders as $folder) + { + // set the pathfinder + $folder['target_type'] = $module->target_type; + $folder['target_id'] = $module->id; + + $this->component->appendArray('folders', $folder); + } + } + } + + /** + * Set the urls + * + * @param object $module + * + * @return void + * @since 5.1.2 + */ + protected function setUrls(object &$module): void + { + if (isset($module->urls) + && ArrayHelper::check($module->urls)) + { + // add to component urls + foreach ($module->urls as &$url) + { + // should we add the local folder + if (isset($url['type']) && $url['type'] > 1 + && isset($url['url']) + && StringHelper::check($url['url'])) + { + // set file name + $fileName = basename((string)$url['url']); + + // get the file contents + $data = FileHelper::getContent( + $url['url'] + ); + + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/assets/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/assets/css'; + } + else + { + $path = ''; + } + + // create sub media path if not set + $this->folder->create( + $module->folder_path . $path + ); + + // set the path to module file + $url['path'] = $module->folder_path . $path + . '/' . $fileName; // we need this for later + + // write data to path + $this->file->write($url['path'], $data); + + // count the file created + $this->counter->file++; + } + } + } + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/JoomlaSix/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Data.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Data.php new file mode 100644 index 000000000..45fbc36dd --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Data.php @@ -0,0 +1,1051 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaSix; + + +use Joomla\CMS\Factory; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\Database\DatabaseInterface; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Customcode; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Language; +use VDM\Joomla\Componentbuilder\Compiler\Field; +use VDM\Joomla\Componentbuilder\Compiler\Field\Name as FieldName; +use VDM\Joomla\Componentbuilder\Compiler\Model\Filesfolders; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\String\ClassfunctionHelper; +use VDM\Joomla\Utilities\String\PluginHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Utilities\GuidHelper; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PluginDataInterface; + + +/** + * Joomla 6 Plug-in Data Class + * + * @since 5.1.2 + */ +final class Data implements PluginDataInterface +{ + /** + * Compiler Joomla Plug-in's Data + * + * @var array + * @since 3.2.0 + */ + protected array $data = []; + + /** + * tracking GUID index + * + * @var array + * @since 5.0.4 + */ + protected array $index = []; + + /** + * The Configure Class. + * + * @var Config + * @since 5.0.2 + */ + protected Config $config; + + /** + * The Customcode Class. + * + * @var Customcode + * @since 5.0.2 + */ + protected Customcode $customcode; + + /** + * The Gui Class. + * + * @var Gui + * @since 5.0.2 + */ + protected Gui $gui; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.0.2 + */ + protected Placeholder $placeholder; + + /** + * The Language Class. + * + * @var Language + * @since 5.0.2 + */ + protected Language $language; + + /** + * The Field Class. + * + * @var Field + * @since 5.0.2 + */ + protected Field $field; + + /** + * The Name Class. + * + * @var FieldName + * @since 5.0.2 + */ + protected FieldName $fieldname; + + /** + * The Filesfolders Class. + * + * @var Filesfolders + * @since 5.0.2 + */ + protected Filesfolders $filesfolders; + + /** + * Joomla Database Class. + * + * @var DatabaseInterface + * @since 5.1.2 + **/ + protected DatabaseInterface $db; + + /** + * Define the mappings of traits and classes to their respective methods and services + * + * @var array + * @since 5.0.2 + **/ + protected array $service_checks = [ + 'DatabaseAwareTrait' => [ + 'trait' => 'Joomla\Database\DatabaseAwareTrait', + 'class' => 'Joomla__'.'_ae15e6b6_f7de_43ad_be4b_71499ae88f45___Power', + 'method' => 'setDatabase', + 'service' => 'Joomla__'.'_7bd29d76_73c9_4c07_a5da_4f7a32aff78f___Power' + ], + 'UserFactoryAwareTrait' => [ + 'trait' => 'Joomla\CMS\User\UserFactoryAwareTrait', + 'class' => 'Joomla__'.'_a6b2c321_5de3_4425_b05f_e5340965fb80___Power', + 'method' => 'setUserFactory', + 'service' => 'Joomla__'.'_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power' + ] + ]; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Customcode $customcode The Customcode Class. + * @param Gui $gui The Gui Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param Language $language The Language Class. + * @param Field $field The Field Class. + * @param FieldName $fieldname The Name Class. + * @param Filesfolders $filesfolders The Filesfolders Class. + * @param DatabaseInterface $db The Joomla Database Class. + * + * @since 5.0.2 + */ + public function __construct(Config $config, Customcode $customcode, Gui $gui, + Placeholder $placeholder, Language $language, + Field $field, FieldName $fieldname, + Filesfolders $filesfolders, DatabaseInterface $db) + { + $this->config = $config; + $this->customcode = $customcode; + $this->gui = $gui; + $this->placeholder = $placeholder; + $this->language = $language; + $this->field = $field; + $this->fieldname = $fieldname; + $this->filesfolders = $filesfolders; + $this->db = $db; + } + + /** + * Get the Joomla Plugin/s + * + * @param int|string|null $plugin The plugin ID/GUID + * + * @return object|array|null if ID|GUID found it returns object, if no ID|GUID given it returns all set + * @since 3.2.0 + */ + public function get($plugin = null) + { + if ($plugin === null && $this->exists()) + { + return $this->data; + } + elseif ($this->exists($plugin)) + { + $id = $this->index[$plugin]; + return $this->data[$id]; + } + + return null; + } + + /** + * Check if the Joomla Plugin/s exists + * + * @param int|string|null $plugin The plugin ID/GUID + * + * @return bool if ID|GUID found it returns true, if no ID|GUID given it returns true if any are set + * @since 3.2.0 + */ + public function exists($plugin = null): bool + { + if ($plugin === null) + { + return ArrayHelper::check($this->data); + } + elseif (isset($this->index[$plugin])) + { + return true; + } + + return $this->set($plugin); + } + + /** + * Set the plugin + * + * @param int|string|null $plugin The plugin ID/GUID + * + * @return bool true on success + * @since 5.0.4 + */ + public function set($plugin): bool + { + if (!GuidHelper::valid($plugin) && !is_numeric($plugin)) + { + return false; + } + elseif (isset($this->index[$plugin])) + { + return true; + } + + if (GuidHelper::valid($plugin)) + { + $query = $this->getQuery($plugin, 'guid'); + } + else + { + $query = $this->getQuery($plugin); + } + + $data = $this->getData($query); + + if ($data !== null) + { + $this->data[$data->id] = $data; + $this->index[$data->id] = $data->id; + $this->index[$data->guid] = $data->id; + + return true; + } + + return false; + } + + /** + * get current plugin data query + * + * @param mixed $value The plugin ID/GUID + * @param string $key The type of value + * + * @return string The plugin data query + * @since 5.0.4 + */ + private function getQuery($value, string $key = 'id') + { + // Create a new query object. + $query = $this->db->getQuery(true); + + $query->select('a.*'); + $query->select( + $this->db->quoteName( + array( + 'g.name', + 'e.name', + 'e.head', + 'e.comment', + 'e.id', + 'f.addfiles', + 'f.addfolders', + 'f.addfilesfullpath', + 'f.addfoldersfullpath', + 'f.addurls', + 'u.version_update', + 'u.id' + ), array( + 'group', + 'extends', + 'class_head', + 'comment', + 'class_id', + 'addfiles', + 'addfolders', + 'addfilesfullpath', + 'addfoldersfullpath', + 'addurls', + 'version_update', + 'version_update_id' + ) + ) + ); + // from these tables + $query->from('#__componentbuilder_joomla_plugin AS a'); + $query->join( + 'LEFT', $this->db->quoteName( + '#__componentbuilder_joomla_plugin_group', 'g' + ) . ' ON (' . $this->db->quoteName('a.joomla_plugin_group') + . ' = ' . $this->db->quoteName('g.guid') . ')' + ); + $query->join( + 'LEFT', + $this->db->quoteName('#__componentbuilder_class_extends', 'e') + . ' ON (' . $this->db->quoteName('a.class_extends') . ' = ' + . $this->db->quoteName('e.guid') . ')' + ); + $query->join( + 'LEFT', $this->db->quoteName( + '#__componentbuilder_joomla_plugin_updates', 'u' + ) . ' ON (' . $this->db->quoteName('a.guid') . ' = ' + . $this->db->quoteName('u.joomla_plugin') . ')' + ); + $query->join( + 'LEFT', $this->db->quoteName( + '#__componentbuilder_joomla_plugin_files_folders_urls', 'f' + ) . ' ON (' . $this->db->quoteName('a.guid') . ' = ' + . $this->db->quoteName('f.joomla_plugin') . ')' + ); + $query->where($this->db->quoteName('a.' . $key) . ' = ' . $this->db->quote($value)); + $query->where($this->db->quoteName('a.published') . ' >= 1'); + + return $query; + } + + /** + * get plugin data + * + * @param string $query The plugin query + * + * @return object|null The plugin data + * @since 5.0.4 + */ + private function getData($query): ?object + { + $this->db->setQuery($query); + $this->db->execute(); + if ($this->db->getNumRows()) + { + // get the plugin data + $plugin = $this->db->loadObject(); + $id = $plugin->id; + + // tweak system to set stuff to the plugin domain + $_backup_target = $this->config->build_target; + $_backup_lang = $this->config->lang_target; + $_backup_langPrefix = $this->config->lang_prefix; + + // set some keys + $plugin->target_type = 'pLuG!n'; + $plugin->key = $plugin->id . '_' . $plugin->target_type; + + // update to point to plugin + $this->config->build_target = $plugin->key; + $this->config->lang_target = $plugin->key; + + // set version if not set + if (empty($plugin->plugin_version)) + { + $plugin->plugin_version = '1.0.0'; + } + + // set GUI mapper + $guiMapper = array('table' => 'joomla_plugin', + 'id' => (int) $id, 'type' => 'php'); + + // update the name if it has dynamic values + $plugin->name = $this->placeholder->update_( + $this->customcode->update($plugin->name) + ); + + // catch empty group name + $plugin->group ??= 'ErrorGroupMissing'; + + // update the name if it has dynamic values + $plugin->code_name + = ClassfunctionHelper::safe( + $plugin->name + ); + + // set official name + $plugin->official_name = ucwords( + $plugin->group . ' - ' . $plugin->name + ); + + // set lang prefix + $plugin->lang_prefix = PluginHelper::safeLangPrefix( + $plugin->code_name, + $plugin->group + ); + + // set langPrefix + $this->config->lang_prefix = $plugin->lang_prefix; + + // set plugin class name + $plugin->class_name = ucfirst( + $plugin->code_name + ); + // set plugin context name + $plugin->context_name = strtolower((string) + $plugin->code_name + ); + + // set plugin namespace + $plugin->namespace = $plugin->code_name; + + // set plugin group namespace + $plugin->group_namespace = ucfirst( + $plugin->group + ); + + // set plugin install class name + $plugin->installer_class_name + = PluginHelper::safeInstallClassName( + $plugin->code_name, + $plugin->group + ); + + // set plugin folder name + $plugin->folder_name + = PluginHelper::safeFolderName( + $plugin->code_name, + $plugin->group + ); + + // set the zip name + $plugin->zip_name = $plugin->folder_name . '_v' . str_replace( + '.', '_', (string) $plugin->plugin_version + ) . '__J' . $this->config->joomla_version; + + // set plugin file name + $plugin->file_name = $plugin->context_name; + $plugin->class_file_name = $plugin->code_name; + + // set plugin context + $plugin->context = $plugin->folder_name . '.' . $plugin->id; + + // set official_name lang strings + $this->language->set( + $plugin->key, $this->config->lang_prefix, $plugin->official_name + ); + + // set the placeholders for this plugin + $this->setPlaceholders($plugin); + + // set some description for this plugin + $this->setDescription($plugin); + + // set some readme for this plugin + $this->setReadme($plugin); + + // open some base64 strings + if (!empty($plugin->main_class_code)) + { + // set GUI mapper field + $guiMapper['field'] = 'main_class_code'; + // base64 Decode main_class_code. + $plugin->main_class_code = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $plugin->main_class_code) + ) + ), + $guiMapper + ); + } + + // set the head :) + if ($plugin->add_head == 1 && !empty($plugin->head)) + { + // set GUI mapper field + $guiMapper['field'] = 'head'; + // base64 Decode head. + $plugin->header = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $plugin->head) + ) + ), + $guiMapper + ); + } + elseif (!empty($plugin->class_head)) + { + // base64 Decode head. + $plugin->header = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $plugin->class_head) + ) + ), + array( + 'table' => 'class_extends', + 'field' => 'head', + 'id' => (int) $plugin->class_id, + 'type' => 'php') + ); + } + unset($plugin->class_head); + + // Check the plugin's code and header for each trait + foreach ($this->service_checks as $key => $info) + { + if (strpos($plugin->main_class_code, $key) !== false || + strpos($plugin->main_class_code, $info['class']) !== false || + strpos($plugin->header, $info['trait']) !== false) + { + $service_provider[] = Indent::_(4) . "\$plugin->{$info['method']}(\$container->get({$info['service']}::class));"; + } + } + + // Assign service provider if any services were added + if (!empty($service_provider)) + { + $plugin->service_provider = implode(PHP_EOL, $service_provider); + } + + // set the comment + if (!empty($plugin->comment)) + { + // base64 Decode comment. + $plugin->comment = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $plugin->comment) + ) + ), + array( + 'table' => 'class_extends', + 'field' => 'comment', + 'id' => (int) $plugin->class_id, + 'type' => 'php') + ); + } + + // start the config array + $plugin->config_fields = []; + // create the form arrays + $plugin->form_files = []; + $plugin->fieldsets_label = []; + $plugin->fieldsets_paths = []; + $plugin->add_rule_path = []; + $plugin->add_field_path = []; + // set global fields rule to default component path + $plugin->fields_rules_paths = 1; + // set the fields data + $plugin->fields = (isset($plugin->fields) + && JsonHelper::check($plugin->fields)) + ? json_decode((string) $plugin->fields, true) : null; + if (ArrayHelper::check($plugin->fields)) + { + // ket global key + $key = $plugin->key; + $dynamic_fields = array('fieldset' => 'basic', + 'fields_name' => 'params', + 'file' => 'config'); + foreach ($plugin->fields as $n => &$form) + { + if (isset($form['fields']) + && ArrayHelper::check( + $form['fields'] + )) + { + // make sure the dynamic_field is set to dynamic_value by default + foreach ( + $dynamic_fields as $dynamic_field => + $dynamic_value + ) + { + if (!isset($form[$dynamic_field]) + || !StringHelper::check( + $form[$dynamic_field] + )) + { + $form[$dynamic_field] = $dynamic_value; + } + else + { + if ('fields_name' === $dynamic_field + && strpos((string) $form[$dynamic_field], '.') + !== false) + { + $form[$dynamic_field] + = $form[$dynamic_field]; + } + else + { + $form[$dynamic_field] + = StringHelper::safe( + $form[$dynamic_field] + ); + } + } + } + // check if field is external form file + if (!isset($form['plugin']) || $form['plugin'] != 1) + { + // now build the form key + $unique = $form['file'] . $form['fields_name'] + . $form['fieldset']; + } + else + { + // now build the form key + $unique = $form['fields_name'] + . $form['fieldset']; + } + // set global fields rule path switchs + if ($plugin->fields_rules_paths == 1 + && isset($form['fields_rules_paths']) + && $form['fields_rules_paths'] == 2) + { + $plugin->fields_rules_paths = 2; + } + // set where to path is pointing + $plugin->fieldsets_paths[$unique] + = $form['fields_rules_paths']; + // add the label if set to lang + if (isset($form['label']) + && StringHelper::check( + $form['label'] + )) + { + $plugin->fieldsets_label[$unique] + = $this->language->key($form['label']); + } + // check for extra rule paths + if (isset($form['addrulepath']) + && ArrayHelper::check($form['addrulepath'])) + { + foreach ($form['addrulepath'] as $add_rule_path) + { + if (StringHelper::check($add_rule_path['path'])) + { + $plugin->add_rule_path[$unique] = $add_rule_path['path']; + } + } + } + // check for extra field paths + if (isset($form['addfieldpath']) + && ArrayHelper::check($form['addfieldpath'])) + { + foreach ($form['addfieldpath'] as $add_field_path) + { + if (StringHelper::check($add_field_path['path'])) + { + $plugin->add_field_path[$unique] = $add_field_path['path']; + } + } + } + // build the fields + $form['fields'] = array_map( + function ($field) use ($key, $unique) { + // make sure the alias and title is 0 + $field['alias'] = 0; + $field['title'] = 0; + // set the field details + $this->field->set( + $field, $key, $key, $unique + ); + // update the default if set + if (StringHelper::check( + $field['custom_value'] + ) + && isset($field['settings'])) + { + if (($old_default + = GetHelper::between( + $field['settings']->xml, + 'default="', '"', false + )) !== false) + { + // replace old default + $field['settings']->xml + = str_replace( + 'default="' . $old_default + . '"', 'default="' + . $field['custom_value'] . '"', + (string) $field['settings']->xml + ); + } + else + { + // add the default (hmmm not ideal but okay it should work) + $field['settings']->xml + = 'default="' + . $field['custom_value'] . '" ' + . $field['settings']->xml; + } + } + unset($field['custom_value']); + + // return field + return $field; + }, array_values($form['fields']) + ); + // check if field is external form file + if (!isset($form['plugin']) || $form['plugin'] != 1) + { + // load the form file + if (!isset($plugin->form_files[$form['file']])) + { + $plugin->form_files[$form['file']] + = []; + } + if (!isset($plugin->form_files[$form['file']][$form['fields_name']])) + { + $plugin->form_files[$form['file']][$form['fields_name']] + = []; + } + if (!isset($plugin->form_files[$form['file']][$form['fields_name']][$form['fieldset']])) + { + $plugin->form_files[$form['file']][$form['fields_name']][$form['fieldset']] + = []; + } + // do some house cleaning (for fields) + foreach ($form['fields'] as $field) + { + // so first we lock the field name in + $this->fieldname->get( + $field, $plugin->key, $unique + ); + // add the fields to the global form file builder + $plugin->form_files[$form['file']][$form['fields_name']][$form['fieldset']][] + = $field; + } + // remove form + unset($plugin->fields[$n]); + } + else + { + // load the config form + if (!isset($plugin->config_fields[$form['fields_name']])) + { + $plugin->config_fields[$form['fields_name']] + = []; + } + if (!isset($plugin->config_fields[$form['fields_name']][$form['fieldset']])) + { + $plugin->config_fields[$form['fields_name']][$form['fieldset']] + = []; + } + // do some house cleaning (for fields) + foreach ($form['fields'] as $field) + { + // so first we lock the field name in + $this->fieldname->get( + $field, $plugin->key, $unique + ); + // add the fields to the config builder + $plugin->config_fields[$form['fields_name']][$form['fieldset']][] + = $field; + } + // remove form + unset($plugin->fields[$n]); + } + } + else + { + unset($plugin->fields[$n]); + } + } + } + unset($plugin->fields); + + // set files and folders + $this->filesfolders->set($plugin); + + // add PHP in plugin install + $plugin->add_install_script = true; + $addScriptMethods = [ + 'php_preflight', + 'php_postflight', + 'php_method', + 'php_script' + ]; + $addScriptTypes = [ + 'install', + 'update', + 'uninstall', + 'construct' + ]; + foreach ($addScriptMethods as $scriptMethod) + { + foreach ($addScriptTypes as $scriptType) + { + if (isset( $plugin->{'add_' . $scriptMethod . '_' . $scriptType}) + && $plugin->{'add_' . $scriptMethod . '_' . $scriptType} == 1 + && StringHelper::check( + $plugin->{$scriptMethod . '_' . $scriptType} + )) + { + // set GUI mapper field + $guiMapper['field'] = $scriptMethod . '_' . $scriptType; + $plugin->{$scriptMethod . '_' . $scriptType} = $this->gui->set( + $this->placeholder->update_( + $this->customcode->update( + base64_decode( + (string) $plugin->{$scriptMethod . '_' . $scriptType} + ) + ) + ), + $guiMapper + ); + } + else + { + unset($plugin->{$scriptMethod . '_' . $scriptType}); + $plugin->{'add_' . $scriptMethod . '_' . $scriptType} = 0; + } + } + } + + // add_sql + if ($plugin->add_sql == 1 + && StringHelper::check($plugin->sql)) + { + $plugin->sql = $this->placeholder->update_( + $this->customcode->update(base64_decode((string) $plugin->sql)) + ); + } + else + { + unset($plugin->sql); + $plugin->add_sql = 0; + } + + // add_sql_uninstall + if ($plugin->add_sql_uninstall == 1 + && StringHelper::check( + $plugin->sql_uninstall + )) + { + $plugin->sql_uninstall = $this->placeholder->update_( + $this->customcode->update( + base64_decode((string) $plugin->sql_uninstall) + ) + ); + } + else + { + unset($plugin->sql_uninstall); + $plugin->add_sql_uninstall = 0; + } + + // update the URL of the update_server if set + if ($plugin->add_update_server == 1 + && StringHelper::check( + $plugin->update_server_url + )) + { + $plugin->update_server_url = $this->placeholder->update_( + $this->customcode->update($plugin->update_server_url) + ); + } + + // add the update/sales server FTP details if that is the expected protocol + $serverArray = array('update_server', 'sales_server'); + foreach ($serverArray as $server) + { + if ($plugin->{'add_' . $server} == 1 + && is_numeric( + $plugin->{$server} + ) + && $plugin->{$server} > 0) + { + // get the server protocol + $plugin->{$server . '_protocol'} + = GetHelper::var( + 'server', (int) $plugin->{$server}, 'id', 'protocol' + ); + } + else + { + $plugin->{$server} = 0; + // only change this for sales server (update server can be added locally to the zip file) + if ('sales_server' === $server) + { + $plugin->{'add_' . $server} = 0; + } + $plugin->{$server . '_protocol'} = 0; + } + } + + // old path (to remove) + $plugin->remove_file_paths = []; + $plugin->remove_file_paths[] = "/plugins/{$plugin->group}/{$plugin->context_name}/{$plugin->file_name}.php"; + + // set the update server stuff (TODO) + // update_server_xml_path + // update_server_xml_file_name + + // rest globals + $this->config->build_target = $_backup_target; + $this->config->lang_target = $_backup_lang; + $this->config->set('lang_prefix', $_backup_langPrefix); + + // clear the placeholders for this plugin + $this->clearPlaceholders(); + + return $plugin; + } + + return null; + } + + /** + * Sets plugin readme. + * + * @param object $plugin The plugin object. + * + * @return void + * @since 5.0.4 + */ + private function setReadme(object $plugin): void + { + if ($plugin->addreadme == 1 && !empty($plugin->readme)) + { + $plugin->readme = $this->placeholder->update_( + $this->customcode->update(base64_decode((string) $plugin->readme)) + ); + } + else + { + $plugin->addreadme = 0; + unset($plugin->readme); + } + } + + /** + * Sets plugin description. + * + * @param object $plugin The plugin object. + * + * @return void + * @since 5.0.4 + */ + private function setDescription(object $plugin): void + { + if (!isset($plugin->description) + || !StringHelper::check( + $plugin->description + )) + { + $plugin->description = ''; + } + else + { + $plugin->description = $this->placeholder->update_( + $this->customcode->update($plugin->description) + ); + $this->language->set( + $plugin->key, $plugin->lang_prefix . '_DESCRIPTION', + $plugin->description + ); + // set description + $this->placeholder->set('DESCRIPTION', $plugin->description); + $plugin->description = '

' . $plugin->description . '

'; + } + + // get author name + $project_author = $this->config->project_author; + + // we can only set these if the component was passed + $plugin->xml_description = "

" . $plugin->official_name + . " (v." . $plugin->plugin_version + . ")

" + . $plugin->description . "

Created by " . trim( + (string) OutputFilter::cleanText($project_author) + ) . "
Development started " + . Factory::getDate($plugin->created)->format("jS F, Y") + . "

"; + + // set xml discription + $this->language->set( + $plugin->key, $plugin->lang_prefix . '_XML_DESCRIPTION', + $plugin->xml_description + ); + } + + /** + * Sets the placeholders for this view + * + * @param object $plugin The plugin object. + * + * @return void + * @since 5.0.4 + */ + private function setPlaceholders(object $plugin): void + { + // set some placeholder for this plugin + $this->placeholder->set('Plugin_name', $plugin->official_name); + $this->placeholder->set('PLUGIN_NAME', $plugin->official_name); + $this->placeholder->set('Plugin', ucfirst((string) $plugin->code_name)); + $this->placeholder->set('plugin', strtolower((string) $plugin->code_name)); + $this->placeholder->set('Plugin_group', ucfirst((string) $plugin->group)); + $this->placeholder->set('plugin_group', strtolower((string) $plugin->group)); + $this->placeholder->set('plugin.version', $plugin->plugin_version); + $this->placeholder->set('VERSION', $plugin->plugin_version); + $this->placeholder->set('plugin_version', str_replace( + '.', '_', (string) $plugin->plugin_version + )); + $this->placeholder->set('DESCRIPTION', ''); + } + + /** + * Clear the placeholders for this plugin + * + * @return void + * @since 5.0.4 + */ + private function clearPlaceholders(): void + { + $this->placeholder->remove('Plugin_name'); + $this->placeholder->remove('Plugin'); + $this->placeholder->remove('plugin'); + $this->placeholder->remove('Plugin_group'); + $this->placeholder->remove('plugin_group'); + $this->placeholder->remove('plugin.version'); + $this->placeholder->remove('plugin_version'); + $this->placeholder->remove('VERSION'); + $this->placeholder->remove('DESCRIPTION'); + $this->placeholder->remove('PLUGIN_NAME'); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Infusion.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Infusion.php new file mode 100644 index 000000000..9c49254ba --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Infusion.php @@ -0,0 +1,392 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface as Header; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PluginDataInterface as Data; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface as InstallScript; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Plugin\ExtensionInterface as Extension; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Plugin\ProviderInterface as Provider; +use VDM\Joomla\Componentbuilder\Interfaces\Architecture\Plugin\MainXMLInterface as MainXML; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentMulti; +use VDM\Joomla\Componentbuilder\Compiler\Builder\ContentOne; +use VDM\Joomla\Componentbuilder\Compiler\Creator\FieldsetExtension; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Interfaces\Plugin\InfusionInterface; + + +/** + * Joomla 6 Plugin Infusion Class + * + * @since 5.1.2 + */ +final class Infusion implements InfusionInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 5.0.2 + */ + protected Config $config; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.0.2 + */ + protected Placeholder $placeholder; + + /** + * The Header Class. + * + * @var Header + * @since 5.0.2 + */ + protected Header $header; + + /** + * The Event Class. + * + * @var Event + * @since 5.0.2 + */ + protected Event $event; + + /** + * The PluginData Class. + * + * @var Data + * @since 5.0.2 + */ + protected Data $data; + + /** + * The GetScript Class. + * + * @var InstallScript + * @since 5.0.2 + */ + protected InstallScript $installscript; + + /** + * The Extension Class. + * + * @var Extension + * @since 5.0.2 + */ + protected Extension $extension; + + /** + * The Provider Class. + * + * @var Provider + * @since 5.0.2 + */ + protected Provider $provider; + + /** + * The MainXML Class. + * + * @var MainXML + * @since 5.0.2 + */ + protected MainXML $mainxml; + + /** + * The Content Multi Class. + * + * @var ContentMulti + * @since 5.0.2 + */ + protected ContentMulti $contentmulti; + + /** + * The Content One Class. + * + * @var ContentOne + * @since 5.0.2 + */ + protected ContentOne $contentone; + + /** + * The Fieldset Extension Class. + * + * @var FieldsetExtension + * @since 5.0.2 + */ + protected FieldsetExtension $fieldsetextension; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param Header $header The HeaderInterface Class. + * @param Event $event The EventInterface Class. + * @param Data $data The PluginDataInterface Class. + * @param InstallScript $installscript The GetScriptInterface Class. + * @param Extension $extension The ExtensionInterface Class. + * @param Provider $provider The ProviderInterface Class. + * @param MainXML $mainxml The MainXMLInterface Class. + * @param ContentMulti $contentmulti The ContentMulti Class. + * @param ContentOne $contentone The ContentOne Class. + * @param FieldsetExtension $fieldsetextension The FieldsetExtension Class. + * + * @since 5.0.2 + */ + public function __construct(Config $config, Placeholder $placeholder, Header $header, + Event $event, Data $data, InstallScript $installscript, + Extension $extension, Provider $provider, + MainXML $mainxml, ContentMulti $contentmulti, + ContentOne $contentone, FieldsetExtension $fieldsetextension) + { + $this->config = $config; + $this->placeholder = $placeholder; + $this->header = $header; + $this->event = $event; + $this->data = $data; + $this->installscript = $installscript; + $this->extension = $extension; + $this->provider = $provider; + $this->mainxml = $mainxml; + $this->contentmulti = $contentmulti; + $this->contentone = $contentone; + $this->fieldsetextension = $fieldsetextension; + } + + /** + * Infuse the plugin data into the content. + * + * This method processes each plugin in the data set, triggering events + * before and after infusion, setting placeholders, and adding content + * such as headers, classes, and XML configurations. + * + * @return void + * @since 5.0.2 + */ + public function set(): void + { + if (!$this->data->exists()) + { + return; + } + + foreach ($this->data->get() as $plugin) + { + if (!ObjectHelper::check($plugin)) + { + continue; + } + + $this->triggerBeforeInfusionEvent($plugin); + $this->setPlaceholders($plugin); + $this->buildPluginContent($plugin); + $this->triggerAfterInfusionEvent($plugin); + } + } + + /** + * Trigger the event before infusing the plugin data. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function triggerBeforeInfusionEvent(&$plugin): void + { + $this->event->trigger('jcb_ce_onBeforeInfusePluginData', [&$plugin]); + } + + /** + * Set placeholders based on plugin data. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setPlaceholders($plugin): void + { + $this->placeholder->set('PluginGroupNamespace', $plugin->group_namespace ?? ''); + $this->placeholder->set('PluginNamespace', $plugin->namespace ?? ''); + + $this->config->build_target = $plugin->key; + $this->config->lang_target = $plugin->key; + $this->config->set('lang_prefix', $plugin->lang_prefix); + } + + /** + * Build and set the content related to the plugin. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function buildPluginContent($plugin): void + { + $this->setExtensionClassHeader($plugin); + $this->setExtensionClass($plugin); + $this->setProviderClassHeader($plugin); + $this->setProviderClass($plugin); + + if ($plugin->add_install_script) + { + $this->setInstallClass($plugin); + } + + if (isset($plugin->form_files) && ArrayHelper::check($plugin->form_files)) + { + $this->setFieldsets($plugin); + } + + $this->setMainXml($plugin); + } + + /** + * Set the extension class header content. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setExtensionClassHeader($plugin): void + { + $headerContent = trim( + $this->header->get('plugin.extension.header', $plugin->class_name) + . PHP_EOL . ($plugin->header ?? '') + ); + + $this->contentmulti->set("{$plugin->key}|EXTENSION_CLASS_HEADER", + $this->placeholder->update($headerContent, $this->contentone->allActive()) + ); + } + + /** + * Set the extension class content. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setExtensionClass($plugin): void + { + $extensionContent = $this->extension->get($plugin); + $this->contentmulti->set("{$plugin->key}|EXTENSION_CLASS", $extensionContent); + } + + /** + * Set the provider class header content. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setProviderClassHeader($plugin): void + { + $providerHeader = $this->header->get('plugin.provider.header', $plugin->class_name); + $this->contentmulti->set("{$plugin->key}|PROVIDER_CLASS_HEADER", $providerHeader); + } + + /** + * Set the provider class content. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setProviderClass($plugin): void + { + $providerContent = $this->provider->get($plugin); + $this->contentmulti->set("{$plugin->key}|PROVIDER_CLASS", $providerContent); + } + + /** + * Set the install script content, if needed. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setInstallClass($plugin): void + { + $installContent = $this->installscript->get($plugin); + $this->contentmulti->set("{$plugin->key}|INSTALL_CLASS", $installContent); + } + + /** + * Set fieldset content based on form files. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setFieldsets($plugin): void + { + foreach ($plugin->form_files as $file => $files) + { + foreach ($files as $field_name => $fieldsets) + { + foreach ($fieldsets as $fieldset => $fields) + { + $fieldsetContent = $this->fieldsetextension->get($plugin, $fields); + $this->contentmulti->set( + "{$plugin->key}|FIELDSET_{$file}{$field_name}{$fieldset}", + $fieldsetContent + ); + } + } + } + } + + /** + * Set the main XML content for the plugin. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function setMainXml($plugin): void + { + $mainXmlContent = $this->mainxml->get($plugin); + $this->contentmulti->set("{$plugin->key}|MAINXML", $mainXmlContent); + } + + /** + * Trigger the event after infusing the plugin data. + * + * @param object $plugin The plugin object being processed. + * + * @return void + * @since 5.0.2 + */ + protected function triggerAfterInfusionEvent(&$plugin): void + { + $this->event->trigger('jcb_ce_onAfterInfusePluginData', [&$plugin]); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Structure.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Structure.php new file mode 100644 index 000000000..b8b6d0dde --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/Structure.php @@ -0,0 +1,827 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PluginDataInterface as Plugin; +use VDM\Joomla\Componentbuilder\Compiler\Component; +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Registry; +use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Folder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\File; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Componentbuilder\Interfaces\Plugin\StructureInterface; + + +/** + * Joomla 6 Plugin Builder Class + * + * @since 5.1.2 + */ +final class Structure implements StructureInterface +{ + /** + * The Data Class. + * + * @var Plugin + * @since 3.2.0 + */ + protected Plugin $plugin; + + /** + * The Component Class. + * + * @var Component + * @since 3.2.0 + */ + protected Component $component; + + /** + * The Config Class. + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The Registry Class. + * + * @var Registry + * @since 3.2.0 + */ + protected Registry $registry; + + /** + * The Dispenser Class. + * + * @var Dispenser + * @since 3.2.0 + */ + protected Dispenser $dispenser; + + /** + * The EventInterface Class. + * + * @var Event + * @since 3.2.0 + */ + protected Event $event; + + /** + * The Counter Class. + * + * @var Counter + * @since 3.2.0 + */ + protected Counter $counter; + + /** + * The Folder Class. + * + * @var Folder + * @since 3.2.0 + */ + protected Folder $folder; + + /** + * The File Class. + * + * @var File + * @since 3.2.0 + */ + protected File $file; + + /** + * The Files Class. + * + * @var Files + * @since 3.2.0 + */ + protected Files $files; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 5.0.0 + */ + protected Placeholder $placeholder; + + /** + * The Namespace Prefix + * + * @var string + * @since 5.0.0 + */ + protected string $NamespacePrefix; + + /** + * The Component Namespace (in code) + * + * @var string + * @since 3.2.0 + */ + protected string $ComponentNamespace; + + /** + * Constructor. + * + * @param Plugin $plugin The Data Class. + * @param Component $component The Component Class. + * @param Config $config The Config Class. + * @param Registry $registry The Registry Class. + * @param Dispenser $dispenser The Dispenser Class. + * @param Event $event The EventInterface Class. + * @param Counter $counter The Counter Class. + * @param Folder $folder The Folder Class. + * @param File $file The File Class. + * @param Files $files The Files Class. + * @param Placeholder $placeholder The Placeholder Class. + * + * @since 3.2.0 + */ + public function __construct(Plugin $plugin, Component $component, Config $config, + Registry $registry, Dispenser $dispenser, Event $event, + Counter $counter, Folder $folder, File $file, + Files $files, Placeholder $placeholder) + { + $this->plugin = $plugin; + $this->component = $component; + $this->config = $config; + $this->registry = $registry; + $this->dispenser = $dispenser; + $this->event = $event; + $this->counter = $counter; + $this->folder = $folder; + $this->file = $file; + $this->files = $files; + $this->placeholder = $placeholder; + + // set some global values + $this->NamespacePrefix = $this->placeholder->get('NamespacePrefix'); + $this->ComponentNamespace = $this->placeholder->get('ComponentNamespace'); + } + + /** + * Build the Plugins files, folders, url's and config + * + * @return void + * @since 3.2.0 + */ + public function build() + { + if ($this->plugin->exists()) + { + // for plugin event TODO change event api signatures + $component_context = $this->config->component_context; + $plugins = $this->plugin->get(); + + // Trigger Event: jcb_ce_onBeforeSetPlugins + $this->event->trigger( + 'jcb_ce_onBeforeBuildPlugins', + array(&$component_context, &$plugins) + ); + + foreach ($plugins as $plugin) + { + if (ObjectHelper::check($plugin) + && isset($plugin->folder_name) + && StringHelper::check($plugin->folder_name)) + { + // plugin path + $this->pluginPath($plugin); + + // create src folder + $this->folder->create($plugin->folder_path . '/src'); + + // set the plugin paths + $this->registry->set('dynamic_paths.' . $plugin->key, $plugin->folder_path); + + // make sure there is no old build + $this->folder->remove($plugin->folder_path); + + // creat the main component folder + $this->folder->create($plugin->folder_path); + + // set main class file + $this->setMainClassFile($plugin); + + // set service provider class file + $this->setServiceProviderClassFile($plugin); + + // set main xml file + $this->setMainXmlFile($plugin); + + // set install script if needed + $this->setInstallScript($plugin); + + // set readme if found + $this->setReadme($plugin); + + // set fields & rules folders if needed + if (isset($plugin->fields_rules_paths) + && $plugin->fields_rules_paths == 2) + { + // create rules folder + $this->folder->create($plugin->folder_path . '/src/Rule'); + + // create fields folder + $this->folder->create($plugin->folder_path . '/src/Field'); + } + + // set forms folder if needed + $this->setForms($plugin); + + // set SQL stuff if needed + $this->setSQL($plugin); + + // create the language folder path + $this->folder->create($plugin->folder_path . '/language'); + + // also create the lang tag folder path + $this->folder->create( + $plugin->folder_path . '/language/' . $this->config->get('lang_tag', 'en-GB') + ); + + // check if this plugin has files + $this->setFiles($plugin); + + // check if this plugin has folders + $this->setFolders($plugin); + + // check if this plugin has urls + $this->setUrls($plugin); + } + } + } + } + + /** + * get the plugin xml template + * + * @param object $plugin The plugin object + * + * @return string + * @since 3.2.0 + */ + protected function getXML(object $plugin): string + { + $xml = ''; + $xml .= PHP_EOL . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->lang_prefix + . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('BUILDDATE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOR') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOREMAIL') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHORWEBSITE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('COPYRIGHT') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('LICENSE') . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->plugin_version + . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . "{$this->NamespacePrefix}\\Plugin\\{$plugin->group_namespace}\\{$plugin->namespace}" + . ''; + $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->lang_prefix + . '_XML_DESCRIPTION'; + $xml .= Placefix::_h('MAINXML'); + $xml .= PHP_EOL . ''; + + return $xml; + } + + /** + * set the plugin path + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function pluginPath(object &$plugin): void + { + $plugin->folder_path = $this->config->get('compiler_path', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/compiler') . '/' + . $plugin->folder_name; + } + + /** + * set the main class path + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setMainClassFile(object $plugin): void + { + // create extension folder + $this->folder->create($plugin->folder_path . '/src/Extension'); + + $file_details = [ + 'path' => $plugin->folder_path . '/src/Extension/' . $plugin->class_file_name . '.php', + 'name' => $plugin->class_file_name . '.php', + 'zip' => 'src/Extension/' . $plugin->class_file_name . '.php' + ]; + + $this->file->write( + $file_details['path'], + 'NamespacePrefix}\\Plugin\\{$plugin->group_namespace}\\{$plugin->namespace}\\Extension;" . + PHP_EOL . PHP_EOL . Placefix::_h('EXTENSION_CLASS_HEADER') . + PHP_EOL . PHP_EOL . '// No direct access to this file' . PHP_EOL . + "defined('_JEXEC') or die('Restricted access');" . + PHP_EOL . PHP_EOL . + Placefix::_h('EXTENSION_CLASS') + ); + + $this->files->appendArray($plugin->key, $file_details); + + // count the file created + $this->counter->file++; + } + + /** + * set the service provider path + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setServiceProviderClassFile(object $plugin): void + { + // create services folder + $this->folder->create($plugin->folder_path . '/services'); + + $file_details = [ + 'path' => $plugin->folder_path . '/services/provider.php', + 'name' => 'provider.php', + 'zip' => 'services/provider.php' + ]; + + $this->file->write( + $file_details['path'], + 'files->appendArray($plugin->key, $file_details); + + // count the file created + $this->counter->file++; + } + + /** + * set the main xml file + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setMainXmlFile(object $plugin): void + { + $file_details = [ + 'path' => $plugin->folder_path . '/' . $plugin->file_name . '.xml', + 'name' => $plugin->file_name . '.xml', + 'zip' => $plugin->file_name . '.xml' + ]; + + $this->file->write( + $file_details['path'], + $this->getXML($plugin) + ); + + $this->files->appendArray($plugin->key, $file_details); + + // count the file created + $this->counter->file++; + } + + /** + * set the install script file + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setInstallScript(object $plugin): void + { + if ($plugin->add_install_script) + { + $file_details = [ + 'path' => $plugin->folder_path . '/script.php', + 'name' => 'script.php', + 'zip' => 'script.php' + ]; + + $this->file->write( + $file_details['path'], + 'files->appendArray($plugin->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + + /** + * set the readme file + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setReadme(object $plugin): void + { + if ($plugin->addreadme) + { + $file_details = [ + 'path' => $plugin->folder_path . '/README.md', + 'name' => 'README.md', + 'zip' => 'README.md' + ]; + + $this->file->write($file_details['path'], $plugin->readme); + $this->files->appendArray($plugin->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + + /** + * set the form files and folders + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setForms(object $plugin): void + { + if (isset($plugin->form_files) + && ArrayHelper::check($plugin->form_files)) + { + // create forms folder + $this->folder->create($plugin->folder_path . '/forms'); + + // set the template files + foreach ($plugin->form_files as $file => $fields) + { + // set file details + $file_details = [ + 'path' => $plugin->folder_path . '/forms/' . $file . '.xml', + 'name' => $file . '.xml', + 'zip' => 'forms/' . $file . '.xml' + ]; + + // build basic XML + $xml = ''; + $xml .= PHP_EOL . ''; + + // search if we must add the component path + $add_component_path = false; + foreach ($fields as $field_name => $fieldsets) + { + if (!$add_component_path) + { + foreach ($fieldsets as $fieldset => $field) + { + if (!$add_component_path + && isset($plugin->fieldsets_paths[$file . $field_name . $fieldset]) + && $plugin->fieldsets_paths[$file. $field_name . $fieldset] == 1) + { + $add_component_path = true; + } + } + } + } + + // only add if part of the component field types path is required + if ($add_component_path) + { + $xml .= PHP_EOL . ''; + } + else + { + $xml .= PHP_EOL . '
'; + } + + // add the fields + foreach ($fields as $field_name => $fieldsets) + { + // check if we have an double fields naming set + $field_name_inner = ''; + $field_name_outer = $field_name; + if (strpos((string)$field_name, '.') !== false) + { + $field_names = explode('.', (string)$field_name); + if (count((array)$field_names) == 2) + { + $field_name_outer = $field_names[0]; + $field_name_inner = $field_names[1]; + } + } + $xml .= PHP_EOL . Indent::_(1) + . ''; + foreach ($fieldsets as $fieldset => $field) + { + // default to the field set name + $label = $fieldset; + if (isset($plugin->fieldsets_label[$file . $field_name . $fieldset])) + { + $label = $plugin->fieldsets_label[$file . $field_name . $fieldset]; + } + + // add path to plugin rules and custom fields + if (isset($plugin->fieldsets_paths[$file . $field_name . $fieldset]) + && ($plugin->fieldsets_paths[$file . $field_name . $fieldset] == 2 + || $plugin->fieldsets_paths[$file . $field_name . $fieldset] == 3)) + { + if (!isset($plugin->add_rule_path[$file . $field_name . $fieldset])) + { + $plugin->add_rule_path[$file . $field_name . $fieldset] = + "{$this->NamespacePrefix}\\Plugin\\{$plugin->group_namespace}\\{$plugin->namespace}\\Rule"; + } + + if (!isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $plugin->add_field_path[$file . $field_name . $fieldset] = + "{$this->NamespacePrefix}\\Plugin\\{$plugin->group_namespace}\\{$plugin->namespace}\\Field"; + } + } + + // add path to plugin rules and custom fields + if (isset($plugin->add_rule_path[$file . $field_name . $fieldset]) + || isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(1) . ''; + + $xml .= PHP_EOL . Indent::_(1) . '
add_rule_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addruleprefix="' . $plugin->add_rule_path[$file . $field_name . $fieldset] . '"'; + } + + if (isset($plugin->add_field_path[$file . $field_name . $fieldset])) + { + $xml .= PHP_EOL . Indent::_(2) + . 'addfieldprefix="' . $plugin->add_field_path[$file . $field_name . $fieldset] . '"'; + } + + $xml .= PHP_EOL . Indent::_(1) . '>'; + } + else + { + $xml .= PHP_EOL . Indent::_(1) . '
'; + } + + // check if we have an inner field set + if (StringHelper::check($field_name_inner)) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + + // add the placeholder of the fields + $xml .= Placefix::_h('FIELDSET_' . $file + . $field_name . $fieldset); + + // check if we have an inner field set + if (StringHelper::check($field_name_inner)) + { + $xml .= PHP_EOL . Indent::_(1) + . ''; + } + $xml .= PHP_EOL . Indent::_(1) + . '
'; + } + $xml .= PHP_EOL . Indent::_(1) . ''; + } + $xml .= PHP_EOL . ''; + + // add xml to file + $this->file->write($file_details['path'], $xml); + $this->files->appendArray($plugin->key, $file_details); + + // count the file created + $this->counter->file++; + } + } + } + + /** + * set the sql stuff + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setSQL(object $plugin): void + { + if ($plugin->add_sql || $plugin->add_sql_uninstall) + { + // create SQL folder + $this->folder->create($plugin->folder_path . '/sql'); + + // create mysql folder + $this->folder->create( + $plugin->folder_path . '/sql/mysql' + ); + + // now set the install file + if ($plugin->add_sql) + { + $this->file->write( + $plugin->folder_path . '/sql/mysql/install.sql', + $plugin->sql + ); + + // count the file created + $this->counter->file++; + } + + // now set the uninstall file + if ($plugin->add_sql_uninstall) + { + $this->file->write( + $plugin->folder_path + . '/sql/mysql/uninstall.sql', + $plugin->sql_uninstall + ); + + // count the file created + $this->counter->file++; + } + } + } + + /** + * set the files + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setFiles(object $plugin): void + { + if (isset($plugin->files) && ArrayHelper::check($plugin->files)) + { + // add to component files + foreach ($plugin->files as $file) + { + // set the path finder + $file['target_type'] = $plugin->target_type; + $file['target_id'] = $plugin->id; + + $this->component->appendArray('files', $file); + } + } + } + + /** + * set the folders + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setFolders(object $plugin): void + { + if (isset($plugin->folders) && ArrayHelper::check($plugin->folders)) + { + // add to component folders + foreach ($plugin->folders as $folder) + { + // set the path finder + $folder['target_type'] = $plugin->target_type; + $folder['target_id'] = $plugin->id; + + $this->component->appendArray('folders', $folder); + } + } + } + + /** + * set the urls + * + * @param object $plugin The plugin object + * + * @return void + * @since 3.2.0 + */ + protected function setUrls(object &$plugin): void + { + if (isset($plugin->urls) && ArrayHelper::check($plugin->urls)) + { + // add to component urls + foreach ($plugin->urls as &$url) + { + // should we add the local folder + if (isset($url['type']) && $url['type'] > 1 + && isset($url['url']) + && StringHelper::check($url['url'])) + { + // set file name + $fileName = basename((string)$url['url']); + + // get the file contents + $data = FileHelper::getContent( + $url['url'] + ); + + // build sub path + if (strpos($fileName, '.js') !== false) + { + $path = '/js'; + } + elseif (strpos($fileName, '.css') !== false) + { + $path = '/css'; + } + else + { + $path = ''; + } + + // create sub media folder path if not set + $this->folder->create( + $plugin->folder_path . $path + ); + + // set the path to plugin file + $url['path'] = $plugin->folder_path . $path + . '/' . $fileName; // we need this for later + + // write data to path + $this->file->write($url['path'], $data); + + // count the file created + $this->counter->file++; + } + } + } + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/JoomlaSix/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/Customtabs.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/Customtabs.php new file mode 100644 index 000000000..c4a89b02a --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/Customtabs.php @@ -0,0 +1,240 @@ + + * @git 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 + */ + +namespace VDM\Joomla\Componentbuilder\Compiler\Model\JoomlaSix; + + +use VDM\Joomla\Componentbuilder\Compiler\Config; +use VDM\Joomla\Componentbuilder\Compiler\Builder\CustomTabs as BuilderCustomTabs; +use VDM\Joomla\Componentbuilder\Compiler\Language; +use VDM\Joomla\Componentbuilder\Compiler\Placeholder; +use VDM\Joomla\Componentbuilder\Compiler\Customcode; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Model\CustomtabsInterface; + + +/** + * Joomla 6 Model Custom Tabs Class + * + * @since 5.1.2 + */ +final class Customtabs implements CustomtabsInterface +{ + /** + * The Config Class. + * + * @var Config + * @since 3.2.0 + */ + protected Config $config; + + /** + * The CustomTabs Class. + * + * @var BuilderCustomTabs + * @since 3.2.0 + */ + protected BuilderCustomTabs $buildercustomtabs; + + /** + * The Language Class. + * + * @var Language + * @since 3.2.0 + */ + protected Language $language; + + /** + * The Placeholder Class. + * + * @var Placeholder + * @since 3.2.0 + */ + protected Placeholder $placeholder; + + /** + * The Customcode Class. + * + * @var Customcode + * @since 3.2.0 + */ + protected Customcode $customcode; + + /** + * Constructor. + * + * @param Config $config The Config Class. + * @param BuilderCustomTabs $buildercustomtabs The CustomTabs Class. + * @param Language $language The Language Class. + * @param Placeholder $placeholder The Placeholder Class. + * @param Customcode $customcode The Customcode Class. + * + * @since 3.2.0 + */ + public function __construct(Config $config, BuilderCustomTabs $buildercustomtabs, Language $language, Placeholder $placeholder, Customcode $customcode) + { + $this->config = $config; + $this->buildercustomtabs = $buildercustomtabs; + $this->language = $language; + $this->placeholder = $placeholder; + $this->customcode = $customcode; + } + + /** + * Set custom tabs + * + * @param object $item The view data + * + * @return void + * @since 3.2.0 + */ + public function set(object &$item) + { + $item->customtabs = (isset($item->customtabs) + && JsonHelper::check($item->customtabs)) + ? json_decode((string) $item->customtabs, true) : null; + + if (ArrayHelper::check($item->customtabs)) + { + // get the name + $name = $item->name_single_code; + + // setup custom tabs to global data sets + $this->buildercustomtabs->set($name, + array_map( + function ($tab) use (&$name) { + + // set the view name + $tab['view'] = $name; + + // load the dynamic data + $tab['html'] = $this->placeholder->update_( + $this->customcode->update($tab['html']) + ); + + // set the tab name + $tab['name'] = (isset($tab['name']) + && StringHelper::check( + $tab['name'] + )) ? $tab['name'] : 'Tab'; + + // set lang + $tab['lang'] = $this->config->lang_prefix . '_' + . StringHelper::safe( + $tab['view'], 'U' + ) . '_' . StringHelper::safe( + $tab['name'], 'U' + ); + $this->language->set( + 'both', $tab['lang'], $tab['name'] + ); + + // set code name + $tab['code'] = StringHelper::safe( + $tab['name'] + ); + + // check if the permissions for the tab should be added + $_tab = ''; + if (isset($tab['permission']) + && $tab['permission'] == 1) + { + $_tab = Indent::_(1); + } + + // check if the php of the tab is set, if not load it now + if (strpos((string) $tab['html'], 'uitab.addTab') === false + && strpos((string) $tab['html'], 'uitab.endTab') + === false) + { + // add the tab + $tmp = PHP_EOL . $_tab . Indent::_(1) + . ""; + $tmp .= PHP_EOL . $_tab . Indent::_(2) + . '
'; + $tmp .= PHP_EOL . $_tab . Indent::_(3) + . '
'; + $tmp .= PHP_EOL . $_tab . Indent::_(4) . implode( + PHP_EOL . $_tab . Indent::_(4), + (array) explode(PHP_EOL, trim((string) $tab['html'])) + ); + $tmp .= PHP_EOL . $_tab . Indent::_(3) . '
'; + $tmp .= PHP_EOL . $_tab . Indent::_(2) . '
'; + $tmp .= PHP_EOL . $_tab . Indent::_(1) + . ""; + + // update html + $tab['html'] = $tmp; + } + else + { + $tab['html'] = PHP_EOL . $_tab . Indent::_(1) + . implode( + PHP_EOL . $_tab . Indent::_(1), + (array) explode(PHP_EOL, trim((string) $tab['html'])) + ); + } + + // add the permissions if needed + if (isset($tab['permission']) + && $tab['permission'] == 1) + { + $tmp = PHP_EOL . Indent::_(1) + . "canDo->get('" + . $tab['view'] . "." . $tab['code'] + . ".viewtab')) : ?>"; + $tmp .= $tab['html']; + $tmp .= PHP_EOL . Indent::_(1) . ""; + // update html + $tab['html'] = $tmp; + // set lang for permissions + $tab['lang_permission'] = $tab['lang'] + . '_TAB_PERMISSION'; + $tab['lang_permission_desc'] = $tab['lang'] + . '_TAB_PERMISSION_DESC'; + $tab['lang_permission_title'] + = $this->placeholder->get('Views') . ' View ' + . $tab['name'] . ' Tab'; + $this->language->set( + 'both', $tab['lang_permission'], + $tab['lang_permission_title'] + ); + $this->language->set( + 'both', $tab['lang_permission_desc'], + 'Allow the users in this group to view ' + . $tab['name'] . ' Tab of ' + . $this->placeholder->get('views') + ); + // set the sort key + $tab['sortKey'] + = StringHelper::safe( + $tab['lang_permission_title'] + ); + } + + // return tab + return $tab; + + }, array_values($item->customtabs) + ) + ); + } + + unset($item->customtabs); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/JoomlaSix/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureComHelperClass.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureComHelperClass.php index d11b7be55..b7cc543c9 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureComHelperClass.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureComHelperClass.php @@ -15,6 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\ComHelperClass\CreateUserInterface; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\ComHelperClass\CreateUser as J6CreateUser; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\ComHelperClass\CreateUser as J5CreateUser; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\ComHelperClass\CreateUser as J4CreateUser; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\ComHelperClass\CreateUser as J3CreateUser; @@ -48,6 +49,9 @@ class ArchitectureComHelperClass implements ServiceProviderInterface $container->alias(CreateUserInterface::class, 'Architecture.ComHelperClass.CreateUser') ->share('Architecture.ComHelperClass.CreateUser', [$this, 'getCreateUser'], true); + $container->alias(J6CreateUser::class, 'Architecture.ComHelperClass.J6.CreateUser') + ->share('Architecture.ComHelperClass.J6.CreateUser', [$this, 'getJ6CreateUser'], true); + $container->alias(J5CreateUser::class, 'Architecture.ComHelperClass.J5.CreateUser') ->share('Architecture.ComHelperClass.J5.CreateUser', [$this, 'getJ5CreateUser'], true); @@ -76,6 +80,19 @@ class ArchitectureComHelperClass implements ServiceProviderInterface return $container->get('Architecture.ComHelperClass.J' . $this->targetVersion . '.CreateUser'); } + /** + * Get The CreateUser Class. + * + * @param Container $container The DI container. + * + * @return J6CreateUser + * @since 5.1.2 + */ + public function getJ6CreateUser(Container $container): J6CreateUser + { + return new J6CreateUser(); + } + /** * Get The CreateUser Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureController.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureController.php index 9da4e9cae..39e01abea 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureController.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureController.php @@ -15,14 +15,17 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowAddInterface; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Controller\AllowAdd as J6ControllerAllowAdd; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Controller\AllowAdd as J5ControllerAllowAdd; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Controller\AllowAdd as J4ControllerAllowAdd; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Controller\AllowAdd as J3ControllerAllowAdd; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowEditInterface; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Controller\AllowEdit as J6ControllerAllowEdit; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Controller\AllowEdit as J5ControllerAllowEdit; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Controller\AllowEdit as J4ControllerAllowEdit; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Controller\AllowEdit as J3ControllerAllowEdit; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowEditViewsInterface; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Controller\AllowEditViews as J6ControllerAllowEditViews; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Controller\AllowEditViews as J5ControllerAllowEditViews; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Controller\AllowEditViews as J4ControllerAllowEditViews; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Controller\AllowEditViews as J3ControllerAllowEditViews; @@ -56,6 +59,9 @@ class ArchitectureController implements ServiceProviderInterface $container->alias(AllowAddInterface::class, 'Architecture.Controller.AllowAdd') ->share('Architecture.Controller.AllowAdd', [$this, 'getAllowAdd'], true); + $container->alias(J6ControllerAllowAdd::class, 'Architecture.Controller.J6.AllowAdd') + ->share('Architecture.Controller.J6.AllowAdd', [$this, 'getJ6ControllerAllowAdd'], true); + $container->alias(J5ControllerAllowAdd::class, 'Architecture.Controller.J5.AllowAdd') ->share('Architecture.Controller.J5.AllowAdd', [$this, 'getJ5ControllerAllowAdd'], true); @@ -68,6 +74,9 @@ class ArchitectureController implements ServiceProviderInterface $container->alias(AllowEditInterface::class, 'Architecture.Controller.AllowEdit') ->share('Architecture.Controller.AllowEdit', [$this, 'getAllowEdit'], true); + $container->alias(J6ControllerAllowEdit::class, 'Architecture.Controller.J6.AllowEdit') + ->share('Architecture.Controller.J6.AllowEdit', [$this, 'getJ6ControllerAllowEdit'], true); + $container->alias(J5ControllerAllowEdit::class, 'Architecture.Controller.J5.AllowEdit') ->share('Architecture.Controller.J5.AllowEdit', [$this, 'getJ5ControllerAllowEdit'], true); @@ -80,6 +89,9 @@ class ArchitectureController implements ServiceProviderInterface $container->alias(AllowEditViewsInterface::class, 'Architecture.Controller.AllowEditViews') ->share('Architecture.Controller.AllowEditViews', [$this, 'getAllowEditViews'], true); + $container->alias(J6ControllerAllowEditViews::class, 'Architecture.Controller.J6.AllowEditViews') + ->share('Architecture.Controller.J6.AllowEditViews', [$this, 'getJ6ControllerAllowEditViews'], true); + $container->alias(J5ControllerAllowEditViews::class, 'Architecture.Controller.J5.AllowEditViews') ->share('Architecture.Controller.J5.AllowEditViews', [$this, 'getJ5ControllerAllowEditViews'], true); @@ -108,6 +120,23 @@ class ArchitectureController implements ServiceProviderInterface return $container->get('Architecture.Controller.J' . $this->targetVersion . '.AllowAdd'); } + /** + * Get The AllowAdd Class. + * + * @param Container $container The DI container. + * + * @return J6ControllerAllowAdd + * @since 5.1.2 + */ + public function getJ6ControllerAllowAdd(Container $container): J6ControllerAllowAdd + { + return new J6ControllerAllowAdd( + $container->get('Config'), + $container->get('Compiler.Creator.Permission'), + $container->get('Customcode.Dispenser') + ); + } + /** * Get The AllowAdd Class. * @@ -177,13 +206,32 @@ class ArchitectureController implements ServiceProviderInterface return $container->get('Architecture.Controller.J' . $this->targetVersion . '.AllowEdit'); } + /** + * Get The AllowEdit Class. + * + * @param Container $container The DI container. + * + * @return J6ControllerAllowEdit + * @since 5.1.2 + */ + public function getJ6ControllerAllowEdit(Container $container): J6ControllerAllowEdit + { + return new J6ControllerAllowEdit( + $container->get('Config'), + $container->get('Compiler.Creator.Permission'), + $container->get('Customcode.Dispenser'), + $container->get('Compiler.Builder.Category'), + $container->get('Compiler.Builder.Category.Other.Name') + ); + } + /** * Get The AllowEdit Class. * * @param Container $container The DI container. * * @return J5ControllerAllowEdit - * @since 3.2.0 + * @since 3.2.0 */ public function getJ5ControllerAllowEdit(Container $container): J5ControllerAllowEdit { @@ -202,7 +250,7 @@ class ArchitectureController implements ServiceProviderInterface * @param Container $container The DI container. * * @return J4ControllerAllowEdit - * @since 3.2.0 + * @since 3.2.0 */ public function getJ4ControllerAllowEdit(Container $container): J4ControllerAllowEdit { @@ -252,6 +300,24 @@ class ArchitectureController implements ServiceProviderInterface return $container->get('Architecture.Controller.J' . $this->targetVersion . '.AllowEditViews'); } + /** + * Get The AllowEditViews Class. + * + * @param Container $container The DI container. + * + * @return J6ControllerAllowEdit + * @since 5.1.2 + */ + public function getJ6ControllerAllowEditViews(Container $container): J6ControllerAllowEditViews + { + return new J6ControllerAllowEditViews( + $container->get('Compiler.Creator.Permission'), + $container->get('Customcode.Dispenser'), + $container->get('Compiler.Builder.Category'), + $container->get('Compiler.Builder.Category.Other.Name') + ); + } + /** * Get The AllowEditViews Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModel.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModel.php index 2d2b21962..960ea229b 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModel.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModel.php @@ -15,14 +15,17 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanDeleteInterface; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Model\CanDelete as J6ModelCanDelete; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Model\CanDelete as J5ModelCanDelete; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Model\CanDelete as J4ModelCanDelete; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Model\CanDelete as J3ModelCanDelete; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanEditStateInterface; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Model\CanEditState as J6ModelCanEditState; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Model\CanEditState as J5ModelCanEditState; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Model\CanEditState as J4ModelCanEditState; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Model\CanEditState as J3ModelCanEditState; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CheckInNowInterface; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Model\CheckInNow as J6CheckInNow; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Model\CheckInNow as J5CheckInNow; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Model\CheckInNow as J4CheckInNow; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Model\CheckInNow as J3CheckInNow; @@ -62,6 +65,9 @@ class ArchitectureModel implements ServiceProviderInterface $container->alias(J5ModelCanDelete::class, 'Architecture.Model.J5.CanDelete') ->share('Architecture.Model.J5.CanDelete', [$this, 'getJ5ModelCanDelete'], true); + $container->alias(J6ModelCanDelete::class, 'Architecture.Model.J6.CanDelete') + ->share('Architecture.Model.J6.CanDelete', [$this, 'getJ6ModelCanDelete'], true); + $container->alias(CanDeleteInterface::class, 'Architecture.Model.CanDelete') ->share('Architecture.Model.CanDelete', [$this, 'getModelCanDelete'], true); @@ -74,12 +80,18 @@ class ArchitectureModel implements ServiceProviderInterface $container->alias(J5ModelCanEditState::class, 'Architecture.Model.J5.CanEditState') ->share('Architecture.Model.J5.CanEditState', [$this, 'getJ5ModelCanEditState'], true); + $container->alias(J6ModelCanEditState::class, 'Architecture.Model.J6.CanEditState') + ->share('Architecture.Model.J6.CanEditState', [$this, 'getJ6ModelCanEditState'], true); + $container->alias(CanEditStateInterface::class, 'Architecture.Model.CanEditState') ->share('Architecture.Model.CanEditState', [$this, 'getModelCanEditState'], true); $container->alias(CheckInNowInterface::class, 'Architecture.Model.CheckInNow') ->share('Architecture.Model.CheckInNow', [$this, 'getCheckInNow'], true); + $container->alias(J6CheckInNow::class, 'Architecture.Model.J6.CheckInNow') + ->share('Architecture.Model.J6.CheckInNow', [$this, 'getJ6CheckInNow'], true); + $container->alias(J5CheckInNow::class, 'Architecture.Model.J5.CheckInNow') ->share('Architecture.Model.J5.CheckInNow', [$this, 'getJ5CheckInNow'], true); @@ -108,6 +120,22 @@ class ArchitectureModel implements ServiceProviderInterface return $container->get('Architecture.Model.J' . $this->targetVersion . '.CanDelete'); } + /** + * Get The Model CanDelete Class. + * + * @param Container $container The DI container. + * + * @return J6ModelCanDelete + * @since 5.1.2 + */ + public function getJ6ModelCanDelete(Container $container): J6ModelCanDelete + { + return new J6ModelCanDelete( + $container->get('Config'), + $container->get('Compiler.Creator.Permission') + ); + } + /** * Get The Model CanDelete Class. * @@ -174,6 +202,22 @@ class ArchitectureModel implements ServiceProviderInterface return $container->get('Architecture.Model.J' . $this->targetVersion . '.CanEditState'); } + /** + * Get The Model Can Edit State Class. + * + * @param Container $container The DI container. + * + * @return J6ModelCanEditState + * @since 5.1.2 + */ + public function getJ6ModelCanEditState(Container $container): J6ModelCanEditState + { + return new J6ModelCanEditState( + $container->get('Config'), + $container->get('Compiler.Creator.Permission') + ); + } + /** * Get The Model Can Edit State Class. * @@ -240,6 +284,20 @@ class ArchitectureModel implements ServiceProviderInterface return $container->get('Architecture.Model.J' . $this->targetVersion . '.CheckInNow'); } + /** + * Get The Model CheckInNow Class. + * + * @param Container $container The DI container. + * + * @return J6CheckInNow + * @since 5.1.2 + */ + public function getJ6CheckInNow(Container $container): J6CheckInNow + { + return new J6CheckInNow(); + } + + /** * Get The Model CheckInNow Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModule.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModule.php index d4744f60e..36f6bbb78 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModule.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitectureModule.php @@ -15,26 +15,32 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\LibraryInterface as Library; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module\Library as J6Library; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Module\Library as J5Library; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Module\Library as J4Library; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Module\Library as J3Library; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\TemplateInterface as Template; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module\Template as J6Template; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Module\Template as J5Template; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Module\Template as J4Template; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Module\Template as J3Template; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\HelperInterface as Helper; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module\Helper as J6Helper; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Module\Helper as J5Helper; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Module\Helper as J4Helper; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Module\Helper as J3Helper; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\DispatcherInterface as Dispatcher; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module\Dispatcher as J6Dispatcher; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Module\Dispatcher as J5Dispatcher; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Module\Dispatcher as J4Dispatcher; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Module\Dispatcher as J3Dispatcher; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Module\ProviderInterface as Provider; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module\Provider as J6Provider; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Module\Provider as J5Provider; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Module\Provider as J4Provider; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Module\Provider as J3Provider; use VDM\Joomla\Componentbuilder\Interfaces\Architecture\Module\MainXMLInterface as MainXML; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Module\MainXML as J6MainXML; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Module\MainXML as J5MainXML; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Module\MainXML as J4MainXML; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Module\MainXML as J3MainXML; @@ -68,6 +74,9 @@ class ArchitectureModule implements ServiceProviderInterface $container->alias(Library::class, 'Architecture.Module.Library') ->share('Architecture.Module.Library', [$this, 'getLibrary'], true); + $container->alias(J6Library::class, 'Architecture.Module.J6.Library') + ->share('Architecture.Module.J6.Library', [$this, 'getJ6Library'], true); + $container->alias(J5Library::class, 'Architecture.Module.J5.Library') ->share('Architecture.Module.J5.Library', [$this, 'getJ5Library'], true); @@ -80,6 +89,9 @@ class ArchitectureModule implements ServiceProviderInterface $container->alias(Template::class, 'Architecture.Module.Template') ->share('Architecture.Module.Template', [$this, 'getTemplate'], true); + $container->alias(J6Template::class, 'Architecture.Module.J6.Template') + ->share('Architecture.Module.J6.Template', [$this, 'getJ6Template'], true); + $container->alias(J5Template::class, 'Architecture.Module.J5.Template') ->share('Architecture.Module.J5.Template', [$this, 'getJ5Template'], true); @@ -92,6 +104,9 @@ class ArchitectureModule implements ServiceProviderInterface $container->alias(Helper::class, 'Architecture.Module.Helper') ->share('Architecture.Module.Helper', [$this, 'getHelper'], true); + $container->alias(J6Helper::class, 'Architecture.Module.J6.Helper') + ->share('Architecture.Module.J6.Helper', [$this, 'getJ6Helper'], true); + $container->alias(J5Helper::class, 'Architecture.Module.J5.Helper') ->share('Architecture.Module.J5.Helper', [$this, 'getJ5Helper'], true); @@ -104,6 +119,9 @@ class ArchitectureModule implements ServiceProviderInterface $container->alias(Dispatcher::class, 'Architecture.Module.Dispatcher') ->share('Architecture.Module.Dispatcher', [$this, 'getDispatcher'], true); + $container->alias(J6Dispatcher::class, 'Architecture.Module.J6.Dispatcher') + ->share('Architecture.Module.J6.Dispatcher', [$this, 'getJ6Dispatcher'], true); + $container->alias(J5Dispatcher::class, 'Architecture.Module.J5.Dispatcher') ->share('Architecture.Module.J5.Dispatcher', [$this, 'getJ5Dispatcher'], true); @@ -116,6 +134,9 @@ class ArchitectureModule implements ServiceProviderInterface $container->alias(Provider::class, 'Architecture.Module.Provider') ->share('Architecture.Module.Provider', [$this, 'getProvider'], true); + $container->alias(J6Provider::class, 'Architecture.Module.J6.Provider') + ->share('Architecture.Module.J6.Provider', [$this, 'getJ6Provider'], true); + $container->alias(J5Provider::class, 'Architecture.Module.J5.Provider') ->share('Architecture.Module.J5.Provider', [$this, 'getJ5Provider'], true); @@ -128,6 +149,9 @@ class ArchitectureModule implements ServiceProviderInterface $container->alias(MainXML::class, 'Architecture.Module.MainXML') ->share('Architecture.Module.MainXML', [$this, 'getMainXML'], true); + $container->alias(J6MainXML::class, 'Architecture.Module.J6.MainXML') + ->share('Architecture.Module.J6.MainXML', [$this, 'getJ6MainXML'], true); + $container->alias(J5MainXML::class, 'Architecture.Module.J5.MainXML') ->share('Architecture.Module.J5.MainXML', [$this, 'getJ5MainXML'], true); @@ -156,6 +180,25 @@ class ArchitectureModule implements ServiceProviderInterface return $container->get('Architecture.Module.J' . $this->targetVersion . '.Library'); } + /** + * Get The Library Class. + * + * @param Container $container The DI container. + * + * @return J6Library + * @since 5.1.2 + */ + public function getJ6Library(Container $container): J6Library + { + return new J6Library( + $container->get('Compiler.Builder.Library.Manager'), + $container->get('Library.Document'), + $container->get('Registry'), + $container->get('Placeholder'), + $container->get('Compiler.Builder.Content.One') + ); + } + /** * Get The Library Class. * @@ -231,6 +274,27 @@ class ArchitectureModule implements ServiceProviderInterface return $container->get('Architecture.Module.J' . $this->targetVersion . '.Template'); } + /** + * Get The Template Class. + * + * @param Container $container The DI container. + * + * @return J6Template + * @since 5.1.2 + */ + public function getJ6Template(Container $container): J6Template + { + return new J6Template( + $container->get('Config'), + $container->get('Header'), + $container->get('Customcode.Dispenser'), + $container->get('Compiler.Builder.Template.Data'), + $container->get('Placeholder'), + $container->get('Compiler.Builder.Content.One'), + $container->get('Compiler.Builder.Content.Multi') + ); + } + /** * Get The Template Class. * @@ -311,6 +375,22 @@ class ArchitectureModule implements ServiceProviderInterface return $container->get('Architecture.Module.J' . $this->targetVersion . '.Helper'); } + /** + * Get The Helper Class. + * + * @param Container $container The DI container. + * + * @return J6Helper + * @since 5.1.2 + */ + public function getJ6Helper(Container $container): J6Helper + { + return new J6Helper( + $container->get('Placeholder'), + $container->get('Compiler.Builder.Content.One') + ); + } + /** * Get The Helper Class. * @@ -377,6 +457,23 @@ class ArchitectureModule implements ServiceProviderInterface return $container->get('Architecture.Module.J' . $this->targetVersion . '.Dispatcher'); } + /** + * Get The Dispatcher Class. + * + * @param Container $container The DI container. + * + * @return J6Dispatcher + * @since 5.1.2 + */ + public function getJ6Dispatcher(Container $container): J6Dispatcher + { + return new J6Dispatcher( + $container->get('Placeholder'), + $container->get('Compiler.Builder.Content.One'), + $container->get('Architecture.Module.Library') + ); + } + /** * Get The Dispatcher Class. * @@ -446,6 +543,22 @@ class ArchitectureModule implements ServiceProviderInterface return $container->get('Architecture.Module.J' . $this->targetVersion . '.Provider'); } + /** + * Get The Provider Class. + * + * @param Container $container The DI container. + * + * @return J6Provider + * @since 5.1.2 + */ + public function getJ6Provider(Container $container): J6Provider + { + return new J6Provider( + $container->get('Placeholder'), + $container->get('Compiler.Builder.Content.One') + ); + } + /** * Get The Provider Class. * @@ -512,6 +625,33 @@ class ArchitectureModule implements ServiceProviderInterface return $container->get('Architecture.Module.J' . $this->targetVersion . '.MainXML'); } + /** + * Get The MainXML Class. + * + * @param Container $container The DI container. + * + * @return J6MainXML + * @since 5.1.2 + */ + public function getJ6MainXML(Container $container): J6MainXML + { + return new J6MainXML( + $container->get('Config'), + $container->get('Language'), + $container->get('Language.Set'), + $container->get('Language.Purge'), + $container->get('Language.Translation'), + $container->get('Language.Multilingual'), + $container->get('Event'), + $container->get('Compiler.Creator.Fieldset.Extension'), + $container->get('Compiler.Builder.Content.One'), + $container->get('Compiler.Builder.Languages'), + $container->get('Compiler.Builder.Multilingual'), + $container->get('Utilities.Counter'), + $container->get('Utilities.File') + ); + } + /** * Get The MainXML Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitecturePlugin.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitecturePlugin.php index c7a9eb355..e3367aa58 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitecturePlugin.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/ArchitecturePlugin.php @@ -15,14 +15,17 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Plugin\ExtensionInterface as Extension; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Plugin\Extension as J6Extension; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Plugin\Extension as J5Extension; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Plugin\Extension as J4Extension; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Plugin\Extension as J3Extension; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Plugin\ProviderInterface as Provider; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Plugin\Provider as J6Provider; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Plugin\Provider as J5Provider; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Plugin\Provider as J4Provider; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Plugin\Provider as J3Provider; use VDM\Joomla\Componentbuilder\Interfaces\Architecture\Plugin\MainXMLInterface as MainXML; +use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaSix\Plugin\MainXML as J6MainXML; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFive\Plugin\MainXML as J5MainXML; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaFour\Plugin\MainXML as J4MainXML; use VDM\Joomla\Componentbuilder\Compiler\Architecture\JoomlaThree\Plugin\MainXML as J3MainXML; @@ -56,6 +59,9 @@ class ArchitecturePlugin implements ServiceProviderInterface $container->alias(Extension::class, 'Architecture.Plugin.Extension') ->share('Architecture.Plugin.Extension', [$this, 'getExtension'], true); + $container->alias(J6Extension::class, 'Architecture.Plugin.J6.Extension') + ->share('Architecture.Plugin.J6.Extension', [$this, 'getJ6Extension'], true); + $container->alias(J5Extension::class, 'Architecture.Plugin.J5.Extension') ->share('Architecture.Plugin.J5.Extension', [$this, 'getJ5Extension'], true); @@ -68,6 +74,9 @@ class ArchitecturePlugin implements ServiceProviderInterface $container->alias(Provider::class, 'Architecture.Plugin.Provider') ->share('Architecture.Plugin.Provider', [$this, 'getProvider'], true); + $container->alias(J6Provider::class, 'Architecture.Plugin.J6.Provider') + ->share('Architecture.Plugin.J6.Provider', [$this, 'getJ6Provider'], true); + $container->alias(J5Provider::class, 'Architecture.Plugin.J5.Provider') ->share('Architecture.Plugin.J5.Provider', [$this, 'getJ5Provider'], true); @@ -80,6 +89,9 @@ class ArchitecturePlugin implements ServiceProviderInterface $container->alias(MainXML::class, 'Architecture.Plugin.MainXML') ->share('Architecture.Plugin.MainXML', [$this, 'getMainXML'], true); + $container->alias(J6MainXML::class, 'Architecture.Plugin.J6.MainXML') + ->share('Architecture.Plugin.J6.MainXML', [$this, 'getJ6MainXML'], true); + $container->alias(J5MainXML::class, 'Architecture.Plugin.J5.MainXML') ->share('Architecture.Plugin.J5.MainXML', [$this, 'getJ5MainXML'], true); @@ -108,6 +120,23 @@ class ArchitecturePlugin implements ServiceProviderInterface return $container->get('Architecture.Plugin.J' . $this->targetVersion . '.Extension'); } + /** + * Get The Extension Class. + * + * @param Container $container The DI container. + * + * @return J6Extension + * @since 5.1.2 + */ + public function getJ6Extension(Container $container): J6Extension + { + return new J6Extension( + $container->get('Placeholder'), + $container->get('Compiler.Builder.Content.One'), + $container->get('Power.Parser') + ); + } + /** * Get The Extension Class. * @@ -176,6 +205,22 @@ class ArchitecturePlugin implements ServiceProviderInterface return $container->get('Architecture.Plugin.J' . $this->targetVersion . '.Provider'); } + /** + * Get The Provider Class. + * + * @param Container $container The DI container. + * + * @return J6Provider + * @since 5.1.2 + */ + public function getJ6Provider(Container $container): J6Provider + { + return new J6Provider( + $container->get('Placeholder'), + $container->get('Compiler.Builder.Content.One') + ); + } + /** * Get The Provider Class. * @@ -242,6 +287,33 @@ class ArchitecturePlugin implements ServiceProviderInterface return $container->get('Architecture.Plugin.J' . $this->targetVersion . '.MainXML'); } + /** + * Get The MainXML Class. + * + * @param Container $container The DI container. + * + * @return J6MainXML + * @since 5.1.2 + */ + public function getJ6MainXML(Container $container): J6MainXML + { + return new J6MainXML( + $container->get('Config'), + $container->get('Language'), + $container->get('Language.Set'), + $container->get('Language.Purge'), + $container->get('Language.Translation'), + $container->get('Language.Multilingual'), + $container->get('Event'), + $container->get('Compiler.Creator.Fieldset.Extension'), + $container->get('Compiler.Builder.Content.One'), + $container->get('Compiler.Builder.Languages'), + $container->get('Compiler.Builder.Multilingual'), + $container->get('Utilities.Counter'), + $container->get('Utilities.File') + ); + } + /** * Get The MainXML Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php index 6007d5b59..e483d75c7 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php @@ -18,6 +18,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Component as CompilerComponent; use VDM\Joomla\Componentbuilder\Compiler\Component\JoomlaThree\Settings as J3Settings; use VDM\Joomla\Componentbuilder\Compiler\Component\JoomlaFour\Settings as J4Settings; use VDM\Joomla\Componentbuilder\Compiler\Component\JoomlaFive\Settings as J5Settings; +use VDM\Joomla\Componentbuilder\Compiler\Component\JoomlaSix\Settings as J6Settings; use VDM\Joomla\Componentbuilder\Compiler\Component\Dashboard; use VDM\Joomla\Componentbuilder\Compiler\Component\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Component\Data; @@ -64,6 +65,9 @@ class Component implements ServiceProviderInterface $container->alias(J5Settings::class, 'Component.J5.Settings') ->share('Component.J5.Settings', [$this, 'getJ5Settings'], true); + $container->alias(J6Settings::class, 'Component.J6.Settings') + ->share('Component.J6.Settings', [$this, 'getJ6Settings'], true); + $container->alias(Dashboard::class, 'Component.Dashboard') ->share('Component.Dashboard', [$this, 'getDashboard'], true); @@ -167,6 +171,28 @@ class Component implements ServiceProviderInterface ); } + /** + * Get The Settings Class. + * + * @param Container $container The DI container. + * + * @return J6Settings + * @since 5.1.2 + */ + public function getJ6Settings(Container $container): J6Settings + { + return new J6Settings( + $container->get('Config'), + $container->get('Registry'), + $container->get('Event'), + $container->get('Placeholder'), + $container->get('Component'), + $container->get('Utilities.Paths'), + $container->get('Utilities.Dynamicpath'), + $container->get('Utilities.Pathfix') + ); + } + /** * Get The Dashboard Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php index bc0c7edab..7f2badba4 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php @@ -19,6 +19,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; use VDM\Joomla\Componentbuilder\Compiler\JoomlaThree\Event as J3Event; use VDM\Joomla\Componentbuilder\Compiler\JoomlaFour\Event as J4Event; use VDM\Joomla\Componentbuilder\Compiler\JoomlaFive\Event as J5Event; +use VDM\Joomla\Componentbuilder\Compiler\JoomlaSix\Event as J6Event; /** @@ -55,6 +56,9 @@ class Event implements ServiceProviderInterface $container->alias(J5Event::class, 'J5.Event') ->share('J5.Event', [$this, 'getJ5Event'], true); + $container->alias(J6Event::class, 'J6.Event') + ->share('J6.Event', [$this, 'getJ6Event'], true); + $container->alias(EventInterface::class, 'Event') ->share('Event', [$this, 'getEvent'], true); } @@ -114,6 +118,19 @@ class Event implements ServiceProviderInterface public function getJ5Event(Container $container): J5Event { return new J5Event(); + } + + /** + * Get the Joomla 6 Event + * + * @param Container $container The DI container. + * + * @return J6Event + * @since 5.1.2 + */ + public function getJ6Event(Container $container): J6Event + { + return new J6Event(); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php index 1c2c5e791..0eb5b39a5 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php @@ -18,6 +18,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface; use VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaThree\InstallScript as J3InstallScript; use VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaFour\InstallScript as J4InstallScript; use VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaFive\InstallScript as J5InstallScript; +use VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaSix\InstallScript as J6InstallScript; /** @@ -56,6 +57,9 @@ class Extension implements ServiceProviderInterface $container->alias(J5InstallScript::class, 'J5.Extension.InstallScript') ->share('J5.Extension.InstallScript', [$this, 'getJ5ExtensionInstallScript'], true); + + $container->alias(J6InstallScript::class, 'J6.Extension.InstallScript') + ->share('J6.Extension.InstallScript', [$this, 'getJ6ExtensionInstallScript'], true); } /** @@ -97,6 +101,19 @@ class Extension implements ServiceProviderInterface return new J5InstallScript(); } + /** + * Get the Joomla 6 Extension Install Script + * + * @param Container $container The DI container. + * + * @return J6InstallScript + * @since 5.1.2 + */ + public function getJ6ExtensionInstallScript(Container $container): J6InstallScript + { + return new J6InstallScript(); + } + /** * Get the Joomla Extension Install Script * @@ -113,7 +130,6 @@ class Extension implements ServiceProviderInterface } return $container->get('J' . $this->targetVersion . '.Extension.InstallScript'); - } - + } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php index 8b7c31ff1..17e429a9b 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Field.php @@ -29,9 +29,11 @@ use VDM\Joomla\Componentbuilder\Compiler\Field\DatabaseName; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaThree\CoreField as J3CoreField; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFour\CoreField as J4CoreField; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFive\CoreField as J5CoreField; +use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaSix\CoreField as J6CoreField; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaThree\InputButton as J3InputButton; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFour\InputButton as J4InputButton; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFive\InputButton as J5InputButton; +use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaSix\InputButton as J6InputButton; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreFieldInterface as CoreField; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\InputButtonInterface as InputButton; @@ -111,6 +113,9 @@ class Field implements ServiceProviderInterface $container->alias(J5CoreField::class, 'J5.Field.Core.Field') ->share('J5.Field.Core.Field', [$this, 'getJ5CoreField'], true); + $container->alias(J6CoreField::class, 'J6.Field.Core.Field') + ->share('J6.Field.Core.Field', [$this, 'getJ6CoreField'], true); + $container->alias(J3InputButton::class, 'J3.Field.Input.Button') ->share('J3.Field.Input.Button', [$this, 'getJ3InputButton'], true); @@ -120,6 +125,9 @@ class Field implements ServiceProviderInterface $container->alias(J5InputButton::class, 'J5.Field.Input.Button') ->share('J5.Field.Input.Button', [$this, 'getJ5InputButton'], true); + $container->alias(J6InputButton::class, 'J6.Field.Input.Button') + ->share('J6.Field.Input.Button', [$this, 'getJ6InputButton'], true); + $container->alias(CoreField::class, 'Field.Core.Field') ->share('Field.Core.Field', [$this, 'getCoreField'], true); @@ -354,6 +362,19 @@ class Field implements ServiceProviderInterface return new J5CoreField(); } + /** + * Get The CoreField Class. + * + * @param Container $container The DI container. + * + * @return J6CoreField + * @since 5.1.2 + */ + public function getJ6CoreField(Container $container): J6CoreField + { + return new J6CoreField(); + } + /** * Get The J3InputButton Class. * @@ -405,6 +426,23 @@ class Field implements ServiceProviderInterface ); } + /** + * Get The J6InputButton Class. + * + * @param Container $container The DI container. + * + * @return J6InputButton + * @since 5.1.2 + */ + public function getJ6InputButton(Container $container): J6InputButton + { + return new J6InputButton( + $container->get('Config'), + $container->get('Placeholder'), + $container->get('Compiler.Creator.Permission') + ); + } + /** * Get The CoreFieldInterface Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Header.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Header.php index 6f3ee5c94..c2efa6570 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Header.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Header.php @@ -18,6 +18,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface; use VDM\Joomla\Componentbuilder\Compiler\JoomlaThree\Header as J3Header; use VDM\Joomla\Componentbuilder\Compiler\JoomlaFour\Header as J4Header; use VDM\Joomla\Componentbuilder\Compiler\JoomlaFive\Header as J5Header; +use VDM\Joomla\Componentbuilder\Compiler\JoomlaSix\Header as J6Header; /** @@ -54,6 +55,9 @@ class Header implements ServiceProviderInterface $container->alias(J5Header::class, 'J5.Header') ->share('J5.Header', [$this, 'getJ5Header'], true); + $container->alias(J6Header::class, 'J6.Header') + ->share('J6.Header', [$this, 'getJ6Header'], true); + $container->alias(HeaderInterface::class, 'Header') ->share('Header', [$this, 'getHeader'], true); } @@ -146,6 +150,30 @@ class Header implements ServiceProviderInterface $container->get('Compiler.Builder.Filter'), $container->get('Compiler.Builder.Tags') ); + } + + /** + * Get The Header Class. + * + * @param Container $container The DI container. + * + * @return J6Header + * @since 5.1.2 + */ + public function getJ6Header(Container $container): J6Header + { + return new J6Header( + $container->get('Config'), + $container->get('Event'), + $container->get('Placeholder'), + $container->get('Language'), + $container->get('Compiler.Builder.Uikit.Comp'), + $container->get('Compiler.Builder.Admin.Filter.Type'), + $container->get('Compiler.Builder.Category'), + $container->get('Compiler.Builder.Access.Switch.List'), + $container->get('Compiler.Builder.Filter'), + $container->get('Compiler.Builder.Tags') + ); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php index 87c09f02b..1c3e163f1 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/History.php @@ -19,6 +19,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HistoryInterface; use VDM\Joomla\Componentbuilder\Compiler\JoomlaThree\History as J3History; use VDM\Joomla\Componentbuilder\Compiler\JoomlaFour\History as J4History; use VDM\Joomla\Componentbuilder\Compiler\JoomlaFive\History as J5History; +use VDM\Joomla\Componentbuilder\Compiler\JoomlaSix\History as J6History; /** @@ -55,6 +56,9 @@ class History implements ServiceProviderInterface $container->alias(J5History::class, 'J5.History') ->share('J5.History', [$this, 'getJ5History'], true); + $container->alias(J6History::class, 'J6.History') + ->share('J6.History', [$this, 'getJ6History'], true); + $container->alias(HistoryInterface::class, 'History') ->share('History', [$this, 'getHistory'], true); } @@ -123,6 +127,22 @@ class History implements ServiceProviderInterface $container->get('Config'), $container->get('Joomla.Database') ); + } + + /** + * Get the Joomla 6 History + * + * @param Container $container The DI container. + * + * @return J6History + * @since 5.1.2 + */ + public function getJ6History(Container $container): J6History + { + return new J6History( + $container->get('Config'), + $container->get('Joomla.Database') + ); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php index d7bddeb35..1bddc7f19 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlamodule.php @@ -18,14 +18,17 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\ModuleDataInterface as Data; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaThree\Data as J3Data; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaFour\Data as J4Data; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaFive\Data as J5Data; +use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaSix\Data as J6Data; use VDM\Joomla\Componentbuilder\Interfaces\Module\StructureInterface as Structure; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaThree\Structure as J3Structure; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaFour\Structure as J4Structure; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaFive\Structure as J5Structure; +use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaSix\Structure as J6Structure; use VDM\Joomla\Componentbuilder\Interfaces\Module\InfusionInterface as Infusion; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaThree\Infusion as J3Infusion; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaFour\Infusion as J4Infusion; use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaFive\Infusion as J5Infusion; +use VDM\Joomla\Componentbuilder\Compiler\Joomlamodule\JoomlaSix\Infusion as J6Infusion; /** @@ -65,6 +68,9 @@ class Joomlamodule implements ServiceProviderInterface $container->alias(J5Data::class, 'Joomlamodule.J5.Data') ->share('Joomlamodule.J5.Data', [$this, 'getJ5Data'], true); + $container->alias(J6Data::class, 'Joomlamodule.J6.Data') + ->share('Joomlamodule.J6.Data', [$this, 'getJ6Data'], true); + $container->alias(Structure::class, 'Joomlamodule.Structure') ->share('Joomlamodule.Structure', [$this, 'getStructure'], true); @@ -77,6 +83,9 @@ class Joomlamodule implements ServiceProviderInterface $container->alias(J5Structure::class, 'Joomlamodule.J5.Structure') ->share('Joomlamodule.J5.Structure', [$this, 'getJ5Structure'], true); + $container->alias(J6Structure::class, 'Joomlamodule.J6.Structure') + ->share('Joomlamodule.J6.Structure', [$this, 'getJ6Structure'], true); + $container->alias(Infusion::class, 'Joomlamodule.Infusion') ->share('Joomlamodule.Infusion', [$this, 'getInfusion'], true); @@ -88,6 +97,9 @@ class Joomlamodule implements ServiceProviderInterface $container->alias(J5Infusion::class, 'Joomlamodule.J5.Infusion') ->share('Joomlamodule.J5.Infusion', [$this, 'getJ5Infusion'], true); + + $container->alias(J6Infusion::class, 'Joomlamodule.J6.Infusion') + ->share('Joomlamodule.J6.Infusion', [$this, 'getJ6Infusion'], true); } /** @@ -186,6 +198,32 @@ class Joomlamodule implements ServiceProviderInterface ); } + /** + * Get The Data Class. + * + * @param Container $container The DI container. + * + * @return J6Data + * @since 5.1.2 + */ + public function getJ6Data(Container $container): J6Data + { + return new J6Data( + $container->get('Config'), + $container->get('Customcode'), + $container->get('Customcode.Gui'), + $container->get('Placeholder'), + $container->get('Language'), + $container->get('Field'), + $container->get('Field.Name'), + $container->get('Model.Filesfolders'), + $container->get('Model.Libraries'), + $container->get('Dynamicget.Data'), + $container->get('Templatelayout.Data'), + $container->get('Joomla.Database') + ); + } + /** * Get The StructureInterface Class. * @@ -281,6 +319,32 @@ class Joomlamodule implements ServiceProviderInterface ); } + /** + * Get The Structure Class. + * + * @param Container $container The DI container. + * + * @return J6Structure + * @since 5.1.2 + */ + public function getJ6Structure(Container $container): J6Structure + { + return new J6Structure( + $container->get('Joomlamodule.Data'), + $container->get('Component'), + $container->get('Config'), + $container->get('Registry'), + $container->get('Customcode.Dispenser'), + $container->get('Event'), + $container->get('Utilities.Counter'), + $container->get('Utilities.Folder'), + $container->get('Utilities.File'), + $container->get('Utilities.Files'), + $container->get('Compiler.Builder.Template.Data'), + $container->get('Placeholder') + ); + } + /** * Get The InfusionInterface Class. * @@ -377,6 +441,33 @@ class Joomlamodule implements ServiceProviderInterface $container->get('Compiler.Creator.Fieldset.Extension'), $container->get('Dynamicget.Methods') ); + } + + /** + * Get The Infusion Class. + * + * @param Container $container The DI container. + * + * @return J6Infusion + * @since 5.1.2 + */ + public function getJ6Infusion(Container $container): J6Infusion + { + return new J6Infusion( + $container->get('Config'), + $container->get('Architecture.Module.Provider'), + $container->get('Architecture.Module.Dispatcher'), + $container->get('Architecture.Module.Template'), + $container->get('Architecture.Module.Helper'), + $container->get('Architecture.Module.MainXML'), + $container->get('Joomlamodule.Data'), + $container->get('Header'), + $container->get('Event'), + $container->get('Extension.InstallScript'), + $container->get('Compiler.Builder.Content.Multi'), + $container->get('Compiler.Creator.Fieldset.Extension'), + $container->get('Dynamicget.Methods') + ); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php index 18eb58018..ea61b2509 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Joomlaplugin.php @@ -17,14 +17,17 @@ use Joomla\DI\ServiceProviderInterface; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaThree\Data as J3PluginData; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaFour\Data as J4PluginData; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaFive\Data as J5PluginData; +use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaSix\Data as J6PluginData; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PluginDataInterface as PluginData; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaThree\Structure as J3Structure; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaFour\Structure as J4Structure; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaFive\Structure as J5Structure; +use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaSix\Structure as J6Structure; use VDM\Joomla\Componentbuilder\Interfaces\Plugin\StructureInterface as Structure; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaThree\Infusion as J3Infusion; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaFour\Infusion as J4Infusion; use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaFive\Infusion as J5Infusion; +use VDM\Joomla\Componentbuilder\Compiler\Joomlaplugin\JoomlaSix\Infusion as J6Infusion; use VDM\Joomla\Componentbuilder\Interfaces\Plugin\InfusionInterface as Infusion; @@ -62,6 +65,9 @@ class Joomlaplugin implements ServiceProviderInterface $container->alias(J5PluginData::class, 'Joomlaplugin.J5.Data') ->share('Joomlaplugin.J5.Data', [$this, 'getJ5PluginData'], true); + $container->alias(J6PluginData::class, 'Joomlaplugin.J6.Data') + ->share('Joomlaplugin.J6.Data', [$this, 'getJ6PluginData'], true); + $container->alias(PluginData::class, 'Joomlaplugin.Data') ->share('Joomlaplugin.Data', [$this, 'getPluginData'], true); @@ -74,6 +80,9 @@ class Joomlaplugin implements ServiceProviderInterface $container->alias(J5Structure::class, 'Joomlaplugin.J5.Structure') ->share('Joomlaplugin.J5.Structure', [$this, 'getJ5Structure'], true); + $container->alias(J6Structure::class, 'Joomlaplugin.J6.Structure') + ->share('Joomlaplugin.J6.Structure', [$this, 'getJ6Structure'], true); + $container->alias(Structure::class, 'Joomlaplugin.Structure') ->share('Joomlaplugin.Structure', [$this, 'getStructure'], true); @@ -86,6 +95,9 @@ class Joomlaplugin implements ServiceProviderInterface $container->alias(J5Infusion::class, 'Joomlaplugin.J5.Infusion') ->share('Joomlaplugin.J5.Infusion', [$this, 'getJ5Infusion'], true); + $container->alias(J6Infusion::class, 'Joomlaplugin.J6.Infusion') + ->share('Joomlaplugin.J6.Infusion', [$this, 'getJ6Infusion'], true); + $container->alias(Infusion::class, 'Joomlaplugin.Infusion') ->share('Joomlaplugin.Infusion', [$this, 'getInfusion'], true); } @@ -177,6 +189,29 @@ class Joomlaplugin implements ServiceProviderInterface ); } + /** + * Get The PluginData Class. + * + * @param Container $container The DI container. + * + * @return J6PluginData + * @since 5.1.2 + */ + public function getJ6PluginData(Container $container): J6PluginData + { + return new J6PluginData( + $container->get('Config'), + $container->get('Customcode'), + $container->get('Customcode.Gui'), + $container->get('Placeholder'), + $container->get('Language'), + $container->get('Field'), + $container->get('Field.Name'), + $container->get('Model.Filesfolders'), + $container->get('Joomla.Database') + ); + } + /** * Get the Joomla Plugin Structure Builder * @@ -200,7 +235,7 @@ class Joomlaplugin implements ServiceProviderInterface * * @param Container $container The DI container. * - * @return Structure + * @return J3Structure * @since 5.0.2 */ public function getJ3Structure(Container $container): J3Structure @@ -224,7 +259,7 @@ class Joomlaplugin implements ServiceProviderInterface * * @param Container $container The DI container. * - * @return Structure + * @return J4Structure * @since 5.0.2 */ public function getJ4Structure(Container $container): J4Structure @@ -249,7 +284,7 @@ class Joomlaplugin implements ServiceProviderInterface * * @param Container $container The DI container. * - * @return Structure + * @return J5Structure * @since 5.0.2 */ public function getJ5Structure(Container $container): J5Structure @@ -269,6 +304,31 @@ class Joomlaplugin implements ServiceProviderInterface ); } + /** + * Get the Joomla 6 Plugin Structure Builder + * + * @param Container $container The DI container. + * + * @return J6Structure + * @since 5.1.2 + */ + public function getJ6Structure(Container $container): J6Structure + { + return new J6Structure( + $container->get('Joomlaplugin.Data'), + $container->get('Component'), + $container->get('Config'), + $container->get('Registry'), + $container->get('Customcode.Dispenser'), + $container->get('Event'), + $container->get('Utilities.Counter'), + $container->get('Utilities.Folder'), + $container->get('Utilities.File'), + $container->get('Utilities.Files'), + $container->get('Placeholder') + ); + } + /** * Get The InfusionInterface Class. * @@ -361,6 +421,32 @@ class Joomlaplugin implements ServiceProviderInterface $container->get('Compiler.Builder.Content.One'), $container->get('Compiler.Creator.Fieldset.Extension') ); + } + + /** + * Get The Infusion Class. + * + * @param Container $container The DI container. + * + * @return J6Infusion + * @since 5.1.2 + */ + public function getJ6Infusion(Container $container): J6Infusion + { + return new J6Infusion( + $container->get('Config'), + $container->get('Placeholder'), + $container->get('Header'), + $container->get('Event'), + $container->get('Joomlaplugin.Data'), + $container->get('Extension.InstallScript'), + $container->get('Architecture.Plugin.Extension'), + $container->get('Architecture.Plugin.Provider'), + $container->get('Architecture.Plugin.MainXML'), + $container->get('Compiler.Builder.Content.Multi'), + $container->get('Compiler.Builder.Content.One'), + $container->get('Compiler.Creator.Fieldset.Extension') + ); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php index 833398249..a80056775 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Model.php @@ -48,6 +48,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Model\CustomtabsInterface as use VDM\Joomla\Componentbuilder\Compiler\Model\JoomlaThree\Customtabs as CustomtabsJ3; use VDM\Joomla\Componentbuilder\Compiler\Model\JoomlaFour\Customtabs as CustomtabsJ4; use VDM\Joomla\Componentbuilder\Compiler\Model\JoomlaFive\Customtabs as CustomtabsJ5; +use VDM\Joomla\Componentbuilder\Compiler\Model\JoomlaSix\Customtabs as CustomtabsJ6; use VDM\Joomla\Componentbuilder\Compiler\Model\Adminviews; use VDM\Joomla\Componentbuilder\Compiler\Model\Sqltweaking; use VDM\Joomla\Componentbuilder\Compiler\Model\Sqldump; @@ -186,6 +187,9 @@ class Model implements ServiceProviderInterface $container->alias(CustomtabsJ5::class, 'Model.J5.Customtabs') ->share('Model.J5.Customtabs', [$this, 'getCustomtabsJ5'], true); + $container->alias(CustomtabsJ6::class, 'Model.J6.Customtabs') + ->share('Model.J6.Customtabs', [$this, 'getCustomtabsJ6'], true); + $container->alias(Adminviews::class, 'Model.Adminviews') ->share('Model.Adminviews', [$this, 'getAdminviews'], true); @@ -781,6 +785,25 @@ class Model implements ServiceProviderInterface ); } + /** + * Get The CustomtabsJ6 Class. + * + * @param Container $container The DI container. + * + * @return CustomtabsJ6 + * @since 5.1.2 + */ + public function getCustomtabsJ6(Container $container): CustomtabsJ6 + { + return new CustomtabsJ6( + $container->get('Config'), + $container->get('Compiler.Builder.Custom.Tabs'), + $container->get('Language'), + $container->get('Placeholder'), + $container->get('Customcode') + ); + } + /** * Get The Adminviews Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php index c4c0dcc54..1173e4272 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php @@ -25,7 +25,7 @@ use VDM\Joomla\Abstraction\FunctionRegistry; class Config extends FunctionRegistry { /** - * Hold a JInput object for easier access to the input variables. + * Hold a Input object for easier access to the input variables. * * @var Input * @since 3.2.0 @@ -42,7 +42,7 @@ class Config extends FunctionRegistry */ public function __construct(?Input $input = null) { - $this->input = $input ?: Factory::getApplication()->input; + $this->input = $input ?: Factory::getApplication()->getInput(); } /** diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/CoreRules.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/CoreRules.php index ce8d63343..621858e9d 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/CoreRules.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/CoreRules.php @@ -18,6 +18,7 @@ use Joomla\CMS\Version; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaThree\CoreRule as J3CoreRule; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFour\CoreRule as J4CoreRule; use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaFive\CoreRule as J5CoreRule; +use VDM\Joomla\Componentbuilder\Compiler\Field\JoomlaSix\CoreRule as J6CoreRule; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Field\CoreRuleInterface as CoreRule; @@ -55,6 +56,9 @@ class CoreRules implements ServiceProviderInterface $container->alias(J5CoreRule::class, 'J5.Field.Core.Rule') ->share('J5.Field.Core.Rule', [$this, 'getJ5CoreRule'], true); + $container->alias(J6CoreRule::class, 'J6.Field.Core.Rule') + ->share('J6.Field.Core.Rule', [$this, 'getJ6CoreRule'], true); + $container->alias(CoreRule::class, 'Field.Core.Rule') ->share('Field.Core.Rule', [$this, 'getCoreRule'], true); } @@ -98,6 +102,19 @@ class CoreRules implements ServiceProviderInterface return new J5CoreRule(); } + /** + * Get The CoreRule Class. + * + * @param Container $container The DI container. + * + * @return J6CoreRule + * @since 5.1.2 + */ + public function getJ6CoreRule(Container $container): J6CoreRule + { + return new J6CoreRule(); + } + /** * Get The CoreRuleInterface Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Utilities/UploadHelper.php b/libraries/vendor_jcb/VDM.Joomla/src/Utilities/UploadHelper.php index 6dd3c4930..e47256643 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Utilities/UploadHelper.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Utilities/UploadHelper.php @@ -97,7 +97,8 @@ abstract class UploadHelper public static function get(string $field, string $type, string $filter = null, string $path = null): ?array { // Get the uploaded file information. - $input = Factory::getApplication()->input; + $app = Factory::getApplication(); + $input = method_exists($app, 'getInput') ? $app->getInput() : $app->input; // set the default filter if (empty($filter))