Release of v5.1.1-beta1

Add JCB new package engine.
This commit is contained in:
2025-06-18 19:49:35 +00:00
parent 3b502eb09b
commit 70718936b4
464 changed files with 34151 additions and 13973 deletions

View File

@ -1,8 +1,6 @@
# v5.1.1-alpha5
# v5.1.1-beta1
- Refactor initialization flow to accommodate future scalability and integration with all designated areas.
- Refactor the Creator Builders class.
- Refactor the FieldString and FieldXML classes.
- Add JCB new package engine.
# v5.1.1-alpha
@ -18,6 +16,9 @@
- Adds the Component Commands Plugin to the CLI for Import of spreadsheet data-sets.
- Add edit and create options to the ModalSelect Field (in Joomla 5)
- Add all needed Powers to the release package, to speed-up the build of the demo component.
- Refactor initialization flow to accommodate future scalability and integration with all designated areas.
- Refactor the Creator Builders class.
- Refactor the FieldString and FieldXML classes.
# v5.1.0

View File

@ -16,8 +16,10 @@ defined('_JEXEC') or die;
spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix
$search = [
'libraries/vendor_jcb/VDM.Joomla.Github' => 'VDM\\Joomla\\Github',
'libraries/vendor_jcb/VDM.Joomla.Gitea' => 'VDM\\Joomla\\Gitea',
'libraries/vendor_jcb/VDM.Joomla.FOF' => 'VDM\\Joomla\\FOF',
'libraries/vendor_jcb/VDM.Joomla.Git' => 'VDM\\Joomla\\Git',
'libraries/vendor_jcb/VDM.Joomla' => 'VDM\\Joomla',
'libraries/vendor_jcb/VDM.Minify' => 'VDM\\Minify',
'libraries/vendor_jcb/VDM.Psr' => 'VDM\\Psr'

View File

@ -11,12 +11,12 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Installer\InstallerScriptInterface;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Version;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\Database\DatabaseInterface;
use VDM\Joomla\Componentbuilder\PHPConfigurationChecker;
@ -224,6 +224,9 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Remove Custom code Data
$this->removeViewData("com_componentbuilder.custom_code");
// Remove Class extends Data
$this->removeViewData("com_componentbuilder.class_extends");
// Remove Class property Data
$this->removeViewData("com_componentbuilder.class_property");
@ -329,9 +332,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Remove Library files folders urls Data
$this->removeViewData("com_componentbuilder.library_files_folders_urls");
// Remove Class extends Data
$this->removeViewData("com_componentbuilder.class_extends");
// Remove Joomla module updates Data
$this->removeViewData("com_componentbuilder.joomla_module_updates");
@ -392,6 +392,9 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Remove Custom_code from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.custom_code');
// Remove Class_extends from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.class_extends');
// Remove Class_property from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.class_property');
@ -491,9 +494,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Remove Library_files_folders_urls from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.library_files_folders_urls');
// Remove Class_extends from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.class_extends');
// Remove Joomla_module_updates from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.joomla_module_updates');
@ -623,11 +623,11 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_postflight_update","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","crowdin_project_identifier":"crowdin_project_identifier","backup_folder_path":"backup_folder_path","sql_uninstall":"sql_uninstall","php_postflight_update":"php_postflight_update","css_site":"css_site","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_helper_site":"php_helper_site","javascript":"javascript","description":"description","debug_linenr":"debug_linenr","author":"author","php_method_install":"php_method_install","email":"email","website":"website","add_sales_server":"add_sales_server","license":"license","add_jcb_powers_path":"add_jcb_powers_path","bom":"bom","image":"image","php_admin_event":"php_admin_event","copyright":"copyright","php_site_event":"php_site_event","css_admin":"css_admin","php_preflight_update":"php_preflight_update","component_version":"component_version","php_preflight_install":"php_preflight_install","preferred_joomla_version":"preferred_joomla_version","php_postflight_install":"php_postflight_install","add_powers":"add_powers","php_method_uninstall":"php_method_uninstall","sql":"sql","addreadme":"addreadme","update_server_url":"update_server_url","add_backup_folder_path":"add_backup_folder_path","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_namespace_prefix":"add_namespace_prefix","namespace_prefix":"namespace_prefix","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_menu_prefix":"add_menu_prefix","add_javascript":"add_javascript","menu_prefix":"menu_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","dashboard_type":"dashboard_type","toignore":"toignore","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","joomla_source_link":"joomla_source_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_php_method_install":"add_php_method_install","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","assets_table_fix":"assets_table_fix","number":"number","readme":"readme","add_update_server":"add_update_server","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","creatuserhelper":"creatuserhelper","add_git_folder_path":"add_git_folder_path","adduikit":"adduikit","git_folder_path":"git_folder_path","addfootable":"addfootable","jcb_powers_path":"jcb_powers_path","add_email_helper":"add_email_helper","add_php_helper_both":"add_php_helper_both","crowdin_project_api_key":"crowdin_project_api_key","php_helper_both":"php_helper_both","crowdin_account_api_key":"crowdin_account_api_key","add_php_helper_admin":"add_php_helper_admin","buildcomp":"buildcomp","php_helper_admin":"php_helper_admin","guid":"guid","add_admin_event":"add_admin_event","name":"name"}}',
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "javascript","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","javascript":"javascript","css_site":"css_site","php_helper_site":"php_helper_site","add_sales_server":"add_sales_server","add_jcb_powers_path":"add_jcb_powers_path","debug_linenr":"debug_linenr","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_preflight_update":"php_preflight_update","description":"description","sql_uninstall":"sql_uninstall","author":"author","email":"email","backup_folder_path":"backup_folder_path","website":"website","crowdin_project_identifier":"crowdin_project_identifier","license":"license","bom":"bom","php_site_event":"php_site_event","image":"image","css_admin":"css_admin","copyright":"copyright","php_postflight_update":"php_postflight_update","php_preflight_install":"php_preflight_install","php_method_install":"php_method_install","php_postflight_install":"php_postflight_install","component_version":"component_version","php_method_uninstall":"php_method_uninstall","preferred_joomla_version":"preferred_joomla_version","sql":"sql","add_powers":"add_powers","addreadme":"addreadme","update_server_url":"update_server_url","add_backup_folder_path":"add_backup_folder_path","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_site_event":"add_site_event","add_namespace_prefix":"add_namespace_prefix","add_javascript":"add_javascript","namespace_prefix":"namespace_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","add_menu_prefix":"add_menu_prefix","dashboard_type":"dashboard_type","menu_prefix":"menu_prefix","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","toignore":"toignore","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_php_method_install":"add_php_method_install","emptycontributors":"emptycontributors","add_sql":"add_sql","number":"number","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","add_update_server":"add_update_server","update_server_target":"update_server_target","update_server":"update_server","creatuserhelper":"creatuserhelper","sales_server":"sales_server","adduikit":"adduikit","addfootable":"addfootable","add_git_folder_path":"add_git_folder_path","add_email_helper":"add_email_helper","git_folder_path":"git_folder_path","add_php_helper_both":"add_php_helper_both","jcb_powers_path":"jcb_powers_path","php_helper_both":"php_helper_both","add_php_helper_admin":"add_php_helper_admin","crowdin_project_api_key":"crowdin_project_api_key","php_helper_admin":"php_helper_admin","crowdin_account_api_key":"crowdin_account_api_key","add_admin_event":"add_admin_event","buildcomp":"buildcomp","php_admin_event":"php_admin_event","guid":"guid","add_php_helper_site":"add_php_helper_site","name":"name"}}',
// router
'',
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","mvc_versiondate","remove_line_breaks","add_placeholders","debug_linenr","add_sales_server","add_jcb_powers_path","preferred_joomla_version","add_powers","addreadme","add_backup_folder_path","translation_tool","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","add_sql","add_sql_uninstall","emptycontributors","assets_table_fix","number","add_update_server","update_server_target","update_server","sales_server","creatuserhelper","add_git_folder_path","adduikit","addfootable","add_email_helper","add_php_helper_both","add_php_helper_admin","buildcomp","add_admin_event"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
'{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","add_sales_server","add_jcb_powers_path","debug_linenr","mvc_versiondate","remove_line_breaks","add_placeholders","preferred_joomla_version","add_powers","addreadme","add_backup_folder_path","translation_tool","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","emptycontributors","add_sql","number","add_sql_uninstall","assets_table_fix","add_update_server","update_server_target","update_server","creatuserhelper","sales_server","adduikit","addfootable","add_git_folder_path","add_email_helper","add_php_helper_both","add_php_helper_admin","add_admin_event","buildcomp","add_php_helper_site"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
);
// Install Joomla module Content Types.
$this->setContentType(
@ -816,6 +816,23 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/custom_code.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","target","type","comment_type","joomla_version"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "guid","displayColumn": "system_name"}]}'
);
// Install Class extends Content Types.
$this->setContentType(
// typeTitle
'Componentbuilder Class_extends',
// typeAlias
'com_componentbuilder.class_extends',
// table
'{"special": {"dbtable": "#__componentbuilder_class_extends","key": "id","type": "Class_extendsTable","prefix": "VDM\Component\Componentbuilder\Administrator\Table"}}',
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","extension_type":"extension_type","guid":"guid","head":"head","comment":"comment"}}',
// router
'',
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/class_extends.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
);
// Install Class property Content Types.
$this->setContentType(
// typeTitle
@ -1048,7 +1065,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","organisation":"organisation","repository":"repository","target":"target","type":"type","base":"base","guid":"guid","access_repo":"access_repo","write_branch":"write_branch","read_branch":"read_branch","token":"token","username":"username"}}',
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","organisation":"organisation","repository":"repository","target":"target","type":"type","base":"base","guid":"guid","access_repo":"access_repo","write_branch":"write_branch","read_branch":"read_branch","author_email":"author_email","author_name":"author_name","token":"token","username":"username"}}',
// router
'',
// contentHistoryOptions
@ -1411,23 +1428,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/library_files_folders_urls.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "guid","displayColumn": "name"}]}'
);
// Install Class extends Content Types.
$this->setContentType(
// typeTitle
'Componentbuilder Class_extends',
// typeAlias
'com_componentbuilder.class_extends',
// table
'{"special": {"dbtable": "#__componentbuilder_class_extends","key": "id","type": "Class_extendsTable","prefix": "VDM\Component\Componentbuilder\Administrator\Table"}}',
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","extension_type":"extension_type","guid":"guid","head":"head","comment":"comment"}}',
// router
'',
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/class_extends.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
);
// Install Joomla module updates Content Types.
$this->setContentType(
// typeTitle
@ -1516,7 +1516,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Fix the assets table rules column size.
$this->setDatabaseAssetsRulesFix(98560, "MEDIUMTEXT");
$this->setDatabaseAssetsRulesFix(100960, "MEDIUMTEXT");
// Install the global extension params.
$this->setExtensionsParams(
'{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":{"subform_layouts0":{"view_field":"default","layout":"repeatablejcbjfive"}},"editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"»","namespace_prefix":"JCB","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"2","type_name_builder":"2","import_guid_only":"1","export_language_strings":"1","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_company":"Vast Development Method","export_owner":"Llewellyn van der Merwe","export_email":"joomla@vdm.io","export_website":"https://dev.vdm.io/","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}'
@ -1739,6 +1739,22 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
'COM_COMPONENTBUILDER'
);
// Add Class_extends to the action logs config table.
$this->setActionLogConfig(
// typeTitle
'CLASS_EXTENDS',
// typeAlias
'com_componentbuilder.class_extends',
// idHolder
'id',
// titleHolder
'name',
// tableName
'#__componentbuilder_class_extends',
// textPrefix
'COM_COMPONENTBUILDER'
);
// Add Class_property to the action logs config table.
$this->setActionLogConfig(
// typeTitle
@ -2267,22 +2283,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
'COM_COMPONENTBUILDER'
);
// Add Class_extends to the action logs config table.
$this->setActionLogConfig(
// typeTitle
'CLASS_EXTENDS',
// typeAlias
'com_componentbuilder.class_extends',
// idHolder
'id',
// titleHolder
'name',
// tableName
'#__componentbuilder_class_extends',
// textPrefix
'COM_COMPONENTBUILDER'
);
// Add Joomla_module_updates to the action logs config table.
$this->setActionLogConfig(
// typeTitle
@ -2379,11 +2379,11 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_postflight_update","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","crowdin_project_identifier":"crowdin_project_identifier","backup_folder_path":"backup_folder_path","sql_uninstall":"sql_uninstall","php_postflight_update":"php_postflight_update","css_site":"css_site","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_helper_site":"php_helper_site","javascript":"javascript","description":"description","debug_linenr":"debug_linenr","author":"author","php_method_install":"php_method_install","email":"email","website":"website","add_sales_server":"add_sales_server","license":"license","add_jcb_powers_path":"add_jcb_powers_path","bom":"bom","image":"image","php_admin_event":"php_admin_event","copyright":"copyright","php_site_event":"php_site_event","css_admin":"css_admin","php_preflight_update":"php_preflight_update","component_version":"component_version","php_preflight_install":"php_preflight_install","preferred_joomla_version":"preferred_joomla_version","php_postflight_install":"php_postflight_install","add_powers":"add_powers","php_method_uninstall":"php_method_uninstall","sql":"sql","addreadme":"addreadme","update_server_url":"update_server_url","add_backup_folder_path":"add_backup_folder_path","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_namespace_prefix":"add_namespace_prefix","namespace_prefix":"namespace_prefix","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_menu_prefix":"add_menu_prefix","add_javascript":"add_javascript","menu_prefix":"menu_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","dashboard_type":"dashboard_type","toignore":"toignore","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","joomla_source_link":"joomla_source_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_php_method_install":"add_php_method_install","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","assets_table_fix":"assets_table_fix","number":"number","readme":"readme","add_update_server":"add_update_server","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","creatuserhelper":"creatuserhelper","add_git_folder_path":"add_git_folder_path","adduikit":"adduikit","git_folder_path":"git_folder_path","addfootable":"addfootable","jcb_powers_path":"jcb_powers_path","add_email_helper":"add_email_helper","add_php_helper_both":"add_php_helper_both","crowdin_project_api_key":"crowdin_project_api_key","php_helper_both":"php_helper_both","crowdin_account_api_key":"crowdin_account_api_key","add_php_helper_admin":"add_php_helper_admin","buildcomp":"buildcomp","php_helper_admin":"php_helper_admin","guid":"guid","add_admin_event":"add_admin_event","name":"name"}}',
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "javascript","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","javascript":"javascript","css_site":"css_site","php_helper_site":"php_helper_site","add_sales_server":"add_sales_server","add_jcb_powers_path":"add_jcb_powers_path","debug_linenr":"debug_linenr","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_preflight_update":"php_preflight_update","description":"description","sql_uninstall":"sql_uninstall","author":"author","email":"email","backup_folder_path":"backup_folder_path","website":"website","crowdin_project_identifier":"crowdin_project_identifier","license":"license","bom":"bom","php_site_event":"php_site_event","image":"image","css_admin":"css_admin","copyright":"copyright","php_postflight_update":"php_postflight_update","php_preflight_install":"php_preflight_install","php_method_install":"php_method_install","php_postflight_install":"php_postflight_install","component_version":"component_version","php_method_uninstall":"php_method_uninstall","preferred_joomla_version":"preferred_joomla_version","sql":"sql","add_powers":"add_powers","addreadme":"addreadme","update_server_url":"update_server_url","add_backup_folder_path":"add_backup_folder_path","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_site_event":"add_site_event","add_namespace_prefix":"add_namespace_prefix","add_javascript":"add_javascript","namespace_prefix":"namespace_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","add_menu_prefix":"add_menu_prefix","dashboard_type":"dashboard_type","menu_prefix":"menu_prefix","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","toignore":"toignore","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_php_method_install":"add_php_method_install","emptycontributors":"emptycontributors","add_sql":"add_sql","number":"number","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","add_update_server":"add_update_server","update_server_target":"update_server_target","update_server":"update_server","creatuserhelper":"creatuserhelper","sales_server":"sales_server","adduikit":"adduikit","addfootable":"addfootable","add_git_folder_path":"add_git_folder_path","add_email_helper":"add_email_helper","git_folder_path":"git_folder_path","add_php_helper_both":"add_php_helper_both","jcb_powers_path":"jcb_powers_path","php_helper_both":"php_helper_both","add_php_helper_admin":"add_php_helper_admin","crowdin_project_api_key":"crowdin_project_api_key","php_helper_admin":"php_helper_admin","crowdin_account_api_key":"crowdin_account_api_key","add_admin_event":"add_admin_event","buildcomp":"buildcomp","php_admin_event":"php_admin_event","guid":"guid","add_php_helper_site":"add_php_helper_site","name":"name"}}',
// router
'',
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","mvc_versiondate","remove_line_breaks","add_placeholders","debug_linenr","add_sales_server","add_jcb_powers_path","preferred_joomla_version","add_powers","addreadme","add_backup_folder_path","translation_tool","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","add_sql","add_sql_uninstall","emptycontributors","assets_table_fix","number","add_update_server","update_server_target","update_server","sales_server","creatuserhelper","add_git_folder_path","adduikit","addfootable","add_email_helper","add_php_helper_both","add_php_helper_admin","buildcomp","add_admin_event"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
'{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","add_sales_server","add_jcb_powers_path","debug_linenr","mvc_versiondate","remove_line_breaks","add_placeholders","preferred_joomla_version","add_powers","addreadme","add_backup_folder_path","translation_tool","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","emptycontributors","add_sql","number","add_sql_uninstall","assets_table_fix","add_update_server","update_server_target","update_server","creatuserhelper","sales_server","adduikit","addfootable","add_git_folder_path","add_email_helper","add_php_helper_both","add_php_helper_admin","add_admin_event","buildcomp","add_php_helper_site"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
);
// Update Joomla module Content Types.
$this->setContentType(
@ -2572,6 +2572,23 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/custom_code.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","target","type","comment_type","joomla_version"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "guid","displayColumn": "system_name"}]}'
);
// Update Class extends Content Types.
$this->setContentType(
// typeTitle
'Componentbuilder Class_extends',
// typeAlias
'com_componentbuilder.class_extends',
// table
'{"special": {"dbtable": "#__componentbuilder_class_extends","key": "id","type": "Class_extendsTable","prefix": "VDM\Component\Componentbuilder\Administrator\Table"}}',
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","extension_type":"extension_type","guid":"guid","head":"head","comment":"comment"}}',
// router
'',
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/class_extends.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
);
// Update Class property Content Types.
$this->setContentType(
// typeTitle
@ -2804,7 +2821,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","organisation":"organisation","repository":"repository","target":"target","type":"type","base":"base","guid":"guid","access_repo":"access_repo","write_branch":"write_branch","read_branch":"read_branch","token":"token","username":"username"}}',
'{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","organisation":"organisation","repository":"repository","target":"target","type":"type","base":"base","guid":"guid","access_repo":"access_repo","write_branch":"write_branch","read_branch":"read_branch","author_email":"author_email","author_name":"author_name","token":"token","username":"username"}}',
// router
'',
// contentHistoryOptions
@ -3167,23 +3184,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/library_files_folders_urls.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "library","targetTable": "#__componentbuilder_library","targetColumn": "guid","displayColumn": "name"}]}'
);
// Update Class extends Content Types.
$this->setContentType(
// typeTitle
'Componentbuilder Class_extends',
// typeAlias
'com_componentbuilder.class_extends',
// table
'{"special": {"dbtable": "#__componentbuilder_class_extends","key": "id","type": "Class_extendsTable","prefix": "VDM\Component\Componentbuilder\Administrator\Table"}}',
// rules
'',
// fieldMappings
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","extension_type":"extension_type","guid":"guid","head":"head","comment":"comment"}}',
// router
'',
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/class_extends.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
);
// Update Joomla module updates Content Types.
$this->setContentType(
// typeTitle
@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 5.1.1-alpha5 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 5.1.1-beta1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();
@ -3489,6 +3489,22 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
'COM_COMPONENTBUILDER'
);
// Add/Update Class_extends in the action logs config table.
$this->setActionLogConfig(
// typeTitle
'CLASS_EXTENDS',
// typeAlias
'com_componentbuilder.class_extends',
// idHolder
'id',
// titleHolder
'name',
// tableName
'#__componentbuilder_class_extends',
// textPrefix
'COM_COMPONENTBUILDER'
);
// Add/Update Class_property in the action logs config table.
$this->setActionLogConfig(
// typeTitle
@ -4017,22 +4033,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
'COM_COMPONENTBUILDER'
);
// Add/Update Class_extends in the action logs config table.
$this->setActionLogConfig(
// typeTitle
'CLASS_EXTENDS',
// typeAlias
'com_componentbuilder.class_extends',
// idHolder
'id',
// titleHolder
'name',
// tableName
'#__componentbuilder_class_extends',
// textPrefix
'COM_COMPONENTBUILDER'
);
// Add/Update Joomla_module_updates in the action logs config table.
$this->setActionLogConfig(
// typeTitle

327
README.md
View File

@ -1,160 +1,239 @@
# Joomla Component Builder ([JCB](https://www.joomlacomponentbuilder.com))
This is a [Joomla 5.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
![Component Builder Banner](https://raw.githubusercontent.com/joomengine/Joomla-Component-Builder/refs/heads/5.x/admin/assets/images/jcb-banner.jpg "Component Builder")
![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/5.x/admin/assets/images/jcb-banner.jpg "The Component Builder")
This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extension/component-builder/) component, created with [Joomla Component Builder (JCB)](https://www.joomlacomponentbuilder.com)—a uniquely advanced development engine for building and maintaining complete Joomla extensions.
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
> 🎥 [Original... Quick Hello World Demo](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45), yes JCB has been around for over a decade.
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!
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.1.1-alpha5) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install this component easily. The latest release (**5.1.1-beta1**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
Upgrades are seamless through Joomlas built-in extension update mechanism.
Once installed upgrades are quick and easy via the default [Joomla](https://extensions.joomla.org/extension/component-builder/) upgrade area.
---
Some of the Features
====================
## 🚀 Core Capabilities at a Glance
+ Fetch Code from IDE and place it back in component during next compilation.
+ Add [Joomla custom fields](https://www.youtube.com/watch?v=n5RBmP0uNCM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=75) in any of your components.
+ Add you [own dashboard](https://www.youtube.com/watch?v=tU7TeYn1Djo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=60) in the back-end.
+ [Dynamic File and Folder](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=56) Inclusion concept.
+ [Easy Translation](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=51) via excel.
+ Adding your [own rule validation](https://www.youtube.com/watch?v=Z6-ggKtX35o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=46) to a field in [JCB](https://www.joomlacomponentbuilder.com)
+ [Automated backup system](https://www.youtube.com/watch?v=GUWZaODo_IM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=40) in [JCB](https://www.joomlacomponentbuilder.com).
+ Adding mySQL Dump to any View/Table.
+ Grab existing Table data and build a dynamic dump.
+ Unlimited [Joomla](https://extensions.joomla.org/extension/component-builder/) Components.
+ Unlimited Tables/Views.
+ Reusing Views and Fields.
+ Runs on Your Own [Joomla](https://extensions.joomla.org/extension/component-builder/) Install.
+ Add Dynamic/custom back-end views that uses Table and Chart result sets.
+ Build data query of extreme complex nature to use in Dynamic/custom views.
+ Highly Dynamic/custom Front-end Structures.
+ Dynamically setup templates and layouts for Front-end design.
+ Integration of the excellent UIKIT lib.
+ Integration of the excellent FOOTABLE lib.
+ All [Joomla](https://extensions.joomla.org/extension/component-builder/) Standard Field Types (including subforms).
+ Strong Implementation of all [Joomla](https://extensions.joomla.org/extension/component-builder/) Form Security.
+ Load data via ajax with ease.
+ You can add an Update Server to Components you build.
+ Build advanced Dynamic front-end forms.
+ Dynamic data queries from multiple tables.
+ Place in local GIT folder, and publish to sales server.
+ Include any amount of custom files and folders during build.
+ Static helper class with smart methods already included.
+ Static helper methods Can easily be added.
+ Direct install from compiler view.
+ Integrative with native [Joomla](https://extensions.joomla.org/extension/component-builder/) Categories and Tags.
+ Fully Dynamic Search Friendly URL Auto Implementation.
+ Custom scripting options all over the MVC structure.
+ Permission implementation down to each view, item and field.
+ Easy extendible to include other libraries.
+ Can include SQL and visioning update link to distribute your component updates via [Joomla](https://extensions.joomla.org/extension/component-builder/) default upgrade of components.
+ Easy Export & Import addon to all backend-tables.
+ Overriding ability of import concepts in all backend-tables.
+ The Batch and Filter implementation on all backend-list views.
+ This and much much more are all possible with this component builder!
Here are just some of the key powers JCB brings:
Just Imagine
====================
* 🔁 **Bi-Directional IDE Sync** Fetch custom logic from compiled projects and reintegrate on rebuild.
* 🧱 **Build Joomla Components, Plugins, and Modules** Fully native and independently compiled.
* 🧠 **Superpowers (PHP Class Builder)** Create namespaced abstract, interface, and trait-based PHP classes visually.
* 🔌 **Joomla Powers** Intelligent Joomla class referencing via dynamic placeholders (JPKs) that adapt to Joomla versions.
* 🗃️ **Smart Boilerplating** Start fast with 6+ curated demo blueprints for instant use or customization.
* 🔂 **Round-Trip Development** Add, update, and persist changes across compiled code using insert/replace tags.
* 🔐 **Field Types Engine** Blueprint reusable Joomla-native fields with constraints, security, DB structure, and logic.
* 🧬 **Admin Views, Custom Admin Views & Site Views** Fine-grained design for structured or dynamic backend/front-end UIs.
* 🧮 **Dynamic GET Builder** Advanced visual query designer for cross-table, filter-rich, deeply joined SQL fetches.
* 💡 **Snippets, Layouts, Templates & Libraries** Shareable GUI-linked modules for reusable HTML/CSS/JS integration.
* 🧰 **Custom Code System** Write logic once and reuse anywhere; full support for HTML & PHP placeholders and tracking.
* 🛠️ **Multi-Version Compilation** Compile version-specific code for J3, J4, J5 without compatibility bloat.
* 📦 **Package Management** Export/import blueprints, version control builds, sync with Git, and distribute clean packages.
* 🖥️ **CLI Integration** Build commands natively via terminal using Joomla's CLI runner.
* 🌐 **Update Server Support** Integrate custom update mechanisms for extensions post-deployment.
+ Your Component Back-end can be more advanced then the [Joomla](https://extensions.joomla.org/extension/component-builder/) Article Manager.
+ Your Code as Perfectly Unified to the strict [Joomla](https://extensions.joomla.org/extension/component-builder/) Standards.
+ Adding Custom Scripting almost anywhere in the MVC structure.
+ Import and export feature to all backend-views.
+ Batch copy and move/update feature for all backend-views.
+ History tracking per/change made on any back-end item.
+ Dynamic field control, to show and hide fields in amazing ways.
+ Front-end freedom of design that allows for any library to be used.
+ This and much much more are all possible with this component builder!
<details>
<summary>📚 View 100+ Additional Advanced Features</summary>
You are in Control
====================
### 🧩 Architecture & Core Logic
+ You can change the licensing template for your components.
+ You can change/improve existing field types and add more.
+ Line numbers to show where in compiler was the code build.
+ You can improve the component since all code are open-source.
+ Free updates for the lifetime of the project.
+ You can dynamically add internal help structures to all component.
+ There is no limitations on how big or how much you want to build (server limitation only).
+ This is a complete factory kind of component that functions like a deployment hub.
+ Export any component completely mapped in [JCB](https://www.joomlacomponentbuilder.com) and import into another [JCB](https://www.joomlacomponentbuilder.com).
+ This and much much more are all possible with this component builder!
* 🧠 **Super Powers**: Namespaced PHP classes (interfaces, traits, abstracts, finals) managed from GUI
* 🔌 **Joomla Powers**: Dynamic Joomla class resolution via JPK placeholders per Joomla version
* 🧱 **Compile native Components, Plugins & Modules** in one unified workflow
* 🔀 **Multi-version support** (J3, J4, J5, J6-ready) with per-version compilation
* 🚦 **Conditional logic injection** in models, views, controllers
* 🧬 **Reusable Admin Views** across multiple components
* 🧠 **Dynamic GET Builder** for visual cross-table queries
* 🔄 **Round-trip code integration** with file-to-database inserts/replaces
* 🧬 **Custom Admin Views** with full MVC override power
* 🧩 **Site Views** supporting public display of data with custom logic
* 📊 **Dynamic dashboards** built via custom admin view chart helpers
* 🔗 **Model linking between views** using subforms and dynamic selectors
* 🧩 **Shared field reuse across views** and components
* 📥 **Drag & Drop field mapping** for layout and logic assignment
* 🎯 **Dynamic Field Visibility** conditions via GUI
* 📦 **Independent packaging** of views and logic for reuse
Get More Demo Content
====================
### 📁 File & Code Management
> You can now get access to the WOW factor, [JCB](https://www.joomlacomponentbuilder.com) fully mapped can now be yours! Including many other [JCB](https://www.joomlacomponentbuilder.com) mapped components.
* 🧾 **Insert/Replace tags** for persistent file overrides
* 🗃️ **PHP & HTML custom code injection** via placeholder system
* 🛠️ **Automatic file synchronization** on rebuild
* 🧮 **Reverse string parser** to restore lang strings back to natural text
* 📋 **Line tracking** to see where code was compiled from
* 🗂️ **Smart override detection** and conflict management
* 🔍 **Compiler debug tracking**
* ✍️ **Dynamic use-statement generation** with alias auto-resolving
* 💾 **Auto language string export** from templates & views
* 🧰 **Helper classes and static utilities** included by default
### All you need to do is [explained here](https://vdm.bz/how-to-get-free-vdm-package-keys)!
### 🧠 Code Reuse & Blueprints
To install these packages [watch this tutorial](https://vdm.bz/how-to-install-jcb-packages).
* 🧱 **Demo component blueprints** for rapid prototyping
* 🔁 **Blueprint export/import** via JSON or Git sync
* 📎 **Shared field types** serve as field templates
* 🧪 **Test-friendly compiler mode** for internal checking
* 🧩 **Template-based file creation** with dynamic variables
* 📚 **Smart template merging** for updates
* 🚧 **Field definitions drive DB schema**
* 🎛️ **Custom scripting per field** on get/save
* 🔀 **Field view-type override (admin vs config)**
### 🌐 Joomla CMS Integration
Where can you get support and help?
====================
* 🛡️ **Token integration** via Joomla methods
* 🔐 **ACL per view, field, item**
* 🧾 **Field-based Joomla config generation**
* 📘 **Support for Joomla categories/tags/custom fields**
* ⚙️ **CLI-ready components** with native terminal support
* 🛰️ **Joomla Update Server integration**
* 🧪 **Version-aware language string compilation**
* 📤 **Remote publishing to custom repo update streams**
- [Package](https://git.vdm.dev/joomla/pkg-component-builder).
- [Download](https://git.vdm.dev/joomla/pkg-component-builder/archive/master.zip).
- [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE).
- [German](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7).
- [Hello World](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45).
- [Discussions](https://github.com/vdm-io/Joomla-Component-Builder/discussions).
- [Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki).
- [Issues](https://git.vdm.dev/joomla/Component-Builder/issues). ^^
- [Issues Stream](https://t.me/jcb_issues).
- [Updates](https://t.me/jcb_updates).
- [User Group](https://t.me/jcb_group).
- [Announcement](https://t.me/Joomla_component_builder).
- [Beta](https://git.vdm.dev/joomla-beta/pkg-component-builder).
- [Nightly Build](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip).
- [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint).
- [Security](https://www.vdm.io/report-security-issues).
### 🧠 Visual GUI & UX
^^ Then if you run into any issues, related to the [JCB](https://git.vdm.dev/joomla/Component-Builder/issues) code, like bugs, **start by searching** the (*open & closed*) issues over on [Gitea](https://git.vdm.dev/joomla/Component-Builder/issues), and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/CONTRIBUTING.md).
* 🎨 **Layout builder** with inline layout reusability
* 📁 **Template builder** with overrides
* 🧠 **Snippets GUI** for code blocks linked to layouts/templates
* 📚 **Custom documentation sections** linked into generated components
* 🧬 **Field injection points in layout/template snippets**
* 🔁 **Dynamic reload on selection change** via JavaScript binding
* 📦 **Reusable custom admin view templates**
* 🧠 **JS callback logic on field events**
* 📄 **Inline help descriptions** from config
* 🖱️ **Custom admin menus** and dashboard menu builders
WHY GIVE IT AWAY LIKE THIS?
====================
### 🌍 Internationalization
> We are Open Source Enthusiast
> Who Support the [Joomla](https://extensions.joomla.org/extension/component-builder/) Community
* 🌐 **Excel import/export for language strings**
* 📁 **Per-field language control**
* 🧾 **Language string auto-indexing**
* 🔁 **Reverse engineering of language constants**
* 🧠 **Per-Joomla-version lang key mapping**
* 🔧 **GUI to rewrite or update lang string context**
Our idea was to almost let this tool serve as a cheat sheet to how things can be done... and with the help of other developers end up formulating the way how things not only can, but must be done to insure secure, stable, scalable and maintainable code is produced.
### 📦 Packaging & Distribution
MAKING IT BETTER!
====================
* 📤 **Push component to Git repo**
* 🔄 **Auto-compile and auto-tag packages**
* 🗂️ **Blueprints stored and versioned by metadata**
* 🎁 **Auto-generated changelog from commits**
* 🔐 **Signed zip packaging supported**
* 📬 **Component update URLs via GUI settings**
* 🏷️ **Version-aware build ID assignment**
Get involved on the forums, and the Gitea issues, and you can even help us develop/improve the pipeline of [JCB](https://www.joomlacomponentbuilder.com) for continues delivery. We really want to see [JCB](https://www.joomlacomponentbuilder.com) remain the tool of choice for all [Joomla Component Development](https://extensions.joomla.org/extension/component-builder/) needs and ideas.
### ⚙️ Compiler Engine Features
TODO
======
***Under-30-second build time** on large components
* 📦 **Memory-optimized ZIP builder**
* 🔁 **Repeatable fields** via subform templates
* 💥 **Fail-safe error protection** and rollback
* 🔍 **Detailed compiler logs with stack trace and UUIDs**
* 📃 **Build summary report** after compilation
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](https://www.joomlacomponentbuilder.com).
- Team collaborative development across [JCB](https://www.joomlacomponentbuilder.com) installations offline and online.
- Documentation (maintained by the community) for [JCB](https://www.joomlacomponentbuilder.com). (help us select the best system for this)
### 🧱 Custom Code System (Powerful Dual Feature)
# Build Details
* 🔧 **Universal reusable code blocks** (inject anywhere by key)
* 🪄 **Update detection & visual diffing** on reused code
* 🧬 **Multi-context custom code binding**
* 📄 **Dynamic placeholder variable injection**
* 🔁 **Nested custom code support**
* 🔥 **Advanced compiler hooks per code block**
* 🧠 **Round-trip tag tracking in PHP/HTML**
* 📜 [Learn more about this here](https://git.vdm.dev/joomla/Component-Builder/wiki/TIPS:-Custom-Code)
+ *Community*: [Vast Development Method](https://dev.vdm.io)
+ *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*: 13th May, 2025
+ *Version*: 5.1.1-alpha5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **1032893**
+ *Field count*: **2099**
+ *File count*: **7002**
+ *Folder count*: **678**
### 🛠 Field Type System
> 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)
* 🧬 **Field types define templates and data types**
* 💡 **GUI-defined rules (required, unique, nullable)**
* 🧠 **Save/get hooks per field**
* 🛡️ **Database schema auto-generated from field settings**
* 📄 **Per-display field rendering config (list/edit)**
* 🧩 **Create dynamic models with modals/selectors**
* 🧠 **Conditional JS & CSS per field**
### 📐 Dynamic GET (Visual SQL Engine)
* 📊 **Design complex joins from GUI**
* 🧠 **Multiple GETs per view**
* 🔄 **Reusable query sets**
* 🧾 **Where/group/order statements supported**
* 📃 **Auto model method generation**
* 🔧 **Switch between list/item GETs**
* 🛡️ **Output Joomla-native query builder logic**
### 📁 Snippets, Templates, Layouts, Libraries
* 🧠 **Snippets = reusable HTML blocks**
* 🧩 **Layouts = reusable PHP render templates**
* 🖼️ **Templates = page-level views linked to custom admin/site views**
* 📦 **Libraries = JS/CSS assets linked to UI**
* 🌐 **CDN/local toggle for library delivery**
* 📁 **Media folder injection with override support**
* 🔧 **Repository push/pull/reset workflow**
* 📥 **Init snippets/layouts/templates via GUI**
### 📚 Documentation & Metadata
* 📄 **Per-entity README auto-generation**
* 📑 **Markdown + PHPDoc docblock support**
* 🧾 **Internal documentation tables**
* 🔄 **Update version history logs per entity**
* 🧠 **Field reference mapping table output**
* 📘 **Auto-documented component structure**
### 📊 Analytics & Insights
* 📈 **Track last build, size, line count, field count**
* 🔄 **Compare current vs previous builds**
* 🧠 **Export component metadata as JSON**
* 🗃️ **Stats per model/view**
* 📁 **Total file/folder/line counters**
</details>
---
## 📦 Get Started Now
* 🔽 **Download**: [Stable Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) · [Nightly J5](https://git.vdm.dev/joomla/pkg-component-builder/archive/5.x.zip) · [Nightly J4](https://git.vdm.dev/joomla/pkg-component-builder/archive/4.x.zip)
* 📥 **Install**: Use Joomlas extension manager
* 🎓 **Learn**: [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE) · [How to Install Demo Blueprints](https://vdm.bz/how-to-install-jcb-packages)
---
## 🤝 Get Help & Join the Community
* 💬 [GitHub Discussions](https://github.com/orgs/joomengine/discussions)
* 🐛 [Report Issues](https://git.vdm.dev/joomla/Component-Builder/issues)
* 📚 [JCB Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki)
* 👨‍🏫 [Video Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE)
* 🇩🇪 [German Series](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7)
* 🔔 [Telegram Groups](https://t.me/jcb_group) · [Announcements](https://t.me/Joomla_component_builder)
* 📶 [Status](https://status.vdm.dev/status/jcb)
* 🛡️ [Security Reports](https://www.vdm.io/report-security-issues)
---
## 🌱 Why It's Free
JCB is developed by developers for developers. Its purpose is to democratize high-performance Joomla development by empowering everyone — from solo builders to large teams — to work with clean, scalable, maintainable, and versionable code. This isnt a template generator — its a full-scale **extension engineering platform**.
---
## 🧩 Component Metadata
* **Company:** [Vast Development Method](https://dev.vdm.io)
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
* **Created:** 30th April, 2015 · **Last Build:** 18th June, 2025 · **Version:** 5.1.1-beta1
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
* **Lines:** 1086732 · **Fields:** 2096 · **Files:** 7420 · **Folders:** 724
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
## Contributors

View File

@ -1,160 +1,239 @@
# Joomla Component Builder ([JCB](https://www.joomlacomponentbuilder.com))
This is a [Joomla 5.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
![Component Builder Banner](https://raw.githubusercontent.com/joomengine/Joomla-Component-Builder/refs/heads/5.x/admin/assets/images/jcb-banner.jpg "Component Builder")
![Component Builder image](https://git.vdm.dev/joomla/Component-Builder/raw/branch/5.x/admin/assets/images/jcb-banner.jpg "The Component Builder")
This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extension/component-builder/) component, created with [Joomla Component Builder (JCB)](https://www.joomlacomponentbuilder.com)—a uniquely advanced development engine for building and maintaining complete Joomla extensions.
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
> 🎥 [Original... Quick Hello World Demo](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45), yes JCB has been around for over a decade.
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!
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.1.1-alpha5) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install this component easily. The latest release (**5.1.1-beta1**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
Upgrades are seamless through Joomlas built-in extension update mechanism.
Once installed upgrades are quick and easy via the default [Joomla](https://extensions.joomla.org/extension/component-builder/) upgrade area.
---
Some of the Features
====================
## 🚀 Core Capabilities at a Glance
+ Fetch Code from IDE and place it back in component during next compilation.
+ Add [Joomla custom fields](https://www.youtube.com/watch?v=n5RBmP0uNCM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=75) in any of your components.
+ Add you [own dashboard](https://www.youtube.com/watch?v=tU7TeYn1Djo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=60) in the back-end.
+ [Dynamic File and Folder](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=56) Inclusion concept.
+ [Easy Translation](https://www.youtube.com/watch?v=q5NwKGnOHoQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=51) via excel.
+ Adding your [own rule validation](https://www.youtube.com/watch?v=Z6-ggKtX35o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=46) to a field in [JCB](https://www.joomlacomponentbuilder.com)
+ [Automated backup system](https://www.youtube.com/watch?v=GUWZaODo_IM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=0s&index=40) in [JCB](https://www.joomlacomponentbuilder.com).
+ Adding mySQL Dump to any View/Table.
+ Grab existing Table data and build a dynamic dump.
+ Unlimited [Joomla](https://extensions.joomla.org/extension/component-builder/) Components.
+ Unlimited Tables/Views.
+ Reusing Views and Fields.
+ Runs on Your Own [Joomla](https://extensions.joomla.org/extension/component-builder/) Install.
+ Add Dynamic/custom back-end views that uses Table and Chart result sets.
+ Build data query of extreme complex nature to use in Dynamic/custom views.
+ Highly Dynamic/custom Front-end Structures.
+ Dynamically setup templates and layouts for Front-end design.
+ Integration of the excellent UIKIT lib.
+ Integration of the excellent FOOTABLE lib.
+ All [Joomla](https://extensions.joomla.org/extension/component-builder/) Standard Field Types (including subforms).
+ Strong Implementation of all [Joomla](https://extensions.joomla.org/extension/component-builder/) Form Security.
+ Load data via ajax with ease.
+ You can add an Update Server to Components you build.
+ Build advanced Dynamic front-end forms.
+ Dynamic data queries from multiple tables.
+ Place in local GIT folder, and publish to sales server.
+ Include any amount of custom files and folders during build.
+ Static helper class with smart methods already included.
+ Static helper methods Can easily be added.
+ Direct install from compiler view.
+ Integrative with native [Joomla](https://extensions.joomla.org/extension/component-builder/) Categories and Tags.
+ Fully Dynamic Search Friendly URL Auto Implementation.
+ Custom scripting options all over the MVC structure.
+ Permission implementation down to each view, item and field.
+ Easy extendible to include other libraries.
+ Can include SQL and visioning update link to distribute your component updates via [Joomla](https://extensions.joomla.org/extension/component-builder/) default upgrade of components.
+ Easy Export & Import addon to all backend-tables.
+ Overriding ability of import concepts in all backend-tables.
+ The Batch and Filter implementation on all backend-list views.
+ This and much much more are all possible with this component builder!
Here are just some of the key powers JCB brings:
Just Imagine
====================
* 🔁 **Bi-Directional IDE Sync** Fetch custom logic from compiled projects and reintegrate on rebuild.
* 🧱 **Build Joomla Components, Plugins, and Modules** Fully native and independently compiled.
* 🧠 **Superpowers (PHP Class Builder)** Create namespaced abstract, interface, and trait-based PHP classes visually.
* 🔌 **Joomla Powers** Intelligent Joomla class referencing via dynamic placeholders (JPKs) that adapt to Joomla versions.
* 🗃️ **Smart Boilerplating** Start fast with 6+ curated demo blueprints for instant use or customization.
* 🔂 **Round-Trip Development** Add, update, and persist changes across compiled code using insert/replace tags.
* 🔐 **Field Types Engine** Blueprint reusable Joomla-native fields with constraints, security, DB structure, and logic.
* 🧬 **Admin Views, Custom Admin Views & Site Views** Fine-grained design for structured or dynamic backend/front-end UIs.
* 🧮 **Dynamic GET Builder** Advanced visual query designer for cross-table, filter-rich, deeply joined SQL fetches.
* 💡 **Snippets, Layouts, Templates & Libraries** Shareable GUI-linked modules for reusable HTML/CSS/JS integration.
* 🧰 **Custom Code System** Write logic once and reuse anywhere; full support for HTML & PHP placeholders and tracking.
* 🛠️ **Multi-Version Compilation** Compile version-specific code for J3, J4, J5 without compatibility bloat.
* 📦 **Package Management** Export/import blueprints, version control builds, sync with Git, and distribute clean packages.
* 🖥️ **CLI Integration** Build commands natively via terminal using Joomla's CLI runner.
* 🌐 **Update Server Support** Integrate custom update mechanisms for extensions post-deployment.
+ Your Component Back-end can be more advanced then the [Joomla](https://extensions.joomla.org/extension/component-builder/) Article Manager.
+ Your Code as Perfectly Unified to the strict [Joomla](https://extensions.joomla.org/extension/component-builder/) Standards.
+ Adding Custom Scripting almost anywhere in the MVC structure.
+ Import and export feature to all backend-views.
+ Batch copy and move/update feature for all backend-views.
+ History tracking per/change made on any back-end item.
+ Dynamic field control, to show and hide fields in amazing ways.
+ Front-end freedom of design that allows for any library to be used.
+ This and much much more are all possible with this component builder!
<details>
<summary>📚 View 100+ Additional Advanced Features</summary>
You are in Control
====================
### 🧩 Architecture & Core Logic
+ You can change the licensing template for your components.
+ You can change/improve existing field types and add more.
+ Line numbers to show where in compiler was the code build.
+ You can improve the component since all code are open-source.
+ Free updates for the lifetime of the project.
+ You can dynamically add internal help structures to all component.
+ There is no limitations on how big or how much you want to build (server limitation only).
+ This is a complete factory kind of component that functions like a deployment hub.
+ Export any component completely mapped in [JCB](https://www.joomlacomponentbuilder.com) and import into another [JCB](https://www.joomlacomponentbuilder.com).
+ This and much much more are all possible with this component builder!
* 🧠 **Super Powers**: Namespaced PHP classes (interfaces, traits, abstracts, finals) managed from GUI
* 🔌 **Joomla Powers**: Dynamic Joomla class resolution via JPK placeholders per Joomla version
* 🧱 **Compile native Components, Plugins & Modules** in one unified workflow
* 🔀 **Multi-version support** (J3, J4, J5, J6-ready) with per-version compilation
* 🚦 **Conditional logic injection** in models, views, controllers
* 🧬 **Reusable Admin Views** across multiple components
* 🧠 **Dynamic GET Builder** for visual cross-table queries
* 🔄 **Round-trip code integration** with file-to-database inserts/replaces
* 🧬 **Custom Admin Views** with full MVC override power
* 🧩 **Site Views** supporting public display of data with custom logic
* 📊 **Dynamic dashboards** built via custom admin view chart helpers
* 🔗 **Model linking between views** using subforms and dynamic selectors
* 🧩 **Shared field reuse across views** and components
* 📥 **Drag & Drop field mapping** for layout and logic assignment
* 🎯 **Dynamic Field Visibility** conditions via GUI
* 📦 **Independent packaging** of views and logic for reuse
Get More Demo Content
====================
### 📁 File & Code Management
> You can now get access to the WOW factor, [JCB](https://www.joomlacomponentbuilder.com) fully mapped can now be yours! Including many other [JCB](https://www.joomlacomponentbuilder.com) mapped components.
* 🧾 **Insert/Replace tags** for persistent file overrides
* 🗃️ **PHP & HTML custom code injection** via placeholder system
* 🛠️ **Automatic file synchronization** on rebuild
* 🧮 **Reverse string parser** to restore lang strings back to natural text
* 📋 **Line tracking** to see where code was compiled from
* 🗂️ **Smart override detection** and conflict management
* 🔍 **Compiler debug tracking**
* ✍️ **Dynamic use-statement generation** with alias auto-resolving
* 💾 **Auto language string export** from templates & views
* 🧰 **Helper classes and static utilities** included by default
### All you need to do is [explained here](https://vdm.bz/how-to-get-free-vdm-package-keys)!
### 🧠 Code Reuse & Blueprints
To install these packages [watch this tutorial](https://vdm.bz/how-to-install-jcb-packages).
* 🧱 **Demo component blueprints** for rapid prototyping
* 🔁 **Blueprint export/import** via JSON or Git sync
* 📎 **Shared field types** serve as field templates
* 🧪 **Test-friendly compiler mode** for internal checking
* 🧩 **Template-based file creation** with dynamic variables
* 📚 **Smart template merging** for updates
* 🚧 **Field definitions drive DB schema**
* 🎛️ **Custom scripting per field** on get/save
* 🔀 **Field view-type override (admin vs config)**
### 🌐 Joomla CMS Integration
Where can you get support and help?
====================
* 🛡️ **Token integration** via Joomla methods
* 🔐 **ACL per view, field, item**
* 🧾 **Field-based Joomla config generation**
* 📘 **Support for Joomla categories/tags/custom fields**
* ⚙️ **CLI-ready components** with native terminal support
* 🛰️ **Joomla Update Server integration**
* 🧪 **Version-aware language string compilation**
* 📤 **Remote publishing to custom repo update streams**
- [Package](https://git.vdm.dev/joomla/pkg-component-builder).
- [Download](https://git.vdm.dev/joomla/pkg-component-builder/archive/master.zip).
- [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE).
- [German](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7).
- [Hello World](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45).
- [Discussions](https://github.com/vdm-io/Joomla-Component-Builder/discussions).
- [Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki).
- [Issues](https://git.vdm.dev/joomla/Component-Builder/issues). ^^
- [Issues Stream](https://t.me/jcb_issues).
- [Updates](https://t.me/jcb_updates).
- [User Group](https://t.me/jcb_group).
- [Announcement](https://t.me/Joomla_component_builder).
- [Beta](https://git.vdm.dev/joomla-beta/pkg-component-builder).
- [Nightly Build](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip).
- [Community Complaint](https://www.joomlacomponentbuilder.com/community-complaint).
- [Security](https://www.vdm.io/report-security-issues).
### 🧠 Visual GUI & UX
^^ Then if you run into any issues, related to the [JCB](https://git.vdm.dev/joomla/Component-Builder/issues) code, like bugs, **start by searching** the (*open & closed*) issues over on [Gitea](https://git.vdm.dev/joomla/Component-Builder/issues), and if the issue has not been mentioned before, **then only** open a new issue, following the [community guidelines](https://git.vdm.dev/joomla/Component-Builder/src/branch/master/.github/CONTRIBUTING.md).
* 🎨 **Layout builder** with inline layout reusability
* 📁 **Template builder** with overrides
* 🧠 **Snippets GUI** for code blocks linked to layouts/templates
* 📚 **Custom documentation sections** linked into generated components
* 🧬 **Field injection points in layout/template snippets**
* 🔁 **Dynamic reload on selection change** via JavaScript binding
* 📦 **Reusable custom admin view templates**
* 🧠 **JS callback logic on field events**
* 📄 **Inline help descriptions** from config
* 🖱️ **Custom admin menus** and dashboard menu builders
WHY GIVE IT AWAY LIKE THIS?
====================
### 🌍 Internationalization
> We are Open Source Enthusiast
> Who Support the [Joomla](https://extensions.joomla.org/extension/component-builder/) Community
* 🌐 **Excel import/export for language strings**
* 📁 **Per-field language control**
* 🧾 **Language string auto-indexing**
* 🔁 **Reverse engineering of language constants**
* 🧠 **Per-Joomla-version lang key mapping**
* 🔧 **GUI to rewrite or update lang string context**
Our idea was to almost let this tool serve as a cheat sheet to how things can be done... and with the help of other developers end up formulating the way how things not only can, but must be done to insure secure, stable, scalable and maintainable code is produced.
### 📦 Packaging & Distribution
MAKING IT BETTER!
====================
* 📤 **Push component to Git repo**
* 🔄 **Auto-compile and auto-tag packages**
* 🗂️ **Blueprints stored and versioned by metadata**
* 🎁 **Auto-generated changelog from commits**
* 🔐 **Signed zip packaging supported**
* 📬 **Component update URLs via GUI settings**
* 🏷️ **Version-aware build ID assignment**
Get involved on the forums, and the Gitea issues, and you can even help us develop/improve the pipeline of [JCB](https://www.joomlacomponentbuilder.com) for continues delivery. We really want to see [JCB](https://www.joomlacomponentbuilder.com) remain the tool of choice for all [Joomla Component Development](https://extensions.joomla.org/extension/component-builder/) needs and ideas.
### ⚙️ Compiler Engine Features
TODO
======
* ⚡ **Under-30-second build time** on large components
* 📦 **Memory-optimized ZIP builder**
* 🔁 **Repeatable fields** via subform templates
* 💥 **Fail-safe error protection** and rollback
* 🔍 **Detailed compiler logs with stack trace and UUIDs**
* 📃 **Build summary report** after compilation
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](https://www.joomlacomponentbuilder.com).
- Team collaborative development across [JCB](https://www.joomlacomponentbuilder.com) installations offline and online.
- Documentation (maintained by the community) for [JCB](https://www.joomlacomponentbuilder.com). (help us select the best system for this)
### 🧱 Custom Code System (Powerful Dual Feature)
# Build Details
* 🔧 **Universal reusable code blocks** (inject anywhere by key)
* 🪄 **Update detection & visual diffing** on reused code
* 🧬 **Multi-context custom code binding**
* 📄 **Dynamic placeholder variable injection**
* 🔁 **Nested custom code support**
* 🔥 **Advanced compiler hooks per code block**
* 🧠 **Round-trip tag tracking in PHP/HTML**
* 📜 [Learn more about this here](https://git.vdm.dev/joomla/Component-Builder/wiki/TIPS:-Custom-Code)
+ *Community*: [Vast Development Method](https://dev.vdm.io)
+ *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*: 13th May, 2025
+ *Version*: 5.1.1-alpha5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **1032893**
+ *Field count*: **2099**
+ *File count*: **7002**
+ *Folder count*: **678**
### 🛠 Field Type System
> 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)
* 🧬 **Field types define templates and data types**
* 💡 **GUI-defined rules (required, unique, nullable)**
* 🧠 **Save/get hooks per field**
* 🛡️ **Database schema auto-generated from field settings**
* 📄 **Per-display field rendering config (list/edit)**
* 🧩 **Create dynamic models with modals/selectors**
* 🧠 **Conditional JS & CSS per field**
### 📐 Dynamic GET (Visual SQL Engine)
* 📊 **Design complex joins from GUI**
* 🧠 **Multiple GETs per view**
* 🔄 **Reusable query sets**
* 🧾 **Where/group/order statements supported**
* 📃 **Auto model method generation**
* 🔧 **Switch between list/item GETs**
* 🛡️ **Output Joomla-native query builder logic**
### 📁 Snippets, Templates, Layouts, Libraries
* 🧠 **Snippets = reusable HTML blocks**
* 🧩 **Layouts = reusable PHP render templates**
* 🖼️ **Templates = page-level views linked to custom admin/site views**
* 📦 **Libraries = JS/CSS assets linked to UI**
* 🌐 **CDN/local toggle for library delivery**
* 📁 **Media folder injection with override support**
* 🔧 **Repository push/pull/reset workflow**
* 📥 **Init snippets/layouts/templates via GUI**
### 📚 Documentation & Metadata
* 📄 **Per-entity README auto-generation**
* 📑 **Markdown + PHPDoc docblock support**
* 🧾 **Internal documentation tables**
* 🔄 **Update version history logs per entity**
* 🧠 **Field reference mapping table output**
* 📘 **Auto-documented component structure**
### 📊 Analytics & Insights
* 📈 **Track last build, size, line count, field count**
* 🔄 **Compare current vs previous builds**
* 🧠 **Export component metadata as JSON**
* 🗃️ **Stats per model/view**
* 📁 **Total file/folder/line counters**
</details>
---
## 📦 Get Started Now
* 🔽 **Download**: [Stable Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) · [Nightly J5](https://git.vdm.dev/joomla/pkg-component-builder/archive/5.x.zip) · [Nightly J4](https://git.vdm.dev/joomla/pkg-component-builder/archive/4.x.zip)
* 📥 **Install**: Use Joomlas extension manager
* 🎓 **Learn**: [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE) · [How to Install Demo Blueprints](https://vdm.bz/how-to-install-jcb-packages)
---
## 🤝 Get Help & Join the Community
* 💬 [GitHub Discussions](https://github.com/orgs/joomengine/discussions)
* 🐛 [Report Issues](https://git.vdm.dev/joomla/Component-Builder/issues)
* 📚 [JCB Wiki](https://git.vdm.dev/joomla/Component-Builder/wiki)
* 👨‍🏫 [Video Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE)
* 🇩🇪 [German Series](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7)
* 🔔 [Telegram Groups](https://t.me/jcb_group) · [Announcements](https://t.me/Joomla_component_builder)
* 📶 [Status](https://status.vdm.dev/status/jcb)
* 🛡️ [Security Reports](https://www.vdm.io/report-security-issues)
---
## 🌱 Why It's Free
JCB is developed by developers for developers. Its purpose is to democratize high-performance Joomla development by empowering everyone — from solo builders to large teams — to work with clean, scalable, maintainable, and versionable code. This isnt a template generator — its a full-scale **extension engineering platform**.
---
## 🧩 Component Metadata
* **Company:** [Vast Development Method](https://dev.vdm.io)
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
* **Created:** 30th April, 2015 · **Last Build:** 18th June, 2025 · **Version:** 5.1.1-beta1
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
* **Lines:** 1086732 · **Fields:** 2096 · **Files:** 7420 · **Folders:** 724
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
## Contributors

View File

@ -78,6 +78,12 @@
<action name="class_extends.edit.own" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC" />
<action name="class_extends.edit.state" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC" />
<action name="class_extends.version" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC" />
<action name="class_extends.init" title="COM_COMPONENTBUILDER_CLASS_EXTENDS_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_EXTENDS_INIT_BUTTON_ACCESS_DESC" />
<action name="class_extends.push" title="COM_COMPONENTBUILDER_CLASS_EXTENDS_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_EXTENDS_PUSH_BUTTON_ACCESS_DESC" />
<action name="class_extends.reset" title="COM_COMPONENTBUILDER_CLASS_EXTENDS_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_EXTENDS_RESET_BUTTON_ACCESS_DESC" />
<action name="class_method.init" title="COM_COMPONENTBUILDER_CLASS_METHOD_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_METHOD_INIT_BUTTON_ACCESS_DESC" />
<action name="class_method.push" title="COM_COMPONENTBUILDER_CLASS_METHOD_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_METHOD_PUSH_BUTTON_ACCESS_DESC" />
<action name="class_method.reset" title="COM_COMPONENTBUILDER_CLASS_METHOD_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_METHOD_RESET_BUTTON_ACCESS_DESC" />
<action name="class_method.access" title="COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS" description="COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS_DESC" />
<action name="class_method.batch" title="COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE" description="COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE_DESC" />
<action name="class_method.create" title="COM_COMPONENTBUILDER_CLASS_METHODS_CREATE" description="COM_COMPONENTBUILDER_CLASS_METHODS_CREATE_DESC" />
@ -98,6 +104,9 @@
<action name="class_property.edit.own" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN_DESC" />
<action name="class_property.edit.state" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE_DESC" />
<action name="class_property.version" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION_DESC" />
<action name="class_property.init" title="COM_COMPONENTBUILDER_CLASS_PROPERTY_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_PROPERTY_INIT_BUTTON_ACCESS_DESC" />
<action name="class_property.push" title="COM_COMPONENTBUILDER_CLASS_PROPERTY_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_PROPERTY_PUSH_BUTTON_ACCESS_DESC" />
<action name="class_property.reset" title="COM_COMPONENTBUILDER_CLASS_PROPERTY_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CLASS_PROPERTY_RESET_BUTTON_ACCESS_DESC" />
<action name="compiler.access" title="COM_COMPONENTBUILDER_COMPILER_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC" />
<action name="compiler.clear_tmp" title="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC" />
<action name="compiler.compiler_animations" title="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_COMPILER_ANIMATIONS_BUTTON_ACCESS_DESC" />
@ -323,6 +332,9 @@
<action name="joomla_component.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC" />
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
<action name="joomla_component.submenu" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC" />
<action name="joomla_module.init" title="COM_COMPONENTBUILDER_JOOMLA_MODULE_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_INIT_BUTTON_ACCESS_DESC" />
<action name="joomla_module.push" title="COM_COMPONENTBUILDER_JOOMLA_MODULE_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_PUSH_BUTTON_ACCESS_DESC" />
<action name="joomla_module.reset" title="COM_COMPONENTBUILDER_JOOMLA_MODULE_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_RESET_BUTTON_ACCESS_DESC" />
<action name="joomla_module.access" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS_DESC" />
<action name="joomla_module.batch" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE_DESC" />
<action name="joomla_module.create" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE_DESC" />
@ -355,12 +367,12 @@
<action name="joomla_module_updates.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_OWN_DESC" />
<action name="joomla_module_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_STATE_DESC" />
<action name="joomla_module_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION_DESC" />
<action name="joomla_plugin.get_boilerplate" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin_group.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS_DESC" />
<action name="joomla_plugin_group.batch" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE_DESC" />
<action name="joomla_plugin_group.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION_DESC" />
<action name="joomla_plugin.methods" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.properties" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.init" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_INIT_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.push" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUSH_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.reset" title="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RESET_BUTTON_ACCESS_DESC" />
<action name="joomla_plugin.access" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC" />
<action name="joomla_plugin.batch" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE_DESC" />
<action name="joomla_plugin.create" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_CREATE_DESC" />
@ -469,6 +481,9 @@
<action name="library.init" title="COM_COMPONENTBUILDER_LIBRARY_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_LIBRARY_INIT_BUTTON_ACCESS_DESC" />
<action name="library.push" title="COM_COMPONENTBUILDER_LIBRARY_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_LIBRARY_PUSH_BUTTON_ACCESS_DESC" />
<action name="library.reset" title="COM_COMPONENTBUILDER_LIBRARY_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_LIBRARY_RESET_BUTTON_ACCESS_DESC" />
<action name="placeholder.init" title="COM_COMPONENTBUILDER_PLACEHOLDER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_PLACEHOLDER_INIT_BUTTON_ACCESS_DESC" />
<action name="placeholder.push" title="COM_COMPONENTBUILDER_PLACEHOLDER_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_PLACEHOLDER_PUSH_BUTTON_ACCESS_DESC" />
<action name="placeholder.reset" title="COM_COMPONENTBUILDER_PLACEHOLDER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_PLACEHOLDER_RESET_BUTTON_ACCESS_DESC" />
<action name="placeholder.access" title="COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS" description="COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS_DESC" />
<action name="placeholder.batch" title="COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE_DESC" />
<action name="placeholder.create" title="COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE_DESC" />
@ -689,6 +704,17 @@
<action name="custom_code.access" title="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS_DESC" />
<action name="custom_code.version" title="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION" description="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION_DESC" />
</section>
<section name="class_extends">
<action name="class_extends.edit" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_DESC" />
<action name="class_extends.edit.own" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC" />
<action name="class_extends.edit.state" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC" />
<action name="class_extends.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY_DESC" />
<action name="class_extends.edit.created" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE_DESC" />
<action name="class_extends.create" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE_DESC" />
<action name="class_extends.delete" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE_DESC" />
<action name="class_extends.access" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC" />
<action name="class_extends.version" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC" />
</section>
<section name="class_property">
<action name="class_property.edit" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_DESC" />
<action name="class_property.edit.own" title="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_OWN_DESC" />
@ -1032,17 +1058,6 @@
<action name="library_files_folders_urls.access" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_ACCESS_DESC" />
<action name="library_files_folders_urls.version" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC" />
</section>
<section name="class_extends">
<action name="class_extends.edit" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_DESC" />
<action name="class_extends.edit.own" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_OWN_DESC" />
<action name="class_extends.edit.state" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC" />
<action name="class_extends.edit.created_by" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_BY_DESC" />
<action name="class_extends.edit.created" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_CREATED_DATE_DESC" />
<action name="class_extends.create" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_CREATE_DESC" />
<action name="class_extends.delete" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_DELETE_DESC" />
<action name="class_extends.access" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC" />
<action name="class_extends.version" title="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION" description="COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC" />
</section>
<section name="joomla_module_updates">
<action name="joomla_module_updates.edit" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_DESC" />
<action name="joomla_module_updates.edit.own" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_OWN" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_OWN_DESC" />

View File

@ -162,6 +162,16 @@ class InitializationManager {
}
}
_getInitFunctionName(area) {
const powers = [
'Joomla.Fieldtype',
'Joomla.Power',
'Power'
];
return powers.includes(area) ? 'initSelectedPowers' : 'initSelectedPackages';
}
async _handleRepoClick(event) {
const button = event.currentTarget;
const repo = button?.dataset?.repo;
@ -186,12 +196,17 @@ class InitializationManager {
if (data.success && data.index && this.#buildTable) {
const repoData = data.index[0];
const {
path = 'joomla/super-powers',
read_branch = 'master',
target,
base = 'https://git.vdm.dev'
} = repoData;
const repoBase = repoData.base || 'https://git.vdm.dev';
const repoPath = repoData.path || 'joomla/super-powers';
const repoBranch = repoData.read_branch || 'master';
const repo_base = (target === 'github') ? 'https://github.com' : base;
const repo_path = (target === 'github') ? 'tree' : 'src/branch';
window.targetPowerRepoUrl = `${repoBase}/${repoPath}/src/branch/${repoBranch}/`;
window.targetPowerRepoUrl = `${repo_base}/${path}/${repo_path}/${read_branch}/`;
this.#buildTable(repoData.index);
@ -228,6 +243,8 @@ class InitializationManager {
const area = this.currentArea || 'error';
const repo = this.currentRepo || 'error';
const func = this._getInitFunctionName(area);
try {
// Convert selected items to form data
const formData = new FormData();
@ -239,7 +256,7 @@ class InitializationManager {
formData.append('area', area);
formData.append('repo', repo);
const response = await fetch(`${UrlAjax}initSelectedPowers`, {
const response = await fetch(`${UrlAjax}${func}`, {
method: 'POST',
body: formData
});

View File

@ -38,7 +38,7 @@ abstract class ###Component###Email
public static $active = [];
/**
* Configuraiton object
* Configuration object
*
* @var Registry
*/

View File

@ -16,12 +16,12 @@ defined('_JCB_TEMPLATE') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Installer\InstallerScriptInterface;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Version;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\Database\DatabaseInterface;

View File

@ -243,7 +243,6 @@
name="icon"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION"
directory=""
/>
<!-- Php_after_publish Field. Type: Editor. (joomla) -->
<field
@ -295,7 +294,6 @@
name="icon_category"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_CATEGORY_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_CATEGORY_DESCRIPTION"
directory=""
/>
<!-- Icon_add Field. Type: Media. (joomla) -->
<field
@ -303,7 +301,6 @@
name="icon_add"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION"
directory=""
/>
<!-- Php_after_cancel Field. Type: Editor. (joomla) -->
<field

View File

@ -203,17 +203,30 @@
hint="COM_COMPONENTBUILDER_CLASS_METHOD_COMMENT_HINT"
required="false"
/>
<!-- Joomla_plugin_group Field. Type: Joomlaplugingroups. (custom) -->
<!-- Joomla_plugin_group Field. Type: Modalselect. (custom) -->
<field
type="joomlaplugingroups"
type="ModalSelect"
name="joomla_plugin_group"
label="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_LABEL"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
required="true"
button="true"
sql_title_table="#__componentbuilder_joomla_plugin_group"
sql_title_column="name"
data-key-name="guid"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=joomla_plugin_groups&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
urlNew="index.php?option=com_componentbuilder&amp;task=joomla_plugin_group.add&amp;layout=modal&amp;tmpl=component"
urlEdit="index.php?option=com_componentbuilder&amp;task=joomla_plugin_group.edit&amp;guid={id}&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
titleSelect="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_TITLESELECT"
titleNew="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_TITLENEW"
titleEdit="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_TITLEEDIT"
iconSelect="icon-copy"
select="true"
new="true"
edit="true"
clear="true"
class="input-large"
description="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_DESCRIPTION"
hint="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_HINT"
showon="extension_type:plugins"
/>
<!-- Arguments Field. Type: Text. (joomla) -->
<field

View File

@ -187,17 +187,30 @@
hint="COM_COMPONENTBUILDER_CLASS_PROPERTY_COMMENT_HINT"
required="false"
/>
<!-- Joomla_plugin_group Field. Type: Joomlaplugingroups. (custom) -->
<!-- Joomla_plugin_group Field. Type: Modalselect. (custom) -->
<field
type="joomlaplugingroups"
type="ModalSelect"
name="joomla_plugin_group"
label="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_LABEL"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
required="true"
button="true"
sql_title_table="#__componentbuilder_joomla_plugin_group"
sql_title_column="name"
data-key-name="guid"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=joomla_plugin_groups&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
urlNew="index.php?option=com_componentbuilder&amp;task=joomla_plugin_group.add&amp;layout=modal&amp;tmpl=component"
urlEdit="index.php?option=com_componentbuilder&amp;task=joomla_plugin_group.edit&amp;guid={id}&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
titleSelect="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_TITLESELECT"
titleNew="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_TITLENEW"
titleEdit="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_TITLEEDIT"
iconSelect="icon-copy"
select="true"
new="true"
edit="true"
clear="true"
class="input-large"
description="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_DESCRIPTION"
hint="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_HINT"
showon="extension_type:plugins"
/>
<!-- Default Field. Type: Textarea. (joomla) -->
<field

View File

@ -143,16 +143,28 @@
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_HINT"
/>
<!-- Main_get Field. Type: Maingets. (custom) -->
<!-- Main_get Field. Type: Modalselect. (custom) -->
<field
type="maingets"
type="ModalSelect"
name="main_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
layout="joomla.form.field.list-fancy-select"
multiple="false"
sql_title_table="#__componentbuilder_dynamic_get"
sql_title_column="name"
data-key-name="guid"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=dynamic_gets&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid&amp;filter[getgroup]=main"
urlNew="index.php?option=com_componentbuilder&amp;task=dynamic_get.add&amp;layout=modal&amp;tmpl=component"
urlEdit="index.php?option=com_componentbuilder&amp;task=dynamic_get.edit&amp;guid={id}&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
titleSelect="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_TITLESELECT"
titleEdit="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_TITLEEDIT"
iconSelect="icon-copy"
select="true"
new="false"
edit="true"
clear="true"
required="true"
button="true"
class="input-large"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
/>
<!-- Note_add_php_language_string Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_add_php_language_string" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_php_language_string" />
@ -288,7 +300,6 @@
name="icon"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_DESCRIPTION"
directory=""
/>
<!-- Add_php_jview Field. Type: Radio. (joomla) -->
<field

View File

@ -352,7 +352,6 @@
new="true"
edit="true"
clear="true"
required="true"
class="input-large"
description="COM_COMPONENTBUILDER_DYNAMIC_GET_VIEW_TABLE_MAIN_DESCRIPTION"
hint="COM_COMPONENTBUILDER_DYNAMIC_GET_VIEW_TABLE_MAIN_HINT"

View File

@ -200,7 +200,7 @@
name="null_switch"
label="COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL"
class="btn-group btn-group-yesno"
default="NOT NULL"
default="NULL"
required="true">
<!-- Option Set. -->
<option value="NULL">

View File

@ -145,7 +145,7 @@
name="null_switch"
label="COM_COMPONENTBUILDER_FIELDTYPE_NULL_SWITCH_LABEL"
class="btn-group btn-group-yesno"
default="NOT NULL"
default="NULL"
required="true">
<!-- Option Set. -->
<option value="NULL">

View File

@ -30,15 +30,6 @@
class="js-select-submit-on-change"
layout="joomla.form.field.list-fancy-select"
/>
<field
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
layout="joomla.form.field.list-fancy-select"
multiple="true"
hint="COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_GET"
class="js-select-submit-on-change"
/>
<field
type="customadminviewsfilteraddphpajax"
name="add_php_ajax"

View File

@ -41,7 +41,9 @@
type="dynamicgetsfiltergettype"
name="gettype"
label="COM_COMPONENTBUILDER_DYNAMIC_GET_GETTYPE_LABEL"
multiple="false"
layout="joomla.form.field.list-fancy-select"
multiple="true"
hint="COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE"
class="js-select-submit-on-change"
/>
<input type="hidden" name="form_submited" value="1"/>

View File

@ -31,7 +31,18 @@
layout="joomla.form.field.list-fancy-select"
/>
<field
type="classextends"
type="ModalSelect"
sql_title_table="#__componentbuilder_class_extends"
sql_title_column="name"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=class_extendings&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid&amp;filter[extension_type]=plugins"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_HINT"
titleSelect="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_TITLESELECT"
iconSelect="icon-copy"
select="true"
edit="false"
clear="true"
onchange="form.submit()"
name="class_extends"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL"
multiple="false"

View File

@ -31,14 +31,36 @@
layout="joomla.form.field.list-fancy-select"
/>
<field
type="classextends"
type="ModalSelect"
sql_title_table="#__componentbuilder_class_extends"
sql_title_column="name"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=class_extendings&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid&amp;filter[extension_type]=plugins"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_HINT"
titleSelect="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_TITLESELECT"
iconSelect="icon-copy"
select="true"
edit="false"
clear="true"
onchange="form.submit()"
name="class_extends"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL"
multiple="false"
class="js-select-submit-on-change"
/>
<field
type="joomlaplugingroups"
type="ModalSelect"
sql_title_table="#__componentbuilder_joomla_plugin_group"
sql_title_column="name"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=joomla_plugin_groups&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_HINT"
titleSelect="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_TITLESELECT"
iconSelect="icon-copy"
select="true"
edit="false"
clear="true"
onchange="form.submit()"
name="joomla_plugin_group"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL"
multiple="false"

View File

@ -30,15 +30,6 @@
class="js-select-submit-on-change"
layout="joomla.form.field.list-fancy-select"
/>
<field
type="maingets"
name="main_get"
label="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL"
layout="joomla.form.field.list-fancy-select"
multiple="true"
hint="COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_GET"
class="js-select-submit-on-change"
/>
<field
type="siteviewsfilteraddphpajax"
name="add_php_ajax"

File diff suppressed because it is too large Load Diff

View File

@ -111,29 +111,55 @@
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SYSTEM_NAME_HINT"
/>
<!-- Class_extends Field. Type: Classextends. (custom) -->
<!-- Class_extends Field. Type: Modalselect. (custom) -->
<field
type="classextends"
type="ModalSelect"
name="class_extends"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
sql_title_table="#__componentbuilder_class_extends"
sql_title_column="name"
data-key-name="guid"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=class_extendings&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid&amp;filter[extension_type]=plugins"
urlNew="index.php?option=com_componentbuilder&amp;task=class_extends.add&amp;layout=modal&amp;tmpl=component"
urlEdit="index.php?option=com_componentbuilder&amp;task=class_extends.edit&amp;guid={id}&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
titleSelect="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_TITLESELECT"
titleNew="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_TITLENEW"
titleEdit="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_TITLEEDIT"
iconSelect="icon-copy"
select="true"
new="true"
edit="true"
clear="true"
required="true"
button="true"
class="input-large"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_DESCRIPTION"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_HINT"
/>
<!-- Joomla_plugin_group Field. Type: Joomlaplugingroups. (custom) -->
<!-- Joomla_plugin_group Field. Type: Modalselect. (custom) -->
<field
type="joomlaplugingroups"
type="ModalSelect"
name="joomla_plugin_group"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
sql_title_table="#__componentbuilder_joomla_plugin_group"
sql_title_column="name"
data-key-name="guid"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=joomla_plugin_groups&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
urlNew="index.php?option=com_componentbuilder&amp;task=joomla_plugin_group.add&amp;layout=modal&amp;tmpl=component"
urlEdit="index.php?option=com_componentbuilder&amp;task=joomla_plugin_group.edit&amp;guid={id}&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
titleSelect="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_TITLESELECT"
titleNew="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_TITLENEW"
titleEdit="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_TITLEEDIT"
iconSelect="icon-copy"
select="true"
new="true"
edit="true"
clear="true"
required="true"
button="true"
class="input-large"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_DESCRIPTION"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_HINT"
/>
<!-- Add_sql Field. Type: Radio. (joomla) -->
<field

View File

@ -113,17 +113,30 @@
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_HINT"
/>
<!-- Class_extends Field. Type: Classextends. (custom) -->
<!-- Class_extends Field. Type: Modalselect. (custom) -->
<field
type="classextends"
type="ModalSelect"
name="class_extends"
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
sql_title_table="#__componentbuilder_class_extends"
sql_title_column="name"
data-key-name="guid"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=class_extendings&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid&amp;filter[extension_type]=plugins"
urlNew="index.php?option=com_componentbuilder&amp;task=class_extends.add&amp;layout=modal&amp;tmpl=component"
urlEdit="index.php?option=com_componentbuilder&amp;task=class_extends.edit&amp;guid={id}&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
titleSelect="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_TITLESELECT"
titleNew="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_TITLENEW"
titleEdit="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_TITLEEDIT"
iconSelect="icon-copy"
select="true"
new="true"
edit="true"
clear="true"
required="true"
button="true"
class="input-large"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_DESCRIPTION"
hint="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_HINT"
/>
<!-- Guid Field. Type: Text. (joomla) -->
<field

View File

@ -182,6 +182,8 @@
COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION</option>
<option value="1">
COM_COMPONENTBUILDER_REPOSITORY_GITEA</option>
<option value="2">
COM_COMPONENTBUILDER_REPOSITORY_GITHUB</option>
</field>
<!-- Base Field. Type: Url. (joomla) -->
<field
@ -193,7 +195,6 @@
default="https://git.vdm.dev"
description="COM_COMPONENTBUILDER_REPOSITORY_BASE_DESCRIPTION"
class="text_area"
required="true"
filter="url"
validated="url"
scheme="http,https"
@ -268,7 +269,7 @@
label="COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_LABEL"
description="COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0">
default="1">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_REPOSITORY_GLOBAL</option>
@ -301,6 +302,33 @@
message="COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_MESSAGE"
hint="COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_HINT"
/>
<!-- Author_email Field. Type: Text. (joomla) -->
<field
type="text"
name="author_email"
label="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_DESCRIPTION"
class="text_area"
filter="STRING"
validate="email"
message="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_MESSAGE"
hint="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_HINT"
/>
<!-- Author_name Field. Type: Text. (joomla) -->
<field
type="text"
name="author_name"
label="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_DESCRIPTION"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_HINT"
/>
<!-- Token Field. Type: Password. (joomla) -->
<field
type="password"
@ -313,7 +341,7 @@
filter="STRING"
hint="COM_COMPONENTBUILDER_REPOSITORY_TOKEN_HINT"
autocomplete="off"
showon="type:1[AND]access_repo:1"
showon="type:1[OR]type:2[AND]access_repo:1"
/>
<!-- Username Field. Type: Text. (joomla) -->
<field

View File

@ -143,16 +143,28 @@
message="COM_COMPONENTBUILDER_SITE_VIEW_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_SITE_VIEW_DESCRIPTION_HINT"
/>
<!-- Main_get Field. Type: Maingets. (custom) -->
<!-- Main_get Field. Type: Modalselect. (custom) -->
<field
type="maingets"
type="ModalSelect"
name="main_get"
label="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL"
description="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_DESCRIPTION"
layout="joomla.form.field.list-fancy-select"
multiple="false"
sql_title_table="#__componentbuilder_dynamic_get"
sql_title_column="name"
data-key-name="guid"
sql_title_key="guid"
urlSelect="index.php?option=com_componentbuilder&amp;view=dynamic_gets&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid&amp;filter[getgroup]=main"
urlNew="index.php?option=com_componentbuilder&amp;task=dynamic_get.add&amp;layout=modal&amp;tmpl=component"
urlEdit="index.php?option=com_componentbuilder&amp;task=dynamic_get.edit&amp;guid={id}&amp;layout=modal&amp;tmpl=component&amp;titleKey=guid"
titleSelect="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_TITLESELECT"
titleEdit="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_TITLEEDIT"
iconSelect="icon-copy"
select="true"
new="false"
edit="true"
clear="true"
required="true"
button="true"
class="input-large"
description="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_DESCRIPTION"
/>
<!-- Add_php_jview_display Field. Type: Radio. (joomla) -->
<field

View File

@ -1283,6 +1283,7 @@ COM_COMPONENTBUILDER_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="An
COM_COMPONENTBUILDER_ARCHIVED="Archived"
COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS="Are you sure you want to delete? Confirming will permanently delete the selected item(s)!"
COM_COMPONENTBUILDER_ARE_YOU_THEREFORE_ABSOLUTELY_SURE_YOU_WANT_TO_CONTINUE="Are you therefore absolutely sure you want to continue?"
COM_COMPONENTBUILDER_AT_LEAST_ONE_S_CONTENT_REPOSITORY_MUST_BE_CONFIGURED_WITH_A_WRITE_BRANCH_VALUE_IN_THE_REPOSITORIES_AREA_FOR_THE_PUSH_FUNCTION_TO_OPERATE_CORRECTLY="At least one [%s] content repository must be configured with a [Write Branch] value in the repositories area, for the push function to operate correctly."
COM_COMPONENTBUILDER_AUTHOR="Author"
COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in"
COM_COMPONENTBUILDER_A_METHOD_S_WAS_ADDED_TO_THE_INSTALL_BSB_OF_THIS_PACKAGE_TO_INSURE_THAT_THE_FOLDERS_ARE_COPIED_INTO_THE_CORRECT_PLACE_WHEN_THIS_COMPONENT_IS_INSTALLED="A method (%s) was added to the install <b>%s</b> of this package to insure that the folder(s) are copied into the correct place when this component is installed!"
@ -1305,7 +1306,6 @@ COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_SSA="<b>Get the key from</b> <a %s>%s<
COM_COMPONENTBUILDER_BGET_THE_KEY_FROM_SB_FOR_A_SSA="<b>Get the key from %s</b> for <a %s>%s</a>"
COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION="<b>Images</b> not moved to correct location!"
COM_COMPONENTBUILDER_BMULTIPLE_FIELD_REPEATABLE_MODEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD="<b>Multiple Field (repeatable mode)</b> id:%s mismatch in <b>field:%s</b>, and was <em>removed</em> from the field."
COM_COMPONENTBUILDER_BOILERPLATE_PLUGIN_S_DATA_COULD_NOT_BE_SAVED="Boilerplate (plugin - %s) data could not be saved"
COM_COMPONENTBUILDER_BRANCH="Branch"
COM_COMPONENTBUILDER_BSBS_IN_BSB_HAS_ID_MISMATCH_SO_THE_BSB_WAS_REMOVED="<b>%s</b>->%s in <b>%s</b> has id mismatch. So the <b>%s</b> was removed!"
COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported%s"
@ -1387,6 +1387,8 @@ COM_COMPONENTBUILDER_CLASS_EXTENDS_GUID_LABEL="GUID"
COM_COMPONENTBUILDER_CLASS_EXTENDS_HEAD_DESCRIPTION="The class header to add any header values can be added."
COM_COMPONENTBUILDER_CLASS_EXTENDS_HEAD_LABEL="Class Header"
COM_COMPONENTBUILDER_CLASS_EXTENDS_ID="Id"
COM_COMPONENTBUILDER_CLASS_EXTENDS_INIT_BUTTON_ACCESS="Class Extends Init Button Access"
COM_COMPONENTBUILDER_CLASS_EXTENDS_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_CLASS_EXTENDS_MODIFIED_BY_DESC="The last user that modified this Class Extends."
COM_COMPONENTBUILDER_CLASS_EXTENDS_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_CLASS_EXTENDS_MODIFIED_DATE_DESC="The date this Class Extends was modified."
@ -1402,6 +1404,10 @@ COM_COMPONENTBUILDER_CLASS_EXTENDS_PERMISSION="Permissions"
COM_COMPONENTBUILDER_CLASS_EXTENDS_PLUGINS="plugins"
COM_COMPONENTBUILDER_CLASS_EXTENDS_POWERS="powers"
COM_COMPONENTBUILDER_CLASS_EXTENDS_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_CLASS_EXTENDS_PUSH_BUTTON_ACCESS="Class Extends Push Button Access"
COM_COMPONENTBUILDER_CLASS_EXTENDS_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_CLASS_EXTENDS_RESET_BUTTON_ACCESS="Class Extends Reset Button Access"
COM_COMPONENTBUILDER_CLASS_EXTENDS_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_CLASS_EXTENDS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Class Extends to customise the alias."
COM_COMPONENTBUILDER_CLASS_EXTENDS_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_CLASS_EXTENDS_STATUS="Status"
@ -1476,7 +1482,14 @@ COM_COMPONENTBUILDER_CLASS_METHOD_GUID_DESCRIPTION="Globally Unique Identifier"
COM_COMPONENTBUILDER_CLASS_METHOD_GUID_HINT="Auto Generated"
COM_COMPONENTBUILDER_CLASS_METHOD_GUID_LABEL="GUID"
COM_COMPONENTBUILDER_CLASS_METHOD_ID="Id"
COM_COMPONENTBUILDER_CLASS_METHOD_INIT_BUTTON_ACCESS="Class Method Init Button Access"
COM_COMPONENTBUILDER_CLASS_METHOD_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_DESCRIPTION="Select a plugin group"
COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_HINT="Select an Plugin Group"
COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_LABEL="Joomla Plugin Group"
COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_TITLEEDIT="Edit Plugin Group"
COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_TITLENEW="New Plugin Group"
COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_TITLESELECT="Select Plugin Group"
COM_COMPONENTBUILDER_CLASS_METHOD_MODIFIED_BY_DESC="The last user that modified this Class Method."
COM_COMPONENTBUILDER_CLASS_METHOD_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_CLASS_METHOD_MODIFIED_DATE_DESC="The date this Class Method was modified."
@ -1498,6 +1511,10 @@ COM_COMPONENTBUILDER_CLASS_METHOD_PROTECTED_STATIC="protected static"
COM_COMPONENTBUILDER_CLASS_METHOD_PUBLIC="public"
COM_COMPONENTBUILDER_CLASS_METHOD_PUBLIC_STATIC="public static"
COM_COMPONENTBUILDER_CLASS_METHOD_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_CLASS_METHOD_PUSH_BUTTON_ACCESS="Class Method Push Button Access"
COM_COMPONENTBUILDER_CLASS_METHOD_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_CLASS_METHOD_RESET_BUTTON_ACCESS="Class Method Reset Button Access"
COM_COMPONENTBUILDER_CLASS_METHOD_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_CLASS_METHOD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Class Method to customise the alias."
COM_COMPONENTBUILDER_CLASS_METHOD_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_CLASS_METHOD_STATUS="Status"
@ -1573,7 +1590,14 @@ COM_COMPONENTBUILDER_CLASS_PROPERTY_GUID_DESCRIPTION="Globally Unique Identifier
COM_COMPONENTBUILDER_CLASS_PROPERTY_GUID_HINT="Auto Generated"
COM_COMPONENTBUILDER_CLASS_PROPERTY_GUID_LABEL="GUID"
COM_COMPONENTBUILDER_CLASS_PROPERTY_ID="Id"
COM_COMPONENTBUILDER_CLASS_PROPERTY_INIT_BUTTON_ACCESS="Class Property Init Button Access"
COM_COMPONENTBUILDER_CLASS_PROPERTY_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_DESCRIPTION="Select a plugin group"
COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_HINT="Select an Plugin Group"
COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_LABEL="Joomla Plugin Group"
COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_TITLEEDIT="Edit Plugin Group"
COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_TITLENEW="New Plugin Group"
COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_TITLESELECT="Select Plugin Group"
COM_COMPONENTBUILDER_CLASS_PROPERTY_MODIFIED_BY_DESC="The last user that modified this Class Property."
COM_COMPONENTBUILDER_CLASS_PROPERTY_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_CLASS_PROPERTY_MODIFIED_DATE_DESC="The date this Class Property was modified."
@ -1595,6 +1619,10 @@ COM_COMPONENTBUILDER_CLASS_PROPERTY_PROTECTED_STATIC="protected static"
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLIC="public"
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLIC_STATIC="public static"
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUSH_BUTTON_ACCESS="Class Property Push Button Access"
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_CLASS_PROPERTY_RESET_BUTTON_ACCESS="Class Property Reset Button Access"
COM_COMPONENTBUILDER_CLASS_PROPERTY_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_CLASS_PROPERTY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Class Property to customise the alias."
COM_COMPONENTBUILDER_CLASS_PROPERTY_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_CLASS_PROPERTY_STATUS="Status"
@ -3866,6 +3894,8 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LOCK="Lock"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LOOP="Loop"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION="Select a main get"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL="Main Get"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_TITLEEDIT="Edit Main Get"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_TITLESELECT="Select Targetview"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MENU="Menu"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MENU_2="Menu 2"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MENU_3="Menu 3"
@ -4171,6 +4201,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_DESCRIPTION="How To Add the Code to the fi
COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_LABEL="Add Type"
COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_DESC="A count of the number of times this Custom Code has been revised."
COM_COMPONENTBUILDER_CUSTOM_CODE_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_CUSTOM_GET="Custom Get"
COM_COMPONENTBUILDER_CUSTOM_PHP="Custom PHP"
COM_COMPONENTBUILDER_CUSTOM_SCRIPT="Custom Script"
COM_COMPONENTBUILDER_DASH="Dashboard"
@ -5152,7 +5183,6 @@ COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES_TYPE="Select Indexes Type"
COM_COMPONENTBUILDER_FILTER_SELECT_JOOMLA_PLUGIN_GROUP="Select Joomla Plugin Group"
COM_COMPONENTBUILDER_FILTER_SELECT_LIBRARY="Select Library"
COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION="Select Location"
COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_GET="Select Main Get"
COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE="Select Main Source"
COM_COMPONENTBUILDER_FILTER_SELECT_MODELLING_METHOD="Select Modelling Method"
COM_COMPONENTBUILDER_FILTER_SELECT_NAME="Select Name"
@ -5216,9 +5246,6 @@ COM_COMPONENTBUILDER_FOUR_SPACES="4 Spaces"
COM_COMPONENTBUILDER_FREEOPEN="Free/Open"
COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab"
COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again."
COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_FAILED_IF_THE_ISSUE_CONTINUES_INFORM_YOUR_SYSTEM_ADMINISTRATOR="Getting joomla_plugin boilerplate failed, if the issue continues, inform your system administrator!"
COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_WAS_SUCCESSFULLY="Getting joomla_plugin boilerplate was successfully!"
COM_COMPONENTBUILDER_GET_BOILERPLATE="Get Boilerplate"
COM_COMPONENTBUILDER_GET_PACKAGE="Get Package"
COM_COMPONENTBUILDER_GET_TOKEN="Get Token"
COM_COMPONENTBUILDER_GET_TOKEN_FROM_VDM_TO_GET_UPDATE_NOTICE_AND_ADD_IT_TO_YOUR_GLOBAL_OPTIONS="Get token from VDM to get update notice, and add it to your global options."
@ -5362,6 +5389,30 @@ COM_COMPONENTBUILDER_HR_HTHREEMULTI_FILTER_ERRORHTHREE="<hr /><h3>Multi Filter E
COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE="<hr /><h3>%s Warning</h3>"
COM_COMPONENTBUILDER_HR_HTHREETIDY_ERRORHTHREE="<hr /><h3>Tidy Error</h3>"
COM_COMPONENTBUILDER_HR_HTHREEWHMCS_ERRORHTHREE="<hr /><h3>WHMCS Error</h3>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BADMIN_VIEWB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>admin view</b> down to the field level.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BCOMPONENTB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>component</b> down to the field level.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BCUSTOM_ADMIN_VIEWBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>custom admin view</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BCUSTOM_CODEBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>custom code</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BDYNAMIC_GETBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>dynamic get</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BJOOMLA_MODULEB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>joomla module</b> down to the field level.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BJOOMLA_PLUGINB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>joomla plugin</b> down to the field level.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BLAYOUTBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>layout</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BLIBRARYBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>library</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BSITE_VIEWBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>site view</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BSNIPPETBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>snippet</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BPUSH_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BTEMPLATEBBRBRDO_YOU_WANT_TO_PROCEEDP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>push all</b> entities linked to each selected <b>template</b>.<br><br>Do you want to proceed?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BADMIN_VIEWB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>admin view</b> down to the field level.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BCOMPONENTB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>component</b> down to the field level.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BCUSTOM_ADMIN_VIEWBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>custom admin view</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BCUSTOM_CODEBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>custom code</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BDYNAMIC_GETBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>dynamic get</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BJOOMLA_MODULEB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>joomla module</b> down to the field level.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BJOOMLA_PLUGINB_DOWN_TO_THE_FIELD_LEVELBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>joomla plugin</b> down to the field level.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BLAYOUTBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>layout</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BLIBRARYBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>library</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BSITE_VIEWBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>site view</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BSNIPPETBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>snippet</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEKEEP_THIS_WIDOW_OPENHTHREEPTHIS_IS_A_BVERY_LARGE_TASKB_AND_MAY_TAKE_A_BLONG_TIMEB_TO_COMPLETEBRBRIT_WILL_BRESET_ALLB_ENTITIES_LINKED_TO_EACH_SELECTED_BTEMPLATEBBRBRDO_YOU_WANT_TO_CONTINUEP="<h3>Keep this widow open</h3><p>This is a <b>very large task</b> and may take a <b>long time</b> to complete.<br><br>It will <b>reset all</b> entities linked to each selected <b>template</b>.<br><br>Do you want to continue?</p>"
COM_COMPONENTBUILDER_HTHREEPLACEHOLDER_REMOVEDHTHREEPBTHISB_CUSTOM_CODE_CAN_ONLY_BE_USED_IN_BOTHERB_CUSTOM_CODE_NOT_IN_IT_SELF_SINCE_THAT_WILL_CAUSE_A_INFINITE_LOOP_IN_THE_COMPILERP="<h3>Placeholder Removed!</h3><p><b>This</b> custom code can only be used in <b>other</b> custom code, not in it self! Since that will cause a infinite loop in the compiler.</p>"
COM_COMPONENTBUILDER_HTHREESHTHREEPCUSTOM_CODE_CAN_ONLY_BE_USED_IN_OTHER_CUSTOM_CODE_IF_SET_AS_BJCB_MANUALB_YOU_CAN_NOT_ADD_THEM_TO_EMHASH_AUTOMATIONEM_CODE_AT_THIS_POINTP="<h3>%s</h3><p>Custom code can only be used in other custom code if set as <b>JCB (manual)</b>, you can not add them to <em>Hash (Automation)</em> code at this point.</p>"
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="<h3>%s namespace error (%s)</h3><p>You must at-least have two sections in your namespace, you just have one (%s). This is an unacceptable action, please see <a href=%s >psr-4</a> for more info.</p><p>This %s was therefore removed, <a href=%s>click here</a> to fix this issue.</p>"
@ -5389,6 +5440,9 @@ COM_COMPONENTBUILDER_INIT="Init"
COM_COMPONENTBUILDER_INITIALIZATION_SELECTION="Selection"
COM_COMPONENTBUILDER_INITIALIZATION_SELECTION_DESC="Initialization Selection"
COM_COMPONENTBUILDER_INITIALIZE_ADMIN_VIEWS="Initialize Admin Views"
COM_COMPONENTBUILDER_INITIALIZE_CLASS_EXTENDS="Initialize Class Extends"
COM_COMPONENTBUILDER_INITIALIZE_CLASS_METHODS="Initialize Class Methods"
COM_COMPONENTBUILDER_INITIALIZE_CLASS_PROPERTIES="Initialize Class Properties"
COM_COMPONENTBUILDER_INITIALIZE_COMPONENTS="Initialize Components"
COM_COMPONENTBUILDER_INITIALIZE_CUSTOM_ADMIN_VIEWS="Initialize Custom Admin Views"
COM_COMPONENTBUILDER_INITIALIZE_CUSTOM_CODES="Initialize Custom Codes"
@ -5399,6 +5453,7 @@ COM_COMPONENTBUILDER_INITIALIZE_JOOMLA_POWERS="Initialize Joomla Powers"
COM_COMPONENTBUILDER_INITIALIZE_LAYOUTS="Initialize Layouts"
COM_COMPONENTBUILDER_INITIALIZE_LIBRARIES="Initialize Libraries"
COM_COMPONENTBUILDER_INITIALIZE_MODULES="Initialize Modules"
COM_COMPONENTBUILDER_INITIALIZE_PLACEHOLDERS="Initialize Placeholders"
COM_COMPONENTBUILDER_INITIALIZE_PLUGINS="Initialize Plugins"
COM_COMPONENTBUILDER_INITIALIZE_POWERS="Initialize Powers"
COM_COMPONENTBUILDER_INITIALIZE_SELECTED_S_ITEMS="Initialize selected [%s] items"
@ -5662,14 +5717,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_DESCRIPTION="Set if a li
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_LABEL="Empty Contributor Fields"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ERROR_UNIQUE_ALIAS="Another Joomla Component has the same alias."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Joomla Component has the same alias ."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_DESCRIPTION="Enter link where your JCB package key can be bought."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_HINT="http://www.example.com/buy-keys"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_LABEL="Buy Link<br /><small>(to get key)</small>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_MESSAGE="Error! Please add link here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_DESCRIPTION="The key used to lock the data during export."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_HINT="Export Key Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_LABEL="Export Key<br /><small>(encrypted field)</small>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_MESSAGE="Error! Please add export key here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FRONT="Front"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GIT_FOLDER_PATH_DESCRIPTION="Here you can set the path to the git folder."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GIT_FOLDER_PATH_HINT="/home/user/git"
@ -5688,16 +5735,10 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INIT_BUTTON_ACCESS_DESC="Allows the users
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INTELLIGENT_ADDREMOVEIF="Intelligent (add&remove+if)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION="Add JavaScript for the entire back-end. Do not add the script tags."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL="Javascript"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_EXPORT_PACKAGE_NOTE_DESCRIPTION="The settings below are used when you export this component as a JCB Package, for more info on how this works please review the following tutorial (<a href='https://youtu.be/lkE0ZiSWufg' target='_blank'>https://youtu.be/lkE0ZiSWufg</a>)."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_EXPORT_PACKAGE_NOTE_LABEL="JCB Package Export Settings"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_POWERS_PATH_DESCRIPTION="Here you can set the path to the powers folder. Recommended that you always place it inside the <b>libraries</b>. You don't need to add a full path here, so <b>libraries/jcb_powers</b> will mean <i>/home/username/public_html/libraries/jcb_powers</i> when installed. You should always use two folders here, libraries + one more for example: <br /><code>libraries/jcb_powers</code>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_POWERS_PATH_HINT="libraries/jcb_powers"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_POWERS_PATH_LABEL="JCB Powers Path<br /><small>example: <code>libraries/jcb_powers</code></small>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_POWERS_PATH_MESSAGE="Error! Please add folder path here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA_SOURCE_LINK_DESCRIPTION="Enter link where this Joomla component's source code can be found on gitHub. Where those who want to use this package, can review and contribute to the code."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA_SOURCE_LINK_HINT="https://github.com/vdm-io/Joomla-Component-Builder"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA_SOURCE_LINK_LABEL="Joomla Source Link<br /><small>(where the Joomla source code is found)</small>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA_SOURCE_LINK_MESSAGE="Error! Please add link here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LIBS_HELPERS="Libs & Helpers"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_DESCRIPTION="Add License Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_HINT="Add License Here"
@ -6158,6 +6199,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_GUID_LABEL="GUID"
COM_COMPONENTBUILDER_JOOMLA_MODULE_HELPER="Helper"
COM_COMPONENTBUILDER_JOOMLA_MODULE_HTML="HTML"
COM_COMPONENTBUILDER_JOOMLA_MODULE_ID="Id"
COM_COMPONENTBUILDER_JOOMLA_MODULE_INIT_BUTTON_ACCESS="Joomla Module Init Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_JOOMLA_MODULE_LABEL_DESCRIPTION="Not mandatory, used to Label the Fieldset"
COM_COMPONENTBUILDER_JOOMLA_MODULE_LABEL_HINT="Name"
COM_COMPONENTBUILDER_JOOMLA_MODULE_LABEL_LABEL="Label"
@ -6221,8 +6264,12 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_PHP_PREFLIGHT_UPDATE_LABEL="PHP in the prefli
COM_COMPONENTBUILDER_JOOMLA_MODULE_PHP_SCRIPT_CONSTRUCT_DESCRIPTION="PHP script that should run in __construct of script."
COM_COMPONENTBUILDER_JOOMLA_MODULE_PHP_SCRIPT_CONSTRUCT_LABEL="PHP Script Construct"
COM_COMPONENTBUILDER_JOOMLA_MODULE_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_JOOMLA_MODULE_PUSH_BUTTON_ACCESS="Joomla Module Push Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_JOOMLA_MODULE_README="Readme"
COM_COMPONENTBUILDER_JOOMLA_MODULE_README_LABEL="README.md"
COM_COMPONENTBUILDER_JOOMLA_MODULE_RESET_BUTTON_ACCESS="Joomla Module Reset Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_JOOMLA_MODULE_SALES_SERVER_DESCRIPTION="Select your sales server for this component"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SALES_SERVER_LABEL="Sales Server"
COM_COMPONENTBUILDER_JOOMLA_MODULE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Module to customise the alias."
@ -6449,7 +6496,12 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_SALES_SERVER_LABEL="Add Sales Server"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_SQL_LABEL="Add MySQL - (Install)"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_SQL_UNINSTALL_LABEL="Add MySQL - (Uninstall)"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ADD_UPDATE_SERVER_LABEL="Add Update Server"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_DESCRIPTION="Enter a class extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_HINT="Select a Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_LABEL="Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_TITLEEDIT="Edit Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_TITLENEW="New Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CLASS_EXTENDS_TITLESELECT="Select Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CODE="Code"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_COMPONENT="Component"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CREATED_BY_DESC="The user that created this Joomla Plugin."
@ -6558,8 +6610,6 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILE_DESCRIPTION="Leave default if you don't
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILE_HINT="config"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILE_LABEL="File Name"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FORMS_FIELDS="Forms & Fields"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS="Joomla Plugin Get Boilerplate Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the get boilerplate button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP="Joomla Plugin Group"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS="Joomla Plugin Groups"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS="Joomla Plugin Groups Access"
@ -6592,7 +6642,12 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNFEATURED="%s Joomla Plugin G
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNFEATURED_1="%s Joomla Plugin Group unfeatured."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNPUBLISHED="%s Joomla Plugin Groups unpublished."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_N_ITEMS_UNPUBLISHED_1="%s Joomla Plugin Group unpublished."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_DESCRIPTION="Enter a class extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_HINT="Select a Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_LABEL="Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_TITLEEDIT="Edit Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_TITLENEW="New Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CLASS_EXTENDS_TITLESELECT="Select Class Extends"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CREATED_BY_DESC="The user that created this Joomla Plugin Group."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_CREATED_DATE_DESC="The date this Joomla Plugin Group was created."
@ -6627,14 +6682,19 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GUID_LABEL="GUID"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_HEAD_DESCRIPTION="The class header to add any header values can be added."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_HEAD_LABEL="Class Header"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ID="Id"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_INIT_BUTTON_ACCESS="Joomla Plugin Init Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_DESCRIPTION="Select a plugin group"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_HINT="Select an Plugin Group"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_LABEL="Joomla Plugin Group"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_TITLEEDIT="Edit Plugin Group"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_TITLENEW="New Plugin Group"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_JOOMLA_PLUGIN_GROUP_TITLESELECT="Select Plugin Group"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_LABEL_DESCRIPTION="Not mandatory, used to Label the Fieldset"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_LABEL_HINT="Name"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_LABEL_LABEL="Label"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MAIN_CLASS_CODE_DESCRIPTION="Add the properties & methods here."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_MAIN_CLASS_CODE_LABEL="Properties & Methods"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS="Joomla Plugin Methods Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS_DESC="Allows the users in this group to access the methods button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD_LABEL="Methods"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD_SELECTION_DESCRIPTION="Select methods you want to use in your joomla_plugin."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHOD_SELECTION_LABEL="Method Selection"
@ -6686,14 +6746,16 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_DESCRIPTION="Add Version Numbe
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_HINT="1.0.0"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PLUGIN_VERSION_MESSAGE="Error! Please add version here."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS="Joomla Plugin Properties Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS_DESC="Allows the users in this group to access the properties button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY_LABEL="Properties"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY_SELECTION_DESCRIPTION="Select properties you want to use in your joomla_plugin."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTY_SELECTION_LABEL="Property Selection"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUSH_BUTTON_ACCESS="Joomla Plugin Push Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_README="Readme"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_README_LABEL="README.md"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RESET_BUTTON_ACCESS="Joomla Plugin Reset Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SALES_SERVER_DESCRIPTION="Select your sales server for this component"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SALES_SERVER_LABEL="Sales Server"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Plugin to customise the alias."
@ -7510,6 +7572,7 @@ COM_COMPONENTBUILDER_LOCAL="Local"
COM_COMPONENTBUILDER_LOCAL_GET="Local (get)"
COM_COMPONENTBUILDER_LOCAL_POWERS_REPOSITORY_PATH="Local Powers Repository Path"
COM_COMPONENTBUILDER_LOGIN_FAILED="Login failed"
COM_COMPONENTBUILDER_MAIN_GET="Main Get"
COM_COMPONENTBUILDER_MAIN_MENU="Main Menu"
COM_COMPONENTBUILDER_MAKE_A_DIFFERENCE_WITH_JCB="Make a Difference with JCB"
COM_COMPONENTBUILDER_MAKE_YOUR_SELECTION="Make your selection"
@ -7520,7 +7583,6 @@ COM_COMPONENTBUILDER_MATCH_FIELD="Match Field"
COM_COMPONENTBUILDER_MATCH_OPTIONS="Match Options"
COM_COMPONENTBUILDER_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)"
COM_COMPONENTBUILDER_MERGE="Merge"
COM_COMPONENTBUILDER_METHODS="Methods"
COM_COMPONENTBUILDER_MINIFY_JAVASCRIPT="Minify JavaScript"
COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)"
COM_COMPONENTBUILDER_MISSING_REPOSITORY_OR_AREA_DATA="Missing repository or area data."
@ -7545,6 +7607,8 @@ COM_COMPONENTBUILDER_NONE_SELECTED="None selected"
COM_COMPONENTBUILDER_NONE_SET="None set"
COM_COMPONENTBUILDER_NOTRANSLATION="no-translation"
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied."
COM_COMPONENTBUILDER_NOT_PUSHED="Not pushed!"
COM_COMPONENTBUILDER_NOT_RESET="Not reset!"
COM_COMPONENTBUILDER_NOT_SAVED="Not saved!"
COM_COMPONENTBUILDER_NOT_SET="not set"
COM_COMPONENTBUILDER_NOT_TRANSLATED_IN="Not translated in"
@ -7552,6 +7616,7 @@ COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
COM_COMPONENTBUILDER_NO_ACTIVE_REPOSITORIES_FOUND="No Active Repositories Found"
COM_COMPONENTBUILDER_NO_ACTIVE_REPOSITORIES_FOUND_FOR_THIS_AREA_YOU_CAN_ADD_REPOSITORIES_IN_THE_REPOSITORIES_SECTION_OF_JCB="No active repositories found for this area. You can add repositories in the Repositories section of JCB."
COM_COMPONENTBUILDER_NO_ADMIN_VIEWS_FOUND="No Admin Views Found"
COM_COMPONENTBUILDER_NO_CHANGE_S_ITEM_S_IN_REPO_S_IS_ALREADY_IN_SYNC="NO CHANGE: %s item [%s] in repo (%s) is already in sync."
COM_COMPONENTBUILDER_NO_COMPONENTS_FOUND="No Components Found"
COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE="No component details found, so it is not safe to continue!"
COM_COMPONENTBUILDER_NO_CRONJOB_PATHS_WAS_REMOVED_WE_WILL_CHANGE_TO_WORKFLOWS_SOON="No cronjob paths was removed, we will change to workflows soon."
@ -7578,61 +7643,6 @@ COM_COMPONENTBUILDER_NO_UPLOAD_SELECTED="No upload selected"
COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found."
COM_COMPONENTBUILDER_NO_VALID_MODE_HAS_BEEN_SPECIFIED="No valid mode has been specified!"
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages"
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_ADMIN_VIEWS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Admin Views into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_CUSTOM_ADMIN_VIEWS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Custom Admin Views into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_CUSTOM_CODES_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Custom Codes into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_DYNAMIC_GETS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Dynamic Gets into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_FIELDS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Fields into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_JOOMLA_COMPONENTS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Joomla Components into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_LAYOUTS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Layouts into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_LIBRARIES_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Libraries into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_SITE_VIEWS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Site Views into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_SNIPPETS_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Snippets into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_TEMPLATES_INTO_THIS_JCB_INSTANCE="Once completed, this feature will allow you to pull both demo and user-created Templates into this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_ADMIN_VIEWS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Admin Views from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_ADMIN_VIEW_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Admin View from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_ADMIN_VIEWS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Custom Admin Views from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_ADMIN_VIEW_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Custom Admin View from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_CODES_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Custom Codes from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_CODE_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Custom Code from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_DYNAMIC_GETS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Dynamic Gets from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_DYNAMIC_GET_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Dynamic Get from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_FIELDS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Fields from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_FIELD_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Field from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_JOOMLA_COMPONENTS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Joomla Components from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_JOOMLA_COMPONENT_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Joomla Component from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LAYOUTS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Layouts from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LAYOUT_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Layout from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LIBRARIES_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Libraries from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LIBRARY_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Library from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SITE_VIEWS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Site Views from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SITE_VIEW_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Site View from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SNIPPETS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Snippets from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SNIPPET_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Snippet from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_TEMPLATES_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Templates from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_TEMPLATE_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES="Once completed, this feature will allow you to push user-created Template from this JCB instance to your configured repositories."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_ADMIN_VIEWS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Admin Views within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_ADMIN_VIEW_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Admin View within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_ADMIN_VIEWS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Custom Admin Views within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_ADMIN_VIEW_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Custom Admin View within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_CODES_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Custom Codes within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_CODE_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Custom Code within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_DYNAMIC_GETS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Dynamic Gets within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_DYNAMIC_GET_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Dynamic Get within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_FIELDS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Fields within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_FIELD_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Field within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_JOOMLA_COMPONENTS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Joomla Components within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_JOOMLA_COMPONENT_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Joomla Component within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LAYOUTS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Layouts within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LAYOUT_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Layout within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LIBRARIES_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Libraries within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LIBRARY_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Library within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SITE_VIEWS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Site Views within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SITE_VIEW_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Site View within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SNIPPETS_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Snippets within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SNIPPET_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Snippet within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_TEMPLATES_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Templates within this JCB instance."
COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_TEMPLATE_WITHIN_THIS_JCB_INSTANCE="Once completed, this feature will allow you to reset both demo and user-created Template within this JCB instance."
COM_COMPONENTBUILDER_ONLY_IN_ADMIN_LIST_VIEW="Only in Admin List View"
COM_COMPONENTBUILDER_ONLY_IN_LINKED_LIST_VIEWS="Only in Linked List Views"
COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="Only (%s.zip) file was removed the from tmp folder during installation!"
@ -7651,7 +7661,7 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not
COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
COM_COMPONENTBUILDER_PERMISSION_DENIED="Permission Denied!"
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>"
COM_COMPONENTBUILDER_PFILE_AT_BSSSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s/%s/%s</b> gave the following error!<br />%s</p>"
COM_COMPONENTBUILDER_PJOOMLA_FIELD_TYPEB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Joomla Field Type</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
COM_COMPONENTBUILDER_PJOOMLA_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Joomla Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="<p>Joomla Power <b>guid:%s</b> not found!</p>"
@ -7713,6 +7723,8 @@ COM_COMPONENTBUILDER_PLACEHOLDER_EDIT="Editing the Placeholder"
COM_COMPONENTBUILDER_PLACEHOLDER_ERROR_UNIQUE_ALIAS="Another Placeholder has the same alias."
COM_COMPONENTBUILDER_PLACEHOLDER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Placeholder has the same alias ."
COM_COMPONENTBUILDER_PLACEHOLDER_ID="Id"
COM_COMPONENTBUILDER_PLACEHOLDER_INIT_BUTTON_ACCESS="Placeholder Init Button Access"
COM_COMPONENTBUILDER_PLACEHOLDER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_PLACEHOLDER_MODIFIED_BY_DESC="The last user that modified this Placeholder."
COM_COMPONENTBUILDER_PLACEHOLDER_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_PLACEHOLDER_MODIFIED_DATE_DESC="The date this Placeholder was modified."
@ -7722,7 +7734,11 @@ COM_COMPONENTBUILDER_PLACEHOLDER_NOTE_PLACEHOLDERS_PLACEDIN_DESCRIPTION="<div cl
COM_COMPONENTBUILDER_PLACEHOLDER_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_PLACEHOLDER_PERMISSION="Permissions"
COM_COMPONENTBUILDER_PLACEHOLDER_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_PLACEHOLDER_PUSH_BUTTON_ACCESS="Placeholder Push Button Access"
COM_COMPONENTBUILDER_PLACEHOLDER_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_PLACEHOLDER_REMOVED="Placeholder Removed!"
COM_COMPONENTBUILDER_PLACEHOLDER_RESET_BUTTON_ACCESS="Placeholder Reset Button Access"
COM_COMPONENTBUILDER_PLACEHOLDER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_PLACEHOLDER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Placeholder to customise the alias."
COM_COMPONENTBUILDER_PLACEHOLDER_STATUS="Status"
COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_DESCRIPTION="Set the text you would like to target as a placeholder"
@ -7931,9 +7947,9 @@ COM_COMPONENTBUILDER_POWER_VERSION_DESC="A count of the number of times this Pow
COM_COMPONENTBUILDER_POWER_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_POWER_YES="Yes"
COM_COMPONENTBUILDER_PPACKAGEB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Package</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
COM_COMPONENTBUILDER_PPACKAGECONTENTB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Package:content</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="<p>Power <b>guid:%s</b> not found!</p>"
COM_COMPONENTBUILDER_PRE_RELEASE="Pre Release"
COM_COMPONENTBUILDER_PROPERTIES="Properties"
COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties<br /><small>Here you can set the properties for this field.</small>"
COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER="Property already selected, try another."
@ -7946,6 +7962,7 @@ COM_COMPONENTBUILDER_PUBLISHED="Published"
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_PUSH="Push"
COM_COMPONENTBUILDER_PUSH_FAILED="Push Failed!"
COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL="Push Unsuccessful!"
COM_COMPONENTBUILDER_PUSH_WAS_UNSUCCESSFUL="Push Was Unsuccessful!"
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
COM_COMPONENTBUILDER_REFRESH="Refresh"
@ -8007,10 +8024,18 @@ COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_UNPUBLISHED_1="%s Repository unpublish
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU="Repositories Submenu"
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC="Allows the users in this group to submenu of repository"
COM_COMPONENTBUILDER_REPOSITORY="Repository"
COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_DESCRIPTION="Set the access options to this repository"
COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_DESCRIPTION="Set the access options to this repository. Global is only applicable to <b>git.vdm.dev</b> repos."
COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_LABEL="Access"
COM_COMPONENTBUILDER_REPOSITORY_ADDPLACEHOLDERS_DESCRIPTION="Set dnamic placeholders for this component."
COM_COMPONENTBUILDER_REPOSITORY_ADDPLACEHOLDERS_LABEL="Placeholders"
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_DESCRIPTION="Enter Author Email"
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_HINT="Author Email Here"
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_LABEL="Author Email"
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_EMAIL_MESSAGE="Error! Please author email address here."
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_DESCRIPTION="Enter Author Name"
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_HINT="Author Name Here"
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_LABEL="Author Name"
COM_COMPONENTBUILDER_REPOSITORY_AUTHOR_NAME_MESSAGE="Error! Please author name here."
COM_COMPONENTBUILDER_REPOSITORY_BASE_DESCRIPTION="Enter Base URL"
COM_COMPONENTBUILDER_REPOSITORY_BASE_HINT="https://git.vdm.dev"
COM_COMPONENTBUILDER_REPOSITORY_BASE_LABEL="Base URL"
@ -8024,6 +8049,7 @@ COM_COMPONENTBUILDER_REPOSITORY_EDIT="Editing the Repository"
COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS="Another Repository has the same alias."
COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Repository has the same alias ."
COM_COMPONENTBUILDER_REPOSITORY_GITEA="Gitea"
COM_COMPONENTBUILDER_REPOSITORY_GITHUB="Github"
COM_COMPONENTBUILDER_REPOSITORY_GLOBAL="Global"
COM_COMPONENTBUILDER_REPOSITORY_GUID_DESCRIPTION="Globally Unique Identifier"
COM_COMPONENTBUILDER_REPOSITORY_GUID_HINT="Auto Generated"
@ -8092,6 +8118,7 @@ COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS="Requires the value to be the same as that held in the field named &quot;field&quot;, eg:%s"
COM_COMPONENTBUILDER_RESET="Reset"
COM_COMPONENTBUILDER_RESET_FAILED="Reset Failed!"
COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL="Reset Unsuccessful!"
COM_COMPONENTBUILDER_REVERTED_THE_B_ASSETSB_TABLE_RULES_COLUMN_BACK_TO_ITS_DEFAULT_SIZE_OF_VARCHARFIVE_THOUSAND_ONE_HUNDRED_AND_TWENTY="Reverted the <b>#__assets</b> table rules column back to its default size of varchar(5120)"
COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab"
COM_COMPONENTBUILDER_RIGHT_OF_TABS="Right of Tabs"
@ -8135,6 +8162,7 @@ COM_COMPONENTBUILDER_SELECT_A_SNIPPET="select a snippet"
COM_COMPONENTBUILDER_SELECT_BUILD_DATE="Select Build Date"
COM_COMPONENTBUILDER_SELECT_COMPONENT="Select Component"
COM_COMPONENTBUILDER_SELECT_EXTENSION="Select Extension"
COM_COMPONENTBUILDER_SELECT_GET_GROUP="Select Get Group"
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE="Select the component to compile"
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_SEARCH="Select the component to search"
COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_YOUR_WOULD_LIKE_TO_IMPORT="Select the component your would like to import."
@ -8531,6 +8559,8 @@ COM_COMPONENTBUILDER_SITE_VIEW_LOCK="Lock"
COM_COMPONENTBUILDER_SITE_VIEW_LOOP="Loop"
COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_DESCRIPTION="Select a main get"
COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL="Main Get"
COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_TITLEEDIT="Edit Main Get"
COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_TITLESELECT="Select Targetview"
COM_COMPONENTBUILDER_SITE_VIEW_MENU="Menu"
COM_COMPONENTBUILDER_SITE_VIEW_MENU_2="Menu 2"
COM_COMPONENTBUILDER_SITE_VIEW_MENU_3="Menu 3"
@ -8923,8 +8953,12 @@ COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE_IN_THE_COMPILER="S
COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_AS_PART_OF_THE_JOOMLA_CORE_NO_NEED_TO_CREATE_IT_IF_YOU_ARE_ADAPTING_IT_GIVE_IT_YOUR_OWN_UNIQUE_NAME="Sorry this validation rule name (%s) already exist as part of the Joomla core! No need to create it, if you are adapting it give it your own unique name."
COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYSTEM="Sorry this validation rule name (%s) already exist in your system!"
COM_COMPONENTBUILDER_SORTABLE="Sortable"
COM_COMPONENTBUILDER_SS_COULD_NOT_BE_CREATED_OR_FOUND_IN_REPOS="%s:%s could not be ::created:: or ::found:: in repo(%s)."
COM_COMPONENTBUILDER_SS_ENCOUNTERED_AN_ERROR_IN_REPOSBRBRBERROR_MESSAGEBBRS="%s:%s encountered an ::error:: in repo(%s).<br><br><b>Error Message</b>:<br>%s"
COM_COMPONENTBUILDER_SS_IS_NOT_APPROVED_AND_THEREFORE_NOT_LINKED_TO_ANY_REPOSITORY="%s:%s is not ::approved:: and therefore not ::linked:: to any repository."
COM_COMPONENTBUILDER_SS_S_COULD_NOT_BE_FOUND_AT_FULL_PATHS="%s:%s [%s] could not be ::found:: at full path:%s."
COM_COMPONENTBUILDER_SS_S_COULD_NOT_BE_LOADED_FROM_FULL_PATHS="%s:%s [%s] could not be ::loaded:: from full path:%s."
COM_COMPONENTBUILDER_START_A_SEARCH="Start a Search"
COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT="Still in development!"
COM_COMPONENTBUILDER_STOP_A_SEARCH="Stop a Search"
COM_COMPONENTBUILDER_SUBMENU="Submenu"
COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views"
@ -8960,13 +8994,16 @@ COM_COMPONENTBUILDER_SUPPORT_JOOMLA_COMPONENT_BUILDER_JCB_WITH_A_BFINANCIAL_DONA
COM_COMPONENTBUILDER_SZIP_COULD_NOT_BE_INSTALLED="%s.zip could not be installed!"
COM_COMPONENTBUILDER_SZIP_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="%s.zip was removed the from tmp folder during installation!"
COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported"
COM_COMPONENTBUILDER_S_HAD_MISSING_VALUES_GUIDS_POINTER_S_VALUES_ENTITYS_TARGETS="%s had ::missing:: values [guid:%s, pointer: %s, value:%s, entity:%s, target:%s]."
COM_COMPONENTBUILDER_S_ITEM_S_DETAILS_IN_REPOS_DID_NOT_CHANGE_SO_NO_UPDATE_WAS_MADE="%s item [%s] details in repo(%s) did not change, so no update was made."
COM_COMPONENTBUILDER_S_ITEM_S_DETAILS_IN_REPOS_FAILED_TO_UPDATE="%s item [%s] details in repo(%s) failed to update."
COM_COMPONENTBUILDER_S_ITEM_S_ID_S_COULD_NOT_BE_CREATED_OR_FOUND_IN_REPOS="%s item [%s] id [%s] could not be ::created:: or ::found:: in repo(%s)."
COM_COMPONENTBUILDER_S_ITEM_S_ID_S_ENCOUNTERED_AN_ERROR_IN_REPOSBRERROR_MESSAGEBRS="%s item [%s] id [%s] encountered an ::error:: in repo(%s).<br>Error Message:<br>%s"
COM_COMPONENTBUILDER_S_ITEM_S_ID_S_IS_NOT_APPROVED_AND_THEREFORE_NOT_LINKED_TO_ANY_REPOSITORY="%s item [%s] id [%s] is not ::approved:: and therefore not ::linked:: to any repository."
COM_COMPONENTBUILDER_S_ITEM_S_ID_S_MISSING_THE_S_KEY_VALUE="%s item [%s] id [%s] missing the ::%s:: key value."
COM_COMPONENTBUILDER_S_NOT_LINKED="%s Not Linked"
COM_COMPONENTBUILDER_S_PLEASE_WAIT="%s, please wait!"
COM_COMPONENTBUILDER_S_S_BEEN_PUSHED_SUCCESSFULLY="%s %s been pushed successfully."
COM_COMPONENTBUILDER_S_S_NUMBER_BSB_COULD_NOT_BE_DOWNLOADED_SUCCESSFULLY_TO_THIS_JOOMLA_INSTALL="%s (%s) number <b>%s</b> could not be downloaded successfully to this Joomla Install!"
COM_COMPONENTBUILDER_S_WE_DETECTED_A_CHANGE_IN_BEXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_CHANGE_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected a change in <b>EXTERNALCODE</b>, but you do not have permission to allow this change so <b>%s</b> was removed from the compilation. Please contact your system administrator for more info!<br /><small>(admin access required)</small>"
COM_COMPONENTBUILDER_S_WE_DETECTED_BNEW_EXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_NEW_CODESTRING_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOU_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected <b>NEW EXTERNALCODE</b>, but you do not have permission to allow this new code/string so <b>%s</b> was removed from the compilation. Please contact you system administrator for more info!<br /><small>(admin access required)</small>"
@ -9101,23 +9138,59 @@ COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN="There has been an
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info."
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_UPLOADING_TO_THE_SERVER="There was an error uploading to the server."
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
COM_COMPONENTBUILDER_THESE_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Admin Views have successfully been pushed."
COM_COMPONENTBUILDER_THESE_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET="These Admin Views have successfully been reset."
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free."
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
COM_COMPONENTBUILDER_THESE_CLASS_EXTENDINGS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Class Extendings have successfully been pushed."
COM_COMPONENTBUILDER_THESE_CLASS_EXTENDINGS_HAVE_SUCCESSFULLY_BEEN_RESET="These Class Extendings have successfully been reset."
COM_COMPONENTBUILDER_THESE_CLASS_METHODS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Class Methods have successfully been pushed."
COM_COMPONENTBUILDER_THESE_CLASS_METHODS_HAVE_SUCCESSFULLY_BEEN_RESET="These Class Methods have successfully been reset."
COM_COMPONENTBUILDER_THESE_CLASS_PROPERTIES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Class Properties have successfully been pushed."
COM_COMPONENTBUILDER_THESE_CLASS_PROPERTIES_HAVE_SUCCESSFULLY_BEEN_RESET="These Class Properties have successfully been reset."
COM_COMPONENTBUILDER_THESE_CUSTOM_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Custom Admin Views have successfully been pushed."
COM_COMPONENTBUILDER_THESE_CUSTOM_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET="These Custom Admin Views have successfully been reset."
COM_COMPONENTBUILDER_THESE_CUSTOM_CODES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Custom Codes have successfully been pushed."
COM_COMPONENTBUILDER_THESE_CUSTOM_CODES_HAVE_SUCCESSFULLY_BEEN_RESET="These Custom Codes have successfully been reset."
COM_COMPONENTBUILDER_THESE_DYNAMIC_GETS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Dynamic Gets have successfully been pushed."
COM_COMPONENTBUILDER_THESE_DYNAMIC_GETS_HAVE_SUCCESSFULLY_BEEN_RESET="These Dynamic Gets have successfully been reset."
COM_COMPONENTBUILDER_THESE_FIELDS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Fields have successfully been pushed."
COM_COMPONENTBUILDER_THESE_FIELDS_HAVE_SUCCESSFULLY_BEEN_RESET="These Fields have successfully been reset."
COM_COMPONENTBUILDER_THESE_ITEMS_COULD_NOT_BE_FOUND_IN_THE_REMOTE_REPOSITORY_AND_WERE_NOT_INITIALIZED="These items could not be found in the remote repository and were not initialized:"
COM_COMPONENTBUILDER_THESE_ITEMS_WERE_ALREADY_PRESENT_LOCALLY_AND_WERE_NOT_INITIALIZED="These items were already present locally and were not initialized:"
COM_COMPONENTBUILDER_THESE_ITEMS_WERE_SUCCESSFULLY_INITIALIZED="These items were successfully initialized:"
COM_COMPONENTBUILDER_THESE_JOOMLA_COMPONENTS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla Components have successfully been pushed."
COM_COMPONENTBUILDER_THESE_JOOMLA_COMPONENTS_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla Components have successfully been reset."
COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla Field Types have successfully been pushed."
COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla Field Types have successfully been reset."
COM_COMPONENTBUILDER_THESE_JOOMLA_MODULES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla Modules have successfully been pushed."
COM_COMPONENTBUILDER_THESE_JOOMLA_MODULES_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla Modules have successfully been reset."
COM_COMPONENTBUILDER_THESE_JOOMLA_PLUGINS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla Plugins have successfully been pushed."
COM_COMPONENTBUILDER_THESE_JOOMLA_PLUGINS_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla Plugins have successfully been reset."
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla Powers have successfully been pushed."
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla Powers have successfully been reset."
COM_COMPONENTBUILDER_THESE_LAYOUTS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Layouts have successfully been pushed."
COM_COMPONENTBUILDER_THESE_LAYOUTS_HAVE_SUCCESSFULLY_BEEN_RESET="These Layouts have successfully been reset."
COM_COMPONENTBUILDER_THESE_LIBRARIES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Libraries have successfully been pushed."
COM_COMPONENTBUILDER_THESE_LIBRARIES_HAVE_SUCCESSFULLY_BEEN_RESET="These Libraries have successfully been reset."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
COM_COMPONENTBUILDER_THESE_PLACEHOLDERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Placeholders have successfully been pushed."
COM_COMPONENTBUILDER_THESE_PLACEHOLDERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Placeholders have successfully been reset."
COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Powers have successfully been pushed."
COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Powers have successfully been reset."
COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Site Views have successfully been pushed."
COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET="These Site Views have successfully been reset."
COM_COMPONENTBUILDER_THESE_SNIPPETS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Snippets have successfully been pushed."
COM_COMPONENTBUILDER_THESE_SNIPPETS_HAVE_SUCCESSFULLY_BEEN_RESET="These Snippets have successfully been reset."
COM_COMPONENTBUILDER_THESE_TEMPLATES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Templates have successfully been pushed."
COM_COMPONENTBUILDER_THESE_TEMPLATES_HAVE_SUCCESSFULLY_BEEN_RESET="These Templates have successfully been reset."
COM_COMPONENTBUILDER_THE_ADMIN_CUSTOM_TABS="The admin custom tabs"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS="The admin fields relations"
COM_COMPONENTBUILDER_THE_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_PUSHED="The Admin View has successfully been pushed."
COM_COMPONENTBUILDER_THE_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_RESET="The Admin View has successfully been reset."
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
COM_COMPONENTBUILDER_THE_BMULTI_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_MORE_THEN_ONE_VALUE_IN_THIS_FILTERFIELD_PLEASE_NOTE_THAT_THIS_OPTION_BONLY_WORKSB_WITH_THE_BNEWB_FILTERS_THAT_LOAD_ABOVE_THE_ADMIN_LIST_VIEW_YOU_CAN_SELECT_THE_NEW_FILTER_OPTION_WHENWHERE_YOU_ADD_THE_VIEW_TO_THE_COMPONENT="The <b>multi filter</b> selection option allows the user to select more then one value in this filter/field. Please note that this option <b>only works</b> with the <b>new</b> filters that load above the admin list view. You can select the new filter option when/where you add the view to the component."
COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE="The <b>None DB</b> option will remove this field from being saved in the database."
@ -9135,6 +9208,12 @@ COM_COMPONENTBUILDER_THE_BSB_RETURNED_AN_INVALID_STRING="The <b>%s</b> returned
COM_COMPONENTBUILDER_THE_BSB_VALUE_FOR_THE_DYNAMIC_DASHBOARD_IS_INVALID="The <b>%s</b> value for the dynamic dashboard is invalid."
COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED="The <b>Show in All List Views</b> option will Add this field to all list views, admin &amp; linked."
COM_COMPONENTBUILDER_THE_BSINGLE_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_JUST_ONE_VALUE_IN_THIS_FILTERFIELD="The <b>single filter</b> selection option allows the user to select just one value in this filter/field."
COM_COMPONENTBUILDER_THE_CLASS_EXTENDS_HAS_SUCCESSFULLY_BEEN_PUSHED="The Class Extends has successfully been pushed."
COM_COMPONENTBUILDER_THE_CLASS_EXTENDS_HAS_SUCCESSFULLY_BEEN_RESET="The Class Extends has successfully been reset."
COM_COMPONENTBUILDER_THE_CLASS_METHOD_HAS_SUCCESSFULLY_BEEN_PUSHED="The Class Method has successfully been pushed."
COM_COMPONENTBUILDER_THE_CLASS_METHOD_HAS_SUCCESSFULLY_BEEN_RESET="The Class Method has successfully been reset."
COM_COMPONENTBUILDER_THE_CLASS_PROPERTY_HAS_SUCCESSFULLY_BEEN_PUSHED="The Class Property has successfully been pushed."
COM_COMPONENTBUILDER_THE_CLASS_PROPERTY_HAS_SUCCESSFULLY_BEEN_RESET="The Class Property has successfully been reset."
COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_ADDED_FOR_THE_BFIRST_TIMEB_PLEASE_IINVESTIGATEI_TO_ENSURE_THE_CORRECT_CODESTRING_WAS_USED_BSHOULD_YOU_NOT_KNOW_ABOUT_THIS_NEW_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_DANGER_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB="The code/string from <b>%s</b> has been added for the <b>first time</b>. Please <i>investigate</i> to ensure the correct code/string was used! <b>Should you not know about this NEW external code/string being added, then this is a serious danger! and requires immediate attention!</b> Do not ignore this warning as it will only show <b>once</b>."
COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_BCHANGEDB_SINCE_THE_LAST_COMPILATION_PLEASE_INVESTIGATE_TO_ENSURE_THE_CHANGES_ARE_SAFE_BSHOULD_YOU_NOT_EXPECT_THIS_CHANGE_TO_THE_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_ISSUE_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB="The code/string from <b>%s</b> has been <b>changed</b> since the last compilation. Please investigate to ensure the changes are safe! <b>Should you not expect this change to the external code/string being added, then this is a serious issue! and requires immediate attention!</b> Do not ignore this warning as it will only show <b>once</b>."
COM_COMPONENTBUILDER_THE_COMPONENT="The Component"
@ -9153,17 +9232,36 @@ COM_COMPONENTBUILDER_THE_COMPONENT_SITE_ROUTER="The component site router"
COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views"
COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates"
COM_COMPONENTBUILDER_THE_CONTINUED_SUPPORT_OF_INDIVIDUALS_LIKE_YOU_HAS_ALLOWED_JOOMLA_COMPONENT_BUILDER_JCB_TO_THRIVE_FOR_SEVEN_YEARS_SINCE_GOING_PUBLIC_YOUR_CONTRIBUTIONS_HAVE_BEEN_CRUCIAL_IN_ENSURING_THE_GROWTH_AND_RELEVANCE_OF_THIS_VITAL_TOOL_FOR_PHP_PROGRAMMERS_THANK_YOU_FOR_YOUR_SUPPORT_AND_FOR_BEING_A_PART_OF_JCBS_JOURNEY="The continued support of individuals like you has allowed Joomla Component Builder (JCB) to thrive for seven years since going public. Your contributions have been crucial in ensuring the growth and relevance of this vital tool for PHP programmers. Thank you for your support and for being a part of JCB's journey."
COM_COMPONENTBUILDER_THE_CUSTOM_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_PUSHED="The Custom Admin View has successfully been pushed."
COM_COMPONENTBUILDER_THE_CUSTOM_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_RESET="The Custom Admin View has successfully been reset."
COM_COMPONENTBUILDER_THE_CUSTOM_CODE_HAS_SUCCESSFULLY_BEEN_PUSHED="The Custom Code has successfully been pushed."
COM_COMPONENTBUILDER_THE_CUSTOM_CODE_HAS_SUCCESSFULLY_BEEN_RESET="The Custom Code has successfully been reset."
COM_COMPONENTBUILDER_THE_DYNAMIC_GET_HAS_SUCCESSFULLY_BEEN_PUSHED="The Dynamic Get has successfully been pushed."
COM_COMPONENTBUILDER_THE_DYNAMIC_GET_HAS_SUCCESSFULLY_BEEN_RESET="The Dynamic Get has successfully been reset."
COM_COMPONENTBUILDER_THE_FIELD_HAS_SUCCESSFULLY_BEEN_PUSHED="The Field has successfully been pushed."
COM_COMPONENTBUILDER_THE_FIELD_HAS_SUCCESSFULLY_BEEN_RESET="The Field has successfully been reset."
COM_COMPONENTBUILDER_THE_FILE_PATH_BSB_DOES_NOT_EXIST_AND_WAS_NOT_ADDED="The file path: <b>%s</b> does not exist, and was not added!"
COM_COMPONENTBUILDER_THE_FOLDER_PATH_BSB_DOES_NOT_EXIST_AND_WAS_NOT_ADDED="The folder path: <b>%s</b> does not exist, and was not added!"
COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP connection for <b>%s</b> could not be made. Please check your signature details!"
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
COM_COMPONENTBUILDER_THE_INITIALIZATION_FAILED_PLEASE_TRY_AGAIN="The initialization failed, please try again."
COM_COMPONENTBUILDER_THE_JOOMLA_COMPONENT_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla Component has successfully been pushed."
COM_COMPONENTBUILDER_THE_JOOMLA_COMPONENT_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla Component has successfully been reset."
COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla Field Type has successfully been pushed."
COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla Field Type has successfully been reset."
COM_COMPONENTBUILDER_THE_JOOMLA_MODULE_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla Module has successfully been pushed."
COM_COMPONENTBUILDER_THE_JOOMLA_MODULE_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla Module has successfully been reset."
COM_COMPONENTBUILDER_THE_JOOMLA_PLUGIN_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla Plugin has successfully been pushed."
COM_COMPONENTBUILDER_THE_JOOMLA_PLUGIN_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla Plugin has successfully been reset."
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla Power has successfully been pushed."
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla Power has successfully been reset."
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
COM_COMPONENTBUILDER_THE_LAYOUT_HAS_SUCCESSFULLY_BEEN_PUSHED="The Layout has successfully been pushed."
COM_COMPONENTBUILDER_THE_LAYOUT_HAS_SUCCESSFULLY_BEEN_RESET="The Layout has successfully been reset."
COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields"
COM_COMPONENTBUILDER_THE_LIBRARY_FILES_FOLDERS_URLS="The library files, folders & URLs"
COM_COMPONENTBUILDER_THE_LIBRARY_HAS_SUCCESSFULLY_BEEN_PUSHED="The Library has successfully been pushed."
COM_COMPONENTBUILDER_THE_LIBRARY_HAS_SUCCESSFULLY_BEEN_RESET="The Library has successfully been reset."
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_DETAILS_ARE_CORRECT="The login to <b>%s</b> has failed, please check that your details are correct!"
COM_COMPONENTBUILDER_THE_MODULE_FILES_FOLDERS="The module files & folders"
COM_COMPONENTBUILDER_THE_MODULE_UPDATES="The module updates"
@ -9171,6 +9269,8 @@ COM_COMPONENTBUILDER_THE_NAME_OF_THIS_LIBRARY_BSB_CAN_NOT_BE_CHANGED_TO_BSB_OR_T
COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
COM_COMPONENTBUILDER_THE_OPTION_TO_ADD_A_DYNAMIC_BUTTON_IS_NOT_AVAILABLE_IN_BOWN_CUSTOM_FIELD_TYPESB_YOU_WILL_HAVE_TO_CUSTOM_CODE_IT="The option to add a dynamic button is not available in <b>own custom field types</b>, you will have to custom code it."
COM_COMPONENTBUILDER_THE_PHP_TEMPORARY_FOLDER_IS_NOT_SET="The PHP temporary folder is not set."
COM_COMPONENTBUILDER_THE_PLACEHOLDER_HAS_SUCCESSFULLY_BEEN_PUSHED="The Placeholder has successfully been pushed."
COM_COMPONENTBUILDER_THE_PLACEHOLDER_HAS_SUCCESSFULLY_BEEN_RESET="The Placeholder has successfully been reset."
COM_COMPONENTBUILDER_THE_PLUGIN_FILES_FOLDERS="The plugin files & folders"
COM_COMPONENTBUILDER_THE_PLUGIN_UPDATES="The plugin updates"
COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED="The power has successfully been pushed."
@ -9180,26 +9280,173 @@ COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVE
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_COULD_NOT_BE_COMPLETED="The push of these Joomla Field Types could not be completed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_COULD_NOT_BE_COMPLETED="The push of these Joomla Powers could not be completed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_POWERS_COULD_NOT_BE_COMPLETED="The push of these Powers could not be completed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_FAILED="The push of this Admin Views has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Admin Views has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEW_HAS_FAILED="The push of this Admin View has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The push of this Admin View has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDINGS_HAS_FAILED="The push of this Class Extendings has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDINGS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Class Extendings has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDS_HAS_FAILED="The push of this Class Extends has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Class Extends has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHODS_HAS_FAILED="The push of this Class Methods has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHODS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Class Methods has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHOD_HAS_FAILED="The push of this Class Method has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHOD_HAS_NOT_BEEN_SUCCESSFUL="The push of this Class Method has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTIES_HAS_FAILED="The push of this Class Properties has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTIES_HAS_NOT_BEEN_SUCCESSFUL="The push of this Class Properties has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTY_HAS_FAILED="The push of this Class Property has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTY_HAS_NOT_BEEN_SUCCESSFUL="The push of this Class Property has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEWS_HAS_FAILED="The push of this Custom Admin Views has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Custom Admin Views has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_FAILED="The push of this Custom Admin View has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The push of this Custom Admin View has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODES_HAS_FAILED="The push of this Custom Codes has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODES_HAS_NOT_BEEN_SUCCESSFUL="The push of this Custom Codes has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODE_HAS_FAILED="The push of this Custom Code has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODE_HAS_NOT_BEEN_SUCCESSFUL="The push of this Custom Code has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GETS_HAS_FAILED="The push of this Dynamic Gets has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GETS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Dynamic Gets has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GET_HAS_FAILED="The push of this Dynamic Get has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GET_HAS_NOT_BEEN_SUCCESSFUL="The push of this Dynamic Get has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELDS_HAS_FAILED="The push of this Fields has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELDS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Fields has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELD_HAS_FAILED="The push of this Field has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELD_HAS_NOT_BEEN_SUCCESSFUL="The push of this Field has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENTS_HAS_FAILED="The push of this Joomla Components has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENTS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Joomla Components has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENT_HAS_FAILED="The push of this Joomla Component has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENT_HAS_NOT_BEEN_SUCCESSFUL="The push of this Joomla Component has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPES_HAS_FAILED="The push of this Joomla Field Types has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPE_COULD_NOT_BE_COMPLETED="The push of this Joomla Field Type could not be completed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED="The push of this Joomla Field Type has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULES_HAS_FAILED="The push of this Joomla Modules has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULES_HAS_NOT_BEEN_SUCCESSFUL="The push of this Joomla Modules has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULE_HAS_FAILED="The push of this Joomla Module has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULE_HAS_NOT_BEEN_SUCCESSFUL="The push of this Joomla Module has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGINS_HAS_FAILED="The push of this Joomla Plugins has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGINS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Joomla Plugins has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGIN_HAS_FAILED="The push of this Joomla Plugin has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGIN_HAS_NOT_BEEN_SUCCESSFUL="The push of this Joomla Plugin has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWERS_HAS_FAILED="The push of this Joomla Powers has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWER_COULD_NOT_BE_COMPLETED="The push of this Joomla Power could not be completed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWER_HAS_FAILED="The push of this Joomla Power has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUTS_HAS_FAILED="The push of this Layouts has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUTS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Layouts has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUT_HAS_FAILED="The push of this Layout has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUT_HAS_NOT_BEEN_SUCCESSFUL="The push of this Layout has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARIES_HAS_FAILED="The push of this Libraries has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARIES_HAS_NOT_BEEN_SUCCESSFUL="The push of this Libraries has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARY_HAS_FAILED="The push of this Library has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARY_HAS_NOT_BEEN_SUCCESSFUL="The push of this Library has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDERS_HAS_FAILED="The push of this Placeholders has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDERS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Placeholders has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDER_HAS_FAILED="The push of this Placeholder has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDER_HAS_NOT_BEEN_SUCCESSFUL="The push of this Placeholder has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWERS_HAS_FAILED="The push of this Powers has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWER_COULD_NOT_BE_COMPLETED="The push of this power could not be completed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWER_HAS_FAILED="The push of this power has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_FAILED="The push of this Site Views has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Site Views has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEW_HAS_FAILED="The push of this Site View has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The push of this Site View has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPETS_HAS_FAILED="The push of this Snippets has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPETS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Snippets has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPET_HAS_FAILED="The push of this Snippet has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPET_HAS_NOT_BEEN_SUCCESSFUL="The push of this Snippet has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATES_HAS_FAILED="The push of this Templates has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATES_HAS_NOT_BEEN_SUCCESSFUL="The push of this Templates has not been successful."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATE_HAS_FAILED="The push of this Template has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATE_HAS_NOT_BEEN_SUCCESSFUL="The push of this Template has not been successful."
COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading"
COM_COMPONENTBUILDER_THE_REPLACE_PROCESS_HAD_AN_ERROR_WITH_TABLE="The replace process had an error with table"
COM_COMPONENTBUILDER_THE_REPO_INDEX_FAILED_TO_LOAD_PLEASE_TRY_AGAIN="The repo index failed to load, please try again."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_ADMIN_VIEWS_HAS_FAILED="The reset of these Admin Views has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_EXTENDINGS_HAS_FAILED="The reset of these Class Extendings has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_METHODS_HAS_FAILED="The reset of these Class Methods has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_PROPERTIES_HAS_FAILED="The reset of these Class Properties has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CUSTOM_ADMIN_VIEWS_HAS_FAILED="The reset of these Custom Admin Views has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CUSTOM_CODES_HAS_FAILED="The reset of these Custom Codes has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_DYNAMIC_GETS_HAS_FAILED="The reset of these Dynamic Gets has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_FIELDS_HAS_FAILED="The reset of these Fields has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_COMPONENTS_HAS_FAILED="The reset of these Joomla Components has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED="The reset of these Joomla Field Types has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_MODULES_HAS_FAILED="The reset of these Joomla Modules has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_PLUGINS_HAS_FAILED="The reset of these Joomla Plugins has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The reset of these Joomla Powers has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_LAYOUTS_HAS_FAILED="The reset of these Layouts has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_LIBRARIES_HAS_FAILED="The reset of these Libraries has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_PLACEHOLDERS_HAS_FAILED="The reset of these Placeholders has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED="The reset of these Powers has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SITE_VIEWS_HAS_FAILED="The reset of these Site Views has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SNIPPETS_HAS_FAILED="The reset of these Snippets has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_TEMPLATES_HAS_FAILED="The reset of these Templates has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Admin Views has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_ADMIN_VIEW_HAS_FAILED="The reset of this Admin View has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Admin View has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_EXTENDINGS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Class Extendings has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_EXTENDS_HAS_FAILED="The reset of this Class Extends has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_EXTENDS_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Class Extends has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_METHODS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Class Methods has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_METHOD_HAS_FAILED="The reset of this Class Method has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_METHOD_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Class Method has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_PROPERTIES_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Class Properties has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_PROPERTY_HAS_FAILED="The reset of this Class Property has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_PROPERTY_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Class Property has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Custom Admin Views has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_FAILED="The reset of this Custom Admin View has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Custom Admin View has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_CODES_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Custom Codes has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_CODE_HAS_FAILED="The reset of this Custom Code has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_CODE_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Custom Code has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_DYNAMIC_GETS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Dynamic Gets has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_DYNAMIC_GET_HAS_FAILED="The reset of this Dynamic Get has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_DYNAMIC_GET_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Dynamic Get has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_FIELDS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Fields has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_FIELD_HAS_FAILED="The reset of this Field has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_FIELD_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Field has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_COMPONENTS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Joomla Components has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_COMPONENT_HAS_FAILED="The reset of this Joomla Component has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_COMPONENT_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Joomla Component has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED="The reset of this Joomla Field Type has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_MODULES_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Joomla Modules has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_MODULE_HAS_FAILED="The reset of this Joomla Module has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_MODULE_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Joomla Module has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_PLUGINS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Joomla Plugins has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_PLUGIN_HAS_FAILED="The reset of this Joomla Plugin has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_PLUGIN_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Joomla Plugin has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED="The reset of this Joomla Power has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LAYOUTS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Layouts has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LAYOUT_HAS_FAILED="The reset of this Layout has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LAYOUT_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Layout has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LIBRARIES_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Libraries has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LIBRARY_HAS_FAILED="The reset of this Library has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LIBRARY_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Library has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDERS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Placeholders has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_FAILED="The reset of this Placeholder has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Placeholder has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_POWER_HAS_FAILED="The reset of this power has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Site Views has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_FAILED="The reset of this Site View has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Site View has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SNIPPETS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Snippets has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SNIPPET_HAS_FAILED="The reset of this Snippet has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SNIPPET_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Snippet has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_TEMPLATES_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Templates has not been successful."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_TEMPLATE_HAS_FAILED="The reset of this Template has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_TEMPLATE_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Template has not been successful."
COM_COMPONENTBUILDER_THE_SEARCH_PROCESS_HAD_AN_ERROR_WITH_TABLE="The search process had an error with table"
COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for <b>(ID: %s)</b> could not be retrieved!"
COM_COMPONENTBUILDER_THE_SITE_VIEW_HAS_SUCCESSFULLY_BEEN_PUSHED="The Site View has successfully been pushed."
COM_COMPONENTBUILDER_THE_SITE_VIEW_HAS_SUCCESSFULLY_BEEN_RESET="The Site View has successfully been reset."
COM_COMPONENTBUILDER_THE_SNIPPET_HAS_SUCCESSFULLY_BEEN_PUSHED="The Snippet has successfully been pushed."
COM_COMPONENTBUILDER_THE_SNIPPET_HAS_SUCCESSFULLY_BEEN_RESET="The Snippet has successfully been reset."
COM_COMPONENTBUILDER_THE_S_ITEMS_COULD_NOT_BE_FOUND="The %s item(s) could not be found."
COM_COMPONENTBUILDER_THE_S_ITEMS_DID_NOT_RESET="The %s item:%s did not reset."
COM_COMPONENTBUILDER_THE_S_ITEMS_S_COULD_NOT_BE_STORED_LOCALLY="The %s item:%s [%s] could not be stored locally."
COM_COMPONENTBUILDER_THE_S_ITEMS_WAS_RESET="The %s item(s) was reset."
COM_COMPONENTBUILDER_THE_S_S_RESET="The %s %s reset."
COM_COMPONENTBUILDER_THE_TEMPLATE_HAS_SUCCESSFULLY_BEEN_PUSHED="The Template has successfully been pushed."
COM_COMPONENTBUILDER_THE_TEMPLATE_HAS_SUCCESSFULLY_BEEN_RESET="The Template has successfully been reset."
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DID_NOT_RETURN_S_DATA="The url (%s) set to retrieve the packages did not return %s data!"
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DID_NOT_RETURN_VALID_DATA="The url (%s) set to retrieve the packages did not return valid data!"
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
@ -9418,20 +9665,70 @@ COM_COMPONENTBUILDER_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOM
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSIONS_TO_UPLOAD_S="You do not have permissions to upload (%s)."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (<b>%s - denied</b>), please contact your system administrator for more info."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_DOWNLOAD_THE_COMPILER_ANIMATIONS="You do not have permission to download the compiler animations!"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_ADMIN_VIEWS="You do not have permission to initialize Admin Views"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CLASS_EXTENDINGS="You do not have permission to initialize Class Extendings"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CLASS_METHODS="You do not have permission to initialize Class Methods"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CLASS_PROPERTIES="You do not have permission to initialize Class Properties"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CUSTOM_ADMIN_VIEWS="You do not have permission to initialize Custom Admin Views"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CUSTOM_CODES="You do not have permission to initialize Custom Codes"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_DYNAMIC_GETS="You do not have permission to initialize Dynamic Gets"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_FIELDS="You do not have permission to initialize Fields"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_COMPONENTS="You do not have permission to initialize Joomla Components"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_FIELD_TYPES="You do not have permission to initialize Joomla Field Types"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_MODULES="You do not have permission to initialize Joomla Modules"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_PLUGINS="You do not have permission to initialize Joomla Plugins"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_POWERS="You do not have permission to initialize Joomla Powers"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_LAYOUTS="You do not have permission to initialize Layouts"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_LIBRARIES="You do not have permission to initialize Libraries"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_PLACEHOLDERS="You do not have permission to initialize Placeholders"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_POWERS="You do not have permission to initialize Powers"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SITE_VIEWS="You do not have permission to initialize Site Views"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SNIPPETS="You do not have permission to initialize Snippets"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_TEMPLATES="You do not have permission to initialize Templates"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THESE_EXTENSIONS="You do not have permission to install these extensions!"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_COMPONENT="You do not have permission to install the component!"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_MODULE="You do not have permission to install the module!"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_PLUGIN="You do not have permission to install the plugin!"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_ADMIN_VIEW="You do not have permission to push this Admin View"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CLASS_EXTENDS="You do not have permission to push this Class Extends"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CLASS_METHOD="You do not have permission to push this Class Method"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CLASS_PROPERTY="You do not have permission to push this Class Property"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CUSTOM_ADMIN_VIEW="You do not have permission to push this Custom Admin View"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CUSTOM_CODE="You do not have permission to push this Custom Code"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_DYNAMIC_GET="You do not have permission to push this Dynamic Get"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_FIELD="You do not have permission to push this Field"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_COMPONENT="You do not have permission to push this Joomla Component"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_FIELD_TYPE="You do not have permission to push this Joomla Field Type"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_MODULE="You do not have permission to push this Joomla Module"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_PLUGIN="You do not have permission to push this Joomla Plugin"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_POWER="You do not have permission to push this Joomla Power"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_LAYOUT="You do not have permission to push this Layout"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_LIBRARY="You do not have permission to push this Library"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_PLACEHOLDER="You do not have permission to push this Placeholder"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_POWER="You do not have permission to push this power"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SITE_VIEW="You do not have permission to push this Site View"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SNIPPET="You do not have permission to push this Snippet"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_TEMPLATE="You do not have permission to push this Template"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_ADMIN_VIEW="You do not have permission to reset this Admin View"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CLASS_EXTENDS="You do not have permission to reset this Class Extends"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CLASS_METHOD="You do not have permission to reset this Class Method"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CLASS_PROPERTY="You do not have permission to reset this Class Property"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CUSTOM_ADMIN_VIEW="You do not have permission to reset this Custom Admin View"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CUSTOM_CODE="You do not have permission to reset this Custom Code"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_DYNAMIC_GET="You do not have permission to reset this Dynamic Get"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_FIELD="You do not have permission to reset this Field"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_COMPONENT="You do not have permission to reset this Joomla Component"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_FIELD_TYPE="You do not have permission to reset this Joomla Field Type"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_MODULE="You do not have permission to reset this Joomla Module"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_PLUGIN="You do not have permission to reset this Joomla Plugin"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_POWER="You do not have permission to reset this Joomla Power"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_LAYOUT="You do not have permission to reset this Layout"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_LIBRARY="You do not have permission to reset this Library"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_PLACEHOLDER="You do not have permission to reset this Placeholder"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_POWER="You do not have permission to reset this power"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE="You do not have permission to run the get boilerplate module!"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SITE_VIEW="You do not have permission to reset this Site View"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SNIPPET="You do not have permission to reset this Snippet"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_TEMPLATE="You do not have permission to reset this Template"
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THAN_S_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more than %s %s is considered bad practice."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THAN_S_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOW_DOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S="You have %s %s. Adding more than %s %s is considered bad practice. Your %s page load in JCB will slow down. You should consider decoupling some of these %s."
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME="You must add an unique function name."
@ -9439,9 +9736,26 @@ COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_PLACEHOLDER="You must add an unique
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME="You must add an unique validation rule name."
COM_COMPONENTBUILDER_YOU_MUST_ENABLE_THE_BTIDYB_EXTENSION_IN_YOUR_PHPINI_FILE_SO_WE_CAN_TIDY_UP_YOUR_XML_IF_YOU_NEED_HELP_PLEASE_A_SSTART_HEREA="You must enable the <b>Tidy</b> extension in your php.ini file so we can tidy up your xml! If you need help please <a %s>start here</a>!"
COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE="You must first link an admin or a custom admin view to this component, then you can select it here"
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_ADMIN_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Admin View, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_EXTENDS_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Class Extends, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_METHOD_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Class Method, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_PROPERTY_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Class Property, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CUSTOM_ADMIN_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Custom Admin View, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CUSTOM_CODE_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Custom Code, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_DYNAMIC_GET_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Dynamic Get, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_FIELD_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Field, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_COMPONENT_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla Component, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla Field Type, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_MODULE_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla Module, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_PLUGIN_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla Plugin, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla Power, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LAYOUT_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Layout, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LIBRARY_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Library, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_PLACEHOLDER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Placeholder, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the power, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SITE_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Site View, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SNIPPET_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Snippet, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_TEMPLATE_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Template, before you can use this feature."
COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT="You must select a component!"
COM_COMPONENTBUILDER_YOU_SHOULD_ONLY_CONTINUE_THIS_IMPORT_IF_YOU_HAVE_BACKUP_YOUR_COMPONENTS_AND_INSURED_THAT_THE_PACKAGE_OWNER_IS_REPUTABLE="You should only continue this import if you have backup your components, and insured that the package owner is reputable."
COM_COMPONENTBUILDER_YOU_WILL_REPLACE="You will replace"

View File

@ -129,6 +129,12 @@ COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE="Class Extendings Edit State"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class extends"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION="Class Extendings Edit Version"
COM_COMPONENTBUILDER_CLASS_EXTENDINGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version class extendings"
COM_COMPONENTBUILDER_CLASS_EXTENDS_INIT_BUTTON_ACCESS="Class Extends Init Button Access"
COM_COMPONENTBUILDER_CLASS_EXTENDS_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_CLASS_EXTENDS_PUSH_BUTTON_ACCESS="Class Extends Push Button Access"
COM_COMPONENTBUILDER_CLASS_EXTENDS_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_CLASS_EXTENDS_RESET_BUTTON_ACCESS="Class Extends Reset Button Access"
COM_COMPONENTBUILDER_CLASS_EXTENDS_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS="Class Methods Access"
COM_COMPONENTBUILDER_CLASS_METHODS_ACCESS_DESC="Allows the users in this group to access access class methods"
COM_COMPONENTBUILDER_CLASS_METHODS_BATCH_USE="Class Methods Batch Use"
@ -149,6 +155,12 @@ COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE="Class Methods Edit State"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_STATE_DESC="Allows the users in this group to update the state of the class method"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION="Class Methods Edit Version"
COM_COMPONENTBUILDER_CLASS_METHODS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version class methods"
COM_COMPONENTBUILDER_CLASS_METHOD_INIT_BUTTON_ACCESS="Class Method Init Button Access"
COM_COMPONENTBUILDER_CLASS_METHOD_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_CLASS_METHOD_PUSH_BUTTON_ACCESS="Class Method Push Button Access"
COM_COMPONENTBUILDER_CLASS_METHOD_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_CLASS_METHOD_RESET_BUTTON_ACCESS="Class Method Reset Button Access"
COM_COMPONENTBUILDER_CLASS_METHOD_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS="Class Properties Access"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_ACCESS_DESC="Allows the users in this group to access access class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_BATCH_USE="Class Properties Batch Use"
@ -169,6 +181,12 @@ COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE="Class Properties Edit State"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the class property"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION="Class Properties Edit Version"
COM_COMPONENTBUILDER_CLASS_PROPERTIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version class properties"
COM_COMPONENTBUILDER_CLASS_PROPERTY_INIT_BUTTON_ACCESS="Class Property Init Button Access"
COM_COMPONENTBUILDER_CLASS_PROPERTY_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUSH_BUTTON_ACCESS="Class Property Push Button Access"
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_CLASS_PROPERTY_RESET_BUTTON_ACCESS="Class Property Reset Button Access"
COM_COMPONENTBUILDER_CLASS_PROPERTY_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access"
COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC="Allows the users in this group to access compiler."
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access"
@ -700,6 +718,12 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_STATE="Joomla Modules Updates E
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla module updates"
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION="Joomla Modules Updates Edit Version"
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version joomla modules updates"
COM_COMPONENTBUILDER_JOOMLA_MODULE_INIT_BUTTON_ACCESS="Joomla Module Init Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_JOOMLA_MODULE_PUSH_BUTTON_ACCESS="Joomla Module Push Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_JOOMLA_MODULE_RESET_BUTTON_ACCESS="Joomla Module Reset Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS="Joomla Plugins Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC="Allows the users in this group to access access joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE="Joomla Plugins Batch Use"
@ -764,18 +788,18 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE="Joomla Plugins Updates E
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla plugin updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION="Joomla Plugins Updates Edit Version"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version joomla plugins updates"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS="Joomla Plugin Get Boilerplate Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GET_BOILERPLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the get boilerplate button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS="Joomla Plugin Groups Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_ACCESS_DESC="Allows the users in this group to access access joomla plugin groups"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE="Joomla Plugin Groups Batch Use"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch joomla plugin groups"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION="Joomla Plugin Groups Edit Version"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUPS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version joomla plugin groups"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS="Joomla Plugin Methods Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_METHODS_BUTTON_ACCESS_DESC="Allows the users in this group to access the methods button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS="Joomla Plugin Properties Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PROPERTIES_BUTTON_ACCESS_DESC="Allows the users in this group to access the properties button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_INIT_BUTTON_ACCESS="Joomla Plugin Init Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUSH_BUTTON_ACCESS="Joomla Plugin Push Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RESET_BUTTON_ACCESS="Joomla Plugin Reset Button Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGIN_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS="Joomla Powers Access"
COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC="Allows the users in this group to access access joomla powers"
COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE="Joomla Powers Batch Use"
@ -940,6 +964,9 @@ COM_COMPONENTBUILDER_LIBRARY_RESET_BUTTON_ACCESS="Library Reset Button Access"
COM_COMPONENTBUILDER_LIBRARY_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_MENU="&#10003 Component Builder"
COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views"
COM_COMPONENTBUILDER_MENU_CLASS_EXTENDINGS="Class Extendings"
COM_COMPONENTBUILDER_MENU_CLASS_METHODS="Class Methods"
COM_COMPONENTBUILDER_MENU_CLASS_PROPERTIES="Class Properties"
COM_COMPONENTBUILDER_MENU_COMPILER="Compiler"
COM_COMPONENTBUILDER_MENU_CUSTOM_ADMIN_VIEWS="Custom Admin Views"
COM_COMPONENTBUILDER_MENU_CUSTOM_CODES="Custom Codes"
@ -985,6 +1012,12 @@ COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION="Placeholders Edit Version"
COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version placeholders"
COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU="Placeholders Submenu"
COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC="Allows the users in this group to submenu of placeholder"
COM_COMPONENTBUILDER_PLACEHOLDER_INIT_BUTTON_ACCESS="Placeholder Init Button Access"
COM_COMPONENTBUILDER_PLACEHOLDER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_PLACEHOLDER_PUSH_BUTTON_ACCESS="Placeholder Push Button Access"
COM_COMPONENTBUILDER_PLACEHOLDER_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_PLACEHOLDER_RESET_BUTTON_ACCESS="Placeholder Reset Button Access"
COM_COMPONENTBUILDER_PLACEHOLDER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_POWERS_ACCESS="Powers Access"
COM_COMPONENTBUILDER_POWERS_ACCESS_DESC="Allows the users in this group to access access powers"
COM_COMPONENTBUILDER_POWERS_BATCH_USE="Powers Batch Use"

View File

@ -21,7 +21,7 @@ use Joomla\CMS\User\UserFactoryInterface;
defined('_JEXEC') or die;
// set the defaults
$items = $displayData->vxlfields;
$items = $displayData->vxifields;
$user = Factory::getApplication()->getIdentity();
$id = $displayData->item->id;
// set the edit URL

View File

@ -26,7 +26,6 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'spacer_hr_8',
'note_on_contributors',
'addcontributors',
'emptycontributors',

View File

@ -36,11 +36,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'spacer_hr_6',
'to_ignore_note',
'toignore',
'spacer_hr_7',
'jcb_export_package_note',
'export_key',
'joomla_source_link',
'export_buy_link'
'spacer_hr_7'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];

View File

@ -22,19 +22,18 @@ defined('JPATH_BASE') or die;
$table_id = $displayData['id'] ?? 'power_selection_table';
$headers = $displayData['headers'] ?? ['error'];
$default_items_number = 10;
$default_items_number = 13;
$unique_name = '';
?>
<?php echo LayoutHelper::render(
'table',
<?php echo LayoutHelper::render('table',
[
'id' => $table_id,
'table_class' => 'table table-striped',
'table_container_class' => 'power-selection-table-container',
'name' => Text::_('COM_COMPONENTBUILDER_MAKE_YOUR_SELECTION'),
'headers' => $headers,
'items' => 10,
'items' => [],
'default_items_number' => $default_items_number,
'init' => false
]
@ -59,20 +58,39 @@ document.addEventListener("DOMContentLoaded", function() {
columnDefs: [
{ 'targets': [ -1 ], 'visible': false, 'searchable': false },
{ responsivePriority: 1, targets: 1 },
{ responsivePriority: 2, targets: -3 }
{ responsivePriority: 2, targets: -4 }
],
columns: [<?php foreach($headers as $header): ?><?php if ($header === 'path'): ?>
{
data: 'path',
render: function(data, type) {
if (type === 'display') {
return '<a href="' + targetPowerRepoUrl + data + '" target="_blank">' + data + '</a>'
if (data !== '' && type === 'display') {
return '<a href="' + targetPowerRepoUrl + encodePath(data) + '" target="_blank">' + data + '</a>'
} else if (data === '' && type !== 'display') {
return 'zzzzzzzzzzzz';
}
return data;
}
},<?php elseif ($header === 'settings'): ?>
{
data: 'settings',
render: function(data, type) {
if (data !== '' && type === 'display') {
return '<a href="' + targetPowerRepoUrl + encodePath(data) + '" target="_blank">' + data + '</a>'
} else if (data === '' && type !== 'display') {
return 'zzzzzzzzzzzz';
}
return data;
}
},<?php else: ?>
{
data: '<?php echo $header; ?>'
data: '<?php echo $header; ?>',
render: function(data, type) {
if (data === '' && type !== 'display') {
return 'zzzzzzzzzzzz';
}
return data;
}
},<?php endif; ?><?php endforeach; ?>
],
createdRow: function(row, data, dataIndex) {
@ -121,11 +139,23 @@ function clearPowerSelectionTable<?php echo $unique_name; ?>() {
function buildPowerSelectionTable<?php echo $unique_name; ?>(items) {
let table = new jQuery.fn.dataTable.Api('#<?php echo $table_id; ?>');
// clear the table
table.clear();
// load the new items
table.clear().draw(true);
table.rows.add(getArrayFormat(items));
// Draw the table
let emptyRow = <?php echo json_encode(array_map(function($value) { return ''; }, array_flip($headers))); ?>;
let currentRowCount = table.rows().count();
let emptyRowsNeeded = <?php echo (int) $default_items_number; ?> - currentRowCount;
if (emptyRowsNeeded > 0) {
for(let i = 0; i < emptyRowsNeeded; i++) {
table.row.add(emptyRow);
}
}
table.draw(true);
}
function encodePath<?php echo $unique_name; ?>(path) {
return path
.split('/')
.map(encodeURIComponent)
.join('/');
}
</script>

View File

@ -29,7 +29,9 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'type',
'base',
'username',
'token'
'token',
'author_name',
'author_email'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_template`;
DROP TABLE IF EXISTS `#__componentbuilder_layout`;
DROP TABLE IF EXISTS `#__componentbuilder_dynamic_get`;
DROP TABLE IF EXISTS `#__componentbuilder_custom_code`;
DROP TABLE IF EXISTS `#__componentbuilder_class_extends`;
DROP TABLE IF EXISTS `#__componentbuilder_class_property`;
DROP TABLE IF EXISTS `#__componentbuilder_class_method`;
DROP TABLE IF EXISTS `#__componentbuilder_placeholder`;
@ -43,7 +44,6 @@ DROP TABLE IF EXISTS `#__componentbuilder_component_modules`;
DROP TABLE IF EXISTS `#__componentbuilder_snippet_type`;
DROP TABLE IF EXISTS `#__componentbuilder_library_config`;
DROP TABLE IF EXISTS `#__componentbuilder_library_files_folders_urls`;
DROP TABLE IF EXISTS `#__componentbuilder_class_extends`;
DROP TABLE IF EXISTS `#__componentbuilder_joomla_module_updates`;
DROP TABLE IF EXISTS `#__componentbuilder_joomla_module_files_folders_urls`;
DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin_group`;

View File

@ -0,0 +1 @@
ALTER TABLE `#__componentbuilder_repository` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

View File

@ -25,6 +25,7 @@ use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
use VDM\Joomla\Data\Factory as DataFactory;
// No direct access to this file
@ -138,6 +139,7 @@ class Admin_viewController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -147,21 +149,92 @@ class Admin_viewController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_ADMIN_VIEW') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('AdminView.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_ADMIN_VIEW_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_ADMIN_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('admin_view.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('admin_view', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_ADMIN_VIEW_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=admin_view'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -177,6 +250,7 @@ class Admin_viewController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -186,21 +260,92 @@ class Admin_viewController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_ADMIN_VIEW') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('AdminView.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_ADMIN_VIEW_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_ADMIN_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('admin_view.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('admin_view', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEW_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=admin_view'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class Admin_viewsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_ADMIN_VIEWS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_ADMIN_VIEWS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('admin_view.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=AdminView&target=Admin Views', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class Admin_viewsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_ADMIN_VIEWS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('admin_view.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('AdminView.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['admin_view'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('admin_view', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_ADMIN_VIEWS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class Admin_viewsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_ADMIN_VIEWS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('admin_view.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('AdminView.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['admin_view'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('admin_view', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -92,6 +92,7 @@ class AjaxController extends BaseController
$this->registerTask('setValue', 'ajax');
$this->registerTask('getRepoIndex', 'ajax');
$this->registerTask('initSelectedPowers', 'ajax');
$this->registerTask('initSelectedPackages', 'ajax');
}
/**
@ -2280,6 +2281,57 @@ class AjaxController extends BaseController
}
}
break;
case 'initSelectedPackages':
try
{
$repoValue = $jinput->get('repo', NULL, 'STRING');
$areaValue = $jinput->get('area', NULL, 'STRING');
$selectedValue = $jinput->get('selected', NULL, 'ARRAY');
if($repoValue && $user->id != 0 && $areaValue && $selectedValue)
{
$ajaxModule = $this->getModel('ajax', 'Administrator');
if ($ajaxModule)
{
$result = $ajaxModule->initSelectedPackages($repoValue, $areaValue, $selectedValue);
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
}
else
{
$result = ['error' => 'There was an error! [149]'];
}
if($callback)
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(\Exception $e)
{
if($callback)
{
echo $callback."(".json_encode($e).");";
}
elseif($returnRaw)
{
echo json_encode($e);
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
}
else

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -51,4 +52,273 @@ class Class_extendingsController extends AdminController
{
return parent::getModel($name, $prefix, $config);
}
/**
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CLASS_EXTENDINGS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('class_extends.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=ClassExtends&target=Class Extendings', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_extendings', false);
}
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Class Extendings.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Class Extendings.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Class Extendings.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_extendings', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('class_extends.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('ClassExtends.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['class_extends'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('class_extends', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CLASS_EXTENDINGS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_EXTENDINGS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_EXTENDINGS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_extendings', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_extendings', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Class Extendings.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Class Extendings.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Class Extendings.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_extendings', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('class_extends.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('ClassExtends.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['class_extends'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('class_extends', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CLASS_EXTENDINGS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDINGS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDINGS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_extendings', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_extendings', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,8 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -78,6 +80,273 @@ class Class_extendsController extends FormController
*/
protected int $refid;
/**
* Method to edit an existing record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key
* (sometimes required to avoid router collisions).
*
* @return boolean True if access level check and checkout passes, false otherwise.
*
* @since 1.6
*/
public function edit($key = null, $urlVar = null)
{
// for modal title key selection (unique key to do mapping)
$titleKey = $this->input->get('titleKey', 'id', 'word');
$guid = null;
$value = null;
// Determine the name of the primary key for the data.
if (empty($key))
{
$model = $this->getModel();
$table = $model->getTable();
$key = $table->getKeyName();
}
if ($titleKey === 'guid')
{
$guid = $this->input->get('guid', null, 'string');
}
if ($guid !== null && GuidHelper::valid($guid))
{
$value = GuidHelper::item($guid, 'class_extends', 'a.' . $key, 'componentbuilder');
}
if ($value !== null)
{
$this->input->set($key, $value);
}
return parent::edit($key, $urlVar);
}
/**
* Resets the specified Class Extends.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Class Extends.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Class Extends.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CLASS_EXTENDS') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('ClassExtends.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_EXTENDS_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('class_extends.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('class_extends', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CLASS_EXTENDS_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_EXTENDS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_EXTENDS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=class_extends'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Class Extends.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Class Extends.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Class Extends.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CLASS_EXTENDS') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('ClassExtends.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_EXTENDS_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('class_extends.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('class_extends', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CLASS_EXTENDS_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_EXTENDS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=class_extends'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Method override to check if you can add a new record.
*

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -78,6 +79,229 @@ class Class_methodController extends FormController
*/
protected int $refid;
/**
* Resets the specified Class Method.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Class Method.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Class Method.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CLASS_METHOD') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('ClassMethod.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_METHOD_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('class_method.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('class_method', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CLASS_METHOD_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_METHOD_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_METHOD_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=class_method'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Class Method.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Class Method.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Class Method.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CLASS_METHOD') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('ClassMethod.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_METHOD_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('class_method.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('class_method', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CLASS_METHOD_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHOD_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHOD_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=class_method'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Method override to check if you can add a new record.
*

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -51,4 +52,273 @@ class Class_methodsController extends AdminController
{
return parent::getModel($name, $prefix, $config);
}
/**
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CLASS_METHODS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('class_method.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=ClassMethod&target=Class Methods', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_methods', false);
}
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Class Methods.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Class Methods.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Class Methods.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_methods', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('class_method.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('ClassMethod.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['class_method'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('class_method', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CLASS_METHODS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_METHODS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_METHODS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_methods', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_methods', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Class Methods.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Class Methods.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Class Methods.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_methods', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('class_method.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('ClassMethod.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['class_method'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('class_method', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CLASS_METHODS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHODS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_METHODS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_methods', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_methods', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -51,4 +52,273 @@ class Class_propertiesController extends AdminController
{
return parent::getModel($name, $prefix, $config);
}
/**
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CLASS_PROPERTIES') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('class_property.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=ClassProperty&target=Class Properties', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_properties', false);
}
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Class Properties.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Class Properties.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Class Properties.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_properties', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('class_property.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('ClassProperty.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['class_property'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('class_property', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CLASS_PROPERTIES_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_PROPERTIES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_PROPERTIES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_properties', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_properties', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Class Properties.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Class Properties.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Class Properties.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_properties', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('class_property.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('ClassProperty.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['class_property'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('class_property', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CLASS_PROPERTIES_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTIES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTIES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_properties', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=class_properties', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -78,6 +79,229 @@ class Class_propertyController extends FormController
*/
protected int $refid;
/**
* Resets the specified Class Property.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Class Property.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Class Property.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CLASS_PROPERTY') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('ClassProperty.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_PROPERTY_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('class_property.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('class_property', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CLASS_PROPERTY_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_PROPERTY_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CLASS_PROPERTY_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=class_property'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Class Property.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Class Property.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Class Property.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CLASS_PROPERTY') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('ClassProperty.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CLASS_PROPERTY_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('class_property.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('class_property', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CLASS_PROPERTY_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTY_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CLASS_PROPERTY_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=class_property'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Method override to check if you can add a new record.
*

View File

@ -25,6 +25,7 @@ use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -137,6 +138,7 @@ class Custom_admin_viewController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -146,21 +148,92 @@ class Custom_admin_viewController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CUSTOM_ADMIN_VIEW') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('CustomAdminView.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_ADMIN_VIEW_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CUSTOM_ADMIN_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('custom_admin_view.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('custom_admin_view', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CUSTOM_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=custom_admin_view'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -176,6 +249,7 @@ class Custom_admin_viewController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -185,21 +259,92 @@ class Custom_admin_viewController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CUSTOM_ADMIN_VIEW') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('CustomAdminView.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_ADMIN_VIEW_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CUSTOM_ADMIN_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('custom_admin_view.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('custom_admin_view', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CUSTOM_ADMIN_VIEW_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEW_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=custom_admin_view'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class Custom_admin_viewsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_CUSTOM_ADMIN_VIEWS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CUSTOM_ADMIN_VIEWS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('custom_admin_view.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=CustomAdminView&target=Custom Admin Views', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_admin_views', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class Custom_admin_viewsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_ADMIN_VIEWS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_admin_views', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('custom_admin_view.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('CustomAdminView.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['custom_admin_view'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('custom_admin_view', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CUSTOM_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CUSTOM_ADMIN_VIEWS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_admin_views', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_admin_views', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class Custom_admin_viewsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_ADMIN_VIEWS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_admin_views', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('custom_admin_view.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('CustomAdminView.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['custom_admin_view'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('custom_admin_view', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CUSTOM_ADMIN_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEWS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_admin_views', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_admin_views', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -92,6 +93,7 @@ class Custom_codeController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -101,21 +103,92 @@ class Custom_codeController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_CUSTOM_CODE') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('CustomCode.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_CODE_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CUSTOM_CODE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('custom_code.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('custom_code', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CUSTOM_CODE_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_CODE_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_CODE_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=custom_code'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -131,6 +204,7 @@ class Custom_codeController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -140,21 +214,92 @@ class Custom_codeController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_CUSTOM_CODE') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('CustomCode.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_CODE_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_CUSTOM_CODE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('custom_code.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('custom_code', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_CUSTOM_CODE_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODE_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODE_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=custom_code'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class Custom_codesController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_CUSTOM_CODES_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_CUSTOM_CODES') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('custom_code.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=CustomCode&target=Custom Codes', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class Custom_codesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_CUSTOM_CODES_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('custom_code.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('CustomCode.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['custom_code'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('custom_code', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CUSTOM_CODES_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CUSTOM_CODES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_CUSTOM_CODES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class Custom_codesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_CUSTOM_CODES_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('custom_code.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('CustomCode.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['custom_code'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('custom_code', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_CUSTOM_CODES_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_CUSTOM_CODES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,8 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -79,6 +81,50 @@ class Dynamic_getController extends FormController
protected int $refid;
/**
* Method to edit an existing record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key
* (sometimes required to avoid router collisions).
*
* @return boolean True if access level check and checkout passes, false otherwise.
*
* @since 1.6
*/
public function edit($key = null, $urlVar = null)
{
// for modal title key selection (unique key to do mapping)
$titleKey = $this->input->get('titleKey', 'id', 'word');
$guid = null;
$value = null;
// Determine the name of the primary key for the data.
if (empty($key))
{
$model = $this->getModel();
$table = $model->getTable();
$key = $table->getKeyName();
}
if ($titleKey === 'guid')
{
$guid = $this->input->get('guid', null, 'string');
}
if ($guid !== null && GuidHelper::valid($guid))
{
$value = GuidHelper::item($guid, 'dynamic_get', 'a.' . $key, 'componentbuilder');
}
if ($value !== null)
{
$this->input->set($key, $value);
}
return parent::edit($key, $urlVar);
}
/**
* Resets the specified Dynamic Get.
*
@ -92,6 +138,7 @@ class Dynamic_getController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -101,21 +148,92 @@ class Dynamic_getController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_DYNAMIC_GET') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('DynamicGet.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_DYNAMIC_GET_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_DYNAMIC_GET_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('dynamic_get.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('dynamic_get', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_DYNAMIC_GET_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_DYNAMIC_GET_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_DYNAMIC_GET_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=dynamic_get'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -131,6 +249,7 @@ class Dynamic_getController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -140,21 +259,92 @@ class Dynamic_getController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_DYNAMIC_GET') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('DynamicGet.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_DYNAMIC_GET_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_DYNAMIC_GET_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('dynamic_get.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('dynamic_get', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_DYNAMIC_GET_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GET_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GET_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=dynamic_get'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class Dynamic_getsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_DYNAMIC_GETS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_DYNAMIC_GETS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('dynamic_get.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=DynamicGet&target=Dynamic Gets', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class Dynamic_getsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_DYNAMIC_GETS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('dynamic_get.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('DynamicGet.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['dynamic_get'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('dynamic_get', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_DYNAMIC_GETS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_DYNAMIC_GETS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_DYNAMIC_GETS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class Dynamic_getsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_DYNAMIC_GETS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('dynamic_get.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('DynamicGet.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['dynamic_get'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('dynamic_get', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_DYNAMIC_GETS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GETS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_DYNAMIC_GETS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -25,6 +25,7 @@ use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -137,6 +138,7 @@ class FieldController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -146,21 +148,92 @@ class FieldController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_FIELD') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Field.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_FIELD_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_FIELD_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('field.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('field', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_FIELD_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_FIELD_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_FIELD_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=field'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -176,6 +249,7 @@ class FieldController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -185,21 +259,92 @@ class FieldController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_FIELD') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Field.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_FIELD_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_FIELD_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('field.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('field', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_FIELD_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELD_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELD_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=field'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class FieldsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_FIELDS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_FIELDS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('field.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Field&target=Fields', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class FieldsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_FIELDS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('field.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Field.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['field'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('field', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_FIELDS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_FIELDS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_FIELDS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class FieldsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_FIELDS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('field.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Field.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['field'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('field', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_FIELDS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELDS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_FIELDS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -93,6 +93,7 @@ class FieldtypeController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -111,9 +112,12 @@ class FieldtypeController extends FormController
$status = 'error';
$success = false;
// get the guid field of this entity
$key_field = FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
$guid = $item[$key_field] ?? null;
// check if there is any selections
if ($id === null || $guid === null)
@ -168,6 +172,7 @@ class FieldtypeController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -186,9 +191,12 @@ class FieldtypeController extends FormController
$status = 'error';
$success = false;
// get the guid field of this entity
$key_field = FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['warning', 'error'];

View File

@ -17,7 +17,6 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Componentbuilder\Fieldtype\Factory as FieldtypeFactory;
// No direct access to this file
@ -59,6 +58,7 @@ class FieldtypesController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
@ -109,6 +109,7 @@ class FieldtypesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -140,7 +141,9 @@ class FieldtypesController extends AdminController
$user = $this->app->getIdentity();
if($user->authorise('fieldtype.reset', 'com_componentbuilder'))
{
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
// get the guid field of this entity
$key_field = FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->getGuidField();
$guids = FieldtypeFactory::_('Load')->values([$key_field], ['fieldtype'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset($guids))
@ -188,6 +191,7 @@ class FieldtypesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -220,7 +224,9 @@ class FieldtypesController extends AdminController
$user = $this->app->getIdentity();
if($user->authorise('fieldtype.push', 'com_componentbuilder'))
{
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
// get the guid field of this entity
$key_field = FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->getGuidField();
$guids = FieldtypeFactory::_('Load')->values([$key_field], ['fieldtype'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items($guids))

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
use VDM\Joomla\Data\Factory as DataFactory;
use VDM\Joomla\Utilities\GuidHelper;
@ -94,6 +95,7 @@ class Joomla_componentController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -103,21 +105,92 @@ class Joomla_componentController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_COMPONENT') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Component.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_JOOMLA_COMPONENT_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_COMPONENT_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('joomla_component.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('joomla_component', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_COMPONENT_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_COMPONENT_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_COMPONENT_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_component'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -133,6 +206,7 @@ class Joomla_componentController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -142,21 +216,92 @@ class Joomla_componentController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_COMPONENT') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Component.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_JOOMLA_COMPONENT_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_COMPONENT_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('joomla_component.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('joomla_component', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_COMPONENT_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENT_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENT_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_component'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -19,6 +19,7 @@ use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -165,20 +166,41 @@ class Joomla_componentsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_JOOMLA_COMPONENTS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_COMPONENTS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('joomla_component.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Component&target=Joomla Components', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -195,20 +217,103 @@ class Joomla_componentsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_JOOMLA_COMPONENTS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('joomla_component.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Component.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['joomla_component'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('joomla_component', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_COMPONENTS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_COMPONENTS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_COMPONENTS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -225,19 +330,103 @@ class Joomla_componentsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_JOOMLA_COMPONENTS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('joomla_component.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Component.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['joomla_component'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('joomla_component', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_COMPONENTS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENTS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_COMPONENTS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
use VDM\Joomla\Data\Factory as DataFactory;
use VDM\Joomla\Utilities\GuidHelper;
@ -80,6 +81,229 @@ class Joomla_moduleController extends FormController
*/
protected int $refid;
/**
* Resets the specified Joomla Module.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Joomla Module.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Joomla Module.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_MODULE') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaModule.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_MODULE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('joomla_module.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('joomla_module', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_MODULE_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_MODULE_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_MODULE_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_module'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Joomla Module.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Joomla Module.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Joomla Module.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_MODULE') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaModule.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_MODULE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('joomla_module.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('joomla_module', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_MODULE_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULE_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULE_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_module'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Method override to check if you can add a new record.
*

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -51,4 +52,273 @@ class Joomla_modulesController extends AdminController
{
return parent::getModel($name, $prefix, $config);
}
/**
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_MODULES') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('joomla_module.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=JoomlaModule&target=Joomla Modules', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_modules', false);
}
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Joomla Modules.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla Modules.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla Modules.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_modules', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('joomla_module.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaModule.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['joomla_module'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('joomla_module', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_MODULES_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_MODULES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_MODULES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_modules', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_modules', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Joomla Modules.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla Modules.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla Modules.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_modules', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('joomla_module.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaModule.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['joomla_module'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('joomla_module', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_MODULES_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_MODULES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_modules', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_modules', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
use VDM\Joomla\Data\Factory as DataFactory;
use VDM\Joomla\Utilities\GuidHelper;
@ -80,6 +81,229 @@ class Joomla_pluginController extends FormController
*/
protected int $refid;
/**
* Resets the specified Joomla Plugin.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Joomla Plugin.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Joomla Plugin.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_PLUGIN') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaPlugin.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_PLUGIN_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('joomla_plugin.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('joomla_plugin', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_PLUGIN_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_PLUGIN_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_PLUGIN_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_plugin'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Joomla Plugin.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Joomla Plugin.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Joomla Plugin.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_PLUGIN') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaPlugin.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_PLUGIN_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('joomla_plugin.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('joomla_plugin', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_PLUGIN_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGIN_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGIN_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_plugin'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Method override to check if you can add a new record.
*

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@ -78,6 +79,51 @@ class Joomla_plugin_groupController extends FormController
*/
protected int $refid;
/**
* Method to edit an existing record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key
* (sometimes required to avoid router collisions).
*
* @return boolean True if access level check and checkout passes, false otherwise.
*
* @since 1.6
*/
public function edit($key = null, $urlVar = null)
{
// for modal title key selection (unique key to do mapping)
$titleKey = $this->input->get('titleKey', 'id', 'word');
$guid = null;
$value = null;
// Determine the name of the primary key for the data.
if (empty($key))
{
$model = $this->getModel();
$table = $model->getTable();
$key = $table->getKeyName();
}
if ($titleKey === 'guid')
{
$guid = $this->input->get('guid', null, 'string');
}
if ($guid !== null && GuidHelper::valid($guid))
{
$value = GuidHelper::item($guid, 'joomla_plugin_group', 'a.' . $key, 'componentbuilder');
}
if ($value !== null)
{
$this->input->set($key, $value);
}
return parent::edit($key, $urlVar);
}
/**
* Method override to check if you can add a new record.
*

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -54,54 +55,270 @@ class Joomla_pluginsController extends AdminController
/**
* get Boilerplate
* Redirect the request to the Initialization selection page.
*
* @return boolean
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function getBoilerplate()
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set page redirect
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_PLUGINS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('joomla_plugin.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=JoomlaPlugin&target=Joomla Plugins', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
// set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE');
// check if this user has the right to run expansion
if($user->authorise('joomla_plugin.get_boilerplate', 'com_componentbuilder'))
}
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Joomla Plugins.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla Plugins.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla Plugins.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// set massage
$message = Text::_('COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_FAILED_IF_THE_ISSUE_CONTINUES_INFORM_YOUR_SYSTEM_ADMINISTRATOR');
// Get the model
$model = $this->getModel('joomla_plugins');
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if (!$model->getBoilerplate())
if ($pks === [])
{
$message = '<b>' . Text::_('COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_WAS_SUCCESSFULLY') . '</b>';
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
public function openClassMethods()
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('joomla_plugin.reset', 'com_componentbuilder'))
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// redirect to the libraries
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=class_methods', false));
return;
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaPlugin.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['joomla_plugin'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('joomla_plugin', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
public function openClassProperties()
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_PLUGINS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_PLUGINS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_PLUGINS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Joomla Plugins.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla Plugins.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla Plugins.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// redirect to the libraries
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=class_properties', false));
return;
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('joomla_plugin.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('JoomlaPlugin.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['joomla_plugin'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('joomla_plugin', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_PLUGINS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGINS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_PLUGINS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -93,6 +93,7 @@ class Joomla_powerController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -111,9 +112,12 @@ class Joomla_powerController extends FormController
$status = 'error';
$success = false;
// get the guid field of this entity
$key_field = JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
$guid = $item[$key_field] ?? null;
// check if there is any selections
if ($id === null || $guid === null)
@ -168,6 +172,7 @@ class Joomla_powerController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -186,9 +191,12 @@ class Joomla_powerController extends FormController
$status = 'error';
$success = false;
// get the guid field of this entity
$key_field = JoomlaPowerFactory::_('Joomla.Power.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['warning', 'error'];

View File

@ -17,7 +17,6 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Componentbuilder\JoomlaPower\Factory as JoomlaPowerFactory;
// No direct access to this file
@ -59,6 +58,7 @@ class Joomla_powersController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
@ -109,6 +109,7 @@ class Joomla_powersController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -140,7 +141,9 @@ class Joomla_powersController extends AdminController
$user = $this->app->getIdentity();
if($user->authorise('joomla_power.reset', 'com_componentbuilder'))
{
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
// get the guid field of this entity
$key_field = JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->getGuidField();
$guids = JoomlaPowerFactory::_('Load')->values([$key_field], ['joomla_power'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->reset($guids))
@ -188,6 +191,7 @@ class Joomla_powersController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -220,7 +224,9 @@ class Joomla_powersController extends AdminController
$user = $this->app->getIdentity();
if($user->authorise('joomla_power.push', 'com_componentbuilder'))
{
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
// get the guid field of this entity
$key_field = JoomlaPowerFactory::_('Joomla.Power.Remote.Set')->getGuidField();
$guids = JoomlaPowerFactory::_('Load')->values([$key_field], ['joomla_power'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Set')->items($guids))

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -92,6 +93,7 @@ class LayoutController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -101,21 +103,92 @@ class LayoutController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_LAYOUT') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Layout.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LAYOUT_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LAYOUT_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('layout.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('layout', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LAYOUT_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LAYOUT_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LAYOUT_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=layout'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -131,6 +204,7 @@ class LayoutController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -140,21 +214,92 @@ class LayoutController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_LAYOUT') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Layout.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LAYOUT_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LAYOUT_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('layout.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('layout', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LAYOUT_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUT_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUT_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=layout'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class LayoutsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_LAYOUTS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_LAYOUTS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('layout.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Layout&target=Layouts', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=layouts', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class LayoutsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LAYOUTS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=layouts', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('layout.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Layout.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['layout'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('layout', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_LAYOUTS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_LAYOUTS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LAYOUTS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=layouts', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=layouts', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class LayoutsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LAYOUTS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=layouts', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('layout.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Layout.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['layout'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('layout', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_LAYOUTS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUTS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LAYOUTS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=layouts', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=layouts', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class LibrariesController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_LIBRARIES_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_LIBRARIES') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('library.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Library&target=Libraries', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=libraries', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class LibrariesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LIBRARIES_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=libraries', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('library.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Library.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['library'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('library', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_LIBRARIES_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_LIBRARIES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LIBRARIES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=libraries', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=libraries', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class LibrariesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LIBRARIES_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=libraries', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('library.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Library.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['library'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('library', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_LIBRARIES_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARIES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARIES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=libraries', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=libraries', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -25,6 +25,7 @@ use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
use VDM\Joomla\Data\Factory as DataFactory;
// No direct access to this file
@ -138,6 +139,7 @@ class LibraryController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -147,21 +149,92 @@ class LibraryController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_LIBRARY') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Library.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_LIBRARY_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LIBRARY_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('library.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('library', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LIBRARY_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LIBRARY_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_LIBRARY_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=library'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -177,6 +250,7 @@ class LibraryController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -186,21 +260,92 @@ class LibraryController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_LIBRARY') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Library.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_LIBRARY_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LIBRARY_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('library.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('library', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LIBRARY_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARY_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_LIBRARY_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=library'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -78,6 +79,229 @@ class PlaceholderController extends FormController
*/
protected int $refid;
/**
* Resets the specified Placeholder.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Placeholder.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Placeholder.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_PLACEHOLDER') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Placeholder.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_PLACEHOLDER_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('placeholder.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('placeholder', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PLACEHOLDER_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=placeholder'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Placeholder.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Placeholder.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Placeholder.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_PLACEHOLDER') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Placeholder.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_PLACEHOLDER_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('placeholder.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('placeholder', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PLACEHOLDER_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDER_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDER_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=placeholder'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Method override to check if you can add a new record.
*

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -51,4 +52,273 @@ class PlaceholdersController extends AdminController
{
return parent::getModel($name, $prefix, $config);
}
/**
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_PLACEHOLDERS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('placeholder.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Placeholder&target=Placeholders', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=placeholders', false);
}
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Placeholders.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Placeholders.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Placeholders.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=placeholders', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('placeholder.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Placeholder.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['placeholder'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('placeholder', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_PLACEHOLDERS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_PLACEHOLDERS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDERS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=placeholders', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=placeholders', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Placeholders.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Placeholders.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Placeholders.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=placeholders', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('placeholder.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Placeholder.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['placeholder'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('placeholder', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_PLACEHOLDERS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDERS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDERS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=placeholders', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=placeholders', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -138,6 +138,7 @@ class PowerController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -156,9 +157,12 @@ class PowerController extends FormController
$status = 'error';
$success = false;
// get the guid field of this entity
$key_field = PowerFactory::_('Power.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
$guid = $item[$key_field] ?? null;
// check if there is any selections
if ($id === null || $guid === null)
@ -213,6 +217,7 @@ class PowerController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -231,9 +236,12 @@ class PowerController extends FormController
$status = 'error';
$success = false;
// get the guid field of this entity
$key_field = PowerFactory::_('Power.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
$guid = $item[$key_field] ?? null;
$message_bus = ['warning', 'error'];

View File

@ -17,7 +17,6 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
// No direct access to this file
@ -59,6 +58,7 @@ class PowersController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
@ -109,6 +109,7 @@ class PowersController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -140,7 +141,9 @@ class PowersController extends AdminController
$user = $this->app->getIdentity();
if($user->authorise('power.reset', 'com_componentbuilder'))
{
$guids = GetHelper::vars('power', $pks, 'id', 'guid');
// get the guid field of this entity
$key_field = PowerFactory::_('Power.Remote.Get')->getGuidField();
$guids = PowerFactory::_('Load')->values([$key_field], ['power'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
if (PowerFactory::_('Power.Remote.Get')->reset($guids))
@ -188,6 +191,7 @@ class PowersController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -220,7 +224,9 @@ class PowersController extends AdminController
$user = $this->app->getIdentity();
if($user->authorise('power.push', 'com_componentbuilder'))
{
$guids = GetHelper::vars('power', $pks, 'id', 'guid');
// get the guid field of this entity
$key_field = PowerFactory::_('Power.Remote.Set')->getGuidField();
$guids = PowerFactory::_('Load')->values([$key_field], ['power'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
if (PowerFactory::_('Power.Remote.Set')->items($guids))

View File

@ -25,6 +25,7 @@ use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -137,6 +138,7 @@ class Site_viewController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -146,21 +148,92 @@ class Site_viewController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SITE_VIEW') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('SiteView.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SITE_VIEW_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SITE_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('site_view.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('site_view', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_SITE_VIEW_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=site_view'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -176,6 +249,7 @@ class Site_viewController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -185,21 +259,92 @@ class Site_viewController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SITE_VIEW') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('SiteView.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SITE_VIEW_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SITE_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('site_view.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('site_view', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_SITE_VIEW_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEW_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEW_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=site_view'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class Site_viewsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_SITE_VIEWS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SITE_VIEWS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('site_view.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=SiteView&target=Site Views', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=site_views', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class Site_viewsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SITE_VIEWS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=site_views', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('site_view.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('SiteView.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['site_view'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('site_view', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SITE_VIEWS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=site_views', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=site_views', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class Site_viewsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SITE_VIEWS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=site_views', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('site_view.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('SiteView.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['site_view'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('site_view', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=site_views', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=site_views', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Snippet\Factory as SnippetFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -92,6 +93,7 @@ class SnippetController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -101,21 +103,92 @@ class SnippetController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SNIPPET') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = SnippetFactory::_('Snippet.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SNIPPET_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SNIPPET_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('snippet.reset', 'com_componentbuilder'))
{
try {
SnippetFactory::_('Package.Builder.Get')->reset('snippet', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = SnippetFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_SNIPPET_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SNIPPET_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SNIPPET_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=snippet'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -131,6 +204,7 @@ class SnippetController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -140,21 +214,92 @@ class SnippetController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SNIPPET') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = SnippetFactory::_('Snippet.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SNIPPET_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SNIPPET_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('snippet.push', 'com_componentbuilder'))
{
try {
SnippetFactory::_('Package.Builder.Set')->items('snippet', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = SnippetFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_SNIPPET_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPET_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPET_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=snippet'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Snippet\Factory as SnippetFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class SnippetsController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_SNIPPETS_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SNIPPETS') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('snippet.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Snippet&target=Snippets', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=snippets', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class SnippetsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_SNIPPETS_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=snippets', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('snippet.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = SnippetFactory::_('Snippet.Remote.Get')->getGuidField();
$guids = SnippetFactory::_('Load')->values([$key_field], ['snippet'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
SnippetFactory::_('Package.Builder.Get')->reset('snippet', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = SnippetFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_SNIPPETS_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SNIPPETS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SNIPPETS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=snippets', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=snippets', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class SnippetsController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_SNIPPETS_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=snippets', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('snippet.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = SnippetFactory::_('Snippet.Remote.Set')->getGuidField();
$guids = SnippetFactory::_('Load')->values([$key_field], ['snippet'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
SnippetFactory::_('Package.Builder.Set')->items('snippet', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = SnippetFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_SNIPPETS_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPETS_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SNIPPETS_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=snippets', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=snippets', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -92,6 +93,7 @@ class TemplateController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
@ -101,21 +103,92 @@ class TemplateController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_TEMPLATE') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Template.Remote.Get')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_TEMPLATE_WITHIN_THIS_JCB_INSTANCE') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_RESET') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_TEMPLATE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('template.reset', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Get')->reset('template', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_TEMPLATE_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_TEMPLATE_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// set warning message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_TEMPLATE_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=template'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
@ -131,6 +204,7 @@ class TemplateController extends FormController
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
@ -140,21 +214,92 @@ class TemplateController extends FormController
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_TEMPLATE') . '</p>';
$status = 'error';
$success = false;
$has_error = false;
// get the guid field of this entity
$key_field = PackageFactory::_('Template.Remote.Set')->getGuidField();
// load the ID
$id = $item['id'] ?? null;
$guid = $item[$key_field] ?? null;
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_TEMPLATE_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
$message_bus = ['success', 'warning', 'error'];
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_PUSHED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_TEMPLATE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('template.push', 'com_componentbuilder'))
{
try {
PackageFactory::_('Package.Builder.Set')->items('template', [$guid]);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_TEMPLATE_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATE_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATE_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=template'
. $this->getRedirectToItemAppend($id), false
);
$this->setRedirect($redirect_url, $message, 'success');
return true;
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**

View File

@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Package\Factory as PackageFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -57,20 +58,41 @@ class TemplatesController extends AdminController
* Redirect the request to the Initialization selection page.
*
* @return bool True on successful initialization, false on failure.
* @since 5.1.1
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PULL_BOTH_DEMO_AND_USERCREATED_TEMPLATES_INTO_THIS_JCB_INSTANCE') . '</p>';
// check if user has the right
$user = $this->app->getIdentity();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_TEMPLATES') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('template.init', 'com_componentbuilder'))
{
// set success message
$message = null;
$status = null;
$success = true;
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Template&target=Templates', false);
}
else
{
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=templates', false);
$this->setRedirect($redirect_url, $message, 'success');
}
$this->setRedirect($redirect_url, $message, $status);
return true;
return $success;
}
/**
@ -87,20 +109,103 @@ class TemplatesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
* @since 5.1.1
*/
public function resetPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_RESET_BOTH_DEMO_AND_USERCREATED_TEMPLATES_WITHIN_THIS_JCB_INSTANCE') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=templates', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('template.reset', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Template.Remote.Get')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['template'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Get')->reset('template', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_TEMPLATES_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_TEMPLATES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_TEMPLATES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=templates', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=templates', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
@ -117,19 +222,103 @@ class TemplatesController extends AdminController
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
* @since 5.1.1
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// set default in development message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_STILL_IN_DEVELOPMENT') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_ONCE_COMPLETED_THIS_FEATURE_WILL_ALLOW_YOU_TO_PUSH_USERCREATED_TEMPLATES_FROM_THIS_JCB_INSTANCE_TO_YOUR_CONFIGURED_REPOSITORIES') . '</p>';
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=templates', false);
$this->setRedirect($redirect_url, $message, 'success');
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
return true;
$status = 'error';
$success = false;
$has_error = false;
$message_bus = ['success', 'warning', 'error'];
// check if user has the right
$user = $this->app->getIdentity();
if($user->authorise('template.push', 'com_componentbuilder'))
{
// get the guid field of this entity
$key_field = PackageFactory::_('Template.Remote.Set')->getGuidField();
$guids = PackageFactory::_('Load')->values([$key_field], ['template'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
try {
PackageFactory::_('Package.Builder.Set')->items('template', $guids);
foreach ($message_bus as $message_key)
{
if (($messages = PackageFactory::_('Power.Message')->get($message_key, null)) !== null)
{
$messages = '<p>' . implode('<br>', $messages) . '</p>';
$this->app->enqueueMessage($messages, $message_key);
if (!$success && $message_key === 'success')
{
$success = true;
}
if (!$has_error && $message_key === 'error')
{
$has_error = true;
}
}
}
if ($success)
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_TEMPLATES_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
$status = 'success';
}
elseif ($has_error)
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATES_HAS_FAILED') . '</p>';
$status = 'error';
}
else
{
// Initialize base values
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_UNSUCCESSFUL') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATES_HAS_NOT_BEEN_SUCCESSFUL') . '</p>';
$status = 'warning';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=templates', false);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=templates', false);
$this->setRedirect($redirect_url);
return $success;
}
}

View File

@ -17,7 +17,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\Folder;
// No direct access to this file
\defined('_JEXEC') or die;

View File

@ -1,186 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Component\Componentbuilder\Administrator\Field;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Classextends Form Field class for the Componentbuilder component
*
* @since 1.6
*/
class ClassextendsField extends ListField
{
/**
* The classextends field type.
*
* @var string
*/
public $type = 'Classextends';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$set_button = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($set_button === 'true')
{
$button = array();
$script = array();
$button_code_name = $this->getAttribute('name');
// get the input from url
$app = Factory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referral if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;
$refJ .= '&return=' . $_return;
}
// get button label
$button_label = trim($button_code_name);
$button_label = preg_replace('/_+/', ' ', $button_label);
$button_label = preg_replace('/\s+/', ' ', $button_label);
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
$button_label = ucfirst(strtolower($button_label));
// get user object
$user = Factory::getApplication()->getIdentity();
// only add if user allowed to create class_extends
if ($user->authorise('class_extends.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build Create button
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px;"
href="index.php?option=com_componentbuilder&amp;view=class_extends&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit class_extends
if ($user->authorise('class_extends.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build edit button
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small btn-outline-success button-select hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; border-radius: 0px 4px 4px 0px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
document.addEventListener('DOMContentLoaded', function() {
let ".$button_code_name."Field = document.getElementById('jform_".$button_code_name."');
if (!".$button_code_name."Field) { return; }
".$button_code_name."Field.addEventListener('change', function(e) {
e.preventDefault();
let ".$button_code_name."Value = this.value;
".$button_code_name."Button(".$button_code_name."Value);
});
let ".$button_code_name."Value = ".$button_code_name."Field.value;
".$button_code_name."Button(".$button_code_name."Value);
});
function ".$button_code_name."Button(value) {
var createButton = document.getElementById('".$button_code_name."Create');
var editButton = document.getElementById('".$button_code_name."Edit');
if (value > 0) {
// hide the create button
createButton.style.display = 'none';
// show edit button
editButton.style.display = 'block';
let url = 'index.php?option=com_componentbuilder&view=class_extendings&task=class_extends.edit&id='+value+'".$refJ."';
editButton.setAttribute('href', url);
} else {
// show the create button
createButton.style.display = 'block';
// hide edit button
editButton.style.display = 'none';
}
}";
}
// check if button was created for class_extends field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = Factory::getApplication()->getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-group">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
* @since 1.6
*/
protected function getOptions()
{
// Get the user object.
$user = Factory::getApplication()->getIdentity();
// Get the databse object.
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.name'),array('guid','class_extends_name')));
$query->from($db->quoteName('#__componentbuilder_class_extends', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC');
// Implement View Level Access (if set in table)
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$columns = $db->getTableColumns('#__componentbuilder_class_extends');
if(isset($columns['access']))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
}
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = Html::_('select.option', '', 'Select a class');
foreach($items as $item)
{
$options[] = Html::_('select.option', $item->guid, $item->class_extends_name);
}
}
return $options;
}
}

View File

@ -16,7 +16,7 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\Folder;
// No direct access to this file
\defined('_JEXEC') or die;
@ -44,7 +44,7 @@ class CustomfilelistField extends ListField
protected function getOptions()
{
// get custom folder files
$localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/custom');
$localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/custom');
// set the default
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder));
// setup the folder if it does not exist

View File

@ -16,7 +16,7 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\Folder;
// No direct access to this file
\defined('_JEXEC') or die;
@ -44,11 +44,11 @@ class CustomfolderlistField extends ListField
protected function getOptions()
{
// get custom folder folder
$localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
$localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/custom');
// set the default
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S',$localfolder));
// setup the folder if it does not exist
if (!Folder::exists($localfolder))
if (!is_dir($localfolder))
{
Folder::create($localfolder);
}

View File

@ -58,7 +58,6 @@ class DynamicgetsfiltergettypeField extends ListField
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -');
if ($_results)
{

View File

@ -1,186 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Component\Componentbuilder\Administrator\Field;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Joomlaplugingroups Form Field class for the Componentbuilder component
*
* @since 1.6
*/
class JoomlaplugingroupsField extends ListField
{
/**
* The joomlaplugingroups field type.
*
* @var string
*/
public $type = 'Joomlaplugingroups';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$set_button = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($set_button === 'true')
{
$button = array();
$script = array();
$button_code_name = $this->getAttribute('name');
// get the input from url
$app = Factory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referral if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;
$refJ .= '&return=' . $_return;
}
// get button label
$button_label = trim($button_code_name);
$button_label = preg_replace('/_+/', ' ', $button_label);
$button_label = preg_replace('/\s+/', ' ', $button_label);
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
$button_label = ucfirst(strtolower($button_label));
// get user object
$user = Factory::getApplication()->getIdentity();
// only add if user allowed to create joomla_plugin_group
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build Create button
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px;"
href="index.php?option=com_componentbuilder&amp;view=joomla_plugin_group&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit joomla_plugin_group
if ($user->authorise('core.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build edit button
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small btn-outline-success button-select hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; border-radius: 0px 4px 4px 0px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
document.addEventListener('DOMContentLoaded', function() {
let ".$button_code_name."Field = document.getElementById('jform_".$button_code_name."');
if (!".$button_code_name."Field) { return; }
".$button_code_name."Field.addEventListener('change', function(e) {
e.preventDefault();
let ".$button_code_name."Value = this.value;
".$button_code_name."Button(".$button_code_name."Value);
});
let ".$button_code_name."Value = ".$button_code_name."Field.value;
".$button_code_name."Button(".$button_code_name."Value);
});
function ".$button_code_name."Button(value) {
var createButton = document.getElementById('".$button_code_name."Create');
var editButton = document.getElementById('".$button_code_name."Edit');
if (value > 0) {
// hide the create button
createButton.style.display = 'none';
// show edit button
editButton.style.display = 'block';
let url = 'index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=joomla_plugin_group.edit&id='+value+'".$refJ."';
editButton.setAttribute('href', url);
} else {
// show the create button
createButton.style.display = 'block';
// hide edit button
editButton.style.display = 'none';
}
}";
}
// check if button was created for joomla_plugin_group field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = Factory::getApplication()->getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-group">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
* @since 1.6
*/
protected function getOptions()
{
// Get the user object.
$user = Factory::getApplication()->getIdentity();
// Get the databse object.
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.name'),array('guid','joomla_plugin_group_name')));
$query->from($db->quoteName('#__componentbuilder_joomla_plugin_group', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC');
// Implement View Level Access (if set in table)
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$columns = $db->getTableColumns('#__componentbuilder_joomla_plugin_group');
if(isset($columns['access']))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
}
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = Html::_('select.option', '', 'Select a group');
foreach($items as $item)
{
$options[] = Html::_('select.option', $item->guid, $item->joomla_plugin_group_name);
}
}
return $options;
}
}

View File

@ -1,180 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Component\Componentbuilder\Administrator\Field;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* Maingets Form Field class for the Componentbuilder component
*
* @since 1.6
*/
class MaingetsField extends ListField
{
/**
* The maingets field type.
*
* @var string
*/
public $type = 'Maingets';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$set_button = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($set_button === 'true')
{
$button = array();
$script = array();
$button_code_name = $this->getAttribute('name');
// get the input from url
$app = Factory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referral if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;
$refJ .= '&return=' . $_return;
}
// get button label
$button_label = trim($button_code_name);
$button_label = preg_replace('/_+/', ' ', $button_label);
$button_label = preg_replace('/\s+/', ' ', $button_label);
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
$button_label = ucfirst(strtolower($button_label));
// get user object
$user = Factory::getApplication()->getIdentity();
// only add if user allowed to create dynamic_get
if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build Create button
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px;"
href="index.php?option=com_componentbuilder&amp;view=dynamic_get&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit dynamic_get
if ($user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
{
// build edit button
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small btn-outline-success button-select hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; border-radius: 0px 4px 4px 0px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
document.addEventListener('DOMContentLoaded', function() {
let ".$button_code_name."Field = document.getElementById('jform_".$button_code_name."');
if (!".$button_code_name."Field) { return; }
".$button_code_name."Field.addEventListener('change', function(e) {
e.preventDefault();
let ".$button_code_name."Value = this.value;
".$button_code_name."Button(".$button_code_name."Value);
});
let ".$button_code_name."Value = ".$button_code_name."Field.value;
".$button_code_name."Button(".$button_code_name."Value);
});
function ".$button_code_name."Button(value) {
var createButton = document.getElementById('".$button_code_name."Create');
var editButton = document.getElementById('".$button_code_name."Edit');
if (value > 0) {
// hide the create button
createButton.style.display = 'none';
// show edit button
editButton.style.display = 'block';
let url = 'index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id='+value+'".$refJ."';
editButton.setAttribute('href', url);
} else {
// show the create button
createButton.style.display = 'block';
// hide edit button
editButton.style.display = 'none';
}
}";
}
// check if button was created for dynamic_get field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = Factory::getApplication()->getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-group">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
* @since 1.6
*/
protected function getOptions()
{
// Get the databse object.
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.name','a.gettype'),array('guid','main_get_name','type')));
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
$query->where($db->quoteName('a.published') . ' = 1');
$query->where('( '.$db->quoteName('a.gettype') . ' = 1 OR ' . $db->quoteName('a.gettype') . ' = 2 )');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = [];
if ($items)
{
$model = ComponentbuilderHelper::getModel('dynamic_gets');
if ($this->multiple === false)
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
}
foreach($items as $item)
{
$type = $model->selectionTranslation($item->type, 'gettype');
$options[] = Html::_('select.option', $item->guid, $item->main_get_name . ' (' . Text::_($type) . ')');
}
}
return $options;
}
}

View File

@ -17,7 +17,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\Folder;
// No direct access to this file
\defined('_JEXEC') or die;

View File

@ -34,7 +34,7 @@ abstract class ComponentbuilderEmail
public static $active = [];
/**
* Configuraiton object
* Configuration object
*
* @var Registry
*/

View File

@ -35,15 +35,15 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\Archive\Archive;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\Path;
use Joomla\Filesystem\Folder;
use Joomla\Filesystem\Path;
use VDM\Joomla\Openai\Factory as OpenaiFactory;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\Component\Helper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
@ -183,11 +183,11 @@ abstract class ComponentbuilderHelper
// The path to the cache folder.
'JPATH_CACHE' => JPATH_CACHE,
// The path to the administration folder of the current component being executed.
'JPATH_COMPONENT_ADMINISTRATOR' => JPATH_COMPONENT_ADMINISTRATOR,
'JPATH_COMPONENT_ADMINISTRATOR' => JPATH_ADMINISTRATOR . '/components/com_componentbuilder',
// The path to the site folder of the current component being executed.
'JPATH_COMPONENT_SITE' => JPATH_COMPONENT_SITE,
'JPATH_COMPONENT_SITE' => JPATH_SITE . '/components/com_componentbuilder',
// The path to the current component being executed.
'JPATH_COMPONENT' => JPATH_COMPONENT,
'JPATH_COMPONENT' => JPATH_BASE . '/components/com_componentbuilder',
// The path to folder containing the configuration.php file.
'JPATH_CONFIGURATION' => JPATH_CONFIGURATION,
// The path to the installation folder.
@ -728,59 +728,72 @@ abstract class ComponentbuilderHelper
}
}
/*
* Get the Array of Existing Validation Rule Names
/**
* Get the array of existing Joomla validation rule class names
*
* @return array|null
* @param bool $lowercase If true, converts names to lowercase
*
* @return array|null Array of rule names or null on failure
* @since 3.0.0
*/
public static function getExistingValidationRuleNames(bool $lowercase = false): ?array
{
// get the items
$items = self::get('_existing_validation_rules_VDM', null);
if (!$items)
// Try to retrieve from static cache
$cacheKey = '_existing_validation_rules_VDM';
$cached = self::get($cacheKey, null);
if (!empty($cached) && is_string($cached))
{
$items = json_decode($cached, true);
}
else
{
// set the path to the form validation rules
$path = JPATH_LIBRARIES . '/src/Form/Rule';
// check if the path exist
if (!Folder::exists($path))
if (!is_dir($path))
{
return null;
}
// we must first store the current working directory
$joomla = getcwd();
// go to that folder
chdir($path);
// load all the files in this path
$items = Folder::files('.', '\.php', true, true);
// change back to Joomla working directory
chdir($joomla);
// make sure we have an array
if (!UtilitiesArrayHelper::check($items))
{
return null;
}
// remove the Rule.php from the name
$items = array_map( function ($name) {
return str_replace(array('./','Rule.php'), '', $name);
}, $items);
// store the names for next run
self::set('_existing_validation_rules_VDM', json_encode($items));
}
// make sure it is no longer json
if (JsonHelper::check($items))
{
$items = json_decode($items, true);
}
// check if the names should be all lowercase
if ($lowercase)
{
$items = array_map( function($item) {
return strtolower($item);
}, $items);
}
return $items;
$original_dir = getcwd();
if (!@chdir($path))
{
return null;
}
try {
$files = Folder::files(
'.',
'\.php',
true,
true
);
} catch (\Throwable $e) {
return null;
} finally {
@chdir($original_dir);
}
if (!UtilitiesArrayHelper::check($files)) {
return null;
}
$items = array_map(
fn(string $file) => str_replace(['./', 'Rule.php'], '', $file),
$files
);
// Cache it for next time
self::set($cacheKey, json_encode($items));
}
// Normalize casing if requested
if ($lowercase && is_array($items))
{
$items = array_map('strtolower', $items);
}
return is_array($items) ? $items : null;
}
/**
@ -1000,7 +1013,7 @@ abstract class ComponentbuilderHelper
$bucket = [];
// get custom folder path
$customPath = '/'.trim(self::$params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'), '/');
$customPath = '/'.trim(self::$params->get('custom_folder_path', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/custom'), '/');
// get all the file paths
foreach ($result->addfolders as $folder)
@ -1474,7 +1487,7 @@ abstract class ComponentbuilderHelper
if (UtilitiesStringHelper::check($hash))
{
// first get the file path
$path_filename = FileHelper::getPath('path', $name.$type, $fileType, $key, JPATH_COMPONENT_ADMINISTRATOR);
$path_filename = FileHelper::getPath('path', $name.$type, $fileType, $key, JPATH_ADMINISTRATOR . '/components/com_componentbuilder');
// set as read if not already set
if ($content = FileHelper::getContent($path_filename, false))
{
@ -2222,7 +2235,7 @@ abstract class ComponentbuilderHelper
md5($image_data) === $target['hash'])
{
// create the JCB type path if it does not exist
if (!Folder::exists(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type"))
if (!is_dir(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type"))
{
Folder::create(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/$type");
}
@ -2649,7 +2662,7 @@ abstract class ComponentbuilderHelper
*/
public static function removeFolder(string $path, ?array $ignore = null): bool
{
if (!Folder::exists($path))
if (!is_dir($path))
{
return false;
}
@ -3851,7 +3864,7 @@ abstract class ComponentbuilderHelper
}
$folderPath = self::$params->get($target, $default);
// create the folder if it does not exist
if ($createIfNotSet && !Folder::exists($folderPath))
if ($createIfNotSet && !is_dir($folderPath))
{
Folder::create($folderPath);
}

View File

@ -23,8 +23,10 @@ if (file_exists($composer_autoloader))
spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix
$search = [
'libraries/vendor_jcb/VDM.Joomla.Github' => 'VDM\\Joomla\\Github',
'libraries/vendor_jcb/VDM.Joomla.Gitea' => 'VDM\\Joomla\\Gitea',
'libraries/vendor_jcb/VDM.Joomla.FOF' => 'VDM\\Joomla\\FOF',
'libraries/vendor_jcb/VDM.Joomla.Git' => 'VDM\\Joomla\\Git',
'libraries/vendor_jcb/VDM.Joomla' => 'VDM\\Joomla',
'libraries/vendor_jcb/VDM.Minify' => 'VDM\\Minify',
'libraries/vendor_jcb/VDM.Psr' => 'VDM\\Psr'

View File

@ -45,7 +45,6 @@ use VDM\Joomla\Componentbuilder\Fieldtype\Factory as FieldtypeFactory;
use VDM\Joomla\Componentbuilder\JoomlaPower\Factory as JoomlaPowerFactory;
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
use VDM\Joomla\Componentbuilder\Snippet\Factory as SnippetFactory;
use VDM\Joomla\Interfaces\Remote\GetInterface;
use Joomla\CMS\Form\FormHelper as FormFormHelper;
// No direct access to this file
@ -4286,7 +4285,7 @@ class AjaxModel extends ListModel
* @param array $libraries The original list of library GUIDs.
*
* @return array|false Sanitized and validated list of libraries, or false.
* @since 5.2.1
* @since 5.1.1
*/
protected function expandAndValidateLibraries(array $libraries)
{
@ -4315,7 +4314,7 @@ class AjaxModel extends ListModel
}
elseif (is_numeric($bundled))
{
$expanded[$bundled] = bundled;
$expanded[$bundled] = $bundled;
}
}
else
@ -4405,7 +4404,7 @@ class AjaxModel extends ListModel
* @param mixed $key The value used to identify the snippet.
*
* @return string|false 'guid', 'id', or false if invalid.
* @since 5.2.1
* @since 5.1.1
*/
protected function resolveSnippetKeyField($key)
{
@ -5277,7 +5276,7 @@ class AjaxModel extends ListModel
*
* @return string|null
*
* @since 5.2.1
* @since 5.1.1
*/
protected function getTargetAreaPower($power): ?string
{
@ -5291,7 +5290,7 @@ class AjaxModel extends ListModel
* @param string $area The target area
*
* @return array
* @since 5.2.1
* @since 5.1.1
*/
public function getRepoIndex(string $repo, string $area): array
{
@ -5318,8 +5317,17 @@ class AjaxModel extends ListModel
return ['success' => false, 'message' => $e->getMessage()];
}
if ($result !== null)
if (!empty($result))
{
foreach($result as &$values)
{
// ensure we don't leak the repo token
if (isset($values->token))
{
$values->token = '***redacted***';
}
}
return ['success' => true, 'index' => $result];
}
@ -5334,7 +5342,7 @@ class AjaxModel extends ListModel
* @param array $selected The selected powers
*
* @return array
* @since 5.2.1
* @since 5.1.1
*/
public function initSelectedPowers(string $repo, string $area, array $selected): array
{
@ -5371,11 +5379,71 @@ class AjaxModel extends ListModel
return ['success' => false, 'message' => Text::_('COM_COMPONENTBUILDER_THE_REPO_INDEX_FAILED_TO_LOAD_PLEASE_TRY_AGAIN')];
}
/**
* Method to initialize the selected packages
*
* @param string $repo The repo to list index
* @param string $area The target area
* @param array $selected The selected powers
*
* @return array
* @since 5.1.1
*/
public function initSelectedPackages(string $repo, string $area, array $selected): array
{
if (!GuidHelper::valid($repo))
{
return ['success' => false, 'message' => Text::_('COM_COMPONENTBUILDER_INVALID_REPO_SELECTED')];
}
if (($Power = $this->getTargetAreaPower($area)) === null)
{
return ['success' => false, 'message' => Text::_('COM_COMPONENTBUILDER_INVALID_AREA_SELECTED')];
}
$result = [];
try
{
$class = $this->getPowerClass($Power, "Package.Builder.Get");
$entity = $this->getPowerClass($Power, "{$area}.Remote.Get");
if (!empty($selected) && $class !== null && $entity !== null)
{
$table = $entity->getTable();
$repo_path = $entity->path($repo);
$result = $class->init($table, $selected, $repo_path);
}
}
catch (\Exception $e)
{
return ['success' => false, 'message' => $e->getMessage()];
}
if ($this->hasIntResults($result))
{
return ['success' => true, 'result_log' => $result];
}
return ['success' => false, 'message' => Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_FAILED_PLEASE_TRY_AGAIN')];
}
/**
* Check if at least one key in the array has a non-empty value.
*
* @param array $data The result array (with 'local', 'not_found', 'added' keys)
*
* @return bool True if some values are non-empty; false if all are empty.
* @since 5.1.1
*/
protected static function hasIntResults(array $data): bool
{
return (bool) array_filter($data);
}
/**
* The powers that we can initialize
*
* @var array
* @since 5.2.1
* @since 5.1.1
*/
protected array $powers = [
'AdminView' => 'PackageFactory',
@ -5388,12 +5456,16 @@ class AjaxModel extends ListModel
'Joomla.Power' => 'JoomlaPowerFactory',
'Layout' => 'PackageFactory',
'Library' => 'PackageFactory',
'Module' => 'PackageFactory',
'JoomlaModule' => 'PackageFactory',
'JoomlaPlugin' => 'PackageFactory',
'Power' => 'PowerFactory',
'Plugin' => 'PackageFactory',
'SiteView' => 'PackageFactory',
'Snippet' => 'SnippetFactory',
'Template' => 'PackageFactory'
'Template' => 'PackageFactory',
'ClassExtends' => 'PackageFactory',
'ClassProperty' => 'PackageFactory',
'ClassMethod' => 'PackageFactory',
'Placeholder' => 'PackageFactory'
];
/**
@ -5402,10 +5474,10 @@ class AjaxModel extends ListModel
* @param string $factoryName The factory name
* @param string $getClass The remote power class name
*
* @return GetInterface|null
* @since 5.2.1
* @return mixed
* @since 5.1.1
*/
protected function getPowerClass(string $factoryName, string $getClass): ?GetInterface
protected function getPowerClass(string $factoryName, string $getClass)
{
return match ($factoryName) {
'PowerFactory' => PowerFactory::_($getClass),

View File

@ -596,42 +596,6 @@ class Class_methodModel extends AdminModel
return $data;
}
/**
* Method to validate the form data.
*
* @param JForm $form The form to validate against.
* @param array $data The data to validate.
* @param string $group The name of the field group to validate.
*
* @return mixed Array of filtered data if valid, false otherwise.
*
* @see JFormRule
* @see JFilterInput
* @since 12.2
*/
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
if (isset($data['not_required']) && UtilitiesStringHelper::check($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// make sure there is a string value
if (UtilitiesStringHelper::check($requiredField))
{
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
unset($data[$requiredField]);
}
}
}
return parent::validate($form, $data, $group);
}
/**
* Method to get the unique fields of this table.
*

View File

@ -283,10 +283,6 @@ class Class_propertiesModel extends ListModel
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_class_property', 'a'));
// From the componentbuilder_joomla_plugin_group table.
$query->select($db->quoteName(['g.name','g.id'],['joomla_plugin_group_name','joomla_plugin_group_id']));
$query->join('LEFT', $db->quoteName('#__componentbuilder_joomla_plugin_group', 'g') . ' ON (' . $db->quoteName('a.joomla_plugin_group') . ' = ' . $db->quoteName('g.guid') . ')');
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))

View File

@ -587,42 +587,6 @@ class Class_propertyModel extends AdminModel
return $data;
}
/**
* Method to validate the form data.
*
* @param JForm $form The form to validate against.
* @param array $data The data to validate.
* @param string $group The name of the field group to validate.
*
* @return mixed Array of filtered data if valid, false otherwise.
*
* @see JFormRule
* @see JFilterInput
* @since 12.2
*/
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
if (isset($data['not_required']) && UtilitiesStringHelper::check($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// make sure there is a string value
if (UtilitiesStringHelper::check($requiredField))
{
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
unset($data[$requiredField]);
}
}
}
return parent::validate($form, $data, $group);
}
/**
* Method to get the unique fields of this table.
*

View File

@ -25,7 +25,7 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\JsonHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\Folder;
use Joomla\Filesystem\File;
use Joomla\CMS\Installer\InstallerHelper;
use Joomla\CMS\Installer\Installer;

View File

@ -133,6 +133,9 @@ class ComponentbuilderModel extends ListModel
'custom_code.access' => 'custom_code.access',
'custom_codes.submenu' => 'custom_code.submenu',
'custom_codes.dashboard_list' => 'custom_code.dashboard_list',
'class_extends.create' => 'class_extends.create',
'class_extendings.access' => 'class_extends.access',
'class_extends.access' => 'class_extends.access',
'class_property.create' => 'class_property.create',
'class_properties.access' => 'class_property.access',
'class_property.access' => 'class_property.access',
@ -254,9 +257,6 @@ class ComponentbuilderModel extends ListModel
'library_files_folders_urls.create' => 'library_files_folders_urls.create',
'libraries_files_folders_urls.access' => 'library_files_folders_urls.access',
'library_files_folders_urls.access' => 'library_files_folders_urls.access',
'class_extends.create' => 'class_extends.create',
'class_extendings.access' => 'class_extends.access',
'class_extends.access' => 'class_extends.access',
'joomla_module_updates.create' => 'joomla_module_updates.create',
'joomla_modules_updates.access' => 'joomla_module_updates.access',
'joomla_module_updates.access' => 'joomla_module_updates.access',

View File

@ -88,12 +88,12 @@ class Custom_admin_viewsModel extends ListModel
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
'g.name','main_get',
'a.add_php_ajax','add_php_ajax',
'a.add_custom_button','add_custom_button',
'a.system_name','system_name',
'a.name','name',
'a.description','description'
'a.description','description',
'g.name','main_get'
);
}
@ -193,13 +193,6 @@ class Custom_admin_viewsModel extends ListModel
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get');
if ($formSubmited)
{
$main_get = $app->input->post->get('main_get');
$this->setState('filter.main_get', $main_get);
}
$add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax');
if ($formSubmited)
{
@ -235,6 +228,13 @@ class Custom_admin_viewsModel extends ListModel
$this->setState('filter.description', $description);
}
$main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get');
if ($formSubmited)
{
$main_get = $app->input->post->get('main_get');
$this->setState('filter.main_get', $main_get);
}
// List state information.
parent::populateState($ordering, $direction);
}
@ -414,46 +414,6 @@ class Custom_admin_viewsModel extends ListModel
}
}
// Filter by Main_get.
$_main_get = $this->getState('filter.main_get');
if (is_numeric($_main_get))
{
if (is_float($_main_get))
{
$query->where('a.main_get = ' . (float) $_main_get);
}
else
{
$query->where('a.main_get = ' . (int) $_main_get);
}
}
elseif (StringHelper::check($_main_get))
{
$query->where('a.main_get = ' . $db->quote($db->escape($_main_get)));
}
elseif (UtilitiesArrayHelper::check($_main_get))
{
// Secure the array for the query
$_main_get = array_map( function ($val) use(&$db) {
if (is_numeric($val))
{
if (is_float($val))
{
return (float) $val;
}
else
{
return (int) $val;
}
}
elseif (StringHelper::check($val))
{
return $db->quote($db->escape($val));
}
}, $_main_get);
// Filter by the Main_get Array.
$query->where('a.main_get IN (' . implode(',', $_main_get) . ')');
}
// Filter by Add_php_ajax.
$_add_php_ajax = $this->getState('filter.add_php_ajax');
if (is_numeric($_add_php_ajax))
@ -529,23 +489,12 @@ class Custom_admin_viewsModel extends ListModel
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
// Check if the value is an array
$_main_get = $this->getState('filter.main_get');
if (UtilitiesArrayHelper::check($_main_get))
{
$id .= ':' . implode(':', $_main_get);
}
// Check if this is only an number or string
elseif (is_numeric($_main_get)
|| StringHelper::check($_main_get))
{
$id .= ':' . $_main_get;
}
$id .= ':' . $this->getState('filter.add_php_ajax');
$id .= ':' . $this->getState('filter.add_custom_button');
$id .= ':' . $this->getState('filter.system_name');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.description');
$id .= ':' . $this->getState('filter.main_get');
return parent::getStoreId($id);
}

View File

@ -23,6 +23,7 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\Input\Input;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\FormHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper;
@ -97,6 +98,44 @@ class Dynamic_getsModel extends ListModel
$this->app ??= Factory::getApplication();
}
/**
* Get the filter form - Override the parent method
*
* @param array $data data
* @param boolean $loadData load current data
*
* @return Form|null The Form object or false on error
*
* @since JCB 2.12.5
*/
public function getFilterForm($data = array(), $loadData = true)
{
// load form from the parent class
$form = parent::getFilterForm($data, $loadData);
// Create the "getgroup" filter
$attributes = [
'name' => 'getgroup',
'type' => 'list',
'onchange' => 'this.form.submit();',
];
$options = [
'' => '- ' . Text::_('COM_COMPONENTBUILDER_SELECT_GET_GROUP') . ' -',
'main' => Text::_('COM_COMPONENTBUILDER_MAIN_GET'),
'custom' => Text::_('COM_COMPONENTBUILDER_CUSTOM_GET')
];
$form->setField(FormHelper::xml($attributes, $options),'filter');
$form->setValue(
'getgroup',
'filter',
$this->state->get("filter.getgroup")
);
array_push($this->filter_fields, 'getgroup');
return $form;
}
/**
* Method to auto-populate the model state.
*
@ -280,6 +319,22 @@ class Dynamic_getsModel extends ListModel
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
// Filtering "getgroup"
$filter_getgroup = $this->state->get("filter.getgroup");
if (!empty($filter_getgroup))
{
if ($filter_getgroup === 'main')
{
// the main gets
$query->where($db->quoteName('a.gettype') . ' IN (1,2)');
}
elseif ($filter_getgroup === 'custom')
{
// the custom gets
$query->where($db->quoteName('a.gettype') . ' IN (3,4)');
}
}
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
@ -362,6 +417,29 @@ class Dynamic_getsModel extends ListModel
{
$query->where('a.gettype = ' . $db->quote($db->escape($_gettype)));
}
elseif (UtilitiesArrayHelper::check($_gettype))
{
// Secure the array for the query
$_gettype = array_map( function ($val) use(&$db) {
if (is_numeric($val))
{
if (is_float($val))
{
return (float) $val;
}
else
{
return (int) $val;
}
}
elseif (StringHelper::check($val))
{
return $db->quote($db->escape($val));
}
}, $_gettype);
// Filter by the Gettype Array.
$query->where('a.gettype IN (' . implode(',', $_gettype) . ')');
}
// Add the list ordering clause.
$orderCol = $this->getState('list.ordering', 'a.id');
@ -404,7 +482,18 @@ class Dynamic_getsModel extends ListModel
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.main_source');
$id .= ':' . $this->getState('filter.gettype');
// Check if the value is an array
$_gettype = $this->getState('filter.gettype');
if (UtilitiesArrayHelper::check($_gettype))
{
$id .= ':' . implode(':', $_gettype);
}
// Check if this is only an number or string
elseif (is_numeric($_gettype)
|| StringHelper::check($_gettype))
{
$id .= ':' . $_gettype;
}
$id .= ':' . $this->getState('filter.name');
return parent::getStoreId($id);

View File

@ -33,6 +33,7 @@ use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Utilities\FilterHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\GetHelper;
@ -298,7 +299,7 @@ class FieldtypeModel extends AdminModel
*
* @return mixed An array of data items on success, false on failure.
*/
public function getVxlfields()
public function getVxifields()
{
// Get the user object.
$user = Factory::getApplication()->getIdentity();
@ -322,7 +323,7 @@ class FieldtypeModel extends AdminModel
{
// column name, and id
$type_extension = explode('__', $filter_extension);
if (($guids = JCBFilterHelper::linked((string) $type_extension[1], (string) $type_extension[0])) !== null)
if (($guids = FilterHelper::linked((string) $type_extension[1], (string) $type_extension[0])) !== null)
{
$field_guids = $guids;
}
@ -338,7 +339,7 @@ class FieldtypeModel extends AdminModel
$filter_admin_view = $this->state->get("filter.admin_view");
if ($get_ids && $filter_admin_view !== null && !empty($filter_admin_view))
{
if (($guids = JCBFilterHelper::linked((string) $filter_admin_view, 'admin_view')) !== null)
if (($guids = FilterHelper::linked((string) $filter_admin_view, 'admin_view')) !== null)
{
// view will return less fields, so we ignore the component
$field_guids = $guids;
@ -436,13 +437,13 @@ class FieldtypeModel extends AdminModel
foreach ($items as $nr => &$item)
{
// convert datatype
$item->datatype = $this->selectionTranslationVxlfields($item->datatype, 'datatype');
$item->datatype = $this->selectionTranslationVxifields($item->datatype, 'datatype');
// convert indexes
$item->indexes = $this->selectionTranslationVxlfields($item->indexes, 'indexes');
$item->indexes = $this->selectionTranslationVxifields($item->indexes, 'indexes');
// convert null_switch
$item->null_switch = $this->selectionTranslationVxlfields($item->null_switch, 'null_switch');
$item->null_switch = $this->selectionTranslationVxifields($item->null_switch, 'null_switch');
// convert store
$item->store = $this->selectionTranslationVxlfields($item->store, 'store');
$item->store = $this->selectionTranslationVxifields($item->store, 'store');
}
}
@ -456,7 +457,7 @@ class FieldtypeModel extends AdminModel
*
* @return string The translatable string.
*/
public function selectionTranslationVxlfields($value,$name)
public function selectionTranslationVxifields($value,$name)
{
// Array of datatype language strings
if ($name === 'datatype')

View File

@ -14,7 +14,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\CMS\Filesystem\Path;
use Joomla\Filesystem\Path;
use Joomla\CMS\Filter\OutputFilter;
use Joomla\CMS\Installer\InstallerHelper;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
@ -25,7 +25,6 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use Joomla\CMS\Filesystem\Folder as FilesystemFolder;
// No direct access to this file
\defined('_JEXEC') or die;
@ -940,7 +939,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
if (is_dir($customDir))
{
// great we have some custom stuff lets move it
if (!FilesystemFolder::copy($customDir, $customPath,'',true))
if (!Folder::copy($customDir, $customPath,'',true))
{
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false;
@ -956,7 +955,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
if (is_dir($imageDir))
{
// great we have some images lets move them
if (!FilesystemFolder::copy($imageDir, $imagesPath,'',true))
if (!Folder::copy($imageDir, $imagesPath,'',true))
{
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false;
@ -972,7 +971,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
if (is_dir($dynamicDir))
{
// get a list of folders
$folders = FilesystemFolder::folders($dynamicDir);
$folders = Folder::folders($dynamicDir);
// check if we have files
if(UtilitiesArrayHelper::check($folders))
{
@ -980,7 +979,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
{
$destination = $this->setDynamicPath($folder);
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
if (!is_dir($fullPath) || !FilesystemFolder::copy($fullPath, $destination,'',true))
if (!is_dir($fullPath) || !Folder::copy($fullPath, $destination,'',true))
{
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error');
$success = false;
@ -993,7 +992,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
}
}
// get a list of files
$files = FilesystemFolder::files($dynamicDir);
$files = Folder::files($dynamicDir);
// check if we have files
if(UtilitiesArrayHelper::check($files))
{
@ -1056,7 +1055,7 @@ class Import_joomla_componentsimportModel extends BaseDatabaseModel
// we are changing the working directory to the tmp path (important)
chdir($tmpPath);
// get a list of files in the current directory tree (all)
$files = FilesystemFolder::files('.', '.', true, true);
$files = Folder::files('.', '.', true, true);
// read in the file content
foreach ($files as $file)
{

View File

@ -14,7 +14,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\CMS\Filesystem\Path;
use Joomla\Filesystem\Path;
use Joomla\CMS\Filter\OutputFilter;
use Joomla\CMS\Installer\InstallerHelper;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;

Some files were not shown because too many files have changed in this diff Show More