From 47e47ee7bb4c137772ccb824d53a187dcea367a4 Mon Sep 17 00:00:00 2001 From: aB0t Date: Tue, 8 Oct 2024 00:32:35 +0200 Subject: [PATCH] Release of v4.0.4-alpha2 Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. --- CHANGELOG.md | 10 +- ComponentbuilderInstallerScript.php | 2 +- README.md | 12 +- admin/README.txt | 12 +- admin/assets/js/get_snippets.js | 9 +- admin/compiler/joomla_3/HtmlView_edit.php | 5 + .../compiler/joomla_3/HtmlView_edit_site.php | 5 + admin/compiler/joomla_3/HtmlView_list.php | 5 + admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php | 5 +- admin/compiler/joomla_4/ADMIN_VIEW_HTML.php | 5 +- .../joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php | 5 +- .../joomla_4/CUSTOM_ADMIN_VIEW_HTML.php | 5 +- admin/compiler/joomla_4/DASH_VIEW_HTML.php | 7 +- admin/compiler/joomla_4/SITE_VIEWS_HTML.php | 3 +- admin/compiler/joomla_4/SITE_VIEW_HTML.php | 3 +- admin/config.xml | 8 +- .../en-GB/en-GB.com_componentbuilder.ini | 4 +- admin/sql/install.mysql.utf8.sql | 4 +- admin/sql/updates/mysql/4.0.4-alpha.sql | 1 + admin/src/Controller/CompilerController.php | 3 + admin/src/Controller/SnippetsController.php | 2 +- admin/src/Field/CustomfilelistField.php | 7 +- admin/src/Model/Admin_viewModel.php | 3 + admin/src/Model/AjaxModel.php | 5 +- admin/src/Model/CompilerModel.php | 18 +- admin/src/Model/Custom_admin_viewModel.php | 3 + .../Import_joomla_componentsimportModel.php | 39 +- admin/src/Model/Joomla_componentsModel.php | 26 +- admin/src/Model/Site_viewModel.php | 3 + admin/src/Model/SnippetsModel.php | 10 +- admin/src/View/Admin_custom_tabs/HtmlView.php | 5 +- admin/src/View/Admin_fields/HtmlView.php | 5 +- .../View/Admin_fields_conditions/HtmlView.php | 5 +- .../View/Admin_fields_relations/HtmlView.php | 9 +- admin/src/View/Admin_view/HtmlView.php | 9 +- admin/src/View/Admin_views/HtmlView.php | 5 +- .../src/View/Admins_custom_tabs/HtmlView.php | 5 +- admin/src/View/Admins_fields/HtmlView.php | 5 +- .../Admins_fields_conditions/HtmlView.php | 5 +- .../View/Admins_fields_relations/HtmlView.php | 5 +- admin/src/View/Class_extendings/HtmlView.php | 5 +- admin/src/View/Class_extends/HtmlView.php | 9 +- admin/src/View/Class_method/HtmlView.php | 9 +- admin/src/View/Class_methods/HtmlView.php | 5 +- admin/src/View/Class_properties/HtmlView.php | 5 +- admin/src/View/Class_property/HtmlView.php | 9 +- admin/src/View/Compiler/HtmlView.php | 5 +- .../View/Component_admin_views/HtmlView.php | 5 +- admin/src/View/Component_config/HtmlView.php | 5 +- .../Component_custom_admin_menus/HtmlView.php | 5 +- .../Component_custom_admin_views/HtmlView.php | 5 +- .../src/View/Component_dashboard/HtmlView.php | 9 +- .../View/Component_files_folders/HtmlView.php | 5 +- admin/src/View/Component_modules/HtmlView.php | 5 +- .../View/Component_mysql_tweaks/HtmlView.php | 5 +- .../View/Component_placeholders/HtmlView.php | 5 +- admin/src/View/Component_plugins/HtmlView.php | 5 +- admin/src/View/Component_router/HtmlView.php | 5 +- .../View/Component_site_views/HtmlView.php | 5 +- admin/src/View/Component_updates/HtmlView.php | 5 +- admin/src/View/Componentbuilder/HtmlView.php | 7 +- .../View/Components_admin_views/HtmlView.php | 5 +- admin/src/View/Components_config/HtmlView.php | 5 +- .../HtmlView.php | 5 +- .../HtmlView.php | 5 +- .../View/Components_dashboard/HtmlView.php | 5 +- .../Components_files_folders/HtmlView.php | 5 +- .../src/View/Components_modules/HtmlView.php | 5 +- .../View/Components_mysql_tweaks/HtmlView.php | 5 +- .../View/Components_placeholders/HtmlView.php | 5 +- .../src/View/Components_plugins/HtmlView.php | 5 +- .../src/View/Components_routers/HtmlView.php | 5 +- .../View/Components_site_views/HtmlView.php | 5 +- .../src/View/Components_updates/HtmlView.php | 5 +- admin/src/View/Custom_admin_view/HtmlView.php | 9 +- .../src/View/Custom_admin_views/HtmlView.php | 5 +- admin/src/View/Custom_code/HtmlView.php | 9 +- admin/src/View/Custom_codes/HtmlView.php | 5 +- admin/src/View/Dynamic_get/HtmlView.php | 9 +- admin/src/View/Dynamic_gets/HtmlView.php | 5 +- admin/src/View/Field/HtmlView.php | 5 +- admin/src/View/Fields/HtmlView.php | 5 +- admin/src/View/Fieldtype/HtmlView.php | 9 +- admin/src/View/Fieldtypes/HtmlView.php | 5 +- admin/src/View/Get_snippets/HtmlView.php | 29 +- admin/src/View/Help_document/HtmlView.php | 5 +- admin/src/View/Help_documents/HtmlView.php | 5 +- .../HtmlView.php | 6 +- admin/src/View/Joomla_component/HtmlView.php | 5 +- admin/src/View/Joomla_components/HtmlView.php | 5 +- admin/src/View/Joomla_module/HtmlView.php | 5 +- .../HtmlView.php | 5 +- .../View/Joomla_module_updates/HtmlView.php | 5 +- admin/src/View/Joomla_modules/HtmlView.php | 5 +- .../HtmlView.php | 5 +- .../View/Joomla_modules_updates/HtmlView.php | 5 +- admin/src/View/Joomla_plugin/HtmlView.php | 5 +- .../HtmlView.php | 5 +- .../src/View/Joomla_plugin_group/HtmlView.php | 5 +- .../View/Joomla_plugin_groups/HtmlView.php | 5 +- .../View/Joomla_plugin_updates/HtmlView.php | 5 +- admin/src/View/Joomla_plugins/HtmlView.php | 5 +- .../HtmlView.php | 5 +- .../View/Joomla_plugins_updates/HtmlView.php | 5 +- admin/src/View/Joomla_power/HtmlView.php | 5 +- admin/src/View/Joomla_powers/HtmlView.php | 5 +- admin/src/View/Language/HtmlView.php | 5 +- .../View/Language_translation/HtmlView.php | 7 +- .../View/Language_translations/HtmlView.php | 5 +- admin/src/View/Languages/HtmlView.php | 5 +- admin/src/View/Layout/HtmlView.php | 9 +- admin/src/View/Layouts/HtmlView.php | 5 +- admin/src/View/Libraries/HtmlView.php | 5 +- admin/src/View/Libraries_config/HtmlView.php | 5 +- .../Libraries_files_folders_urls/HtmlView.php | 5 +- admin/src/View/Library/HtmlView.php | 9 +- admin/src/View/Library_config/HtmlView.php | 5 +- .../Library_files_folders_urls/HtmlView.php | 5 +- admin/src/View/Placeholder/HtmlView.php | 9 +- admin/src/View/Placeholders/HtmlView.php | 5 +- admin/src/View/Power/HtmlView.php | 13 +- admin/src/View/Powers/HtmlView.php | 5 +- admin/src/View/Repositories/HtmlView.php | 5 +- admin/src/View/Repository/HtmlView.php | 5 +- admin/src/View/Search/HtmlView.php | 5 +- admin/src/View/Server/HtmlView.php | 5 +- admin/src/View/Servers/HtmlView.php | 5 +- admin/src/View/Site_view/HtmlView.php | 9 +- admin/src/View/Site_views/HtmlView.php | 5 +- admin/src/View/Snippet/HtmlView.php | 5 +- admin/src/View/Snippet_type/HtmlView.php | 5 +- admin/src/View/Snippet_types/HtmlView.php | 5 +- admin/src/View/Snippets/HtmlView.php | 5 +- admin/src/View/Template/HtmlView.php | 9 +- admin/src/View/Templates/HtmlView.php | 5 +- admin/src/View/Validation_rule/HtmlView.php | 9 +- admin/src/View/Validation_rules/HtmlView.php | 5 +- admin/tmpl/custom_admin_view/default.php | 53 +- admin/tmpl/field/default.php | 43 +- admin/tmpl/joomla_module/default.php | 45 +- admin/tmpl/layout/default.php | 50 +- admin/tmpl/layouts/default.php | 37 +- admin/tmpl/site_view/default.php | 53 +- admin/tmpl/snippet/default.php | 7 +- admin/tmpl/template/default.php | 54 +- admin/tmpl/templates/default.php | 37 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 22 +- .../Compiler/Creator/Builders.php | 34 +- .../Compiler/Helper/Infusion.php | 2 +- .../src/Componentbuilder/Import/Factory.php | 57 + .../src/Componentbuilder/Import/index.html | 1 + .../Componentbuilder/Service/Spreadsheet.php | 88 ++ .../Componentbuilder/Spreadsheet/Exporter.php | 325 +++++ .../Componentbuilder/Spreadsheet/Header.php | 75 ++ .../Componentbuilder/Spreadsheet/Importer.php | 99 ++ .../Componentbuilder/Spreadsheet/index.html | 1 + .../VDM.Joomla/src/Componentbuilder/Table.php | 1153 +++++++++++++++++ media/js/admin_fields_relations.js | 8 +- media/js/admin_view.js | 8 +- media/js/class_extends.js | 8 +- media/js/class_method.js | 8 +- media/js/class_property.js | 8 +- media/js/component_dashboard.js | 8 +- media/js/component_router.js | 8 +- media/js/custom_admin_view.js | 148 ++- media/js/custom_code.js | 8 +- media/js/dynamic_get.js | 8 +- media/js/field.js | 8 +- media/js/fieldtype.js | 8 +- media/js/joomla_component.js | 8 +- media/js/joomla_module.js | 8 +- media/js/joomla_plugin.js | 8 +- media/js/layout.js | 127 +- media/js/library.js | 8 +- media/js/power.js | 8 +- media/js/site_view.js | 148 ++- media/js/template.js | 151 ++- media/js/validation_rule.js | 8 +- 179 files changed, 3024 insertions(+), 793 deletions(-) create mode 100644 admin/sql/updates/mysql/4.0.4-alpha.sql create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Import/Factory.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Import/index.html create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Spreadsheet.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Spreadsheet/Exporter.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Spreadsheet/Header.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Spreadsheet/Importer.php create mode 100644 libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Spreadsheet/index.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d907061..a32f8d108 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ -# v4.0.4-alpha1 +# v4.0.4-alpha2 + +- Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. +- Added new import powers for custom import of spreadsheets. +- Move the setDocument and _prepareDocument above the display in the site view and custom admin view. +- Update the trashhelper layout to work in Joomla 5. +- Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. + +# v4.0.4-alpha - Add [AllowDynamicProperties] in the base view class for J5 - Move the _prepareDocument above the display call in the base view class diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index ca0b0fe8e..1084fcecd 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

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

