diff --git a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php index 0f687b6..00a44d2 100644 --- a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php +++ b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.php @@ -12,7 +12,6 @@ namespace VDM\Joomla\Utilities\String; -use Joomla\CMS\Component\ComponentHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\Component\Helper; @@ -97,7 +96,6 @@ abstract class FieldHelper // use the default (original behavior/convention) return StringHelper::safe($string); - } - + } } diff --git a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.power b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.power index 0b27fc5..6ac4ef3 100644 --- a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.power +++ b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/code.power @@ -71,4 +71,4 @@ // use the default (original behavior/convention) return StringHelper::safe($string); - } + } \ No newline at end of file diff --git a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json index 64e832f..336b860 100644 --- a/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json +++ b/src/9ef0eb24-aae4-4f5a-99af-d724db44808f/settings.json @@ -1,5 +1,5 @@ { - "add_head": "1", + "add_head": "0", "add_licensing_template": "2", "extends": "0", "guid": "9ef0eb24-aae4-4f5a-99af-d724db44808f", @@ -22,6 +22,6 @@ "namespace": "VDM\\Joomla\\Utilities.String.FieldHelper", "description": "Control the naming of a field\r\n\r\n@since 3.0.9", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", - "head": "use Joomla\\CMS\\Component\\ComponentHelper;", + "head": "", "composer": "" } \ No newline at end of file diff --git a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php index bd6f1a2..3c1554d 100644 --- a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php +++ b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.php @@ -65,7 +65,7 @@ abstract class TypeHelper $string = StringHelper::transliterate($string); // remove all and keep only characters and numbers and point (TODO just one point) - $string = trim(preg_replace("/[^A-Za-z0-9\.]/", '', (string) $string)); + $string = trim(preg_replace("/[^A-Za-z0-9_\.]/", '', (string) $string)); // best is to return lower (for all string equality in compiler) return strtolower($string); diff --git a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.power b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.power index e3de478..3f19db7 100644 --- a/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.power +++ b/src/a8935cbe-7701-40dc-bfd5-675f2d600954/code.power @@ -39,7 +39,7 @@ $string = StringHelper::transliterate($string); // remove all and keep only characters and numbers and point (TODO just one point) - $string = trim(preg_replace("/[^A-Za-z0-9\.]/", '', (string) $string)); + $string = trim(preg_replace("/[^A-Za-z0-9_\.]/", '', (string) $string)); // best is to return lower (for all string equality in compiler) return strtolower($string); diff --git a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php index ef12295..0210aa2 100644 --- a/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php +++ b/src/bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8/code.php @@ -67,51 +67,6 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Details', ], - 'php_helper_both' => [ - 'name' => 'php_helper_both', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - ], - 'created' => [ - 'name' => 'created', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL', - 'type' => 'calendar', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'publishing', - ], - 'crowdin_project_identifier' => [ - 'name' => 'crowdin_project_identifier', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL', - 'type' => 'text', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dynamic Integration', - ], - 'php_method_uninstall' => [ - 'name' => 'php_method_uninstall', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dash & Install', - ], - 'php_preflight_install' => [ - 'name' => 'php_preflight_install', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dash & Install', - ], 'css_admin' => [ 'name' => 'css_admin', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL', @@ -121,33 +76,6 @@ class Table extends BaseTable implements Tableinterface 'store' => 'base64', 'tab_name' => 'Libs & Helpers', ], - 'mvc_versiondate' => [ - 'name' => 'mvc_versiondate', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL', - 'type' => 'list', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - ], - 'remove_line_breaks' => [ - 'name' => 'remove_line_breaks', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - ], - 'add_placeholders' => [ - 'name' => 'add_placeholders', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL', - 'type' => 'radio', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - ], 'php_admin_event' => [ 'name' => 'php_admin_event', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL', @@ -166,18 +94,18 @@ class Table extends BaseTable implements Tableinterface 'store' => 'base64', 'tab_name' => 'Libs & Helpers', ], - 'description' => [ - 'name' => 'description', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL', - 'type' => 'textarea', + 'crowdin_username' => [ + 'name' => 'crowdin_username', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_LABEL', + 'type' => 'text', 'title' => false, 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', + 'store' => 'basic_encryption', + 'tab_name' => 'Dynamic Integration', ], - 'author' => [ - 'name' => 'author', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL', + 'component_version' => [ + 'name' => 'component_version', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL', 'type' => 'text', 'title' => false, 'list' => 'joomla_components', @@ -193,10 +121,19 @@ class Table extends BaseTable implements Tableinterface 'store' => 'base64', 'tab_name' => 'Dash & Install', ], - 'email' => [ - 'name' => 'email', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL', - 'type' => 'text', + 'remove_line_breaks' => [ + 'name' => 'remove_line_breaks', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'description' => [ + 'name' => 'description', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL', + 'type' => 'textarea', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, @@ -211,6 +148,96 @@ class Table extends BaseTable implements Tableinterface 'store' => 'base64', 'tab_name' => 'MySQL', ], + 'debug_linenr' => [ + 'name' => 'debug_linenr', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'mvc_versiondate' => [ + 'name' => 'mvc_versiondate', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'php_preflight_install' => [ + 'name' => 'php_preflight_install', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + ], + 'backup_folder_path' => [ + 'name' => 'backup_folder_path', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_FOLDER_PATH_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'php_method_uninstall' => [ + 'name' => 'php_method_uninstall', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Dash & Install', + ], + 'add_placeholders' => [ + 'name' => 'add_placeholders', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'author' => [ + 'name' => 'author', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'add_sales_server' => [ + 'name' => 'add_sales_server', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'email' => [ + 'name' => 'email', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], + 'translation_tool' => [ + 'name' => 'translation_tool', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION_TOOL_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], 'website' => [ 'name' => 'website', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL', @@ -220,14 +247,14 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Details', ], - 'debug_linenr' => [ - 'name' => 'debug_linenr', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL', - 'type' => 'radio', + 'buildcompsql' => [ + 'name' => 'buildcompsql', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL', + 'type' => 'textarea', 'title' => false, 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', + 'store' => 'base64', + 'tab_name' => 'Dynamic Build (beta)', ], 'add_license' => [ 'name' => 'add_license', @@ -238,6 +265,15 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Details', ], + 'php_helper_admin' => [ + 'name' => 'php_helper_admin', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL', + 'type' => 'editor', + 'title' => false, + 'list' => 'joomla_components', + 'store' => 'base64', + 'tab_name' => 'Libs & Helpers', + ], 'license_type' => [ 'name' => 'license_type', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE_LABEL', @@ -247,18 +283,18 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Details', ], - 'add_email_helper' => [ - 'name' => 'add_email_helper', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL', - 'type' => 'radio', + 'php_helper_site' => [ + 'name' => 'php_helper_site', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL', + 'type' => 'editor', 'title' => false, 'list' => 'joomla_components', - 'store' => NULL, + 'store' => 'base64', 'tab_name' => 'Libs & Helpers', ], - 'php_helper_admin' => [ - 'name' => 'php_helper_admin', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL', + 'javascript' => [ + 'name' => 'javascript', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL', 'type' => 'editor', 'title' => false, 'list' => 'joomla_components', @@ -274,9 +310,9 @@ class Table extends BaseTable implements Tableinterface 'store' => 'basic_encryption', 'tab_name' => 'Details', ], - 'php_helper_site' => [ - 'name' => 'php_helper_site', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL', + 'css_site' => [ + 'name' => 'css_site', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL', 'type' => 'editor', 'title' => false, 'list' => 'joomla_components', @@ -292,15 +328,6 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Details', ], - 'javascript' => [ - 'name' => 'javascript', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - ], 'whmcs_buy_link' => [ 'name' => 'whmcs_buy_link', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_LABEL', @@ -310,33 +337,6 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Details', ], - 'css_site' => [ - 'name' => 'css_site', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL', - 'type' => 'editor', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Libs & Helpers', - ], - 'license' => [ - 'name' => 'license', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - ], - 'bom' => [ - 'name' => 'bom', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL', - 'type' => 'filelist', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - ], 'php_preflight_update' => [ 'name' => 'php_preflight_update', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL', @@ -346,10 +346,10 @@ class Table extends BaseTable implements Tableinterface 'store' => 'base64', 'tab_name' => 'Dash & Install', ], - 'image' => [ - 'name' => 'image', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL', - 'type' => 'media', + 'license' => [ + 'name' => 'license', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL', + 'type' => 'textarea', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, @@ -364,10 +364,10 @@ class Table extends BaseTable implements Tableinterface 'store' => 'base64', 'tab_name' => 'Dash & Install', ], - 'copyright' => [ - 'name' => 'copyright', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_LABEL', - 'type' => 'textarea', + 'bom' => [ + 'name' => 'bom', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL', + 'type' => 'filelist', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, @@ -382,6 +382,15 @@ class Table extends BaseTable implements Tableinterface 'store' => 'base64', 'tab_name' => 'MySQL', ], + 'image' => [ + 'name' => 'image', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL', + 'type' => 'media', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Details', + ], 'addreadme' => [ 'name' => 'addreadme', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL', @@ -391,14 +400,14 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Readme', ], - 'add_sales_server' => [ - 'name' => 'add_sales_server', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL', - 'type' => 'radio', + 'copyright' => [ + 'name' => 'copyright', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_LABEL', + 'type' => 'textarea', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Dynamic Integration', + 'tab_name' => 'Details', ], 'update_server_url' => [ 'name' => 'update_server_url', @@ -409,15 +418,6 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Dynamic Integration', ], - 'component_version' => [ - 'name' => 'component_version', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL', - 'type' => 'text', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Details', - ], 'add_powers' => [ 'name' => 'add_powers', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_LABEL', @@ -427,41 +427,32 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Details', ], - 'translation_tool' => [ - 'name' => 'translation_tool', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION_TOOL_LABEL', - 'type' => 'list', - 'title' => false, - 'list' => 'joomla_components', - 'store' => NULL, - 'tab_name' => 'Dynamic Integration', - ], - 'crowdin_username' => [ - 'name' => 'crowdin_username', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_LABEL', - 'type' => 'text', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'basic_encryption', - 'tab_name' => 'Dynamic Integration', - ], - 'buildcompsql' => [ - 'name' => 'buildcompsql', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL', - 'type' => 'textarea', - 'title' => false, - 'list' => 'joomla_components', - 'store' => 'base64', - 'tab_name' => 'Dynamic Build (beta)', - ], - 'add_php_helper_both' => [ - 'name' => 'add_php_helper_both', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_BOTH_LABEL', + 'add_backup_folder_path' => [ + 'name' => 'add_backup_folder_path', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_BACKUP_FOLDER_PATH_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, - 'tab_name' => 'Libs & Helpers', + 'tab_name' => 'Dynamic Integration', + ], + 'crowdin_project_identifier' => [ + 'name' => 'crowdin_project_identifier', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'created' => [ + 'name' => 'created', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL', + 'type' => 'calendar', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'publishing', ], 'add_php_helper_admin' => [ 'name' => 'add_php_helper_admin', @@ -742,6 +733,42 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Dynamic Integration', ], + 'add_git_folder_path' => [ + 'name' => 'add_git_folder_path', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_GIT_FOLDER_PATH_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'git_folder_path' => [ + 'name' => 'git_folder_path', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GIT_FOLDER_PATH_LABEL', + 'type' => 'text', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Dynamic Integration', + ], + 'creatuserhelper' => [ + 'name' => 'creatuserhelper', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER_LABEL', + 'type' => 'radio', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Libs & Helpers', + ], + 'adduikit' => [ + 'name' => 'adduikit', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Libs & Helpers', + ], 'crowdin_project_api_key' => [ 'name' => 'crowdin_project_api_key', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_API_KEY_LABEL', @@ -751,6 +778,15 @@ class Table extends BaseTable implements Tableinterface 'store' => 'basic_encryption', 'tab_name' => 'Dynamic Integration', ], + 'addfootable' => [ + 'name' => 'addfootable', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL', + 'type' => 'list', + 'title' => false, + 'list' => 'joomla_components', + 'store' => NULL, + 'tab_name' => 'Libs & Helpers', + ], 'crowdin_account_api_key' => [ 'name' => 'crowdin_account_api_key', 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_ACCOUNT_API_KEY_LABEL', @@ -760,9 +796,9 @@ class Table extends BaseTable implements Tableinterface 'store' => 'basic_encryption', 'tab_name' => 'Dynamic Integration', ], - 'creatuserhelper' => [ - 'name' => 'creatuserhelper', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER_LABEL', + 'add_email_helper' => [ + 'name' => 'add_email_helper', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL', 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', @@ -778,10 +814,10 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'Dynamic Build (beta)', ], - 'adduikit' => [ - 'name' => 'adduikit', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL', - 'type' => 'list', + 'add_php_helper_both' => [ + 'name' => 'add_php_helper_both', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_BOTH_LABEL', + 'type' => 'radio', 'title' => false, 'list' => 'joomla_components', 'store' => NULL, @@ -796,13 +832,13 @@ class Table extends BaseTable implements Tableinterface 'store' => NULL, 'tab_name' => 'publishing', ], - 'addfootable' => [ - 'name' => 'addfootable', - 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL', - 'type' => 'list', + 'php_helper_both' => [ + 'name' => 'php_helper_both', + 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_LABEL', + 'type' => 'editor', 'title' => false, 'list' => 'joomla_components', - 'store' => NULL, + 'store' => 'base64', 'tab_name' => 'Libs & Helpers', ], 'modified' => [ diff --git a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/README.md b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/README.md new file mode 100644 index 0000000..c571efc --- /dev/null +++ b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/README.md @@ -0,0 +1,37 @@ +``` +██████╗ ██████╗ ██╗ ██╗███████╗██████╗ +██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗ +██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝ +██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗ +██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║ +╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝ +``` +# trait IsArray (Details) +> namespace: **VDM\Joomla\Abstraction\Registry\Traits** +```uml +@startuml +class IsArray << (T,Orange) >> #Turquoise { + + isArray(string $path) : bool +} + +note right of IsArray::isArray + Check if a path is an array + + since: 3.2.0 + return: bool +end note + +@enduml +``` + +--- +``` + ██╗ ██████╗██████╗ + ██║██╔════╝██╔══██╗ + ██║██║ ██████╔╝ +██ ██║██║ ██╔══██╗ +╚█████╔╝╚██████╗██████╔╝ + ╚════╝ ╚═════╝╚═════╝ +``` +> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder) + diff --git a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.php b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.php new file mode 100644 index 0000000..cdf224b --- /dev/null +++ b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.php @@ -0,0 +1,48 @@ + + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace VDM\Joomla\Abstraction\Registry\Traits; + + +/** + * Check if a value is in an array + * + * @since 3.2.0 + */ +trait IsArray +{ + /** + * Check if a path is an array + * + * @param string $path Registry path (e.g. joomla.content.showauthor) + * + * @return bool + * @since 3.2.0 + */ + public function isArray(string $path): bool + { + // Check base array if no path is given + if (empty($path)) + { + return false; + } + + // get the value + if (($node = $this->get($path)) !== null + && is_array($node)) + { + return true; + } + + return false; + } +} + diff --git a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.power b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.power new file mode 100644 index 0000000..5ca85be --- /dev/null +++ b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/code.power @@ -0,0 +1,25 @@ + /** + * Check if a path is an array + * + * @param string $path Registry path (e.g. joomla.content.showauthor) + * + * @return bool + * @since 3.2.0 + */ + public function isArray(string $path): bool + { + // Check base array if no path is given + if (empty($path)) + { + return false; + } + + // get the value + if (($node = $this->get($path)) !== null + && is_array($node)) + { + return true; + } + + return false; + } \ No newline at end of file diff --git a/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json new file mode 100644 index 0000000..43bdf5c --- /dev/null +++ b/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json @@ -0,0 +1,18 @@ +{ + "add_head": "0", + "add_licensing_template": "2", + "extends": "0", + "guid": "c09e8968-c767-4175-bb3d-8432f206a2c7", + "implements": null, + "load_selection": null, + "name": "IsArray", + "power_version": "1.0.0", + "system_name": "VDM.Abstraction.Registry.Traits.IsArray", + "type": "trait", + "use_selection": null, + "namespace": "VDM\\Joomla\\Abstraction.Registry.Traits.IsArray", + "description": "Check if a value is in an array\r\n\r\n@since 3.2.0", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "head": "", + "composer": "" +} \ No newline at end of file