diff --git a/README.md b/README.md
index 44f91d048..95a187961 100644
--- a/README.md
+++ b/README.md
@@ -140,14 +140,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*: 20th September, 2022
++ *Last Build*: 6th October, 2022
+ *Version*: 3.1.8
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **331607**
++ *Line count*: **331795**
+ *Field count*: **2004**
-+ *File count*: **2170**
-+ *Folder count*: **376**
++ *File count*: **2172**
++ *Folder count*: **378**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
diff --git a/admin/README.txt b/admin/README.txt
index 44f91d048..95a187961 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -140,14 +140,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*: 20th September, 2022
++ *Last Build*: 6th October, 2022
+ *Version*: 3.1.8
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **331607**
++ *Line count*: **331795**
+ *Field count*: **2004**
-+ *File count*: **2170**
-+ *Folder count*: **376**
++ *File count*: **2172**
++ *Folder count*: **378**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
diff --git a/admin/models/forms/admin_custom_tabs.xml b/admin/models/forms/admin_custom_tabs.xml
index bf05ddcf6..4733e880a 100644
--- a/admin/models/forms/admin_custom_tabs.xml
+++ b/admin/models/forms/admin_custom_tabs.xml
@@ -153,6 +153,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_MESSAGE"
diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml
index 294612635..bda1af153 100644
--- a/admin/models/forms/admin_view.xml
+++ b/admin/models/forms/admin_view.xml
@@ -608,6 +608,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_MESSAGE"
@@ -1786,6 +1788,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_MESSAGE"
diff --git a/admin/models/forms/class_extends.xml b/admin/models/forms/class_extends.xml
index 8861f9e1d..9811a2e0c 100644
--- a/admin/models/forms/class_extends.xml
+++ b/admin/models/forms/class_extends.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_MESSAGE"
diff --git a/admin/models/forms/class_method.xml b/admin/models/forms/class_method.xml
index e1c210b54..0852532f8 100644
--- a/admin/models/forms/class_method.xml
+++ b/admin/models/forms/class_method.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CLASS_METHOD_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CLASS_METHOD_NAME_MESSAGE"
diff --git a/admin/models/forms/class_property.xml b/admin/models/forms/class_property.xml
index 1d95e9cfb..7fdc145e7 100644
--- a/admin/models/forms/class_property.xml
+++ b/admin/models/forms/class_property.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_MESSAGE"
diff --git a/admin/models/forms/component_custom_admin_menus.xml b/admin/models/forms/component_custom_admin_menus.xml
index fb7ad3a56..547f5fd7b 100644
--- a/admin/models/forms/component_custom_admin_menus.xml
+++ b/admin/models/forms/component_custom_admin_menus.xml
@@ -137,6 +137,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_MESSAGE"
diff --git a/admin/models/forms/component_dashboard.xml b/admin/models/forms/component_dashboard.xml
index 78160c848..2b33f5025 100644
--- a/admin/models/forms/component_dashboard.xml
+++ b/admin/models/forms/component_dashboard.xml
@@ -138,6 +138,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_MESSAGE"
diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml
index 0576f7735..d8029fd5b 100644
--- a/admin/models/forms/custom_admin_view.xml
+++ b/admin/models/forms/custom_admin_view.xml
@@ -116,6 +116,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_MESSAGE"
@@ -1118,6 +1120,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_MESSAGE"
diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml
index bf0b67278..32af1c69c 100644
--- a/admin/models/forms/dynamic_get.xml
+++ b/admin/models/forms/dynamic_get.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE"
diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml
index 21fc3b1c4..a1dcbc680 100644
--- a/admin/models/forms/field.xml
+++ b/admin/models/forms/field.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_FIELD_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELD_NAME_MESSAGE"
diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml
index 2a94aef36..dbdf98c6b 100644
--- a/admin/models/forms/fieldtype.xml
+++ b/admin/models/forms/fieldtype.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_FIELDTYPE_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELDTYPE_NAME_MESSAGE"
@@ -322,6 +324,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_FIELDTYPE_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELDTYPE_NAME_MESSAGE"
diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml
index 17abef7d8..01ce06bbd 100644
--- a/admin/models/forms/joomla_component.xml
+++ b/admin/models/forms/joomla_component.xml
@@ -1217,6 +1217,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE"
diff --git a/admin/models/forms/joomla_module.xml b/admin/models/forms/joomla_module.xml
index e4e0579a1..a2fadcb5a 100644
--- a/admin/models/forms/joomla_module.xml
+++ b/admin/models/forms/joomla_module.xml
@@ -890,6 +890,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_MESSAGE"
diff --git a/admin/models/forms/joomla_plugin.xml b/admin/models/forms/joomla_plugin.xml
index 4b587a0a3..0a8bec6e3 100644
--- a/admin/models/forms/joomla_plugin.xml
+++ b/admin/models/forms/joomla_plugin.xml
@@ -857,6 +857,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_MESSAGE"
diff --git a/admin/models/forms/joomla_plugin_group.xml b/admin/models/forms/joomla_plugin_group.xml
index 888298674..f68c65cc4 100644
--- a/admin/models/forms/joomla_plugin_group.xml
+++ b/admin/models/forms/joomla_plugin_group.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_MESSAGE"
diff --git a/admin/models/forms/language.xml b/admin/models/forms/language.xml
index ff794c747..a4882c39d 100644
--- a/admin/models/forms/language.xml
+++ b/admin/models/forms/language.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_LANGUAGE_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_LANGUAGE_NAME_MESSAGE"
diff --git a/admin/models/forms/layout.xml b/admin/models/forms/layout.xml
index a12c4c786..75b64a30e 100644
--- a/admin/models/forms/layout.xml
+++ b/admin/models/forms/layout.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_LAYOUT_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE"
diff --git a/admin/models/forms/library.xml b/admin/models/forms/library.xml
index d6050a295..beb2e8d35 100644
--- a/admin/models/forms/library.xml
+++ b/admin/models/forms/library.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_LIBRARY_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_LIBRARY_NAME_MESSAGE"
diff --git a/admin/models/forms/power.xml b/admin/models/forms/power.xml
index 5b01bbf59..573407d82 100644
--- a/admin/models/forms/power.xml
+++ b/admin/models/forms/power.xml
@@ -448,6 +448,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_POWER_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_NAME_MESSAGE"
diff --git a/admin/models/forms/server.xml b/admin/models/forms/server.xml
index b22cf1557..884ec9e73 100644
--- a/admin/models/forms/server.xml
+++ b/admin/models/forms/server.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SERVER_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SERVER_NAME_MESSAGE"
diff --git a/admin/models/forms/site_view.xml b/admin/models/forms/site_view.xml
index 754be86b7..28d759090 100644
--- a/admin/models/forms/site_view.xml
+++ b/admin/models/forms/site_view.xml
@@ -116,6 +116,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SITE_VIEW_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SITE_VIEW_NAME_MESSAGE"
@@ -1137,6 +1139,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SITE_VIEW_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SITE_VIEW_NAME_MESSAGE"
diff --git a/admin/models/forms/snippet.xml b/admin/models/forms/snippet.xml
index 31c799b11..5d666c212 100644
--- a/admin/models/forms/snippet.xml
+++ b/admin/models/forms/snippet.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SNIPPET_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SNIPPET_NAME_MESSAGE"
diff --git a/admin/models/forms/snippet_type.xml b/admin/models/forms/snippet_type.xml
index 8f1a0dd7a..14287a313 100644
--- a/admin/models/forms/snippet_type.xml
+++ b/admin/models/forms/snippet_type.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_MESSAGE"
diff --git a/admin/models/forms/template.xml b/admin/models/forms/template.xml
index a2a4495ef..0d4e7a31d 100644
--- a/admin/models/forms/template.xml
+++ b/admin/models/forms/template.xml
@@ -102,6 +102,8 @@
maxlength="150"
description="COM_COMPONENTBUILDER_TEMPLATE_NAME_DESCRIPTION"
class="text_area"
+ readonly="false"
+ disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE"
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql
index a1e978117..a8987270c 100644
--- a/admin/sql/install.mysql.utf8.sql
+++ b/admin/sql/install.mysql.utf8.sql
@@ -2204,12 +2204,12 @@ INSERT INTO `#__componentbuilder_validation_rule` (`id`, `name`, `php`, `short_d
--
INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`, `add_javascript_view_footer`, `add_javascript_views_footer`, `css_view`, `css_views`, `datadefault`, `datadefault_other`, `datalenght`, `datalenght_other`, `datatype`, `indexes`, `javascript_view_footer`, `javascript_views_footer`, `name`, `null_switch`, `store`, `fieldtype`, `xml`, `published`, `created`, `modified`, `version`, `hits`, `ordering`, `guid`) VALUES
-(23, '', '', '', '', '', '', '', '', 64, '', 'CHAR', '', '', '', 'Alias', 'NOT NULL', '', 24, '\"\"', 1, '2015-04-09 13:46:04', '2016-05-05 22:30:18', 2, '', 216, '335866ce-b81b-4329-901d-c20254135c9c'),
-(84, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Description (full width)', 'NOT NULL', '', 25, '\"\"', 1, '2015-03-19 18:20:49', '2016-10-20 17:01:21', 4, '', 265, '749a9917-90c3-49c4-9e72-aa33b0683a87'),
+(23, '', '', '', '', '', '', '', '', 64, '', 'CHAR', '', '', '', 'Alias', 'NOT NULL', '', 24, '\"\"', 1, '2015-04-09 13:46:04', '2022-09-21 10:17:10', 2, '', 216, '335866ce-b81b-4329-901d-c20254135c9c'),
+(84, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Description (full width)', 'NOT NULL', '', 25, '\"\"', 1, '2015-03-19 18:20:49', '2022-09-21 10:17:10', 4, '', 265, '749a9917-90c3-49c4-9e72-aa33b0683a87'),
(100, '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Email (required)', 'NOT NULL', '', 24, '\"\"', 1, '2015-05-05 23:44:32', '2016-02-07 22:43:18', 4, '', 285, '10c1eccb-b3c3-4325-a056-45a72d116fd8'),
(158, '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Image', 'NOT NULL', '', 12, '\"\"', 1, '2015-04-29 14:00:56', '2020-06-07 02:17:46', 2, '', 45, '0d6970af-b361-4f65-84f6-0eb0c5f09bad'),
(196, '', '', '', '', '', '', '', '', 64, '', 'VARCHAR', '', '', '', 'Mobile Phone', 'NOT NULL', '', 23, '\"\"', 1, '2015-04-07 22:12:58', '2016-03-28 14:00:02', 2, '', 7, '65933a19-243a-48b2-aae9-34e2da710051'),
-(199, '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name (required)', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2021-08-05 08:42:17', 10, '', 4, '5d3d34dd-4876-4c6a-86ab-b4e162f22c08'),
+(199, '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2022-09-21 10:17:10', 8, '', 4, '5d3d34dd-4876-4c6a-86ab-b4e162f22c08'),
(203, '', '', '', '', '', '', '', '', 1, '', 'INT', '', '', '', 'Not Required', 'NOT NULL', '', 9, '\"\"', 1, '2015-05-08 16:19:16', '2020-02-27 20:17:33', 13, '', 19, 'da5e6901-6958-40e5-a4f5-6822d6fe57ac'),
(280, '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Website', 'NOT NULL', '', 27, '\"\"', 1, '2015-04-08 00:36:16', '2018-07-08 00:11:05', 2, '', 105, '6c3a6983-d1bf-4e5e-9e99-deea00b0cefd'),
(682, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Add More', 'NOT NULL', '', 17, '\"\"', 1, '2015-08-05 01:18:20', '2018-03-30 09:30:45', 4, '', 196, 'a66389aa-2323-4f44-8c23-ff44969639be'),
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 7cb461846..a5bd7a14d 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 20th September, 2022
+ 6th October, 2022
Llewellyn van der Merwe
joomla@vdm.io
https://dev.vdm.io
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/BaseConfig.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/Registry.php
similarity index 85%
rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/BaseConfig.php
rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/Registry.php
index 773e31c59..b3a36519f 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/BaseConfig.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/Registry.php
@@ -9,10 +9,10 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder;
+namespace VDM\Joomla\Componentbuilder\Abstraction;
-use Joomla\Registry\Registry;
+use Joomla\Registry\Registry as JoomlaRegistry;
use Joomla\CMS\Factory;
use Joomla\Input\Input;
use VDM\Joomla\Utilities\Component\Helper;
@@ -20,11 +20,11 @@ use VDM\Joomla\Utilities\String\ClassfunctionHelper;
/**
- * Configurations
+ * Registry
*
* @since 3.2.0
*/
-abstract class BaseConfig extends Registry
+abstract class Registry extends JoomlaRegistry
{
/**
* Hold a JInput object for easier access to the input variables.
@@ -37,10 +37,10 @@ abstract class BaseConfig extends Registry
/**
* The Params
*
- * @var Registry
+ * @var JoomlaRegistry
* @since 3.2.0
*/
- protected Registry $params;
+ protected JoomlaRegistry $params;
/**
* Constructor
@@ -51,7 +51,7 @@ abstract class BaseConfig extends Registry
* @throws \Exception
* @since 3.2.0
*/
- public function __construct(?Input $input = null, ?Registry $params = null)
+ public function __construct(?Input $input = null, ?JoomlaRegistry $params = null)
{
$this->input = $input ?: Factory::getApplication()->input;
$this->params = $params ?: Helper::getParams('com_componentbuilder');
@@ -92,7 +92,7 @@ abstract class BaseConfig extends Registry
return $value;
}
- throw new \InvalidArgumentException(sprintf('Argument %s could not be found as function [%s], or path.', $key, $method));
+ throw new \InvalidArgumentException(sprintf('Argument %s could not be found as function or path.', $key));
}
/**
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Abstraction/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
index e9407f63c..aeff2fe86 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
@@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\StringHelper;
-use VDM\Joomla\Componentbuilder\BaseConfig;
+use VDM\Joomla\Componentbuilder\Abstraction\Registry;
/**
@@ -22,7 +22,7 @@ use VDM\Joomla\Componentbuilder\BaseConfig;
*
* @since 3.2.0
*/
-class Config extends BaseConfig
+class Config extends Registry
{
/**
* get posted component id
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
index 8d5ab19e7..dfa6ba645 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
@@ -44,6 +44,14 @@ class Power implements PowerInterface
**/
public array $active = [];
+ /**
+ * The url to the power, if there is an error.
+ *
+ * @var string
+ * @since 3.2.0
+ **/
+ protected string $fixUrl;
+
/**
* The state of all loaded powers
*
@@ -200,7 +208,7 @@ class Power implements PowerInterface
$tmp_lang_target = $this->config->lang_target;
$this->config->lang_target = 'both';
// we set the fix usr if needed
- $fix_url
+ $this->fixUrl
= '"index.php?option=com_componentbuilder&view=powers&task=power.edit&id='
. $this->active[$guid]->id . '" target="_blank"';
// set some keys
@@ -219,217 +227,37 @@ class Power implements PowerInterface
$this->active[$guid]->official_name = StringHelper::safe(
$this->active[$guid]->name, 'W'
);
- // set namespace
- $this->active[$guid]->namespace = $this->placeholder->update(
- $this->active[$guid]->namespace, $this->placeholder->active
- );
- // validate namespace
- if (strpos($this->active[$guid]->namespace, '\\') === false)
+
+ // set name space
+ if (!$this->setNamespace($guid))
{
- // we raise an error message
- $this->app->enqueueMessage(
- Text::sprintf('COM_COMPONENTBUILDER_HTHREES_NAMESPACE_ERROR_SHTHREEPYOU_MUST_ATLEAST_HAVE_TWO_SECTIONS_IN_YOUR_NAMESPACE_YOU_JUST_HAVE_ONE_THIS_IS_AN_UNACCEPTABLE_ACTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPTHIS_S_WAS_THEREFORE_REMOVED_A_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP',
- ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->namespace,
- '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $this->active[$guid]->type,
- $fix_url),
- 'Error'
- );
$this->state[$guid] = false;
unset($this->active[$guid]);
// reset back to starting value
$this->config->lang_target = $tmp_lang_target;
- // we break out here
+
return false;
}
- else
- {
- // setup the path array
- $path_array = (array) explode('\\', $this->active[$guid]->namespace);
- // make sure all sub folders in src dir is set and remove all characters that will not work in folders naming
- $this->active[$guid]->namespace = NamespaceHelper::safe(str_replace('.', '\\', $this->active[$guid]->namespace));
- // make sure it has two or more
- if (ArrayHelper::check($path_array) <= 1)
- {
- // we raise an error message
- $this->app->enqueueMessage(
- Text::sprintf('COM_COMPONENTBUILDER_HTHREES_NAMESPACE_ERROR_SHTHREEPYOU_MUST_ATLEAST_HAVE_TWO_SECTIONS_IN_YOUR_NAMESPACE_YOU_JUST_HAVE_ONE_S_THIS_IS_AN_UNACCEPTABLE_ACTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPTHIS_S_WAS_THEREFORE_REMOVED_A_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP',
- ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->namespace,
- '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $this->active[$guid]->type,
- $fix_url),
- 'Error'
- );
- $this->state[$guid] = false;
- unset($this->active[$guid]);
- // reset back to starting value
- $this->config->lang_target = $tmp_lang_target;
- // we break out here
- return false;
- }
- // get the file and class name (the last value in array)
- $file_name = array_pop($path_array);
- // src array bucket
- $src_array = array();
- // do we have src folders
- if (strpos($file_name, '.') !== false)
- {
- // we have src folders in the namespace
- $src_array = (array) explode('.', $file_name);
- // get the file and class name (the last value in array)
- $this->active[$guid]->file_name = array_pop($src_array);
- // namespace array
- $namespace_array = array_merge($path_array, $src_array);
- }
- else
- {
- // set the file name
- $this->active[$guid]->file_name = $file_name;
- // namespace array
- $namespace_array = $path_array;
- }
- // the last value is the same as the class name
- if ($this->active[$guid]->file_name !== $this->active[$guid]->class_name)
- {
- // we raise an error message
- $this->app->enqueueMessage(
- Text::sprintf('COM_COMPONENTBUILDER_PS_NAMING_MISMATCH_ERROR_SPPTHE_S_NAME_IS_BSB_AND_THE_ENDING_FILE_NAME_IN_THE_NAMESPACE_IS_BSB_THIS_IS_BAD_CONVENTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPA_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP',
- ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->type, $this->active[$guid]->class_name, $this->active[$guid]->file_name,
- '"https://www.php-fig.org/psr/psr-4/" target="_blank"',
- $fix_url),
- 'Error'
- );
- $this->state[$guid] = false;
- unset($this->active[$guid]);
- // reset back to starting value
- $this->config->lang_target = $tmp_lang_target;
- // we break out here
- return false;
- }
- // make sure the arrays are namespace safe
- $path_array = array_map(function ($val) {
- return NamespaceHelper::safe($val);
- }, $path_array);
- $namespace_array = array_map(function ($val) {
- return NamespaceHelper::safe($val);
- }, $namespace_array);
- // set the actual class namespace
- $this->active[$guid]->_namespace = implode('\\', $namespace_array);
- // prefix values
- $this->active[$guid]->_namespace_prefix = $path_array;
- // get the parent folder (the first value in array)
- $prefix_folder = implode('.', $path_array);
- // make sub folders if still found
- $sub_folder = '';
- if (ArrayHelper::check($src_array))
- {
- // make sure the arrays are namespace safe
- $sub_folder = '/' . implode('/', array_map(function ($val) {
- return NamespaceHelper::safe($val);
- }, $src_array));
- }
- // now we set the paths
- $this->active[$guid]->path_jcb = $this->config->get('jcb_powers_path', 'libraries/jcb_powers');
- $this->active[$guid]->path_parent = $this->active[$guid]->path_jcb . '/' . $prefix_folder;
- $this->active[$guid]->path = $this->active[$guid]->path_parent . '/src' . $sub_folder;
- }
+
// load use ids
- $use = array();
- $as = array();
- // check if we have use selection
- $this->active[$guid]->use_selection = (isset($this->active[$guid]->use_selection)
- && JsonHelper::check(
- $this->active[$guid]->use_selection
- )) ? json_decode($this->active[$guid]->use_selection, true) : null;
- if ($this->active[$guid]->use_selection)
- {
- $use = array_values(array_map(function ($u) use(&$as) {
- // track the AS options
- if (empty($u['as']))
- {
- $as[$u['use']] = 'default';
- }
- else
- {
- $as[$u['use']] = (string) $u['as'];
- }
- // return the guid
- return $u['use'];
- }, $this->active[$guid]->use_selection));
- }
- // check if we have load selection
- $this->active[$guid]->load_selection = (isset($this->active[$guid]->load_selection)
- && JsonHelper::check(
- $this->active[$guid]->load_selection
- )) ? json_decode($this->active[$guid]->load_selection, true) : null;
- if ($this->active[$guid]->load_selection)
- {
- // load use ids
- array_map(function ($l) {
- // just load it directly and be done with it
- return $this->set($l['load']);
- }, $this->active[$guid]->load_selection);
- }
- // see if we have implements
- $this->active[$guid]->implement_names = array();
- // does this implement
- $this->active[$guid]->implements = (isset($this->active[$guid]->implements)
- && JsonHelper::check(
- $this->active[$guid]->implements
- )) ? json_decode($this->active[$guid]->implements, true) : null;
- if ($this->active[$guid]->implements)
- {
- foreach ($this->active[$guid]->implements as $implement)
- {
- if ($implement == -1
- && StringHelper::check($this->active[$guid]->implements_custom))
- {
- $this->active[$guid]->implement_names[] = $this->placeholder->update(
- $this->customcode->update($this->active[$guid]->implements_custom),
- $this->placeholder->active
- );
- // just add this once
- unset($this->active[$guid]->implements_custom);
- }
- // does this extend existing
- elseif (GuidHelper::valid($implement))
- {
- // check if it was set
- if ($this->set($implement))
- {
- // get the name
- $this->active[$guid]->implement_names[] = $this->get($implement, 1)->class_name;
- // add to use
- $use[] = $implement;
- }
- }
- }
- }
- // does this extend something
- $this->active[$guid]->extends_name = null;
- // we first check for custom extending options
- if ($this->active[$guid]->extends == -1
- && StringHelper::check($this->active[$guid]->extends_custom))
- {
- $this->active[$guid]->extends_name = $this->placeholder->update(
- $this->customcode->update($this->active[$guid]->extends_custom),
- $this->placeholder->active
- );
- // just add once
- unset($this->active[$guid]->extends_custom);
- }
- // does this extend existing
- elseif (GuidHelper::valid($this->active[$guid]->extends))
- {
- // check if it was set
- if ($this->set($this->active[$guid]->extends))
- {
- // get the name
- $this->active[$guid]->extends_name = $this->get($this->active[$guid]->extends, 1)->class_name;
- // add to use
- $use[] = $this->active[$guid]->extends;
- }
- }
+ $use = [];
+ $as = [];
+
+ // set extra classes
+ $this->setLoadSelection($guid);
+
+ // set use classes
+ $this->setUseSelection($guid, $use, $as);
+
+ // set implement interfaces
+ $this->setImplements($guid, $use);
+
+ // set extend class
+ $this->setExtend($guid, $use);
+
// set GUI mapper
$guiMapper = array('table' => 'power', 'id' => (int) $this->active[$guid]->id, 'type' => 'php');
+
// add the licensing template
if ($this->active[$guid]->add_licensing_template == 2 &&
StringHelper::check($this->active[$guid]->licensing_template))
@@ -453,6 +281,7 @@ class Power implements PowerInterface
$this->active[$guid]->add_licensing_template = 1;
$this->active[$guid]->licensing_template = '';
}
+
// add the header script
if ($this->active[$guid]->add_head == 1)
{
@@ -470,35 +299,13 @@ class Power implements PowerInterface
$guiMapper
) . PHP_EOL;
}
- // now add all the extra use statements
- if (ArrayHelper::check($use))
- {
- foreach (array_unique($use) as $u)
- {
- if ($this->set($u))
- {
- $add_use = $this->get($u, 1)->namespace;
- // check if it is already added manually, you know how some people are
- if (strpos($this->active[$guid]->head, $add_use) === false)
- {
- // check if it has an AS option
- if (isset($as[$u]) && StringHelper::check($as[$u]) && $as[$u] !== 'default')
- {
- $this->active[$guid]->head .= 'use ' . $add_use . ' as ' . $as[$u] . ';' . PHP_EOL;
- }
- else
- {
- $this->active[$guid]->head .= 'use ' . $add_use . ';' . PHP_EOL;
- }
- }
- }
- }
- }
+
// now set the description
$this->active[$guid]->description = (StringHelper::check($this->active[$guid]->description)) ? $this->placeholder->update(
$this->customcode->update($this->active[$guid]->description),
$this->placeholder->active
) : '';
+
// add the main code if set
if (StringHelper::check($this->active[$guid]->main_class_code))
{
@@ -516,6 +323,10 @@ class Power implements PowerInterface
$guiMapper
);
}
+
+ // load the use classes
+ $this->setUseAs($guid, $use, $as);
+
// reset back to starting value
$this->config->lang_target = $tmp_lang_target;
@@ -536,6 +347,327 @@ class Power implements PowerInterface
$this->state[$guid] = false;
return false;
- }
+ }
+
+ /**
+ * Set the namespace for this power
+ *
+ * @param string $guid The global unique id of the power
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function setNamespace(string $guid)
+ {
+ // set namespace
+ $this->active[$guid]->namespace = $this->placeholder->update(
+ $this->active[$guid]->namespace, $this->placeholder->active
+ );
+
+ // validate namespace
+ if (strpos($this->active[$guid]->namespace, '\\') === false)
+ {
+ // we raise an error message
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_HTHREES_NAMESPACE_ERROR_SHTHREEPYOU_MUST_ATLEAST_HAVE_TWO_SECTIONS_IN_YOUR_NAMESPACE_YOU_JUST_HAVE_ONE_THIS_IS_AN_UNACCEPTABLE_ACTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPTHIS_S_WAS_THEREFORE_REMOVED_A_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP',
+ ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->namespace,
+ '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $this->active[$guid]->type,
+ $this->fixUrl),
+ 'Error'
+ );
+
+ // we break out here
+ return false;
+ }
+
+ // setup the path array
+ $path_array = (array) explode('\\', $this->active[$guid]->namespace);
+
+ // make sure all sub folders in src dir is set and remove all characters that will not work in folders naming
+ $this->active[$guid]->namespace = NamespaceHelper::safe(str_replace('.', '\\', $this->active[$guid]->namespace));
+
+ // make sure it has two or more
+ if (ArrayHelper::check($path_array) <= 1)
+ {
+ // we raise an error message
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_HTHREES_NAMESPACE_ERROR_SHTHREEPYOU_MUST_ATLEAST_HAVE_TWO_SECTIONS_IN_YOUR_NAMESPACE_YOU_JUST_HAVE_ONE_S_THIS_IS_AN_UNACCEPTABLE_ACTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPTHIS_S_WAS_THEREFORE_REMOVED_A_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP',
+ ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->namespace,
+ '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $this->active[$guid]->type,
+ $this->fixUrl),
+ 'Error'
+ );
+
+ // we break out here
+ return false;
+ }
+
+ // get the file and class name (the last value in array)
+ $file_name = array_pop($path_array);
+
+ // src array bucket
+ $src_array = [];
+
+ // do we have src folders
+ if (strpos($file_name, '.') !== false)
+ {
+ // we have src folders in the namespace
+ $src_array = (array) explode('.', $file_name);
+
+ // get the file and class name (the last value in array)
+ $this->active[$guid]->file_name = array_pop($src_array);
+
+ // namespace array
+ $namespace_array = array_merge($path_array, $src_array);
+ }
+ else
+ {
+ // set the file name
+ $this->active[$guid]->file_name = $file_name;
+
+ // namespace array
+ $namespace_array = $path_array;
+ }
+
+ // the last value is the same as the class name
+ if ($this->active[$guid]->file_name !== $this->active[$guid]->class_name)
+ {
+ // we raise an error message
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_PS_NAMING_MISMATCH_ERROR_SPPTHE_S_NAME_IS_BSB_AND_THE_ENDING_FILE_NAME_IN_THE_NAMESPACE_IS_BSB_THIS_IS_BAD_CONVENTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPA_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP',
+ ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->type, $this->active[$guid]->class_name, $this->active[$guid]->file_name,
+ '"https://www.php-fig.org/psr/psr-4/" target="_blank"',
+ $this->fixUrl),
+ 'Error'
+ );
+
+ // we break out here
+ return false;
+ }
+
+ // make sure the arrays are namespace safe
+ $path_array = array_map(function ($val) {
+ return NamespaceHelper::safe($val);
+ }, $path_array);
+ $namespace_array = array_map(function ($val) {
+ return NamespaceHelper::safe($val);
+ }, $namespace_array);
+ // set the actual class namespace
+ $this->active[$guid]->_namespace = implode('\\', $namespace_array);
+ // prefix values
+ $this->active[$guid]->_namespace_prefix = $path_array;
+ // get the parent folder (the first value in array)
+ $prefix_folder = implode('.', $path_array);
+
+ // make sub folders if still found
+ $sub_folder = '';
+ if (ArrayHelper::check($src_array))
+ {
+ // make sure the arrays are namespace safe
+ $sub_folder = '/' . implode('/', array_map(function ($val) {
+ return NamespaceHelper::safe($val);
+ }, $src_array));
+ }
+
+ // now we set the paths
+ $this->active[$guid]->path_jcb = $this->config->get('jcb_powers_path', 'libraries/jcb_powers');
+ $this->active[$guid]->path_parent = $this->active[$guid]->path_jcb . '/' . $prefix_folder;
+ $this->active[$guid]->path = $this->active[$guid]->path_parent . '/src' . $sub_folder;
+
+ return true;
+ }
+
+ /**
+ * Set Use Classess
+ *
+ * @param string $guid The global unique id of the power
+ * @param array $use The use array
+ * @param array $as The use as array
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function setUseSelection(string $guid, array &$use, array &$as)
+ {
+ // check if we have use selection
+ $this->active[$guid]->use_selection = (isset($this->active[$guid]->use_selection)
+ && JsonHelper::check(
+ $this->active[$guid]->use_selection
+ )) ? json_decode($this->active[$guid]->use_selection, true) : null;
+
+ if ($this->active[$guid]->use_selection)
+ {
+ $use = array_values(array_map(function ($u) use(&$as) {
+ // track the AS options
+ if (empty($u['as']))
+ {
+ $as[$u['use']] = 'default';
+ }
+ else
+ {
+ $as[$u['use']] = (string) $u['as'];
+ }
+ // return the guid
+ return $u['use'];
+ }, $this->active[$guid]->use_selection));
+ }
+ }
+
+ /**
+ * Load Extra Classes
+ *
+ * @param string $guid The global unique id of the power
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function setLoadSelection(string $guid)
+ {
+ // check if we have load selection
+ $this->active[$guid]->load_selection = (isset($this->active[$guid]->load_selection)
+ && JsonHelper::check(
+ $this->active[$guid]->load_selection
+ )) ? json_decode($this->active[$guid]->load_selection, true) : null;
+
+ if ($this->active[$guid]->load_selection)
+ {
+ // load use ids
+ array_map(function ($power) {
+ // just load it directly and be done with it
+ return $this->set($power['load']);
+ }, $this->active[$guid]->load_selection);
+ }
+ }
+
+ /**
+ * Set Implements Interface classes
+ *
+ * @param string $guid The global unique id of the power
+ * @param array $use The use array
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function setImplements(string $guid, array &$use)
+ {
+ // see if we have implements
+ $this->active[$guid]->implement_names = [];
+
+ // does this implement
+ $this->active[$guid]->implements = (isset($this->active[$guid]->implements)
+ && JsonHelper::check(
+ $this->active[$guid]->implements
+ )) ? json_decode($this->active[$guid]->implements, true) : null;
+
+ if ($this->active[$guid]->implements)
+ {
+ foreach ($this->active[$guid]->implements as $implement)
+ {
+ if ($implement == -1
+ && StringHelper::check($this->active[$guid]->implements_custom))
+ {
+ $this->active[$guid]->implement_names[] = $this->placeholder->update(
+ $this->customcode->update($this->active[$guid]->implements_custom),
+ $this->placeholder->active
+ );
+ // just add this once
+ unset($this->active[$guid]->implements_custom);
+ }
+ // does this extend existing
+ elseif (GuidHelper::valid($implement))
+ {
+ // check if it was set
+ if ($this->set($implement))
+ {
+ // get the name
+ $this->active[$guid]->implement_names[] = $this->get($implement, 1)->class_name;
+ // add to use
+ $use[] = $implement;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Set Extend Class
+ *
+ * @param string $guid The global unique id of the power
+ * @param array $use The use array
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function setExtend(string $guid, array &$use)
+ {
+ // does this extend something
+ $this->active[$guid]->extends_name = null;
+
+ // we first check for custom extending options
+ if ($this->active[$guid]->extends == -1
+ && StringHelper::check($this->active[$guid]->extends_custom))
+ {
+ $this->active[$guid]->extends_name = $this->placeholder->update(
+ $this->customcode->update($this->active[$guid]->extends_custom),
+ $this->placeholder->active
+ );
+ // just add once
+ unset($this->active[$guid]->extends_custom);
+ }
+ // does this extend existing
+ elseif (GuidHelper::valid($this->active[$guid]->extends))
+ {
+ // check if it was set
+ if ($this->set($this->active[$guid]->extends))
+ {
+ // get the name
+ $this->active[$guid]->extends_name = $this->get($this->active[$guid]->extends, 1)->class_name;
+ // add to use
+ $use[] = $this->active[$guid]->extends;
+ }
+ }
+ }
+
+ /**
+ * Set Extra Use Classes
+ *
+ * @param string $guid The global unique id of the power
+ * @param array $use The use array
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function setUseAs($guid, $use, $as)
+ {
+ // now add all the extra use statements
+ if (ArrayHelper::check($use))
+ {
+ foreach (array_unique($use) as $u)
+ {
+ if ($this->set($u))
+ {
+ // get the namespace
+ $add_use = $this->get($u, 1)->namespace;
+
+ // check if it has an AS option
+ if (isset($as[$u]) && StringHelper::check($as[$u]) && $as[$u] !== 'default')
+ {
+ $add_use = 'use ' . $add_use . ' as ' . $as[$u] . ';';
+ }
+ else
+ {
+ $add_use = 'use ' . $add_use . ';';
+ }
+
+ // check if it is already added manually
+ if (strpos($this->active[$guid]->head, $add_use) === false)
+ {
+ $this->active[$guid]->head .= $add_use . PHP_EOL;
+ }
+ }
+ }
+ }
+ }
+
}
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Model.php
similarity index 94%
rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model.php
rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Model.php
index bf41a257b..1b6cfebb2 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Model.php
@@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Search;
+namespace VDM\Joomla\Componentbuilder\Search\Abstraction;
use VDM\Joomla\Utilities\StringHelper;
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Type.php
similarity index 92%
rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type.php
rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Type.php
index 3056b4d3d..fcb902a80 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/Type.php
@@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Search;
+namespace VDM\Joomla\Componentbuilder\Search\Abstraction;
use VDM\Joomla\Componentbuilder\Search\Factory;
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Abstraction/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php
index ca2200570..7a9690c0a 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Config.php
@@ -12,7 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Search;
-use VDM\Joomla\Componentbuilder\BaseConfig;
+use VDM\Joomla\Componentbuilder\Abstraction\Registry;
/**
@@ -20,7 +20,7 @@ use VDM\Joomla\Componentbuilder\BaseConfig;
*
* @since 3.2.0
*/
-class Config extends BaseConfig
+class Config extends Registry
{
/**
* get posted search value
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php
index 793b9acca..3d42856c3 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Get.php
@@ -15,7 +15,7 @@ namespace VDM\Joomla\Componentbuilder\Search\Model;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Search\Interfaces\ModelInterface;
-use VDM\Joomla\Componentbuilder\Search\Model;
+use VDM\Joomla\Componentbuilder\Search\Abstraction\Model;
/**
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php
index 16d576789..c35764ed5 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Model/Set.php
@@ -13,7 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Search\Model;
use VDM\Joomla\Componentbuilder\Search\Interfaces\ModelInterface;
-use VDM\Joomla\Componentbuilder\Search\Model;
+use VDM\Joomla\Componentbuilder\Search\Abstraction\Model;
/**
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php
index b25803138..a2959ad30 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Basic.php
@@ -16,7 +16,7 @@ use VDM\Joomla\Componentbuilder\Search\Config;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Search\Interfaces\SearchTypeInterface;
-use VDM\Joomla\Componentbuilder\Search\Type;
+use VDM\Joomla\Componentbuilder\Search\Abstraction\Type;
/**
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php
index 9014013bd..19bd68a69 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Search/Type/Regex.php
@@ -16,7 +16,7 @@ use VDM\Joomla\Componentbuilder\Search\Config;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Search\Interfaces\SearchTypeInterface;
-use VDM\Joomla\Componentbuilder\Search\Type;
+use VDM\Joomla\Componentbuilder\Search\Abstraction\Type;
/**