diff --git a/CHANGELOG.md b/CHANGELOG.md index 48a338b3e..6f4b9ac3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,16 @@ +# v5.0.0-alpha2 + +- Fix the plug-in installer script builder bug #1067 +- Fix Event triggers for Joomla 4 and 5 builds. + # v5.0.0-alpha1 - First alpha release of Component Builder towards Joomla 5 (very unstable...) -# v4.0.0-alpha1 +# v4.0.0-alpha2 -- First alpha release of Component Builder towards Joomla 4 (very unstable...) +- Fix the plug-in installer script builder bug #1067 -# v3.2.0-beta4 +# v3.2.0-beta6 -- Add Preferred Joomla Version to Components \ No newline at end of file +- Fix the plug-in installer script builder bug #1068 \ No newline at end of file diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index c0feacc41..42c3a5eeb 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3140,7 +3140,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

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

'; +

Upgrade to Version 5.0.0-alpha2 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 6943b31ae..55ee18981 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Joomla Component Builder ([JCB](https://www.joomlacomponentbuilder.com)) -This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) +This is a [Joomla 5.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) ![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/master/admin/assets/images/jcb-banner.jpg "The Component Builder") @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.0-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.0-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 9th March, 2024 -+ *Version*: 5.0.0-alpha1 ++ *Last Build*: 11th March, 2024 ++ *Version*: 5.0.0-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **707644** -+ *Field count*: **1690** -+ *File count*: **4985** -+ *Folder count*: **453** ++ *Line count*: **725286** ++ *Field count*: **2078** ++ *File count*: **5117** ++ *Folder count*: **518** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/README.txt b/admin/README.txt index 6943b31ae..55ee18981 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,7 +1,7 @@ # Joomla Component Builder ([JCB](https://www.joomlacomponentbuilder.com)) -This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) +This is a [Joomla 5.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) ![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/master/admin/assets/images/jcb-banner.jpg "The Component Builder") @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.0-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.0-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 9th March, 2024 -+ *Version*: 5.0.0-alpha1 ++ *Last Build*: 11th March, 2024 ++ *Version*: 5.0.0-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **707644** -+ *Field count*: **1690** -+ *File count*: **4985** -+ *Folder count*: **453** ++ *Line count*: **725286** ++ *Field count*: **2078** ++ *File count*: **5117** ++ *Folder count*: **518** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php index 64690b202..2f67bb7db 100644 --- a/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_AJAX_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; use Joomla\CMS\Factory; use Joomla\CMS\Application\CMSApplication; diff --git a/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php b/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php index 43d6a8d19..c02dcc00a 100644 --- a/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###AJAX_ADMIN_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_DISPLAY_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_DISPLAY_CONTROLLER.php index 21f59aafa..199578ec5 100644 --- a/admin/compiler/joomla_4/ADMIN_DISPLAY_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_DISPLAY_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; diff --git a/admin/compiler/joomla_4/ADMIN_EXTENSION_COMPONENT.php b/admin/compiler/joomla_4/ADMIN_EXTENSION_COMPONENT.php index a3de713ee..abb451609 100644 --- a/admin/compiler/joomla_4/ADMIN_EXTENSION_COMPONENT.php +++ b/admin/compiler/joomla_4/ADMIN_EXTENSION_COMPONENT.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Extension; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Extension; use Joomla\CMS\Association\AssociationServiceInterface; use Joomla\CMS\Association\AssociationServiceTrait; @@ -31,7 +31,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Tag\TagServiceInterface; use Joomla\CMS\Tag\TagServiceTrait; use Joomla\CMS\User\UserFactoryInterface; -// (soon) use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Service\HTML\AdministratorService; +// (soon) use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Service\HTML\AdministratorService; use Psr\Container\ContainerInterface; // No direct access to this file diff --git a/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php b/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php index 6e94886ee..e07898584 100644 --- a/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php +++ b/admin/compiler/joomla_4/ADMIN_HEADERCHECK.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper; use Joomla\CMS\Factory; use Joomla\CMS\Document\Document; diff --git a/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php b/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php index f7b123bd7..ddd00b885 100644 --- a/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php +++ b/admin/compiler/joomla_4/ADMIN_HELPER_CLASS.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper; ###ADMIN_POWER_HELPER### diff --git a/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php index 215d4a778..91b90a0d1 100644 --- a/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_HELPER_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; use Joomla\CMS\Factory; use Joomla\CMS\MVC\Controller\BaseController; diff --git a/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php b/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php index 4810aa03d..ac42ef225 100644 --- a/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php +++ b/admin/compiler/joomla_4/ADMIN_HELPER_EMAIL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper; use Joomla\CMS\Factory; use Joomla\CMS\Component\ComponentHelper; diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php index dff0372db..865a18c44 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; ###IMPORT_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php index 516800bda..59b242d3d 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_CONTROLLER_CUSTOM.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; ###IMPORT_CUSTOM_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php index bafc18095..87dee6372 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php @@ -13,13 +13,13 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\View\Import; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\Import; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Toolbar\ToolbarHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php index 3fad91b86..7265d0600 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\View\###View###Import; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###View###Import; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; @@ -22,7 +22,7 @@ use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\HTML\HTMLHelper as Html; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php index f1f5f6575..70efddb07 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###IMPORT_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php index b30e5846e..7b3b58651 100644 --- a/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php +++ b/admin/compiler/joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###IMPORT_CUSTOM_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_PROVIDER.php b/admin/compiler/joomla_4/ADMIN_PROVIDER.php index 23696fa3f..274892e72 100644 --- a/admin/compiler/joomla_4/ADMIN_PROVIDER.php +++ b/admin/compiler/joomla_4/ADMIN_PROVIDER.php @@ -27,8 +27,8 @@ use Joomla\CMS\Extension\Service\Provider\MVCFactory; use Joomla\CMS\Extension\Service\Provider\RouterFactory; use Joomla\CMS\HTML\Registry; use Joomla\CMS\MVC\Factory\MVCFactoryInterface; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Extension\###Component###Component; -// (soon) use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\AssociationsHelper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Extension\###Component###Component; +// (soon) use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\AssociationsHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_VIEWS_CONTROLLER.php index f2c68be9b..28bede844 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; ###ADMIN_VIEWS_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php index bc59999f0..2ae71fed7 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\View\###Views###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###Views###; ###ADMIN_VIEWS_HTML_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php b/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php index 3297824df..7431385d4 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###ADMIN_VIEWS_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php b/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php index aab67b639..f5150bf72 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; ###ADMIN_VIEW_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php index 34750b530..d844a3e12 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\View\###View###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###View###; ###ADMIN_VIEW_HTML_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php b/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php index 86d77aa8f..b425ecfb7 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###ADMIN_VIEW_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php b/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php index 6dfae6f66..0a38769fe 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Table; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Table; use Joomla\CMS\Factory; use Joomla\CMS\Table\Table; @@ -33,7 +33,7 @@ use Joomla\Database\DatabaseDriver; use Joomla\Event\DispatcherInterface; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php index fb2e2468d..0fbe25922 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; ###CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php index b6a3ab8e3..c8d70e3ac 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\View\###SViews###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###SViews###; ###CUSTOM_ADMIN_VIEWS_HTML_HEADER######CUSTOM_ADMIN_GET_MODULE_JIMPORT### diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php index 21260e2cc..584eb6b38 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###CUSTOM_ADMIN_VIEWS_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php index 6618a2b2f..b7fa6648b 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; ###CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php index de896a019..6fe4459f2 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\View\###SView###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###SView###; ###CUSTOM_ADMIN_VIEW_HTML_HEADER######CUSTOM_ADMIN_GET_MODULE_JIMPORT### diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php index fc43c158c..f71b26864 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###CUSTOM_ADMIN_VIEW_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/DASH_CONTROLLER.php b/admin/compiler/joomla_4/DASH_CONTROLLER.php index 5a2268dac..564117d8d 100644 --- a/admin/compiler/joomla_4/DASH_CONTROLLER.php +++ b/admin/compiler/joomla_4/DASH_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Controller; ###DASH_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/DASH_MODEL.php b/admin/compiler/joomla_4/DASH_MODEL.php index 610e08ba9..5e14fff76 100644 --- a/admin/compiler/joomla_4/DASH_MODEL.php +++ b/admin/compiler/joomla_4/DASH_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Model; ###DASH_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/DASH_VIEW_HTML.php b/admin/compiler/joomla_4/DASH_VIEW_HTML.php index 31e294e46..8e6decf8b 100644 --- a/admin/compiler/joomla_4/DASH_VIEW_HTML.php +++ b/admin/compiler/joomla_4/DASH_VIEW_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\View\###Component###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###Component###; ###DASH_VIEW_HTML_HEADER### diff --git a/admin/compiler/joomla_4/FORM_CHECKBOXES_FIELD.php b/admin/compiler/joomla_4/FORM_CHECKBOXES_FIELD.php index 3bda6475e..007fd3bac 100644 --- a/admin/compiler/joomla_4/FORM_CHECKBOXES_FIELD.php +++ b/admin/compiler/joomla_4/FORM_CHECKBOXES_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\CheckboxesField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/FORM_CUSTOM_FIELD.php b/admin/compiler/joomla_4/FORM_CUSTOM_FIELD.php index c6d1f3c5d..5afa801f2 100644 --- a/admin/compiler/joomla_4/FORM_CUSTOM_FIELD.php +++ b/admin/compiler/joomla_4/FORM_CUSTOM_FIELD.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Field; ###FORM_CUSTOM_FIELD_HEADER### diff --git a/admin/compiler/joomla_4/FORM_LIST_FIELD.php b/admin/compiler/joomla_4/FORM_LIST_FIELD.php index cb70ab37d..72b8880ae 100644 --- a/admin/compiler/joomla_4/FORM_LIST_FIELD.php +++ b/admin/compiler/joomla_4/FORM_LIST_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\ListField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/FORM_RADIO_FIELD.php b/admin/compiler/joomla_4/FORM_RADIO_FIELD.php index 4b11f1865..60460a463 100644 --- a/admin/compiler/joomla_4/FORM_RADIO_FIELD.php +++ b/admin/compiler/joomla_4/FORM_RADIO_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\RadioField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/FORM_RULE.php b/admin/compiler/joomla_4/FORM_RULE.php index a31ce624a..c280db455 100644 --- a/admin/compiler/joomla_4/FORM_RULE.php +++ b/admin/compiler/joomla_4/FORM_RULE.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Rule; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Rule; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; @@ -22,7 +22,7 @@ use Joomla\CMS\Form\FormRule; use Joomla\Registry\Registry; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('JPATH_PLATFORM') or die; diff --git a/admin/compiler/joomla_4/FORM_USER_FIELD.php b/admin/compiler/joomla_4/FORM_USER_FIELD.php index 3327f5a6d..9ad457423 100644 --- a/admin/compiler/joomla_4/FORM_USER_FIELD.php +++ b/admin/compiler/joomla_4/FORM_USER_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\UserField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php index 9379d7327..95af762f1 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controller; ###SITE_ADMIN_VIEW_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php index d48f41976..9a5b4b279 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\View\###View###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###View###; ###SITE_ADMIN_VIEW_HTML_HEADER### diff --git a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php index 51bf65ed8..facbcf2c0 100644 --- a/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/SITE_ADMIN_VIEW_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Model; ###SITE_ADMIN_VIEW_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php b/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php index f69ef0234..423691e92 100644 --- a/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_AJAX_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controller; use Joomla\CMS\Factory; use Joomla\CMS\Application\CMSApplication; diff --git a/admin/compiler/joomla_4/SITE_AJAX_MODEL.php b/admin/compiler/joomla_4/SITE_AJAX_MODEL.php index 1cec88644..b56b2df9c 100644 --- a/admin/compiler/joomla_4/SITE_AJAX_MODEL.php +++ b/admin/compiler/joomla_4/SITE_AJAX_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Model; ###AJAX_SITE_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/SITE_DISPATCHER.php b/admin/compiler/joomla_4/SITE_DISPATCHER.php index c86e55ee1..c14886997 100644 --- a/admin/compiler/joomla_4/SITE_DISPATCHER.php +++ b/admin/compiler/joomla_4/SITE_DISPATCHER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Dispatcher; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Dispatcher; use Joomla\CMS\Dispatcher\ComponentDispatcher; diff --git a/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php b/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php index 93767574c..704227616 100644 --- a/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_DISPLAY_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controller; use Joomla\CMS\Factory; use Joomla\CMS\MVC\Controller\BaseController; diff --git a/admin/compiler/joomla_4/SITE_FORM_CHECKBOXES_FIELD.php b/admin/compiler/joomla_4/SITE_FORM_CHECKBOXES_FIELD.php index bdc5586de..f6a272785 100644 --- a/admin/compiler/joomla_4/SITE_FORM_CHECKBOXES_FIELD.php +++ b/admin/compiler/joomla_4/SITE_FORM_CHECKBOXES_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\CheckboxesField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/SITE_FORM_CUSTOM_FIELD.php b/admin/compiler/joomla_4/SITE_FORM_CUSTOM_FIELD.php index 6feabb598..b9562c00b 100644 --- a/admin/compiler/joomla_4/SITE_FORM_CUSTOM_FIELD.php +++ b/admin/compiler/joomla_4/SITE_FORM_CUSTOM_FIELD.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Field; ###SITE_FORM_CUSTOM_FIELD_HEADER### diff --git a/admin/compiler/joomla_4/SITE_FORM_LIST_FIELD.php b/admin/compiler/joomla_4/SITE_FORM_LIST_FIELD.php index 94dd388be..23cdf9972 100644 --- a/admin/compiler/joomla_4/SITE_FORM_LIST_FIELD.php +++ b/admin/compiler/joomla_4/SITE_FORM_LIST_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\ListField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/SITE_FORM_RADIO_FIELD.php b/admin/compiler/joomla_4/SITE_FORM_RADIO_FIELD.php index 635a592ca..bab377f5a 100644 --- a/admin/compiler/joomla_4/SITE_FORM_RADIO_FIELD.php +++ b/admin/compiler/joomla_4/SITE_FORM_RADIO_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\RadioField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/SITE_FORM_RULE.php b/admin/compiler/joomla_4/SITE_FORM_RULE.php index 533bd4f38..8dba963e5 100644 --- a/admin/compiler/joomla_4/SITE_FORM_RULE.php +++ b/admin/compiler/joomla_4/SITE_FORM_RULE.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Rule; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Rule; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; @@ -22,7 +22,7 @@ use Joomla\CMS\Form\FormRule; use Joomla\Registry\Registry; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper\###Component###Helper; // No direct access to this file \defined('JPATH_PLATFORM') or die; diff --git a/admin/compiler/joomla_4/SITE_FORM_USER_FIELD.php b/admin/compiler/joomla_4/SITE_FORM_USER_FIELD.php index 4911b111a..fbc1b36d9 100644 --- a/admin/compiler/joomla_4/SITE_FORM_USER_FIELD.php +++ b/admin/compiler/joomla_4/SITE_FORM_USER_FIELD.php @@ -13,14 +13,14 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Field; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Field; use Joomla\CMS\Factory; use Joomla\CMS\Form\Field\UserField; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Component\ComponentHelper; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper\###Component###Helper; // No direct access to this file \defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/SITE_HEADERCHECK.php b/admin/compiler/joomla_4/SITE_HEADERCHECK.php index 574f45eda..55e244ed3 100644 --- a/admin/compiler/joomla_4/SITE_HEADERCHECK.php +++ b/admin/compiler/joomla_4/SITE_HEADERCHECK.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper; use Joomla\CMS\Factory; use Joomla\CMS\Document\Document; diff --git a/admin/compiler/joomla_4/SITE_HELPER_CLASS.php b/admin/compiler/joomla_4/SITE_HELPER_CLASS.php index 9b2cba942..12b92f571 100644 --- a/admin/compiler/joomla_4/SITE_HELPER_CLASS.php +++ b/admin/compiler/joomla_4/SITE_HELPER_CLASS.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper; ###SITE_POWER_HELPER### diff --git a/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php b/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php index bbc91bd97..f4090b346 100644 --- a/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_HELPER_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controller; use Joomla\CMS\Factory; use Joomla\CMS\MVC\Controller\BaseController; diff --git a/admin/compiler/joomla_4/SITE_ROUTER.php b/admin/compiler/joomla_4/SITE_ROUTER.php index ad70467df..4cc195d94 100644 --- a/admin/compiler/joomla_4/SITE_ROUTER.php +++ b/admin/compiler/joomla_4/SITE_ROUTER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Service; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Service; ###SITE_ROUTER_HEADER### diff --git a/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php b/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php index 11c38f396..96fdd1822 100644 --- a/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php +++ b/admin/compiler/joomla_4/SITE_ROUTE_HELPER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Helper; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; diff --git a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php index b59f57ef7..7cf77c74c 100644 --- a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\View\###SViews###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###SViews###; ###SITE_VIEWS_HTML_HEADER######SITE_GET_MODULE_JIMPORT### diff --git a/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php b/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php index bbb1676d2..20fa13ebd 100644 --- a/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php +++ b/admin/compiler/joomla_4/SITE_VIEWS_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Model; ###SITE_VIEWS_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/SITE_VIEW_CONTROLLER.php b/admin/compiler/joomla_4/SITE_VIEW_CONTROLLER.php index 0b5676074..3dd8a4f9f 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_CONTROLLER.php +++ b/admin/compiler/joomla_4/SITE_VIEW_CONTROLLER.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Controller; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Controller; ###SITE_VIEW_CONTROLLER_HEADER### diff --git a/admin/compiler/joomla_4/SITE_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_VIEW_HTML.php index 19ad53193..56b208d85 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEW_HTML.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\View\###SView###; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###SView###; ###SITE_VIEW_HTML_HEADER######SITE_GET_MODULE_JIMPORT### diff --git a/admin/compiler/joomla_4/SITE_VIEW_MODEL.php b/admin/compiler/joomla_4/SITE_VIEW_MODEL.php index fe73b93a4..e017632af 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_MODEL.php +++ b/admin/compiler/joomla_4/SITE_VIEW_MODEL.php @@ -13,7 +13,7 @@ defined('_JCB_TEMPLATE') or die; ?> ###BOM### -namespace ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Site\Model; +namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Model; ###SITE_VIEW_MODEL_HEADER### diff --git a/admin/compiler/joomla_4/component.xml b/admin/compiler/joomla_4/component.xml index 7dad78c48..7e1fd7cba 100644 --- a/admin/compiler/joomla_4/component.xml +++ b/admin/compiler/joomla_4/component.xml @@ -14,7 +14,7 @@

###DESCRIPTION###

Created by ###AUTHOR###
Development started ###CREATIONDATE###

]]> - ###NAMESPACEPREFIX###\Component\###ComponentNameSpace### + ###NAMESPACEPREFIX###\Component\###ComponentNamespace### diff --git a/admin/compiler/joomla_4/default_body.php b/admin/compiler/joomla_4/default_body.php index 05456df25..573c50ac1 100644 --- a/admin/compiler/joomla_4/default_body.php +++ b/admin/compiler/joomla_4/default_body.php @@ -17,7 +17,7 @@ defined('_JCB_TEMPLATE') or die; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED### diff --git a/admin/compiler/joomla_4/filter_forms.xml b/admin/compiler/joomla_4/filter_forms.xml index 9f2d5d31c..62a188dfb 100644 --- a/admin/compiler/joomla_4/filter_forms.xml +++ b/admin/compiler/joomla_4/filter_forms.xml @@ -1,7 +1,7 @@
###FIELDFILTERSETS### diff --git a/admin/compiler/joomla_4/layoutlinkedview.php b/admin/compiler/joomla_4/layoutlinkedview.php index 92789487a..9617296d8 100644 --- a/admin/compiler/joomla_4/layoutlinkedview.php +++ b/admin/compiler/joomla_4/layoutlinkedview.php @@ -17,7 +17,7 @@ defined('_JCB_TEMPLATE') or die; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; -use ###NAMESPACEPREFIX###\Component\###ComponentNameSpace###\Administrator\Helper\###Component###Helper; +use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper; // No direct access to this file defined('_JEXEC') or die; diff --git a/admin/compiler/joomla_4/module_forms.xml b/admin/compiler/joomla_4/module_forms.xml index bb0dcdb30..029fa5197 100644 --- a/admin/compiler/joomla_4/module_forms.xml +++ b/admin/compiler/joomla_4/module_forms.xml @@ -1,7 +1,7 @@ diff --git a/admin/sql/updates/mysql/3.2.0-beta4.sql b/admin/sql/updates/mysql/3.2.0-beta6.sql similarity index 100% rename from admin/sql/updates/mysql/3.2.0-beta4.sql rename to admin/sql/updates/mysql/3.2.0-beta6.sql diff --git a/admin/sql/updates/mysql/4.0.0-alpha1.sql b/admin/sql/updates/mysql/4.0.0-alpha2.sql similarity index 100% rename from admin/sql/updates/mysql/4.0.0-alpha1.sql rename to admin/sql/updates/mysql/4.0.0-alpha2.sql diff --git a/admin/sql/updates/mysql/5.0.0-alpha1.sql b/admin/sql/updates/mysql/5.0.0-alpha1.sql new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/admin/sql/updates/mysql/5.0.0-alpha1.sql @@ -0,0 +1 @@ + diff --git a/admin/src/Field/AdminlistvieworderfieldsField.php b/admin/src/Field/AdminlistvieworderfieldsField.php new file mode 100644 index 000000000..faffce0fa --- /dev/null +++ b/admin/src/Field/AdminlistvieworderfieldsField.php @@ -0,0 +1,148 @@ + + * @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\Component\Componentbuilder\Administrator\Field; + +use Joomla\CMS\Factory; +use Joomla\CMS\Form\Field\ListField; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; +use Joomla\CMS\Component\ComponentHelper; +use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; + +// No direct access to this file +\defined('_JEXEC') or die; + +/** + * Adminlistvieworderfields Form Field class for the Componentbuilder component + * + * @since 1.6 + */ +class AdminlistvieworderfieldsField extends ListField +{ + /** + * The adminlistvieworderfields field type. + * + * @var string + */ + public $type = 'Adminlistvieworderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of Html options. + * @since 1.6 + */ + protected function getOptions() + { + // load the db object + $db = Factory::getDBO(); + // get the input from url + $jinput = Factory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // set the field trackers + $fieldIds = array(); + $sortIds = array(); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // admin list view and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 3) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[(int) $addField['field']] = (int) $addField['field']; + } + // do track all fields set as sorted + if (isset($addField['field']) && isset($addField['sort']) && $addField['sort']) + { + $sortIds[(int) $addField['field']] = (int) $addField['field']; + } + } + } + } + } + // get all the fields that are also having a relationship on the list view as sorted + if ($addFields = ComponentbuilderHelper::getVar('admin_fields_relations', (int) $adminView, 'admin_view', 'addrelations')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // admin list view and ordering + if (isset($addField['joinfields']) && ComponentbuilderHelper::checkArray($addField['joinfields'])) + { + foreach($addField['joinfields'] as $joinfield) + { + if (isset($sortIds[$joinfield])) + { + $fieldIds[(int) $joinfield] = (int) $joinfield; + } + } + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = Html::_('select.option', '', Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = Html::_('select.option', -1, Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = Html::_('select.option', -2, Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = Html::_('select.option', -3, Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + if (isset($item->xml) && ComponentbuilderHelper::checkJson($item->xml)) + { + $field_xml = json_decode($item->xml); + $field_name = ComponentbuilderHelper::getBetween($field_xml,'name="','"'); + $field_name = ComponentbuilderHelper::safeFieldName($field_name); + $options[] = Html::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + else + { + $options[] = Html::_('select.option', $item->id, $item->name . ' [ empty - ' . $item->type . ' ]'); + } + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/src/Field/ExcludedlanguagesField.php b/admin/src/Field/ExcludedlanguagesField.php new file mode 100644 index 000000000..f2419d129 --- /dev/null +++ b/admin/src/Field/ExcludedlanguagesField.php @@ -0,0 +1,185 @@ + + * @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\Component\Componentbuilder\Administrator\Field; + +use Joomla\CMS\Factory; +use Joomla\CMS\Form\Field\ListField; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; +use Joomla\CMS\Component\ComponentHelper; +use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; + +// No direct access to this file +\defined('_JEXEC') or die; + +/** + * Excludedlanguages Form Field class for the Componentbuilder component + * + * @since 1.6 + */ +class ExcludedlanguagesField extends ListField +{ + /** + * The excludedlanguages field type. + * + * @var string + */ + public $type = 'Excludedlanguages'; + + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = Factory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = Factory::getApplication()->getIdentity(); + // only add if user allowed to create language + if ($user->authorise('language.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit language + if ($user->authorise('language.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + document.addEventListener('DOMContentLoaded', function() { + document.getElementById('jform_".$button_code_name."').addEventListener('change', function(e) { + e.preventDefault(); + let ".$button_code_name."Value = this.value; + ".$button_code_name."Button(".$button_code_name."Value); + }); + let ".$button_code_name."Value = document.getElementById('jform_".$button_code_name."').value; + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + var createButton = document.getElementById('".$button_code_name."Create'); + var editButton = document.getElementById('".$button_code_name."Edit'); + if (value > 0) { + // hide the create button + createButton.style.display = 'none'; + // show edit button + editButton.style.display = 'block'; + let url = 'index.php?option=com_componentbuilder&view=languages&task=language.edit&id='+value+'".$refJ."'; + editButton.setAttribute('href', url); + } else { + // show the create button + createButton.style.display = 'block'; + // hide edit button + editButton.style.display = 'none'; + } + }"; + } + // check if button was created for language field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = Factory::getApplication()->getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of Html options. + * @since 1.6 + */ + protected function getOptions() + { + $db = Factory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','languages_name'))); + $query->from($db->quoteName('#__componentbuilder_language', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.langtag ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + // add the main language + $main_lang = trim(ComponentHelper::getParams('com_componentbuilder')->get('language', 'en-GB')); + // check if any language was added + $wasAdded = false; + $options = array(); + if ($items) + { + $options[] = Html::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $item->langtag = trim($item->langtag); + // do not add main language + if ($main_lang !== $item->langtag) + { + $options[] = Html::_('select.option', $item->langtag, $item->languages_name . ' (' .$item->langtag.')'); + $wasAdded = true; + } + } + } + // now if none was added give notice + if (!$wasAdded) + { + $options[] = Html::_('select.option', '', 'Add languages to select'); + } + return $options; + } +} diff --git a/admin/src/Field/JoomlacomponentsField.php b/admin/src/Field/JoomlacomponentsField.php index ca52a42fc..79b66be95 100644 --- a/admin/src/Field/JoomlacomponentsField.php +++ b/admin/src/Field/JoomlacomponentsField.php @@ -42,7 +42,7 @@ class JoomlacomponentsField extends ListField */ protected function getOptions() { - $db = Factory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.system_name'),array('id','components_system_name'))); $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); diff --git a/admin/src/Field/JoomlapluginsField.php b/admin/src/Field/JoomlapluginsField.php index 57b74eb98..a89ae3342 100644 --- a/admin/src/Field/JoomlapluginsField.php +++ b/admin/src/Field/JoomlapluginsField.php @@ -34,6 +34,112 @@ class JoomlapluginsField extends ListField */ public $type = 'Joomlaplugins'; + /** + * Override to add new button + * + * @return string The field input markup. + * + * @since 3.2 + */ + protected function getInput() + { + // see if we should add buttons + $set_button = $this->getAttribute('button'); + // get html + $html = parent::getInput(); + // if true set button + if ($set_button === 'true') + { + $button = array(); + $script = array(); + $button_code_name = $this->getAttribute('name'); + // get the input from url + $app = Factory::getApplication(); + $jinput = $app->input; + // get the view name & id + $values = $jinput->getArray(array( + 'id' => 'int', + 'view' => 'word' + )); + // check if new item + $ref = ''; + $refJ = ''; + if (!is_null($values['id']) && strlen($values['view'])) + { + // only load referral if not new item. + $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; + $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; + // get the return value. + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); + $_return = urlencode(base64_encode($_uri)); + // load return value. + $ref .= '&return=' . $_return; + $refJ .= '&return=' . $_return; + } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object + $user = Factory::getApplication()->getIdentity(); + // only add if user allowed to create joomla_plugin + if ($user->authorise('joomla_plugin.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area. + { + // build Create button + $button[] = ' + '; + } + // only add if user allowed to edit joomla_plugin + if ($user->authorise('joomla_plugin.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area. + { + // build edit button + $button[] = ''; + // build script + $script[] = " + document.addEventListener('DOMContentLoaded', function() { + document.getElementById('jform_".$button_code_name."').addEventListener('change', function(e) { + e.preventDefault(); + let ".$button_code_name."Value = this.value; + ".$button_code_name."Button(".$button_code_name."Value); + }); + let ".$button_code_name."Value = document.getElementById('jform_".$button_code_name."').value; + ".$button_code_name."Button(".$button_code_name."Value); + }); + function ".$button_code_name."Button(value) { + var createButton = document.getElementById('".$button_code_name."Create'); + var editButton = document.getElementById('".$button_code_name."Edit'); + if (value > 0) { + // hide the create button + createButton.style.display = 'none'; + // show edit button + editButton.style.display = 'block'; + let url = 'index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_plugin.edit&id='+value+'".$refJ."'; + editButton.setAttribute('href', url); + } else { + // show the create button + createButton.style.display = 'block'; + // hide edit button + editButton.style.display = 'none'; + } + }"; + } + // check if button was created for joomla_plugin field. + if (is_array($button) && count($button) > 0) + { + // Load the needed script. + $document = Factory::getApplication()->getDocument(); + $document->addScriptDeclaration(implode(' ',$script)); + // return the button attached to input field. + return '
' .$html . implode('',$button).'
'; + } + } + return $html; + } + /** * Method to get a list of options for a list input. * diff --git a/admin/src/Field/LinkedviewsorderfieldsField.php b/admin/src/Field/LinkedviewsorderfieldsField.php new file mode 100644 index 000000000..ed9ba7b57 --- /dev/null +++ b/admin/src/Field/LinkedviewsorderfieldsField.php @@ -0,0 +1,115 @@ + + * @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\Component\Componentbuilder\Administrator\Field; + +use Joomla\CMS\Factory; +use Joomla\CMS\Form\Field\ListField; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; +use Joomla\CMS\Component\ComponentHelper; +use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; + +// No direct access to this file +\defined('_JEXEC') or die; + +/** + * Linkedviewsorderfields Form Field class for the Componentbuilder component + * + * @since 1.6 + */ +class LinkedviewsorderfieldsField extends ListField +{ + /** + * The linkedviewsorderfields field type. + * + * @var string + */ + public $type = 'Linkedviewsorderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of Html options. + * @since 1.6 + */ + protected function getOptions() + { + // load the db object + $db = Factory::getDBO(); + // get the input from url + $jinput = Factory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // linked list views and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 4) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[] = (int) $addField['field']; + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = Html::_('select.option', '', Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = Html::_('select.option', -1, Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = Html::_('select.option', -2, Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = Html::_('select.option', -3, Text::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + if (isset($item->xml) && ComponentbuilderHelper::checkJson($item->xml)) + { + $field_xml = json_decode($item->xml); + $field_name = ComponentbuilderHelper::getBetween($field_xml,'name="','"'); + $field_name = ComponentbuilderHelper::safeFieldName($field_name); + $options[] = Html::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + else + { + $options[] = Html::_('select.option', $item->id, $item->name . ' [ empty - ' . $item->type . ' ]'); + } + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/src/Field/PowersField.php b/admin/src/Field/PowersField.php new file mode 100644 index 000000000..bbf216dd1 --- /dev/null +++ b/admin/src/Field/PowersField.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\Component\Componentbuilder\Administrator\Field; + +use Joomla\CMS\Factory; +use Joomla\CMS\Form\Field\ListField; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; +use Joomla\CMS\Component\ComponentHelper; +use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; + +// No direct access to this file +\defined('_JEXEC') or die; + +/** + * Powers Form Field class for the Componentbuilder component + * + * @since 1.6 + */ +class PowersField extends ListField +{ + /** + * The powers field type. + * + * @var string + */ + public $type = 'Powers'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of Html options. + * @since 1.6 + */ + protected function getOptions() + { + // Get the user object. + $user = Factory::getApplication()->getIdentity(); + // Get the databse object. + $db = Factory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.guid','a.system_name','a.namespace','a.type','a.power_version'),array('guid','power_system_name','namespace','type','version'))); + $query->from($db->quoteName('#__componentbuilder_power', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $query->order('a.type ASC'); + // Implement View Level Access (if set in table) + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $columns = $db->getTableColumns('#__componentbuilder_power'); + if(isset($columns['access'])) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + } + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + // if none was found, we add this to set an alternative to set custom + if (!$items) + { + $options[] = Html::_('select.option', '', 'None found'); + } + if ($items) + { + if ($this->multiple === false) + { + $options[] = Html::_('select.option', '', 'Select an option'); + } + foreach($items as $item) + { + $options[] = Html::_('select.option', $item->guid, str_replace('.','\\', $item->namespace) . ' [' . $item->power_system_name . '] (v' . $item->version . ' - ' . $item->type . ')'); + } + } + return $options; + + } +} diff --git a/componentbuilder.xml b/componentbuilder.xml index 5a57c5f11..9f038225b 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 9th March, 2024 + 11th March, 2024 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.0.0-alpha1 + 5.0.0-alpha2 Component Builder (v.5.0.0-alpha1) +

Component Builder (v.5.0.0-alpha2)

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 4562db26e..b102315ca 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -5,10 +5,10 @@ pkg_component_builder package site - 3.2.0-beta4 + 3.2.0-beta6 https://dev.vdm.io - https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.0-beta4.zip + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.0-beta6.zip beta @@ -23,10 +23,10 @@ pkg_component_builder package site - 4.0.0-alpha1 + 4.0.0-alpha2 https://dev.vdm.io - https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-alpha1.zip + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-alpha2.zip stable @@ -53,4 +53,22 @@ https://dev.vdm.io + + Component Builder + Builds Complex Joomla Components + pkg_component_builder + package + site + 5.0.0-alpha2 + https://dev.vdm.io + + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.0-alpha1.zip + + + beta + + Llewellyn van der Merwe + https://dev.vdm.io + + \ No newline at end of file diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php index b987c521a..e762fed9b 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php @@ -17,6 +17,7 @@ use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\String\NamespaceHelper; use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler; use VDM\Joomla\Componentbuilder\Compiler\Config; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; @@ -117,6 +118,12 @@ final class Placeholder implements PlaceholderInterface $bucket[Placefix::_('COMPONENT')] = $bucket[Placefix::_h('COMPONENT')]; $bucket[Placefix::_h('LANG_PREFIX')] = $config->lang_prefix; $bucket[Placefix::_('LANG_PREFIX')] = $bucket[Placefix::_h('LANG_PREFIX')]; + $bucket[Placefix::_h('ComponentNamespace')] = NamespaceHelper::safeSegment(StringHelper::safe($config->component_code_name, 'F')); + $bucket[Placefix::_('ComponentNamespace')] = $bucket[Placefix::_h('ComponentNamespace')]; + $bucket[Placefix::_h('NamespacePrefix')] = $config->namespace_prefix; + $bucket[Placefix::_('NamespacePrefix')] = $config->namespace_prefix; + $bucket[Placefix::_h('NAMESPACEPREFIX')] = $config->namespace_prefix; + $bucket[Placefix::_('NAMESPACEPREFIX')] = $config->namespace_prefix; // get the current components overrides if (($_placeholders = GetHelper::var( diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFive/InstallScript.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFive/InstallScript.php index b93f4750d..6b24caf32 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFive/InstallScript.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFive/InstallScript.php @@ -125,6 +125,9 @@ final class InstallScript implements GetScriptInterface */ public function get(object $extension): string { + // purge the object + $this->rest(); + // loop over methods and types foreach ($this->methods as $method) { @@ -160,6 +163,24 @@ final class InstallScript implements GetScriptInterface return $this->build(); } + /** + * Reset all bucket at the start of each build + * + * @return void + * @since 3.2.0 + */ + protected function rest(): void + { + $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 * diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFour/InstallScript.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFour/InstallScript.php index ce1d45be7..a9acfa5d4 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFour/InstallScript.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaFour/InstallScript.php @@ -125,6 +125,9 @@ final class InstallScript implements GetScriptInterface */ public function get(object $extension): string { + // purge the object + $this->rest(); + // loop over methods and types foreach ($this->methods as $method) { @@ -160,6 +163,24 @@ final class InstallScript implements GetScriptInterface return $this->build(); } + /** + * Reset all bucket at the start of each build + * + * @return void + * @since 3.2.0 + */ + protected function rest(): void + { + $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 * diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/InstallScript.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/InstallScript.php index 04a820576..c36a36bee 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/InstallScript.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/InstallScript.php @@ -125,6 +125,9 @@ final class InstallScript implements GetScriptInterface */ public function get(object $extension): string { + // purge the object + $this->rest(); + // loop over methods and types foreach ($this->methods as $method) { @@ -160,6 +163,24 @@ final class InstallScript implements GetScriptInterface return $this->build(); } + /** + * Reset all bucket at the start of each build + * + * @return void + * @since 3.2.0 + */ + protected function rest(): void + { + $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 * diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php index 8d32386c1..a4bd0ee88 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php @@ -101,9 +101,9 @@ class Infusion extends Interpretation CFactory::_('Placeholder')->get('component') ); - // ComponentNameSpace - CFactory::_('Compiler.Builder.Content.One')->set('ComponentNameSpace', - NamespaceHelper::safeSegment(CFactory::_('Placeholder')->get('Component')) + // ComponentNamespace + CFactory::_('Compiler.Builder.Content.One')->set('ComponentNamespace', + CFactory::_('Placeholder')->get('ComponentNamespace') ); // COMPANYNAME @@ -197,7 +197,7 @@ class Infusion extends Interpretation // set the namespace prefix CFactory::_('Compiler.Builder.Content.One')->set('NAMESPACEPREFIX', - CFactory::_('Config')->namespace_prefix + CFactory::_('Placeholder')->get('NAMESPACEPREFIX') ); // set the global version in case diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php index 1fffe1db4..b065c863a 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php @@ -2274,11 +2274,11 @@ class Interpretation extends Fields { $xml .= PHP_EOL . Indent::_(3) . 'addruleprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\\'. $target_area . '\Rule"'; $xml .= PHP_EOL . Indent::_(3) . 'addfieldprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\\'. $target_area . '\Field">'; } @@ -2331,11 +2331,11 @@ class Interpretation extends Fields { $xml .= PHP_EOL . Indent::_(3) . 'addruleprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\\'. $target_area . '\Rule"'; $xml .= PHP_EOL . Indent::_(3) . 'addfieldprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\\'. $target_area . '\Field">'; } $xml .= implode(Indent::_(3), $params); @@ -8918,7 +8918,7 @@ class Interpretation extends Fields // set the table $array['table'] = '{"special": {"dbtable": "#__' . $component . '_' . $view . '","key": "id","type": "' . $View . 'Table","prefix": "' . CFactory::_('Config')->namespace_prefix - . '\\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\\Administrator\\Table"}}'; // set rules field @@ -23182,11 +23182,11 @@ class Interpretation extends Fields { $xml .= PHP_EOL . Indent::_(3) . 'addruleprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\Administrator\Rule"'; $xml .= PHP_EOL . Indent::_(3) . 'addfieldprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\Administrator\Field">'; } $xml .= PHP_EOL . Indent::_(1) . '>'; @@ -23585,11 +23585,11 @@ class Interpretation extends Fields { $xml .= PHP_EOL . Indent::_(3) . 'addruleprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\Administrator\Rule"'; $xml .= PHP_EOL . Indent::_(3) . 'addfieldprefix="' . CFactory::_('Config')->namespace_prefix - . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNameSpace') + . '\Component\\' . CFactory::_('Compiler.Builder.Content.One')->get('ComponentNamespace') . '\Administrator\Field">'; } $xml .= PHP_EOL . Indent::_(1) . '>'; diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php index 245cf05d9..232fb6221 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php @@ -26,13 +26,20 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; class Event implements EventInterface { /** - * event plugin trigger switch + * event plug-in trigger switch * * @var boolean * @since 3.2.0 */ protected $activePlugins = false; + /** + * The application to trigger and event TODO + * + * @since 3.2.0 + */ + protected $dispatcher; + /** * Constructor * @@ -60,6 +67,8 @@ class Event implements EventInterface } } } + + $this->dispatcher = Factory::getApplication(); } /** @@ -77,22 +86,14 @@ class Event implements EventInterface // only execute if plugins were loaded (active) if ($this->activePlugins) { - // Get the dispatcher. - $dispatcher = \JEventDispatcher::getInstance(); - - // Trigger this compiler event. - $results = $dispatcher->trigger($event, $data); - - // Check for errors encountered while trigger the event - if (count((array) $results) && in_array(false, $results, true)) + try { - // Get the last error. - $error = $dispatcher->getError(); - - if (!($error instanceof \Exception)) - { - throw new \Exception($error); - } + // Trigger this compiler event. + $results = $this->dispatcher->triggerEvent($event, $data ?? []); + } + catch (\Exception $e) + { + throw new \Exception("Error processing event '$event': " . $e->getMessage()); } } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Header.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Header.php index cd95b8476..5db107120 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Header.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Header.php @@ -22,7 +22,6 @@ 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\String\NamespaceHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface; @@ -145,7 +144,7 @@ final class Header implements HeaderInterface * @var string * @since 3.2.0 */ - protected string $ComponentNameSpace; + protected string $ComponentNamespace; /** * Constructor. @@ -181,9 +180,9 @@ final class Header implements HeaderInterface $this->tags = $tags; // set some global values - $this->NamespacePrefix = $this->config->get('namespace_prefix'); + $this->NamespacePrefix = $this->placeholder->get('NamespacePrefix'); $this->ComponentName = $this->placeholder->get('Component'); - $this->ComponentNameSpace = NamespaceHelper::safeSegment($this->ComponentName); + $this->ComponentNamespace = $this->placeholder->get('ComponentNamespace'); } /** @@ -209,7 +208,7 @@ final class Header implements HeaderInterface $target = 'Site'; } - $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNameSpace}\\{$target}\\Helper\\{$this->ComponentName}Helper;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\{$target}\\Helper\\{$this->ComponentName}Helper;"; // we will add more as needed switch ($context) @@ -218,7 +217,7 @@ final class Header implements HeaderInterface case 'site.views.model': case 'site.view.html': case 'site.views.html': - $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNameSpace}\\Site\\Helper\\RouteHelper;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Site\\Helper\\RouteHelper;"; break; default: @@ -387,7 +386,7 @@ final class Header implements HeaderInterface $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;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Site\\Helper\\HeaderCheck;"; break; case 'custom.admin.view.html': @@ -404,7 +403,7 @@ final class Header implements HeaderInterface $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}\\{$target}\\Helper\\HeaderCheck;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\{$target}\\Helper\\HeaderCheck;"; break; case 'admin.view.model': diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php index d15c3292d..578f5f651 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php @@ -12,6 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaFour; +use Joomla\CMS\Factory; use Joomla\Registry\Registry; use Joomla\CMS\Plugin\PluginHelper; use VDM\Joomla\Utilities\Component\Helper; @@ -26,13 +27,20 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface; final class Event implements EventInterface { /** - * event plugin trigger switch + * event plug-in trigger switch * * @var boolean * @since 3.2.0 */ protected $activePlugins = false; + /** + * The application to trigger and event TODO + * + * @since 3.2.0 + */ + protected $dispatcher; + /** * Constructor * @@ -60,6 +68,8 @@ final class Event implements EventInterface } } } + + $this->dispatcher = Factory::getApplication(); } /** @@ -77,22 +87,14 @@ final class Event implements EventInterface // only execute if plugins were loaded (active) if ($this->activePlugins) { - // Get the dispatcher. - $dispatcher = \JEventDispatcher::getInstance(); - - // Trigger this compiler event. - $results = $dispatcher->trigger($event, $data); - - // Check for errors encountered while trigger the event - if (count((array) $results) && in_array(false, $results, true)) + try { - // Get the last error. - $error = $dispatcher->getError(); - - if (!($error instanceof \Exception)) - { - throw new \Exception($error); - } + // Trigger this compiler event. + $results = $this->dispatcher->triggerEvent($event, $data ?? []); + } + catch (\Exception $e) + { + throw new \Exception("Error processing event '$event': " . $e->getMessage()); } } } diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Header.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Header.php index a187c5718..712242b7e 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Header.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Header.php @@ -22,7 +22,6 @@ 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\String\NamespaceHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\HeaderInterface; @@ -145,7 +144,7 @@ final class Header implements HeaderInterface * @var string * @since 3.2.0 */ - protected string $ComponentNameSpace; + protected string $ComponentNamespace; /** * Constructor. @@ -181,9 +180,9 @@ final class Header implements HeaderInterface $this->tags = $tags; // set some global values - $this->NamespacePrefix = $this->config->get('namespace_prefix'); + $this->NamespacePrefix = $this->placeholder->get('NamespacePrefix'); $this->ComponentName = $this->placeholder->get('Component'); - $this->ComponentNameSpace = NamespaceHelper::safeSegment($this->ComponentName); + $this->ComponentNamespace = $this->placeholder->get('ComponentNamespace'); } /** @@ -209,7 +208,7 @@ final class Header implements HeaderInterface $target = 'Site'; } - $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNameSpace}\\{$target}\\Helper\\{$this->ComponentName}Helper;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\{$target}\\Helper\\{$this->ComponentName}Helper;"; // we will add more as needed switch ($context) @@ -218,7 +217,7 @@ final class Header implements HeaderInterface case 'site.views.model': case 'site.view.html': case 'site.views.html': - $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNameSpace}\\Site\\Helper\\RouteHelper;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Site\\Helper\\RouteHelper;"; break; default: @@ -387,7 +386,7 @@ final class Header implements HeaderInterface $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;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\Site\\Helper\\HeaderCheck;"; break; case 'custom.admin.view.html': @@ -404,7 +403,7 @@ final class Header implements HeaderInterface $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}\\{$target}\\Helper\\HeaderCheck;"; + $headers[] = "use {$this->NamespacePrefix}\\Component\\{$this->ComponentNamespace}\\{$target}\\Helper\\HeaderCheck;"; break; case 'admin.view.model':