From c8540f2efc91f2ebf9067e445db825fcbe8c4b68 Mon Sep 17 00:00:00 2001 From: aB0t Date: Mon, 11 Mar 2024 16:14:23 +0200 Subject: [PATCH] Update on v4.0.0-alpha1 (beta for next version) Here's an update on the current version, which includes changes towards the next release still in beta. --- README.md | 10 +- admin/README.txt | 10 +- .../joomla_4/ADMIN_AJAX_CONTROLLER.php | 2 +- admin/compiler/joomla_4/ADMIN_AJAX_MODEL.php | 2 +- .../joomla_4/ADMIN_DISPLAY_CONTROLLER.php | 2 +- .../joomla_4/ADMIN_EXTENSION_COMPONENT.php | 4 +- admin/compiler/joomla_4/ADMIN_HEADERCHECK.php | 2 +- .../compiler/joomla_4/ADMIN_HELPER_CLASS.php | 2 +- .../joomla_4/ADMIN_HELPER_CONTROLLER.php | 2 +- .../compiler/joomla_4/ADMIN_HELPER_EMAIL.php | 2 +- .../joomla_4/ADMIN_IMPORT_CONTROLLER.php | 2 +- .../ADMIN_IMPORT_CONTROLLER_CUSTOM.php | 2 +- admin/compiler/joomla_4/ADMIN_IMPORT_HTML.php | 4 +- .../joomla_4/ADMIN_IMPORT_HTML_CUSTOM.php | 4 +- .../compiler/joomla_4/ADMIN_IMPORT_MODEL.php | 2 +- .../joomla_4/ADMIN_IMPORT_MODEL_CUSTOM.php | 2 +- admin/compiler/joomla_4/ADMIN_PROVIDER.php | 4 +- .../joomla_4/ADMIN_VIEWS_CONTROLLER.php | 2 +- admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php | 2 +- admin/compiler/joomla_4/ADMIN_VIEWS_MODEL.php | 2 +- .../joomla_4/ADMIN_VIEW_CONTROLLER.php | 2 +- admin/compiler/joomla_4/ADMIN_VIEW_HTML.php | 2 +- admin/compiler/joomla_4/ADMIN_VIEW_MODEL.php | 2 +- admin/compiler/joomla_4/ADMIN_VIEW_TABLE.php | 4 +- .../CUSTOM_ADMIN_VIEWS_CONTROLLER.php | 2 +- .../joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php | 2 +- .../joomla_4/CUSTOM_ADMIN_VIEWS_MODEL.php | 2 +- .../joomla_4/CUSTOM_ADMIN_VIEW_CONTROLLER.php | 2 +- .../joomla_4/CUSTOM_ADMIN_VIEW_HTML.php | 2 +- .../joomla_4/CUSTOM_ADMIN_VIEW_MODEL.php | 2 +- admin/compiler/joomla_4/DASH_CONTROLLER.php | 2 +- admin/compiler/joomla_4/DASH_MODEL.php | 2 +- admin/compiler/joomla_4/DASH_VIEW_HTML.php | 2 +- .../joomla_4/FORM_CHECKBOXES_FIELD.php | 4 +- admin/compiler/joomla_4/FORM_CUSTOM_FIELD.php | 2 +- admin/compiler/joomla_4/FORM_LIST_FIELD.php | 4 +- admin/compiler/joomla_4/FORM_RADIO_FIELD.php | 4 +- admin/compiler/joomla_4/FORM_RULE.php | 4 +- admin/compiler/joomla_4/FORM_USER_FIELD.php | 4 +- .../joomla_4/SITE_ADMIN_VIEW_CONTROLLER.php | 2 +- .../joomla_4/SITE_ADMIN_VIEW_HTML.php | 2 +- .../joomla_4/SITE_ADMIN_VIEW_MODEL.php | 2 +- .../joomla_4/SITE_AJAX_CONTROLLER.php | 2 +- admin/compiler/joomla_4/SITE_AJAX_MODEL.php | 2 +- admin/compiler/joomla_4/SITE_DISPATCHER.php | 2 +- .../joomla_4/SITE_DISPLAY_CONTROLLER.php | 2 +- .../joomla_4/SITE_FORM_CHECKBOXES_FIELD.php | 4 +- .../joomla_4/SITE_FORM_CUSTOM_FIELD.php | 2 +- .../joomla_4/SITE_FORM_LIST_FIELD.php | 4 +- .../joomla_4/SITE_FORM_RADIO_FIELD.php | 4 +- admin/compiler/joomla_4/SITE_FORM_RULE.php | 4 +- .../joomla_4/SITE_FORM_USER_FIELD.php | 4 +- admin/compiler/joomla_4/SITE_HEADERCHECK.php | 2 +- admin/compiler/joomla_4/SITE_HELPER_CLASS.php | 2 +- .../joomla_4/SITE_HELPER_CONTROLLER.php | 2 +- admin/compiler/joomla_4/SITE_ROUTER.php | 2 +- admin/compiler/joomla_4/SITE_ROUTE_HELPER.php | 2 +- admin/compiler/joomla_4/SITE_VIEWS_HTML.php | 2 +- admin/compiler/joomla_4/SITE_VIEWS_MODEL.php | 2 +- .../joomla_4/SITE_VIEW_CONTROLLER.php | 2 +- admin/compiler/joomla_4/SITE_VIEW_HTML.php | 2 +- admin/compiler/joomla_4/SITE_VIEW_MODEL.php | 2 +- admin/compiler/joomla_4/component.xml | 2 +- admin/compiler/joomla_4/default_body.php | 2 +- admin/compiler/joomla_4/filter_forms.xml | 4 +- admin/compiler/joomla_4/layoutlinkedview.php | 2 +- admin/compiler/joomla_4/module_forms.xml | 4 +- .../Field/AdminlistvieworderfieldsField.php | 148 ++++++++++++++ admin/src/Field/ExcludedlanguagesField.php | 185 ++++++++++++++++++ admin/src/Field/JoomlacomponentsField.php | 2 +- admin/src/Field/JoomlapluginsField.php | 106 ++++++++++ .../src/Field/LinkedviewsorderfieldsField.php | 115 +++++++++++ admin/src/Field/PowersField.php | 87 ++++++++ componentbuilder.xml | 2 +- .../Compiler/Component/Placeholder.php | 7 + .../Compiler/Helper/Infusion.php | 8 +- .../Compiler/Helper/Interpretation.php | 18 +- .../Compiler/JoomlaFive/Header.php | 15 +- .../Compiler/JoomlaFour/Header.php | 15 +- 79 files changed, 769 insertions(+), 123 deletions(-) create mode 100644 admin/src/Field/AdminlistvieworderfieldsField.php create mode 100644 admin/src/Field/ExcludedlanguagesField.php create mode 100644 admin/src/Field/LinkedviewsorderfieldsField.php create mode 100644 admin/src/Field/PowersField.php diff --git a/README.md b/README.md index f9831f798..3386f9984 100644 --- a/README.md +++ b/README.md @@ -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 ++ *Last Build*: 11th March, 2024 + *Version*: 4.0.0-alpha1 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **707621** -+ *Field count*: **1690** -+ *File count*: **4984** -+ *Folder count*: **453** ++ *Line count*: **725507** ++ *Field count*: **2078** ++ *File count*: **5115** ++ *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 f9831f798..3386f9984 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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 ++ *Last Build*: 11th March, 2024 + *Version*: 4.0.0-alpha1 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **707621** -+ *Field count*: **1690** -+ *File count*: **4984** -+ *Folder count*: **453** ++ *Line count*: **725507** ++ *Field count*: **2078** ++ *File count*: **5115** ++ *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/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 51ba6cf18..ce5e3e147 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 9th March, 2024 + 11th March, 2024 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io 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/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/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/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':