'; +

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

'; // Add/Update component in the action logs extensions table. $this->setActionLogsExtensions(); diff --git a/README.md b/README.md index c868aa4f7..c018ee7a8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 29th September, 2024 -+ *Version*: 4.0.4-alpha1 ++ *Last Build*: 7th October, 2024 ++ *Version*: 4.0.4-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **858763** ++ *Line count*: **865648** + *Field count*: **2098** -+ *File count*: **5928** -+ *Folder count*: **619** ++ *File count*: **5976** ++ *Folder count*: **621** > 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 c868aa4f7..c018ee7a8 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 29th September, 2024 -+ *Version*: 4.0.4-alpha1 ++ *Last Build*: 7th October, 2024 ++ *Version*: 4.0.4-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **858763** ++ *Line count*: **865648** + *Field count*: **2098** -+ *File count*: **5928** -+ *Folder count*: **619** ++ *File count*: **5976** ++ *Folder count*: **621** > 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/assets/js/get_snippets.js b/admin/assets/js/get_snippets.js index f4af38715..a810ae982 100644 --- a/admin/assets/js/get_snippets.js +++ b/admin/assets/js/get_snippets.js @@ -78,7 +78,7 @@ function getLibraries(path) { buildLibraries(_paths); } else { jQuery.get(path) - .success(function(paths) { + .done(function(paths) { // load only this library paths jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire}); buildLibraries(paths); @@ -161,7 +161,7 @@ function getSnippets(path, libraryName) { jQuery('#snippets-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS')+'

'); } else { jQuery.get(path) - .success(function(paths) { + .done(function(paths) { // load only this library paths jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire}); setSnippets(paths, libraryName); @@ -190,7 +190,7 @@ function setSnippets(paths, libraryName) { fromLocal = true; } else { jQuery.get(snippetPath+value.path) - .success(function(snippet) { + .done(function(snippet) { // convert the string to json.object snippet = jQuery.parseJSON(snippet); jQuery.jStorage.set(value.path, snippet, {TTL: expire}); @@ -469,7 +469,7 @@ function getSnippetModal(key, type) { showSnippetModal(_snippet, type); } else { jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/'+key) - .success(function(snippet) { + .done(function(snippet) { // convert the string to json.object snippet = jQuery.parseJSON(snippet); jQuery.jStorage.set(key, snippet, {TTL: expire}); @@ -527,7 +527,6 @@ function getKeyID(key) { // return the id build return keyID; } - // get key ID function getKeyID(key) { // get useful ID diff --git a/admin/compiler/joomla_3/HtmlView_edit.php b/admin/compiler/joomla_3/HtmlView_edit.php index eb12a0165..c273c8f67 100644 --- a/admin/compiler/joomla_3/HtmlView_edit.php +++ b/admin/compiler/joomla_3/HtmlView_edit.php @@ -113,6 +113,11 @@ class ###Component###View###View### extends HtmlView */ protected function setDocument() { + // Load Core + Html::_('behavior.core'); + // Load jQuery + Html::_('jquery.framework'); + $isNew = ($this->item->id < 1); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS### diff --git a/admin/compiler/joomla_3/HtmlView_edit_site.php b/admin/compiler/joomla_3/HtmlView_edit_site.php index 99c3b9875..d5d413634 100644 --- a/admin/compiler/joomla_3/HtmlView_edit_site.php +++ b/admin/compiler/joomla_3/HtmlView_edit_site.php @@ -114,6 +114,11 @@ class ###Component###View###View### extends HtmlView */ protected function setDocument() { + // Load Core + Html::_('behavior.core'); + // Load jQuery + Html::_('jquery.framework'); + $isNew = ($this->item->id < 1); $this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); // only add the ISIS template css & js if needed (default is 1 = true) diff --git a/admin/compiler/joomla_3/HtmlView_list.php b/admin/compiler/joomla_3/HtmlView_list.php index e6371926c..83cc53e0d 100644 --- a/admin/compiler/joomla_3/HtmlView_list.php +++ b/admin/compiler/joomla_3/HtmlView_list.php @@ -151,6 +151,11 @@ class ###Component###View###Views### extends HtmlView */ protected function setDocument() { + // Load Core + Html::_('behavior.core'); + // Load jQuery + Html::_('jquery.framework'); + if (!isset($this->document)) { $this->document = Factory::getDocument(); diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php index 94e6fd359..4ce16d9a2 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -90,9 +90,10 @@ class HtmlView extends BaseHtmlView * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void + * @throws \Exception * @since 1.6 */ - public function display($tpl = null) + public function display($tpl = null): void { // Assign data to the view $this->items = $this->get('Items'); diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php index 7dd658664..4cafee33a 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -114,9 +114,10 @@ class HtmlView extends BaseHtmlView * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void + * @throws \Exception * @since 1.6 */ - public function display($tpl = null) + public function display($tpl = null): void { // set params $this->params = ComponentHelper::getParams('com_###component###'); diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php index 6257cfd58..a557e3aff 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -66,9 +66,10 @@ class HtmlView extends BaseHtmlView * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void + * @throws \Exception * @since 1.6 */ - public function display($tpl = null) + public function display($tpl = null): void { // get component params $this->params = ComponentHelper::getParams('com_###component###'); diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php index 748ca2454..4d62671ec 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -34,9 +34,10 @@ class HtmlView extends BaseHtmlView * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void + * @throws \Exception * @since 1.6 */ - public function display($tpl = null) + public function display($tpl = null): void { // get component params $this->params = ComponentHelper::getParams('com_###component###'); diff --git a/admin/compiler/joomla_4/DASH_VIEW_HTML.php b/admin/compiler/joomla_4/DASH_VIEW_HTML.php index e25b5dc4f..ec7c59f52 100644 --- a/admin/compiler/joomla_4/DASH_VIEW_HTML.php +++ b/admin/compiler/joomla_4/DASH_VIEW_HTML.php @@ -25,14 +25,17 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** * View display method + * * @return void + * @throws \Exception + * @since 1.6 */ - function display($tpl = null) + function display($tpl = null): void { // Assign data to the view $this->icons = $this->get('Icons'); diff --git a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php index 2776f8bc2..07113d005 100644 --- a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php @@ -81,9 +81,10 @@ class HtmlView extends BaseHtmlView * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void + * @throws \Exception * @since 1.6 */ - public function display($tpl = null) + public function display($tpl = null): void { // get combined params of both component and menu $this->app ??= Factory::getApplication(); diff --git a/admin/compiler/joomla_4/SITE_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_VIEW_HTML.php index 88b335bfd..fc104516c 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEW_HTML.php @@ -65,9 +65,10 @@ class HtmlView extends BaseHtmlView * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void + * @throws \Exception * @since 1.6 */ - public function display($tpl = null) + public function display($tpl = null): void { // get combined params of both component and menu $this->app ??= Factory::getApplication(); diff --git a/admin/config.xml b/admin/config.xml index fe3f64206..5d1863161 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -57,7 +57,7 @@ buttons="add,remove,move" description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION" icon="list" - max="9" + max="10" min="1">