diff --git a/CHANGELOG.md b/CHANGELOG.md index b925325c5..7958c8278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# v3.2.0-beta3 + +- Move the old helper compiler files to powers +- Move the old helper extrusion files to powers + # v3.2.0-beta1 - Move beta to main repo diff --git a/README.md b/README.md index 12a574fe5..7e06feea0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.0-beta2) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.0-beta3) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 4th March, 2024 -+ *Version*: 3.2.0-beta2 ++ *Last Build*: 6th March, 2024 ++ *Version*: 3.2.0-beta3 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **694682** ++ *Line count*: **729192** + *Field count*: **2077** -+ *File count*: **5122** ++ *File count*: **5132** + *Folder count*: **455** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 12a574fe5..7e06feea0 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.0-beta2) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.0-beta3) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 4th March, 2024 -+ *Version*: 3.2.0-beta2 ++ *Last Build*: 6th March, 2024 ++ *Version*: 3.2.0-beta3 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **694682** ++ *Line count*: **729192** + *Field count*: **2077** -+ *File count*: **5122** ++ *File count*: **5132** + *Folder count*: **455** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/componentbuilder.php b/admin/componentbuilder.php index 631e970f8..7983508e4 100644 --- a/admin/componentbuilder.php +++ b/admin/componentbuilder.php @@ -85,7 +85,7 @@ Html::_('script', 'components/com_componentbuilder/assets/js/admin.js', ['versio // require helper files JLoader::register('ComponentbuilderHelper', __DIR__ . '/helpers/componentbuilder.php'); -JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php'); +\JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php'); JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php'); // Trigger the Global Admin Event diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index eaf9bb448..8b95dbb06 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -123,7 +123,7 @@ class ComponentbuilderControllerAdmin_views extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/compiler.php b/admin/controllers/compiler.php index 78397effe..e46145a32 100644 --- a/admin/controllers/compiler.php +++ b/admin/controllers/compiler.php @@ -97,8 +97,6 @@ class ComponentbuilderControllerCompiler extends AdminController // currently only those with admin access can compile a component if($user->authorise('core.manage', 'com_componentbuilder')) { - // include component compiler - require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php'; $model = $this->getModel('compiler'); if ($model->builder()) { @@ -530,7 +528,7 @@ class ComponentbuilderControllerCompiler extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect @@ -570,7 +568,7 @@ class ComponentbuilderControllerCompiler extends AdminController public function clearTmp() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect @@ -611,7 +609,7 @@ class ComponentbuilderControllerCompiler extends AdminController public function runTranslator() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/custom_codes.php b/admin/controllers/custom_codes.php index bb9b3342d..efa3af237 100644 --- a/admin/controllers/custom_codes.php +++ b/admin/controllers/custom_codes.php @@ -123,7 +123,7 @@ class ComponentbuilderControllerCustom_codes extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/dynamic_gets.php b/admin/controllers/dynamic_gets.php index 0e2c670d7..8c49894be 100644 --- a/admin/controllers/dynamic_gets.php +++ b/admin/controllers/dynamic_gets.php @@ -123,7 +123,7 @@ class ComponentbuilderControllerDynamic_gets extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/fields.php b/admin/controllers/fields.php index adf182fc1..acaa65876 100644 --- a/admin/controllers/fields.php +++ b/admin/controllers/fields.php @@ -123,7 +123,7 @@ class ComponentbuilderControllerFields extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index 931c2b6b4..42091f0b5 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -124,7 +124,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect @@ -164,7 +164,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController public function clearTmp() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/joomla_plugins.php b/admin/controllers/joomla_plugins.php index c0898b160..bdc218298 100644 --- a/admin/controllers/joomla_plugins.php +++ b/admin/controllers/joomla_plugins.php @@ -58,7 +58,7 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/powers.php b/admin/controllers/powers.php index 3253462eb..14beb09e3 100644 --- a/admin/controllers/powers.php +++ b/admin/controllers/powers.php @@ -59,7 +59,7 @@ class ComponentbuilderControllerPowers extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/controllers/validation_rules.php b/admin/controllers/validation_rules.php index 86943676c..69c81f4d9 100644 --- a/admin/controllers/validation_rules.php +++ b/admin/controllers/validation_rules.php @@ -123,7 +123,7 @@ class ComponentbuilderControllerValidation_rules extends AdminController public function runExpansion() { // Check for request forgeries - Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); + Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); // check if user has the right $user = Factory::getUser(); // set page redirect diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 5b38dff39..3d509fbd7 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -1123,15 +1123,6 @@ abstract class ComponentbuilderHelper jimport('joomla.application'); } - /** - * The dynamic builder of views, tables and fields - **/ - public static function dynamicBuilder(&$data, $type) - { - self::autoLoader('extrusion'); - $extruder = new Extrusion($data); - } - /* * Convert repeatable field to subform * diff --git a/admin/helpers/indenter.php b/admin/helpers/indenter.php deleted file mode 100644 index 575896cd0..000000000 --- a/admin/helpers/indenter.php +++ /dev/null @@ -1,204 +0,0 @@ - - @github Joomla Component Builder - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -/** - * @link https://github.com/gajus/dindent for the canonical source repository - * @license https://github.com/gajus/dindent/blob/master/LICENSE BSD 3-Clause - */ -class Indenter { - private - $log = array(), - $options = array( - 'indentation_character' => ' ' - ), - $inline_elements = array('b', 'big', 'i', 'small', 'tt', 'abbr', 'acronym', 'cite', 'code', 'dfn', 'em', 'kbd', 'strong', 'samp', 'var', 'a', 'bdo', 'br', 'img', 'span', 'sub', 'sup'), - $temporary_replacements_script = array(), - $temporary_replacements_inline = array(); - - const ELEMENT_TYPE_BLOCK = 0; - const ELEMENT_TYPE_INLINE = 1; - - const MATCH_INDENT_NO = 0; - const MATCH_INDENT_DECREASE = 1; - const MATCH_INDENT_INCREASE = 2; - const MATCH_DISCARD = 3; - - /** - * @param array $options - */ - public function __construct (array $options = array()) { - foreach ($options as $name => $value) { - if (!array_key_exists($name, $this->options)) { - throw new Exception\InvalidArgumentException('Unrecognized option.'); - } - - $this->options[$name] = $value; - } - } - - /** - * @param string $element_name Element name, e.g. "b". - * @param ELEMENT_TYPE_BLOCK|ELEMENT_TYPE_INLINE $type - * @return null - */ - public function setElementType ($element_name, $type) { - if ($type === static::ELEMENT_TYPE_BLOCK) { - $this->inline_elements = array_diff($this->inline_elements, array($element_name)); - } else if ($type === static::ELEMENT_TYPE_INLINE) { - $this->inline_elements[] = $element_name; - } else { - throw new Exception\InvalidArgumentException('Unrecognized element type.'); - } - - $this->inline_elements = array_unique($this->inline_elements); - } - - /** - * @param string $input HTML input. - * @return string Indented HTML. - */ - public function indent ($input) { - $this->log = array(); - - // Dindent does not indent ', $input); - } - } - - // Removing double whitespaces to make the source code easier to read. - // With exception of
/ CSS white-space changing the default behaviour, double whitespace is meaningless in HTML output.
-        // This reason alone is sufficient not to use Dindent in production.
-        $input = str_replace("\t", '', $input);
-        $input = preg_replace('/\s{2,}/', ' ', $input);
-
-        // Remove inline elements and replace them with text entities.
-        if (preg_match_all('/<(' . implode('|', $this->inline_elements) . ')[^>]*>(?:[^<]*)<\/\1>/', $input, $matches)) {
-            $this->temporary_replacements_inline = $matches[0];
-            foreach ($matches[0] as $i => $match) {
-                $input = str_replace($match, 'ᐃ' . ($i + 1) . 'ᐃ', $input);
-            }
-        }
-
-        $subject = $input;
-
-        $output = '';
-
-        $next_line_indentation_level = 0;
-
-        do {
-            $indentation_level = $next_line_indentation_level;
-
-            $patterns = array(
-                // block tag
-                '/^(<([a-z]+)(?:[^>]*)>(?:[^<]*)<\/(?:\2)>)/' => static::MATCH_INDENT_NO,
-                // DOCTYPE
-                '/^]*)>/' => static::MATCH_INDENT_NO,
-                // tag with implied closing
-                '/^<(input|link|meta|base|br|img|hr)([^>]*)>/' => static::MATCH_INDENT_NO,
-                // opening tag
-                '/^<[^\/]([^>]*)>/' => static::MATCH_INDENT_INCREASE,
-                // closing tag
-                '/^<\/([^>]*)>/' => static::MATCH_INDENT_DECREASE,
-                // self-closing tag
-                '/^<(.+)\/>/' => static::MATCH_INDENT_DECREASE,
-                // whitespace
-                '/^(\s+)/' => static::MATCH_DISCARD,
-                // text node
-                '/([^<]+)/' => static::MATCH_INDENT_NO
-            );
-            $rules = array('NO', 'DECREASE', 'INCREASE', 'DISCARD');
-
-            foreach ($patterns as $pattern => $rule) {
-                if ($match = preg_match($pattern, $subject, $matches)) {
-                    $this->log[] = array(
-                        'rule' => $rules[$rule],
-                        'pattern' => $pattern,
-                        'subject' => $subject,
-                        'match' => $matches[0]
-                    );
-
-                    $subject = mb_substr($subject, mb_strlen($matches[0]));
-
-                    if ($rule === static::MATCH_DISCARD) {
-                        break;
-                    }
-
-                    if ($rule === static::MATCH_INDENT_NO) {
-
-                    } else if ($rule === static::MATCH_INDENT_DECREASE) {
-                        $next_line_indentation_level--;
-                        $indentation_level--;
-                    } else {
-                        $next_line_indentation_level++;
-                    }
-
-                    if ($indentation_level < 0) {
-                        $indentation_level = 0;
-                    }
-
-                    $output .= str_repeat($this->options['indentation_character'], $indentation_level) . $matches[0] . "\n";
-
-                    break;
-                }
-            }
-        } while ($match);
-
-        $interpreted_input = '';
-        foreach ($this->log as $e) {
-            $interpreted_input .= $e['match'];
-        }
-
-        if ($interpreted_input !== $input) {
-            throw new Exception\RuntimeException('Did not reproduce the exact input.');
-        }
-
-        $output = preg_replace('/(<(\w+)[^>]*>)\s*(<\/\2>)/', '\\1\\3', $output);
-
-        foreach ($this->temporary_replacements_script as $i => $original) {
-            $output = str_replace('', $original, $output);
-        }
-
-        foreach ($this->temporary_replacements_inline as $i => $original) {
-            $output = str_replace('ᐃ' . ($i + 1) . 'ᐃ', $original, $output);
-        }
-
-        return trim($output);
-    }
-
-    /**
-     * Debugging utility. Get log for the last indent operation.
-     *
-     * @return array
-     */
-    public function getLog () {
-        return $this->log;
-    }
-}
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index 741f2495c..37407c526 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -1292,6 +1292,7 @@ COM_COMPONENTBUILDER_ALL_FOUND_INSTANCES_IN_S_WHERE_REPLACED="All found instance
 COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER="All is good, please check again later"
 COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, there is no notice at this time."
 COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA="All of these packages are a fully developed/mapped components for JCB. They can be seen as demo content, or base images from which to start your project.
Always make sure you are on the latest version of JCB before importing any of these packages, should any of them fail to import please let us know." +COM_COMPONENTBUILDER_ALL_THE_FIELDS_AND_VIEWS_FROM_YOUR_SQL_DUMP_HAS_BEEN_CREATED_AND_LINKED_TO_THIS_COMPONENT="All the fields and views from your sql dump has been created and linked to this component." COM_COMPONENTBUILDER_ALL_THE_LANGUAGES_FOUND_IN_JOOMLA_WERE_SUCCESSFULLY_IMPORTED="All the languages found in Joomla were successfully imported." COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?" COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER="Already selected, try another." @@ -1648,6 +1649,7 @@ COM_COMPONENTBUILDER_CLONE="Clone" COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!" COM_COMPONENTBUILDER_CLOSE_NEW="Close & New" COM_COMPONENTBUILDER_CODE="Code" +COM_COMPONENTBUILDER_CODESTRINGS="code/strings" COM_COMPONENTBUILDER_COMMUNITY_PACKAGES="Community Packages" COM_COMPONENTBUILDER_COMPANY="Company" COM_COMPONENTBUILDER_COMPANY_NAME="Company Name" @@ -3667,6 +3669,7 @@ COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors" COM_COMPONENTBUILDER_COPYRIGHT="Copyright" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER="Could not clear the tmp folder!" +COM_COMPONENTBUILDER_COULD_NOT_FIND_THE_DATA_NEEDED_TO_CONTINUE="Could not find the data needed to continue." COM_COMPONENTBUILDER_COULD_NOT_INSTALL_COMPONENT="Could not install component!" COM_COMPONENTBUILDER_COULD_NOT_INSTALL_EXTENSIONS="Could not install extensions!" COM_COMPONENTBUILDER_COULD_NOT_INSTALL_MODULE="Could not install module!" @@ -5403,7 +5406,11 @@ COM_COMPONENTBUILDER_HI="Hi" COM_COMPONENTBUILDER_HIDE_ONLY="Hide Only" COM_COMPONENTBUILDER_HIDE_TOGGLE="Hide Toggle" COM_COMPONENTBUILDER_HOW_TO_GET_A_S_FREE_KEYSA_FROM_VDM="How to get free keys from VDM." +COM_COMPONENTBUILDER_HR_HTHREEASSETS_TABLE_NOTICEHTHREE="

Assets Table Notice

" +COM_COMPONENTBUILDER_HR_HTHREEASSETS_TABLE_WARNINGHTHREE="

Assets Table Warning

" +COM_COMPONENTBUILDER_HR_HTHREECONDITIONAL_SCRIPT_WARNINGHTHREE="

Conditional Script Warning

" COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODES_WARNINGHTHREE="

Custom Codes Warning

" +COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODE_WARNINGHTHREE="

Custom Code Warning

" COM_COMPONENTBUILDER_HR_HTHREECZEROMPZERONTHREENT_ISSUE_FOUNDHTHREEPTHE_PATH_S_COULD_NOT_BE_USEDP="

c0mp0n3nt issue found

The path (%s) could not be used.

" COM_COMPONENTBUILDER_HR_HTHREEDASHBOARD_ERRORHTHREE="

Dashboard Error

" COM_COMPONENTBUILDER_HR_HTHREEDYNAMIC_FOLDERS_WERE_DETECTEDHTHREE="

Dynamic folder(s) were detected.

" @@ -5411,9 +5418,15 @@ COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_ERRORHTHREE="

External Code COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE="

External Code Notice

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE="

External Code Warning

" COM_COMPONENTBUILDER_HR_HTHREEFIELD_NOTICEHTHREE="

Field Notice

" +COM_COMPONENTBUILDER_HR_HTHREEFIELD_WARNINGHTHREE="

Field Warning

" COM_COMPONENTBUILDER_HR_HTHREEFILE_PATH_ERRORHTHREE="

File Path Error

" COM_COMPONENTBUILDER_HR_HTHREEFOLDER_PATH_ERRORHTHREE="

Folder Path Error

" +COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_NOTICEHTHREE="

Language Notice

" +COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_WARNINGHTHREE="

Language Warning

" +COM_COMPONENTBUILDER_HR_HTHREEMULTI_FILTER_ERRORHTHREE="

Multi Filter Error

" +COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE="

%s Warning

" COM_COMPONENTBUILDER_HR_HTHREETIDY_ERRORHTHREE="

Tidy Error

" +COM_COMPONENTBUILDER_HR_HTHREEWHMCS_ERRORHTHREE="

WHMCS Error

" 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="

Placeholder Removed!

This custom code can only be used in other custom code, not in it self! Since that will cause a infinite loop in the compiler.

" 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="

%s

Custom code can only be used in other custom code if set as JCB (manual), you can not add them to Hash (Automation) code at this point.

" 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="

%s namespace error (%s)

You must at-least have two sections in your namespace, you just have one (%s). This is an unacceptable action, please see psr-4 for more info.

This %s was therefore removed, click here to fix this issue.

" @@ -7528,6 +7541,7 @@ COM_COMPONENTBUILDER_NO_COMPONENTS_FOUND="No Components Found" COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!" 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_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN="No component was selected, please make a selection of one component and try again!" +COM_COMPONENTBUILDER_NO_CREATE_TABLE_WERE_FOUND_PLEASE_CHECK_YOUR_SQL="No "CREATE TABLE.." were found, please check your sql." COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)" COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested." COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND="No description found." @@ -7665,6 +7679,7 @@ COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST="Please first m COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION="Please note that this package has no checksum validation!" COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile." COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER="Please try again later" +COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_THIS_ERROR_USUALY_HAPPENS_IF_IT_IS_A_NEW_COMPONENT_BEACUES_WE_NEED_A_COMPONENT_ID_TO_DO_THIS_BUILD_WITH_YOUR_SQL_DUMP="Please try again, this error usualy happens if it is a new component, beacues we need a component ID to do this build with your sql dump." COM_COMPONENTBUILDER_PLEASE_WAIT="Please wait!" COM_COMPONENTBUILDER_PLEASE_WAIT_LOADING="Please wait, loading" COM_COMPONENTBUILDER_PLUGIN="Plugin" @@ -7873,6 +7888,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 "field", eg:%s" COM_COMPONENTBUILDER_RESET="Reset" COM_COMPONENTBUILDER_RESET_FAILED="Reset Failed!" +COM_COMPONENTBUILDER_REVERTED_THE_B_ASSETSB_TABLE_RULES_COLUMN_BACK_TO_ITS_DEFAULT_SIZE_OF_VARCHARFIVE_THOUSAND_ONE_HUNDRED_AND_TWENTY="Reverted the #__assets table rules column back to its default size of varchar(5120)" COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets" COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab" COM_COMPONENTBUILDER_RIGHT_OF_TABS="Right of Tabs" @@ -9147,6 +9163,12 @@ COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move %s!" COM_COMPONENTBUILDER_WE_FOUND_DYNAMIC_CODE_BALL_IN_ONE_LINEB_AND_IGNORED_IT_PLEASE_REVIEW_S_FOR_MORE_DETAILS="We found dynamic code all in one line, and ignored it! Please review (%s) for more details!" COM_COMPONENTBUILDER_WE_FOUND_SOME_INSTANCES_IN_S="We found some instances in %s" COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved %s!" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_COMPONENT_TO_THE_GIT_REPOSITORY="We where was unable to transfer the component to the git repository:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_COMPONENT_ZIP_FILE_TO_THE_BACKUP_FOLDER="We where was unable to transfer the component ZIP file to the backup folder:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_MODULE_TO_THE_GIT_REPOSITORY="We where was unable to transfer the (%s) module to the git repository:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_MODULE_ZIP_FILE_TO_THE_BACKUP_FOLDER="We where was unable to transfer the (%s) module zip file to the backup folder:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_PLUGIN_TO_THE_GIT_REPOSITORY="We where was unable to transfer the (%s) plugin to the git repository:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_PLUGIN_ZIP_FILE_TO_THE_BACKUP_FOLDER="We where was unable to transfer the (%s) plugin zip file to the backup folder:" COM_COMPONENTBUILDER_WHAT_VERSION_OF_JOOMLA_WOULD_YOU_LIKE_TO_TARGET="What version of Joomla would you like to target." COM_COMPONENTBUILDER_WHICH_TYPE_OF_INDENTATION_WOULD_YOU_LIKE_TO_USE_PLEASE_NOTE_THAT_THIS_DOES_NOT_YET_IMPACT_THE_STATIC_TEMPLATES="Which type of indentation would you like to use? Please note that this does not yet impact the static templates." COM_COMPONENTBUILDER_WHILE_WE_DOWNLOAD_ALL_TWENTY_SIX_COMPILER_GIF_ANIMATIONS_RANDOMLY_USED_IN_THE_COMPILER_GUI_DURING_COMPILATION="While we download all 26 compiler GIF animations randomly used in the compiler GUI during compilation" diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 3b4b4334d..125c69ef2 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -3347,7 +3347,7 @@ class ComponentbuilderModelAjax extends ListModel protected function buildFieldTextarea($name, $desc, $default, $rows) { // get the textarea - $textarea = JFormHelper::loadFieldType('textarea', true); + $textarea = \JFormHelper::loadFieldType('textarea', true); // start building the name field XML $textareaXML = new \SimpleXMLElement(''); // textarea attributes @@ -3373,7 +3373,7 @@ class ComponentbuilderModelAjax extends ListModel protected function buildFieldOptionsSubform($values, $nameListOptions = null, $name = 'properties', $label = 'COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL') { // get the subform - $subform = JFormHelper::loadFieldType('subform', true); + $subform = \JFormHelper::loadFieldType('subform', true); // start building the subform field XML $subformXML = new \SimpleXMLElement(''); // subform attributes diff --git a/admin/models/compiler.php b/admin/models/compiler.php index 7c5645af2..d6899ede9 100644 --- a/admin/models/compiler.php +++ b/admin/models/compiler.php @@ -18,6 +18,7 @@ use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\MVC\Model\ListModel; use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\JsonHelper; diff --git a/admin/models/fields/superpowerpaths.php b/admin/models/fields/superpowerpaths.php index 4a1219943..692d55a65 100644 --- a/admin/models/fields/superpowerpaths.php +++ b/admin/models/fields/superpowerpaths.php @@ -15,10 +15,9 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; -jimport('joomla.form.helper'); -JFormHelper::loadFieldClass('checkboxes'); -JFormHelper::loadFieldClass('checkboxes'); use VDM\Joomla\Utilities\Component\Helper; +jimport('joomla.form.helper'); +\JFormHelper::loadFieldClass('checkboxes'); /** * Superpowerpaths Form Field class for the Componentbuilder component @@ -63,7 +62,7 @@ class JFormFieldSuperpowerpaths extends JFormFieldCheckboxes // must have one / in the path if (strpos($default, '/') !== false) { - $tmp = new stdClass; + $tmp = new \stdClass; $tmp->text = $tmp->value = trim($default); $tmp->checked = false; $options[$tmp->value] = $tmp; @@ -81,7 +80,7 @@ class JFormFieldSuperpowerpaths extends JFormFieldCheckboxes if (isset($value->owner) && strlen($value->owner) > 1 && isset($value->repo) && strlen($value->repo) > 1) { - $tmp = new stdClass; + $tmp = new \stdClass; $tmp->text = $tmp->value = trim($value->owner) . '/' . trim($value->repo); $tmp->checked = false; diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 7c2eddf8d..39300fbd5 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -30,6 +30,7 @@ use VDM\Joomla\Utilities\GuidHelper; use VDM\Joomla\FOF\Encrypt\AES; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Componentbuilder\Extrusion\Helper\Extrusion; /** * Componentbuilder Joomla_component Admin Model @@ -1569,7 +1570,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel // we check if component should be build from sql file if (isset($data['buildcomp']) && 1 == $data['buildcomp']) { - ComponentbuilderHelper::dynamicBuilder($data, 1); + $extruder__ = new Extrusion($data); } // Set the Params Items to data diff --git a/admin/sql/updates/mysql/3.2.03.sql b/admin/sql/updates/mysql/3.2.03.sql new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/admin/sql/updates/mysql/3.2.03.sql @@ -0,0 +1 @@ + diff --git a/admin/views/joomla_plugin/view.html.php b/admin/views/joomla_plugin/view.html.php index 1cd6ecaa9..a02ab095c 100644 --- a/admin/views/joomla_plugin/view.html.php +++ b/admin/views/joomla_plugin/view.html.php @@ -262,8 +262,8 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView $this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); $this->document->addScriptDeclaration("selectionArray = {'property':{},'method':{}};"); // add a few field options via PHP - JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); - $tmp_ = JFormHelper::loadFieldType('joomlaplugingroups')->options; + \JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields'); + $tmp_ = \JFormHelper::loadFieldType('joomlaplugingroups')->options; if (ArrayHelper::check($tmp_)) { $_tmp = array(); @@ -274,7 +274,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView // Set the values to JavaScript $this->document->addScriptDeclaration("selectionArray['joomla_plugin_group'] = ". json_encode($_tmp) . ";"); } - $tmp_ = JFormHelper::loadFieldType('pluginsclassproperties')->options; + $tmp_ = \JFormHelper::loadFieldType('pluginsclassproperties')->options; if (ArrayHelper::check($tmp_)) { $_tmp = array(); @@ -285,7 +285,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView // Set the values to JavaScript $this->document->addScriptDeclaration("selectionArray['property'] = ". json_encode($_tmp) . ";"); } - $tmp_ = JFormHelper::loadFieldType('pluginsclassmethods')->options; + $tmp_ = \JFormHelper::loadFieldType('pluginsclassmethods')->options; if (ArrayHelper::check($tmp_)) { $_tmp = array(); diff --git a/componentbuilder.xml b/componentbuilder.xml index 756d9f071..694a1fc47 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 4th March, 2024 + 6th March, 2024 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 3.2.0-beta2 + 3.2.0-beta3 Component Builder (v.3.2.0-beta2) +

Component Builder (v.3.2.0-beta3)

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. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index ef4e87623..6c4f2cf8d 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -1559,4 +1559,22 @@ https://dev.vdm.io + + Component Builder + Builds Complex Joomla Components + pkg_component_builder + package + site + 3.2.03 + https://dev.vdm.io + + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.0-beta3.zip + + + beta + + Llewellyn van der Merwe + https://dev.vdm.io + + \ No newline at end of file diff --git a/admin/helpers/compiler.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Compiler.php similarity index 92% rename from admin/helpers/compiler.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Compiler.php index e963cc553..b60ec24fb 100644 --- a/admin/helpers/compiler.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Compiler.php @@ -1,43 +1,40 @@ - - * @gitea Joomla Component Builder - * @github Joomla Component Builder + * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - + +namespace VDM\Joomla\Componentbuilder\Compiler\Helper; + + use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\Folder; -use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Utilities\ArrayHelper; -use VDM\Joomla\Utilities\ObjectHelper; -use VDM\Joomla\Utilities\FileHelper; -use VDM\Joomla\Utilities\GetHelper; -use VDM\Joomla\Utilities\MathHelper; -use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; - -// Use the component builder autoloader -ComponentbuilderHelper::autoLoader(); - -/** +// use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; (for Joomla 4 and above) +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\MathHelper; +use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Helper\Infusion; + + +/** * Compiler class - * @deprecated 3.3 - */ -class Compiler extends Infusion -{ - + * + * @deprecated 3.3 + */ +class Compiler extends Infusion +{ /** * The Temp path * @@ -172,7 +169,7 @@ class Compiler extends Infusion if (CFactory::_('Compiler.Builder.Language.Messages')->isArray('exclude')) { $this->app->enqueueMessage( - Text::_('


Language Warning

'), 'Warning' + Text::_('COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_WARNINGHTHREE'), 'Warning' ); foreach (CFactory::_('Compiler.Builder.Language.Messages')->get('exclude') as $tag => $targets) { @@ -190,7 +187,7 @@ class Compiler extends Infusion } } $this->app->enqueueMessage( - Text::_('

Language Notice

'), 'Notice' + Text::_('COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_NOTICEHTHREE'), 'Notice' ); $this->app->enqueueMessage( Text::sprintf( @@ -214,7 +211,7 @@ class Compiler extends Infusion if (CFactory::_('Compiler.Builder.Language.Messages')->isArray('include')) { $this->app->enqueueMessage( - Text::_('

Language Notice

'), 'Notice' + Text::_('COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_NOTICEHTHREE'), 'Notice' ); foreach (CFactory::_('Compiler.Builder.Language.Messages')->get('include') as $tag => $targets) { @@ -246,7 +243,7 @@ class Compiler extends Infusion if ($add_assets_table_fix) { $this->app->enqueueMessage( - Text::_('

Assets Table Notice

'), 'Notice' + Text::_('COM_COMPONENTBUILDER_HR_HTHREEASSETS_TABLE_NOTICEHTHREE'), 'Notice' ); $asset_table_fix_type = ($add_assets_table_fix == 2) ? 'intelligent' : 'sql'; @@ -262,7 +259,7 @@ class Compiler extends Infusion elseif (CFactory::_('Utilities.Counter')->accessSize >= 30) { $this->app->enqueueMessage( - Text::_('

Assets Table Warning

'), 'Warning' + Text::_('COM_COMPONENTBUILDER_HR_HTHREEASSETS_TABLE_WARNINGHTHREE'), 'Warning' ); $this->app->enqueueMessage( Text::sprintf( @@ -279,7 +276,7 @@ class Compiler extends Infusion if (CFactory::_('Utilities.Counter')->accessSize < 30) { $this->app->enqueueMessage( - Text::_('

Assets Table Warning

'), + Text::_('COM_COMPONENTBUILDER_HR_HTHREEASSETS_TABLE_WARNINGHTHREE'), 'Warning' ); } @@ -328,7 +325,7 @@ class Compiler extends Infusion )) { $this->app->enqueueMessage( - Text::_('

Language Warning

'), 'Warning' + Text::_('COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_WARNINGHTHREE'), 'Warning' ); if (count((array) $mismatch) > 1) { @@ -368,10 +365,10 @@ class Compiler extends Infusion // the correct string $externalCodeString = ($externalCount == 1) ? Text::_( 'code/string' - ) : Text::_('code/strings'); + ) : Text::_('COM_COMPONENTBUILDER_CODESTRINGS'); // the notice $this->app->enqueueMessage( - Text::_('

External Code Notice

'), 'Notice' + Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE'), 'Notice' ); $this->app->enqueueMessage( Text::sprintf( @@ -686,7 +683,7 @@ class Compiler extends Infusion // check if the file should get PHP opening $php = ''; - if (ComponentbuilderHelper::checkFileType($name, 'php')) + if (\ComponentbuilderHelper::checkFileType($name, 'php')) { $php = "app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -978,7 +975,7 @@ class Compiler extends Infusion { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1015,7 +1012,7 @@ class Compiler extends Infusion Folder::copy(CFactory::_('Utilities.Paths')->component_path, $repoFullPath, '', true); } catch (\RuntimeException $e) { $this->app->enqueueMessage( - Text::_('We where was unable to transfer the component to the git repository:') . ' ' . $e->getMessage() + Text::_('COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_COMPONENT_TO_THE_GIT_REPOSITORY') . ' ' . $e->getMessage() , 'Error' ); } @@ -1057,7 +1054,7 @@ class Compiler extends Infusion ); } catch (\RuntimeException $e) { $this->app->enqueueMessage( - Text::sprintf('We where was unable to transfer the (%s) module to the git repository:', $module->name) . ' ' . $e->getMessage() + Text::sprintf('COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_MODULE_TO_THE_GIT_REPOSITORY', $module->name) . ' ' . $e->getMessage() , 'Error' ); } @@ -1101,7 +1098,7 @@ class Compiler extends Infusion ); } catch (\RuntimeException $e) { $this->app->enqueueMessage( - Text::sprintf('We where was unable to transfer the (%s) plugin to the git repository:', $plugin->name) . ' ' . $e->getMessage() + Text::sprintf('COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_PLUGIN_TO_THE_GIT_REPOSITORY', $plugin->name) . ' ' . $e->getMessage() , 'Error' ); } @@ -1156,7 +1153,7 @@ class Compiler extends Infusion ); } catch (\RuntimeException $e) { $this->app->enqueueMessage( - Text::_('We where was unable to transfer the component ZIP file to the backup folder:') . ' ' . $e->getMessage() + Text::_('COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_COMPONENT_ZIP_FILE_TO_THE_BACKUP_FOLDER') . ' ' . $e->getMessage() , 'Error' ); } @@ -1259,7 +1256,7 @@ class Compiler extends Infusion ); } catch (\RuntimeException $e) { $this->app->enqueueMessage( - Text::sprintf('We where was unable to transfer the (%s) module zip file to the backup folder:', $module->name) . ' ' . $e->getMessage() + Text::sprintf('COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_MODULE_ZIP_FILE_TO_THE_BACKUP_FOLDER', $module->name) . ' ' . $e->getMessage() , 'Error' ); } @@ -1367,7 +1364,7 @@ class Compiler extends Infusion ); } catch (\RuntimeException $e) { $this->app->enqueueMessage( - Text::sprintf('We where was unable to transfer the (%s) plugin zip file to the backup folder:', $plugin->name) . ' ' . $e->getMessage() + Text::sprintf('COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_PLUGIN_ZIP_FILE_TO_THE_BACKUP_FOLDER', $plugin->name) . ' ' . $e->getMessage() , 'Error' ); } @@ -1463,7 +1460,7 @@ class Compiler extends Infusion if (File::exists($file)) { foreach ( - new SplFileObject($file) as $lineNumber => $lineContent + new \SplFileObject($file) as $lineNumber => $lineContent ) { // if not found we need to load line bites per line @@ -1561,7 +1558,7 @@ class Compiler extends Infusion // Load escaped code since the target endhash has changed $this->loadEscapedCode($file, $target, $lineBites); $this->app->enqueueMessage( - Text::_('

Custom Code Warning

'), + Text::_('COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODE_WARNINGHTHREE'), 'Warning' ); $this->app->enqueueMessage( @@ -1580,7 +1577,7 @@ class Compiler extends Infusion // Load escaped code since the target hash has changed $this->loadEscapedCode($file, $target, $lineBites); $this->app->enqueueMessage( - Text::_('

Custom Code Warning

'), + Text::_('COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODE_WARNINGHTHREE'), 'Warning' ); $this->app->enqueueMessage( @@ -1598,7 +1595,7 @@ class Compiler extends Infusion { // Give developer a notice that file is not found. $this->app->enqueueMessage( - Text::_('

Custom Code Warning

'), + Text::_('COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODE_WARNINGHTHREE'), 'Warning' ); $this->app->enqueueMessage( @@ -1665,6 +1662,6 @@ class Compiler extends Infusion protected function addDataToFile(string $file, string $data, int $position, ?int $replace = null) { CFactory::_('Utilities.FileInjector')->add($file, $data, $position, $replace); - } - -} + } +} + diff --git a/admin/helpers/compiler/c_Fields.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Fields.php similarity index 96% rename from admin/helpers/compiler/c_Fields.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Fields.php index c2a620ba1..a171dd6b5 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Fields.php @@ -1,1582 +1,1585 @@ - * @gitea Joomla Component Builder - * @github 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 - */ +/** + * @package Joomla.Component.Builder + * + * @created 4th September, 2022 + * @author Llewellyn van der Merwe + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); +namespace VDM\Joomla\Componentbuilder\Compiler\Helper; -use Joomla\CMS\Language\Text; -use VDM\Joomla\Utilities\StringHelper; + +use Joomla\CMS\Language\Text; +// use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; (for Joomla 4 and above) use VDM\Joomla\Utilities\ArrayHelper; -use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; +use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; +use VDM\Joomla\Componentbuilder\Compiler\Helper\Structure; + /** - * Compiler class + * Fields class + * * @deprecated 3.3 */ class Fields extends Structure { - - /** - * Metadate Switch - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Meta.Data')->get($key); - */ - public $metadataBuilder = []; - - /** - * View access Switch - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Access.Switch')->get($key); - */ - public $accessBuilder = []; - - /** - * edit view tabs counter - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Tab.Counter')->get($key); - */ - public $tabCounter = []; - - /** - * layout builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Layout')->get($key); - */ - public $layoutBuilder = []; - - /** - * permissions builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Has.Permissions')->get($key); - */ - public $hasPermissions = []; - - /** - * used to fix the zero order - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Order.Zero')->get($key); - */ - private $zeroOrderFix = []; - - /** - * Site field data - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Site.Field.Data')->get($key); - */ - public $siteFieldData = []; - - /** - * list of fields that are not being escaped - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Do.Not.Escape')->get($key); - */ - public $doNotEscape = []; - - /** - * list of classes used in the list view for the fields - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.List.Field.Class')->set($key, true); - */ - public $listFieldClass = []; - - /** - * tags builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Tags')->get($key); - */ - public $tagsBuilder = []; - - /** - * query builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Tables')->get($key); - */ - public $queryBuilder = []; - - /** - * unique keys for database field - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Unique.Keys')->get($key); - */ - public $dbUniqueKeys = []; - - /** - * unique guid swtich - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Unique.Guid')->get($key); - */ - public $dbUniqueGuid = []; - - /** - * keys for database field - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Keys')->get($key); - */ - public $dbKeys = []; - - /** - * history builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.History')->get($key); - */ - public $historyBuilder = []; - - /** - * alias builder - * - * @var array - * @deprecated 3.3 CFactory::_('Compiler.Builder.Alias')->get($key); - */ - public $aliasBuilder = []; - - /** - * title builder - * - * @var array - * @deprecated 3.3 CFactory::_('Compiler.Builder.Title')->get($key); - */ - public $titleBuilder = []; - - /** - * list builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Lists')->get($key); - */ - public $listBuilder = []; - - /** - * custom Builder List - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.List')->get($key); - */ - public $customBuilderList = []; - - /** - * Hidden Fields Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Hidden.Fields')->get($key); - */ - public $hiddenFieldsBuilder = []; - - /** - * INT Field Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Integer.Fields')->get($key); - */ - public $intFieldsBuilder = []; - - /** - * Dynamic Fields Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Dynamic.Fields')->get($key); - */ - public $dynamicfieldsBuilder = []; - - /** - * Main text Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Main.Text.Field')->get($key); - */ - public $maintextBuilder = []; - - /** - * Custom Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.Field')->get($key); - */ - public $customBuilder = []; - - /** - * Custom Field Links Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.Field.Links')->get($key); - */ - public $customFieldLinksBuilder = []; - - /** - * Set Script for User Switch - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Script.User.Switch')->get($key); - */ - public $setScriptUserSwitch = []; - - /** - * Set Script for Media Switch - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Script.Media.Switch')->get($key); - */ - public $setScriptMediaSwitch = []; - - /** - * Category builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Category')->get($key); - */ - public $categoryBuilder = []; - - /** - * Category Code builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Category.Code')->get($key); - */ - public $catCodeBuilder = []; - - /** - * Check Box builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Check.Box')->get($key); - */ - public $checkboxBuilder = []; - - /** - * Json String Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.String')->get($key); - */ - public $jsonStringBuilder = []; - - /** - * Json String Builder for return values to array - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.Item.Array')->get($key); - */ - public $jsonItemBuilderArray = []; - - /** - * Json Item Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.Item')->get($key); - */ - public $jsonItemBuilder = []; - - /** - * Base 64 Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Base.Six.Four')->get($key); - */ - public $base64Builder = []; - - /** - * Basic Encryption Field Modeling - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Basic.Field')->get($key); - */ - public $basicFieldModeling = []; - - /** - * WHMCS Encryption Field Modeling - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Whmcs.Field')->get($key); - */ - public $whmcsFieldModeling = []; - - /** - * Medium Encryption Field Modeling - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Medium.Field')->get($key); - */ - public $mediumFieldModeling = []; - - /** - * Expert Field Modeling - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Expert.Field')->get($key); - */ - public $expertFieldModeling = []; - - /** - * Expert Mode Initiator - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Expert.Field.Initiator')->get($key); - */ - public $expertFieldModelInitiator = []; - - /** - * Get Items Method List String Fix Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Items.Method.List.String')->get($key); - */ - public $getItemsMethodListStringFixBuilder = []; - - /** - * Get Items Method Eximport String Fix Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Items.Method.Eximport.String')->get($key); - */ - public $getItemsMethodEximportStringFixBuilder = []; - - /** - * Selection Translation Fix Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Selection.Translation')->get($key); - */ - public $selectionTranslationFixBuilder = []; - - /** - * Sort Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Sort')->get($key); - */ - public $sortBuilder = []; - - /** - * Search Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Search')->get($key); - */ - public $searchBuilder = []; - - /** - * Filter Builder - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Filter')->get($key); - */ - public $filterBuilder = []; - - /** - * Set Group Control - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Group.Control')->get($key); - */ - public $setGroupControl = []; - - /** - * Set Field Names - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Names')->get($key); - */ - public $fieldsNames = []; - - /** - * Default Fields set to publishing - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.New.Publishing.Fields')->set($key); - */ - public $newPublishingFields = []; - - /** - * Default Fields set to publishing - * - * @var array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Moved.Publishing.Fields')->set($key); - */ - public $movedPublishingFields = []; - - /** - * set the Field set of a view - * - * @param array $view The view data - * @param string $component The component name - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * - * @return string The fields set in xml - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Fieldset')->get(...); - */ - public function setFieldSet(array $view, string $component, string $nameSingleCode, string $nameListCode) - { - return CFactory::_('Compiler.Creator.Fieldset')-> - get($view, $component, $nameSingleCode, $nameListCode); - } - - /** - * build field set using string manipulation - * - * @param array $view The view data - * @param string $component The component name - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param string $langView The language string of the view - * @param string $langViews The language string of the views - * - * @return string The fields set in xml - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Fieldset.String')->get(...); - */ - protected function stringFieldSet(array $view, string $component, string $nameSingleCode, string $nameListCode, - string $langView, string $langViews): string - { - return CFactory::_('Compiler.Creator.Fieldset.String')->get( - $view, - $component, - $nameSingleCode, - $nameListCode, - $langView, - $langViews - ); - } - - /** - * build field set with simpleXMLElement class - * - * @param array $view The view data - * @param string $component The component name - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param string $langView The language string of the view - * @param string $langViews The language string of the views - * - * @return string The fields set in string xml - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Fieldset.XML')->get(...); - */ - protected function simpleXMLFieldSet(array $view, string $component, string $nameSingleCode, - string $nameListCode, string $langView, string $langViews): string - { - return CFactory::_('Compiler.Creator.Fieldset.XML')->get( - $view, - $component, - $nameSingleCode, - $nameListCode, - $langView, - $langViews - ); - } - - /** - * Check to see if a view has permissions - * - * @param array $view View details - * @param string $nameSingleCode View Single Code Name - * - * @return boolean true if it has permisssions - * @deprecated 3.3 Use CFactory::_('Adminview.Permission')->check($view, $nameSingleCode); - */ - protected function hasPermissionsSet(&$view, &$nameSingleCode) - { - return CFactory::_('Adminview.Permission')->check($view, $nameSingleCode); - } - - /** - * set Field Names - * - * @param string $view View the field belongs to - * @param string $name The name of the field - * - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Names')->set($view . '.' . $name, $name); - */ - public function setFieldsNames(&$view, &$name) - { - CFactory::_('Compiler.Builder.Field.Names')->set($view . '.' . $name, $name); - } - - /** - * set Dynamic field - * - * @param array $field The field data - * @param array $view The view data - * @param int $viewType The view type - * @param string $langView The language string of the view - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param array $placeholders The place holder and replace values - * @param string $dbkey The the custom table key - * @param boolean $build The switch to set the build option - * - * @return mixed The complete field - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Names')->get(...); - */ - public function setDynamicField(&$field, &$view, &$viewType, &$langView, - &$nameSingleCode, &$nameListCode, &$placeholders, &$dbkey, $build) - { - CFactory::_('Compiler.Creator.Field.Dynamic')->get($field, $view, $viewType, $langView, - $nameSingleCode, $nameListCode, $placeholders, $dbkey, $build); - } - - /** - * build field set - * - * @param array $fields The fields data - * @param string $langView The language string of the view - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param array $placeholders The place holder and replace values - * @param string $dbkey The the custom table key - * @param boolean $build The switch to set the build option - * @param int $return_type The return type 1 = string, 2 = array - * - * @return mixed The complete field in string or array - * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Fieldset.Dynamic')->get(...); - */ - public function getFieldsetXML(array &$fields, string &$langView, string &$nameSingleCode, - string &$nameListCode, array &$placeholders, string &$dbkey, bool $build = false, - int $returnType = 1) - { - return CFactory::_('Compiler.Creator.Fieldset.Dynamic')->get( - $fields, $langView, $nameSingleCode, - $nameListCode, $placeholders, $dbkey, $build, $returnType - ); - } - - /** - * build field string - * - * @param array $field The field data - * @param array $view The view data - * @param int $viewType The view type - * @param string $langView The language string of the view - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param array $placeholders The place holder and replace values - * @param string $dbkey The the custom table key - * @param boolean $build The switch to set the build option - * - * @return string The complete field in xml-string - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.As.String')->get(...); - */ - public function getFieldXMLString(array &$field, array &$view, int &$viewType, string &$langView, - string &$nameSingleCode, string &$nameListCode, array &$placeholders, string &$dbkey, - bool $build = false): string - { - // get field - return CFactory::_('Compiler.Creator.Field.As.String')->get( - $field, $view, $viewType, $langView, - $nameSingleCode, $nameListCode, $placeholders, $dbkey, $build - ); - } - - /** - * set a field - * - * @param string $setType The set of fields type - * @param array $fieldAttributes The field values - * @param string $name The field name - * @param string $typeName The field type - * @param string $langView The language string of the view - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param array $placeholders The place holder and replace values - * @param array|null $optionArray The option bucket array used to set the field options if needed. - * @param array $custom Used when field is from config - * @param string $taber The tabs to add in layout (only in string manipulation) - * - * @return SimpleXMLElement The field in xml - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.Type')->get(...); - */ - private function setField($setType, &$fieldAttributes, &$name, &$typeName, - &$langView, &$nameSingleCode, &$nameListCode, $placeholders, - &$optionArray, $custom = null, $taber = '' - ) { - return CFactory::_('Compiler.Creator.Field.Type')->get( - $setType, $fieldAttributes, $name, $typeName, - $langView, $nameSingleCode, $nameListCode, $placeholders, - $optionArray, $custom, $taber - ); - } - - /** - * set a field using string manipulation - * - * @param string $setType The set of fields type - * @param array $fieldAttributes The field values - * @param string $name The field name - * @param string $typeName The field type - * @param string $langView The language string of the view - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param array $placeholders The place holder and replace values - * @param array|null $optionArray The option bucket array used to set the field options if needed. - * @param array $custom Used when field is from config - * @param string $taber The tabs to add in layout - * - * @return SimpleXMLElement The field in xml - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.String')->get(...); - */ - protected function stringSetField($setType, &$fieldAttributes, &$name, - &$typeName, &$langView, &$nameSingleCode, &$nameListCode, - $placeholders, &$optionArray, $custom = null, $taber = '') - { - return CFactory::_('Compiler.Creator.Field.String')->get( - $setType, $fieldAttributes, $name, - $typeName, $langView, $nameSingleCode, $nameListCode, - $placeholders, $optionArray, $custom, $taber - ); - } - - /** - * set a field with simpleXMLElement class - * - * @param string $setType The set of fields type - * @param array $fieldAttributes The field values - * @param string $name The field name - * @param string $typeName The field type - * @param string $langView The language string of the view - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param array $placeholders The place holder and replace values - * @param string $optionArray The option bucket array used to set the field options if needed. - * @param array $custom Used when field is from config - * - * @return SimpleXMLElement The field in xml - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.XML')->get(...); - */ - protected function simpleXMLSetField($setType, &$fieldAttributes, &$name, - &$typeName, &$langView, &$nameSingleCode, &$nameListCode, - $placeholders, &$optionArray, $custom = null) - { - return CFactory::_('Compiler.Creator.Field.XML')->get( - $setType, $fieldAttributes, $name, - $typeName, $langView, $nameSingleCode, $nameListCode, - $placeholders, $optionArray, $custom - ); - } - - /** - * set the layout builder - * - * @param string $nameSingleCode The single edit view code name - * @param string $tabName The tab code name - * @param string $name The field code name - * @param array $field The field details - * - * @return void - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Layout')->set(...); - */ - public function setLayoutBuilder($nameSingleCode, $tabName, $name, &$field) - { - CFactory::_('Compiler.Creator.Layout')->set($nameSingleCode, $tabName, $name, $field); - } - - /** - * build the site field data needed - * - * @param string $view The single edit view code name - * @param string $field The field name - * @param string $set The decoding set this field belongs to - * @param string $type The field type - * - * @return void - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Site.Field.Data')->set(...); - */ - public function buildSiteFieldData($view, $field, $set, $type) - { - CFactory::_('Compiler.Creator.Site.Field.Data')->set($view, $field, $set, $type); - } - - /** - * set field attributes - * - * @param array $field The field data - * @param int $viewType The view type - * @param string $name The field name - * @param string $typeName The field type - * @param boolean $multiple The switch to set multiple selection option - * @param string $langLabel The language string for field label - * @param string $langView The language string of the view - * @param string $nameListCode The list view name - * @param string $nameSingleCode The single view name - * @param array $placeholders The place holder and replace values - * @param boolean $repeatable The repeatable field switch - * - * @return array The field attributes - * @deprecated 3.3 Use CFactory::_('Field.Attributes')->set(...); - */ - private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, - &$multiple, &$langLabel, $langView, $nameListCode, $nameSingleCode, - $placeholders, $repeatable = false - ) - { - // set notice that we could not get a valid string from the target - $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' - ); - $this->app->enqueueMessage( - Text::sprintf( - 'Use of a deprecated method (%s)!', __METHOD__ - ), 'Error' - ); - - return false; - } - - /** - * set Builders - * - * @param string $langLabel The language string for field label - * @param string $langView The language string of the view - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * @param string $name The field name - * @param array $view The view data - * @param array $field The field data - * @param string $typeName The field type - * @param bool $multiple The switch to set multiple selection option - * @param array|null $custom The custom field switch - * @param array|null $options The options switch - * - * @return void - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Builders')->set(...); - */ - public function setBuilders($langLabel, $langView, $nameSingleCode, - $nameListCode, $name, $view, $field, $typeName, $multiple, - $custom = null, $options = null - ): void - { - CFactory::_('Compiler.Creator.Builders')->set($langLabel, $langView, $nameSingleCode, - $nameListCode, $name, $view, $field, $typeName, $multiple, $custom, $options); - } - - /** - * set Custom Field Type File - * - * @param array $data The field complete data set - * @param string $nameListCode The list view code name - * @param string $nameSingleCode The single view code name - * - * @return void - * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Custom.Field.Type.File')->set(...); - */ - public function setCustomFieldTypeFile($data, $nameListCode,$nameSingleCode) - { - CFactory::_('Compiler.Creator.Custom.Field.Type.File')->set($data, $nameListCode,$nameSingleCode); - } - - /** - * This is just to get the code. - * Don't use this to build the field - * - * @param array $custom The field complete data set - * - * @return array with the code - * - */ - public function getCustomFieldCode($custom) - { - // the code bucket - $code_bucket = array( - 'JFORM_TYPE_HEADER' => '', - 'JFORM_TYPE_PHP' => '' - ); - // set tab and break replacements - $tabBreak = array( - '\t' => Indent::_(1), - '\n' => PHP_EOL - ); - // load the other PHP options - foreach (ComponentbuilderHelper::$phpFieldArray as $x) - { - // reset the php bucket - $phpBucket = ''; - // only set if available - if (isset($custom['php' . $x]) - && ArrayHelper::check( - $custom['php' . $x] - )) - { - foreach ($custom['php' . $x] as $line => $code) - { - if (StringHelper::check($code)) - { - $phpBucket .= PHP_EOL . CFactory::_('Placeholder')->update( - $code, $tabBreak - ); - } - } - // check if this is header text - if ('HEADER' === $x) - { - $code_bucket['JFORM_TYPE_HEADER'] - .= PHP_EOL . $phpBucket; - } - else - { - // JFORM_TYPE_PHP <<>> - $code_bucket['JFORM_TYPE_PHP'] - .= PHP_EOL . $phpBucket; - } - } - } - - return $code_bucket; - } - - /** - * set the Filter Field set of a view - * - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * - * @return string The fields set in xml - * - */ - public function setFieldFilterSet(&$nameSingleCode, &$nameListCode) - { - if (CFactory::_('Config')->get('joomla_version', 3) == 3) - { - return $this->setFieldFilterSetJ3($nameSingleCode, $nameListCode); - } - return $this->setFieldFilterSetJ4($nameSingleCode, $nameListCode); - } - - /** - * set the Filter List set of a view - * - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * - * @return string The fields set in xml - * - */ - public function setFieldFilterListSet(&$nameSingleCode, &$nameListCode) - { - if (CFactory::_('Config')->get('joomla_version', 3) == 3) - { - return $this->setFieldFilterListSetJ3($nameSingleCode, $nameListCode); - } - return $this->setFieldFilterListSetJ4($nameSingleCode, $nameListCode); - } - - /** - * set the Filter Field set of a view - * - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * - * @return string The fields set in xml - * - */ - public function setFieldFilterSetJ3(&$nameSingleCode, &$nameListCode) - { - // check if this is the above/new filter option - if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) - { - // we first create the file - $target = array('admin' => 'filter_' . $nameListCode); - CFactory::_('Utilities.Structure')->build( - $target, 'filter' - ); - // the search language string - $lang_search = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH'; - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_search, 'Search' - . StringHelper::safe($nameListCode, 'w') - ); - // the search description language string - $lang_search_desc = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH_' - . strtoupper($nameListCode); - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_search_desc, 'Search the ' - . StringHelper::safe($nameSingleCode, 'w') - . ' items. Prefix with ID: to search for an item by ID.' - ); - // now build the XML - $field_filter_sets = []; - $field_filter_sets[] = Indent::_(1) . ''; - // we first add the search - $field_filter_sets[] = Indent::_(2) . ''; - // add the published filter if published is not set - if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) - { - // the published language string - $lang_published = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED'; - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_published, 'Status' - ); - // the published description language string - $lang_published_desc = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED_' - . strtoupper($nameListCode); - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_published_desc, 'Status options for ' - . StringHelper::safe($nameListCode, 'w') - ); - $field_filter_sets[] = Indent::_(2) . ''; - $field_filter_sets[] = Indent::_(3) - . ''; - $field_filter_sets[] = Indent::_(2) . '
'; - } - // add the category if found - if (CFactory::_('Compiler.Builder.Category')->exists("{$nameListCode}.extension") - && CFactory::_('Compiler.Builder.Category')->get("{$nameListCode}.filter", 0) >= 1) - { - $field_filter_sets[] = Indent::_(2) . ''; - } - // add the access filter if this view has access - // and if access manually is not set - if (CFactory::_('Compiler.Builder.Access.Switch')->exists($nameSingleCode) - && !CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.access')) - { - $field_filter_sets[] = Indent::_(2) . ''; - } - // now add the dynamic fields - if (CFactory::_('Compiler.Builder.Filter')->exists($nameListCode)) - { - foreach (CFactory::_('Compiler.Builder.Filter')->get($nameListCode) as $n => $filter) - { - if ($filter['type'] != 'category') - { - $field_filter_sets[] = Indent::_(2) . 'set("{$nameListCode}.{$n}.class", $filter_class); - - $field_filter_sets[] = Indent::_(3) . 'name="' - . $filter['code'] . '"'; - $field_filter_sets[] = Indent::_(3) . 'label="' - . $filter['label'] . '"'; - - // if this is a multi field - if ($filter['multi'] == 2) - { - $field_filter_sets[] = Indent::_(3) . 'class="multiple' . $filter_class . '"'; - $field_filter_sets[] = Indent::_(3) . 'multiple="true"'; - } - else - { - $field_filter_sets[] = Indent::_(3) . 'multiple="false"'; - } - - $field_filter_sets[] = Indent::_(3) - . 'onchange="this.form.submit();"'; - $field_filter_sets[] = Indent::_(2) . '/>'; - } - } - } - $field_filter_sets[] = Indent::_(2) - . ''; - $field_filter_sets[] = Indent::_(1) . ''; - - // now update the file - return implode(PHP_EOL, $field_filter_sets); - } - - return ''; - } - - /** - * set the Filter List set of a view - * - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * - * @return string The fields set in xml - * - */ - public function setFieldFilterListSetJ3(&$nameSingleCode, &$nameListCode) - { - // check if this is the above/new filter option - if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) - { - // keep track of all fields already added - $donelist = array('ordering' => true, 'id' => true); - // now build the XML - $list_sets = []; - $list_sets[] = Indent::_(1) . ''; - $list_sets[] = Indent::_(2) . 'getListViewDefaultOrdering( - $nameListCode - ); - // set the default ordering - $list_sets[] = Indent::_(3) . 'default="' - . $default_ordering['name'] . ' ' - . $default_ordering['direction'] . '"'; - $list_sets[] = Indent::_(3) . 'validate="options"'; - $list_sets[] = Indent::_(2) . '>'; - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - // add the published filter if published is not set - if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) - { - // add to done list - $donelist['published'] = true; - // add to xml :) - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - } - - // add the rest of the set filters - if (CFactory::_('Compiler.Builder.Sort')->exists($nameListCode)) - { - foreach (CFactory::_('Compiler.Builder.Sort')->get($nameListCode) as $filter) - { - if (!isset($donelist[$filter['code']])) - { - if ($filter['type'] === 'category') - { - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - } - elseif (ArrayHelper::check( - $filter['custom'] - )) - { - $list_sets[] = Indent::_(3) . ''; - $list_sets[] = Indent::_(3) . ''; - } - else - { - $list_sets[] = Indent::_(3) . ''; - $list_sets[] = Indent::_(3) . ''; - } - // do not add again - $donelist[$filter['code']] = true; - } - } - } - - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(2) . '
' . PHP_EOL; - - $list_sets[] = Indent::_(2) . ''; - $list_sets[] = Indent::_(1) . ''; - - return implode(PHP_EOL, $list_sets); - } - - return ''; - } - - /** - * set the Filter Field set of a view - * - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * - * @return string The fields set in xml - * - */ - public function setFieldFilterSetJ4(&$nameSingleCode, &$nameListCode) - { - // check if this is the above/new filter option - if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) - { - // we first create the file - $target = ['admin' => 'filter_' . $nameListCode]; - CFactory::_('Utilities.Structure')->build( - $target, 'filter' - ); - // the search language string - $lang_search = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH'; - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_search, 'Search' - . StringHelper::safe($nameListCode, 'w') - ); - // the search description language string - $lang_search_desc = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH_' - . strtoupper($nameListCode); - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_search_desc, 'Search the ' - . StringHelper::safe($nameSingleCode, 'w') - . ' items. Prefix with ID: to search for an item by ID.' - ); - // now build the XML - $field_filter_sets = []; - $field_filter_sets[] = Indent::_(1) . ''; - // we first add the search - $field_filter_sets[] = Indent::_(2) . ''; - // add the published filter if published is not set - if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) - { - // the published language string - $lang_published = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED'; - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_published, 'Status' - ); - // the published description language string - $lang_published_desc = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED_' - . strtoupper($nameListCode); - // and to translation - CFactory::_('Language')->set( - CFactory::_('Config')->lang_target, $lang_published_desc, 'Status options for ' - . StringHelper::safe($nameListCode, 'w') - ); - $field_filter_sets[] = Indent::_(2) . ''; - $field_filter_sets[] = Indent::_(3) - . ''; - $field_filter_sets[] = Indent::_(2) . ''; - } - // add the category if found - if (CFactory::_('Compiler.Builder.Category')->exists("{$nameListCode}.extension") - && CFactory::_('Compiler.Builder.Category')->get("{$nameListCode}.filter", 0) >= 1) - { - $field_filter_sets[] = Indent::_(2) . ''; - } - // add the access filter if this view has access - // and if access manually is not set - if (CFactory::_('Compiler.Builder.Access.Switch')->exists($nameSingleCode) - && !CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.access')) - { - $field_filter_sets[] = Indent::_(2) . ''; - } - // now add the dynamic fields - if (CFactory::_('Compiler.Builder.Filter')->exists($nameListCode)) - { - foreach (CFactory::_('Compiler.Builder.Filter')->get($nameListCode) as $n => $filter) - { - if ($filter['type'] != 'category') - { - $field_filter_sets[] = Indent::_(2) . ''; - } - } - } - $field_filter_sets[] = Indent::_(2) - . ''; - $field_filter_sets[] = Indent::_(1) . ''; - - // now update the file - return implode(PHP_EOL, $field_filter_sets); - } - - return ''; - } - - /** - * set the Filter List set of a view - * - * @param string $nameSingleCode The single view name - * @param string $nameListCode The list view name - * - * @return string The fields set in xml - * - */ - public function setFieldFilterListSetJ4(&$nameSingleCode, &$nameListCode) - { - // check if this is the above/new filter option - if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) - { - // keep track of all fields already added - $donelist = ['ordering' => true, 'id' => true]; - // now build the XML - $list_sets = []; - $list_sets[] = Indent::_(1) . ''; - $list_sets[] = Indent::_(2) . 'getListViewDefaultOrdering( - $nameListCode - ); - // set the default ordering - $list_sets[] = Indent::_(3) . 'default="' - . $default_ordering['name'] . ' ' - . $default_ordering['direction'] . '"'; - $list_sets[] = Indent::_(3) . 'validate="options"'; - $list_sets[] = Indent::_(2) . '>'; - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - // add the published filter if published is not set - if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) - { - // add to done list - $donelist['published'] = true; - // add to xml :) - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - } - - // add the rest of the set filters - if (CFactory::_('Compiler.Builder.Sort')->exists($nameListCode)) - { - foreach (CFactory::_('Compiler.Builder.Sort')->get($nameListCode) as $filter) - { - if (!isset($donelist[$filter['code']])) - { - if ($filter['type'] === 'category') - { - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - } - elseif (ArrayHelper::check( - $filter['custom'] - )) - { - $list_sets[] = Indent::_(3) . ''; - $list_sets[] = Indent::_(3) . ''; - } - else - { - $list_sets[] = Indent::_(3) . ''; - $list_sets[] = Indent::_(3) . ''; - } - // do not add again - $donelist[$filter['code']] = true; - } - } - } - - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(3) - . ''; - $list_sets[] = Indent::_(2) . '' . PHP_EOL; - - $list_sets[] = Indent::_(2) . ''; - $list_sets[] = Indent::_(1) . ''; - - return implode(PHP_EOL, $list_sets); - } - - return ''; - } - - /** - * set Custom Field for Filter - * - * @param string $getOptions The get options php string/code - * @param array $filter The filter details - * - * @return void - * - */ - public function setFilterFieldFile($getOptions, $filter) - { - // make sure it is not already been build - if (!CFactory::_('Compiler.Builder.Content.Multi')-> - isArray('customfilterfield_' . $filter['filter_type'])) - { - // start loading the field type - // $this->fileContentDynamic['customfilterfield_' - // . $filter['filter_type']] - // = []; - // JPREFIX <>> - CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|JPREFIX', 'J'); - // Type <<>> - CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|Type', - StringHelper::safe( - $filter['filter_type'], 'F' - ) - ); - // type <<>> - CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|type', - StringHelper::safe($filter['filter_type']) - ); - // JFORM_GETOPTIONS_PHP <<>> - CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|JFORM_GETOPTIONS_PHP', - $getOptions - ); - // ADD_BUTTON <<>> - CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|ADD_BUTTON', ''); - // now build the custom filter field type file - $target = array('admin' => 'customfilterfield'); - CFactory::_('Utilities.Structure')->build( - $target, 'fieldlist', - $filter['filter_type'] - ); - } - } - - /** - * set Add Button To List Field (getInput tweak) - * - * @param array $fieldData The field custom data - * - * @return string of getInput class on success empty string otherwise - * @deprecated 3.3 Use CFactory::_('Field.Input.Button')->get($fieldData); - */ - protected function setAddButtonToListField($fieldData) - { - return CFactory::_('Field.Input.Button')->get($fieldData); - } - - /** - * xmlPrettyPrint - * - * @param SimpleXMLElement $xml The XML element containing a node to be output - * @param string $nodename node name of the input xml element to print out. this is done to omit the pretty($xml, $nodename); - */ - public function xmlPrettyPrint($xml, $nodename) - { - return CFactory::_('Utilities.Xml')->pretty($xml, $nodename); - } - - /** - * xmlIndent - * - * @param string $string The XML input - * @param string $char Character or characters to use as the repeated indent - * @param integer $depth number of times to repeat the indent character - * @param boolean $skipfirst Skip the first line of the input. - * @param boolean $skiplast Skip the last line of the input; - * - * @return string XML output - * @deprecated 3.3 Use CFactory::_('Utilities.Xml')->indent(...); - */ - public function xmlIndent($string, $char = ' ', $depth = 0, - $skipfirst = false, $skiplast = false - ) { - return CFactory::_('Utilities.Xml')->indent($string, $char, $depth, $skipfirst, $skiplast); + /** + * Metadate Switch + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Meta.Data')->get($key); + */ + public $metadataBuilder = []; + + /** + * View access Switch + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Access.Switch')->get($key); + */ + public $accessBuilder = []; + + /** + * edit view tabs counter + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Tab.Counter')->get($key); + */ + public $tabCounter = []; + + /** + * layout builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Layout')->get($key); + */ + public $layoutBuilder = []; + + /** + * permissions builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Has.Permissions')->get($key); + */ + public $hasPermissions = []; + + /** + * used to fix the zero order + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Order.Zero')->get($key); + */ + private $zeroOrderFix = []; + + /** + * Site field data + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Site.Field.Data')->get($key); + */ + public $siteFieldData = []; + + /** + * list of fields that are not being escaped + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Do.Not.Escape')->get($key); + */ + public $doNotEscape = []; + + /** + * list of classes used in the list view for the fields + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.List.Field.Class')->set($key, true); + */ + public $listFieldClass = []; + + /** + * tags builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Tags')->get($key); + */ + public $tagsBuilder = []; + + /** + * query builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Tables')->get($key); + */ + public $queryBuilder = []; + + /** + * unique keys for database field + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Unique.Keys')->get($key); + */ + public $dbUniqueKeys = []; + + /** + * unique guid swtich + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Unique.Guid')->get($key); + */ + public $dbUniqueGuid = []; + + /** + * keys for database field + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Keys')->get($key); + */ + public $dbKeys = []; + + /** + * history builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.History')->get($key); + */ + public $historyBuilder = []; + + /** + * alias builder + * + * @var array + * @deprecated 3.3 CFactory::_('Compiler.Builder.Alias')->get($key); + */ + public $aliasBuilder = []; + + /** + * title builder + * + * @var array + * @deprecated 3.3 CFactory::_('Compiler.Builder.Title')->get($key); + */ + public $titleBuilder = []; + + /** + * list builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Lists')->get($key); + */ + public $listBuilder = []; + + /** + * custom Builder List + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.List')->get($key); + */ + public $customBuilderList = []; + + /** + * Hidden Fields Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Hidden.Fields')->get($key); + */ + public $hiddenFieldsBuilder = []; + + /** + * INT Field Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Integer.Fields')->get($key); + */ + public $intFieldsBuilder = []; + + /** + * Dynamic Fields Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Dynamic.Fields')->get($key); + */ + public $dynamicfieldsBuilder = []; + + /** + * Main text Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Main.Text.Field')->get($key); + */ + public $maintextBuilder = []; + + /** + * Custom Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.Field')->get($key); + */ + public $customBuilder = []; + + /** + * Custom Field Links Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.Field.Links')->get($key); + */ + public $customFieldLinksBuilder = []; + + /** + * Set Script for User Switch + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Script.User.Switch')->get($key); + */ + public $setScriptUserSwitch = []; + + /** + * Set Script for Media Switch + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Script.Media.Switch')->get($key); + */ + public $setScriptMediaSwitch = []; + + /** + * Category builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Category')->get($key); + */ + public $categoryBuilder = []; + + /** + * Category Code builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Category.Code')->get($key); + */ + public $catCodeBuilder = []; + + /** + * Check Box builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Check.Box')->get($key); + */ + public $checkboxBuilder = []; + + /** + * Json String Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.String')->get($key); + */ + public $jsonStringBuilder = []; + + /** + * Json String Builder for return values to array + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.Item.Array')->get($key); + */ + public $jsonItemBuilderArray = []; + + /** + * Json Item Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.Item')->get($key); + */ + public $jsonItemBuilder = []; + + /** + * Base 64 Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Base.Six.Four')->get($key); + */ + public $base64Builder = []; + + /** + * Basic Encryption Field Modeling + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Basic.Field')->get($key); + */ + public $basicFieldModeling = []; + + /** + * WHMCS Encryption Field Modeling + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Whmcs.Field')->get($key); + */ + public $whmcsFieldModeling = []; + + /** + * Medium Encryption Field Modeling + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Medium.Field')->get($key); + */ + public $mediumFieldModeling = []; + + /** + * Expert Field Modeling + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Expert.Field')->get($key); + */ + public $expertFieldModeling = []; + + /** + * Expert Mode Initiator + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Expert.Field.Initiator')->get($key); + */ + public $expertFieldModelInitiator = []; + + /** + * Get Items Method List String Fix Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Items.Method.List.String')->get($key); + */ + public $getItemsMethodListStringFixBuilder = []; + + /** + * Get Items Method Eximport String Fix Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Items.Method.Eximport.String')->get($key); + */ + public $getItemsMethodEximportStringFixBuilder = []; + + /** + * Selection Translation Fix Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Selection.Translation')->get($key); + */ + public $selectionTranslationFixBuilder = []; + + /** + * Sort Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Sort')->get($key); + */ + public $sortBuilder = []; + + /** + * Search Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Search')->get($key); + */ + public $searchBuilder = []; + + /** + * Filter Builder + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Filter')->get($key); + */ + public $filterBuilder = []; + + /** + * Set Group Control + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Group.Control')->get($key); + */ + public $setGroupControl = []; + + /** + * Set Field Names + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Names')->get($key); + */ + public $fieldsNames = []; + + /** + * Default Fields set to publishing + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.New.Publishing.Fields')->set($key); + */ + public $newPublishingFields = []; + + /** + * Default Fields set to publishing + * + * @var array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Moved.Publishing.Fields')->set($key); + */ + public $movedPublishingFields = []; + + /** + * set the Field set of a view + * + * @param array $view The view data + * @param string $component The component name + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The fields set in xml + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Fieldset')->get(...); + */ + public function setFieldSet(array $view, string $component, string $nameSingleCode, string $nameListCode) + { + return CFactory::_('Compiler.Creator.Fieldset')-> + get($view, $component, $nameSingleCode, $nameListCode); + } + + /** + * build field set using string manipulation + * + * @param array $view The view data + * @param string $component The component name + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param string $langView The language string of the view + * @param string $langViews The language string of the views + * + * @return string The fields set in xml + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Fieldset.String')->get(...); + */ + protected function stringFieldSet(array $view, string $component, string $nameSingleCode, string $nameListCode, + string $langView, string $langViews): string + { + return CFactory::_('Compiler.Creator.Fieldset.String')->get( + $view, + $component, + $nameSingleCode, + $nameListCode, + $langView, + $langViews + ); + } + + /** + * build field set with simpleXMLElement class + * + * @param array $view The view data + * @param string $component The component name + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param string $langView The language string of the view + * @param string $langViews The language string of the views + * + * @return string The fields set in string xml + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Fieldset.XML')->get(...); + */ + protected function simpleXMLFieldSet(array $view, string $component, string $nameSingleCode, + string $nameListCode, string $langView, string $langViews): string + { + return CFactory::_('Compiler.Creator.Fieldset.XML')->get( + $view, + $component, + $nameSingleCode, + $nameListCode, + $langView, + $langViews + ); + } + + /** + * Check to see if a view has permissions + * + * @param array $view View details + * @param string $nameSingleCode View Single Code Name + * + * @return boolean true if it has permisssions + * @deprecated 3.3 Use CFactory::_('Adminview.Permission')->check($view, $nameSingleCode); + */ + protected function hasPermissionsSet(&$view, &$nameSingleCode) + { + return CFactory::_('Adminview.Permission')->check($view, $nameSingleCode); + } + + /** + * set Field Names + * + * @param string $view View the field belongs to + * @param string $name The name of the field + * + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Names')->set($view . '.' . $name, $name); + */ + public function setFieldsNames(&$view, &$name) + { + CFactory::_('Compiler.Builder.Field.Names')->set($view . '.' . $name, $name); + } + + /** + * set Dynamic field + * + * @param array $field The field data + * @param array $view The view data + * @param int $viewType The view type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param string $dbkey The the custom table key + * @param boolean $build The switch to set the build option + * + * @return mixed The complete field + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Names')->get(...); + */ + public function setDynamicField(&$field, &$view, &$viewType, &$langView, + &$nameSingleCode, &$nameListCode, &$placeholders, &$dbkey, $build) + { + CFactory::_('Compiler.Creator.Field.Dynamic')->get($field, $view, $viewType, $langView, + $nameSingleCode, $nameListCode, $placeholders, $dbkey, $build); + } + + /** + * build field set + * + * @param array $fields The fields data + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param string $dbkey The the custom table key + * @param boolean $build The switch to set the build option + * @param int $return_type The return type 1 = string, 2 = array + * + * @return mixed The complete field in string or array + * @deprecated 3.3 Use CFactory::_('Compiler.Builder.Fieldset.Dynamic')->get(...); + */ + public function getFieldsetXML(array &$fields, string &$langView, string &$nameSingleCode, + string &$nameListCode, array &$placeholders, string &$dbkey, bool $build = false, + int $returnType = 1) + { + return CFactory::_('Compiler.Creator.Fieldset.Dynamic')->get( + $fields, $langView, $nameSingleCode, + $nameListCode, $placeholders, $dbkey, $build, $returnType + ); + } + + /** + * build field string + * + * @param array $field The field data + * @param array $view The view data + * @param int $viewType The view type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param string $dbkey The the custom table key + * @param boolean $build The switch to set the build option + * + * @return string The complete field in xml-string + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.As.String')->get(...); + */ + public function getFieldXMLString(array &$field, array &$view, int &$viewType, string &$langView, + string &$nameSingleCode, string &$nameListCode, array &$placeholders, string &$dbkey, + bool $build = false): string + { + // get field + return CFactory::_('Compiler.Creator.Field.As.String')->get( + $field, $view, $viewType, $langView, + $nameSingleCode, $nameListCode, $placeholders, $dbkey, $build + ); + } + + /** + * set a field + * + * @param string $setType The set of fields type + * @param array $fieldAttributes The field values + * @param string $name The field name + * @param string $typeName The field type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param array|null $optionArray The option bucket array used to set the field options if needed. + * @param array $custom Used when field is from config + * @param string $taber The tabs to add in layout (only in string manipulation) + * + * @return SimpleXMLElement The field in xml + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.Type')->get(...); + */ + private function setField($setType, &$fieldAttributes, &$name, &$typeName, + &$langView, &$nameSingleCode, &$nameListCode, $placeholders, + &$optionArray, $custom = null, $taber = '' + ) { + return CFactory::_('Compiler.Creator.Field.Type')->get( + $setType, $fieldAttributes, $name, $typeName, + $langView, $nameSingleCode, $nameListCode, $placeholders, + $optionArray, $custom, $taber + ); + } + + /** + * set a field using string manipulation + * + * @param string $setType The set of fields type + * @param array $fieldAttributes The field values + * @param string $name The field name + * @param string $typeName The field type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param array|null $optionArray The option bucket array used to set the field options if needed. + * @param array $custom Used when field is from config + * @param string $taber The tabs to add in layout + * + * @return SimpleXMLElement The field in xml + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.String')->get(...); + */ + protected function stringSetField($setType, &$fieldAttributes, &$name, + &$typeName, &$langView, &$nameSingleCode, &$nameListCode, + $placeholders, &$optionArray, $custom = null, $taber = '') + { + return CFactory::_('Compiler.Creator.Field.String')->get( + $setType, $fieldAttributes, $name, + $typeName, $langView, $nameSingleCode, $nameListCode, + $placeholders, $optionArray, $custom, $taber + ); + } + + /** + * set a field with simpleXMLElement class + * + * @param string $setType The set of fields type + * @param array $fieldAttributes The field values + * @param string $name The field name + * @param string $typeName The field type + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param array $placeholders The place holder and replace values + * @param string $optionArray The option bucket array used to set the field options if needed. + * @param array $custom Used when field is from config + * + * @return SimpleXMLElement The field in xml + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Field.XML')->get(...); + */ + protected function simpleXMLSetField($setType, &$fieldAttributes, &$name, + &$typeName, &$langView, &$nameSingleCode, &$nameListCode, + $placeholders, &$optionArray, $custom = null) + { + return CFactory::_('Compiler.Creator.Field.XML')->get( + $setType, $fieldAttributes, $name, + $typeName, $langView, $nameSingleCode, $nameListCode, + $placeholders, $optionArray, $custom + ); + } + + /** + * set the layout builder + * + * @param string $nameSingleCode The single edit view code name + * @param string $tabName The tab code name + * @param string $name The field code name + * @param array $field The field details + * + * @return void + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Layout')->set(...); + */ + public function setLayoutBuilder($nameSingleCode, $tabName, $name, &$field) + { + CFactory::_('Compiler.Creator.Layout')->set($nameSingleCode, $tabName, $name, $field); + } + + /** + * build the site field data needed + * + * @param string $view The single edit view code name + * @param string $field The field name + * @param string $set The decoding set this field belongs to + * @param string $type The field type + * + * @return void + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Site.Field.Data')->set(...); + */ + public function buildSiteFieldData($view, $field, $set, $type) + { + CFactory::_('Compiler.Creator.Site.Field.Data')->set($view, $field, $set, $type); + } + + /** + * set field attributes + * + * @param array $field The field data + * @param int $viewType The view type + * @param string $name The field name + * @param string $typeName The field type + * @param boolean $multiple The switch to set multiple selection option + * @param string $langLabel The language string for field label + * @param string $langView The language string of the view + * @param string $nameListCode The list view name + * @param string $nameSingleCode The single view name + * @param array $placeholders The place holder and replace values + * @param boolean $repeatable The repeatable field switch + * + * @return array The field attributes + * @deprecated 3.3 Use CFactory::_('Field.Attributes')->set(...); + */ + private function setFieldAttributes(&$field, &$viewType, &$name, &$typeName, + &$multiple, &$langLabel, $langView, $nameListCode, $nameSingleCode, + $placeholders, $repeatable = false + ) + { + // set notice that we could not get a valid string from the target + $this->app->enqueueMessage( + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' + ); + $this->app->enqueueMessage( + Text::sprintf( + 'Use of a deprecated method (%s)!', __METHOD__ + ), 'Error' + ); + + return false; + } + + /** + * set Builders + * + * @param string $langLabel The language string for field label + * @param string $langView The language string of the view + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * @param string $name The field name + * @param array $view The view data + * @param array $field The field data + * @param string $typeName The field type + * @param bool $multiple The switch to set multiple selection option + * @param array|null $custom The custom field switch + * @param array|null $options The options switch + * + * @return void + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Builders')->set(...); + */ + public function setBuilders($langLabel, $langView, $nameSingleCode, + $nameListCode, $name, $view, $field, $typeName, $multiple, + $custom = null, $options = null + ): void + { + CFactory::_('Compiler.Creator.Builders')->set($langLabel, $langView, $nameSingleCode, + $nameListCode, $name, $view, $field, $typeName, $multiple, $custom, $options); + } + + /** + * set Custom Field Type File + * + * @param array $data The field complete data set + * @param string $nameListCode The list view code name + * @param string $nameSingleCode The single view code name + * + * @return void + * @deprecated 3.3 Use CFactory::_('Compiler.Creator.Custom.Field.Type.File')->set(...); + */ + public function setCustomFieldTypeFile($data, $nameListCode,$nameSingleCode) + { + CFactory::_('Compiler.Creator.Custom.Field.Type.File')->set($data, $nameListCode,$nameSingleCode); + } + + /** + * This is just to get the code. + * Don't use this to build the field + * + * @param array $custom The field complete data set + * + * @return array with the code + * + */ + public function getCustomFieldCode($custom) + { + // the code bucket + $code_bucket = array( + 'JFORM_TYPE_HEADER' => '', + 'JFORM_TYPE_PHP' => '' + ); + // set tab and break replacements + $tabBreak = array( + '\t' => Indent::_(1), + '\n' => PHP_EOL + ); + // load the other PHP options + foreach (\ComponentbuilderHelper::$phpFieldArray as $x) + { + // reset the php bucket + $phpBucket = ''; + // only set if available + if (isset($custom['php' . $x]) + && ArrayHelper::check( + $custom['php' . $x] + )) + { + foreach ($custom['php' . $x] as $line => $code) + { + if (StringHelper::check($code)) + { + $phpBucket .= PHP_EOL . CFactory::_('Placeholder')->update( + $code, $tabBreak + ); + } + } + // check if this is header text + if ('HEADER' === $x) + { + $code_bucket['JFORM_TYPE_HEADER'] + .= PHP_EOL . $phpBucket; + } + else + { + // JFORM_TYPE_PHP <<>> + $code_bucket['JFORM_TYPE_PHP'] + .= PHP_EOL . $phpBucket; + } + } + } + + return $code_bucket; + } + + /** + * set the Filter Field set of a view + * + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The fields set in xml + * + */ + public function setFieldFilterSet(&$nameSingleCode, &$nameListCode) + { + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + return $this->setFieldFilterSetJ3($nameSingleCode, $nameListCode); + } + return $this->setFieldFilterSetJ4($nameSingleCode, $nameListCode); + } + + /** + * set the Filter List set of a view + * + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The fields set in xml + * + */ + public function setFieldFilterListSet(&$nameSingleCode, &$nameListCode) + { + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + return $this->setFieldFilterListSetJ3($nameSingleCode, $nameListCode); + } + return $this->setFieldFilterListSetJ4($nameSingleCode, $nameListCode); + } + + /** + * set the Filter Field set of a view + * + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The fields set in xml + * + */ + public function setFieldFilterSetJ3(&$nameSingleCode, &$nameListCode) + { + // check if this is the above/new filter option + if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) + { + // we first create the file + $target = array('admin' => 'filter_' . $nameListCode); + CFactory::_('Utilities.Structure')->build( + $target, 'filter' + ); + // the search language string + $lang_search = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH'; + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_search, 'Search' + . StringHelper::safe($nameListCode, 'w') + ); + // the search description language string + $lang_search_desc = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH_' + . strtoupper($nameListCode); + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_search_desc, 'Search the ' + . StringHelper::safe($nameSingleCode, 'w') + . ' items. Prefix with ID: to search for an item by ID.' + ); + // now build the XML + $field_filter_sets = []; + $field_filter_sets[] = Indent::_(1) . ''; + // we first add the search + $field_filter_sets[] = Indent::_(2) . ''; + // add the published filter if published is not set + if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) + { + // the published language string + $lang_published = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED'; + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_published, 'Status' + ); + // the published description language string + $lang_published_desc = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED_' + . strtoupper($nameListCode); + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_published_desc, 'Status options for ' + . StringHelper::safe($nameListCode, 'w') + ); + $field_filter_sets[] = Indent::_(2) . ''; + $field_filter_sets[] = Indent::_(3) + . ''; + $field_filter_sets[] = Indent::_(2) . ''; + } + // add the category if found + if (CFactory::_('Compiler.Builder.Category')->exists("{$nameListCode}.extension") + && CFactory::_('Compiler.Builder.Category')->get("{$nameListCode}.filter", 0) >= 1) + { + $field_filter_sets[] = Indent::_(2) . ''; + } + // add the access filter if this view has access + // and if access manually is not set + if (CFactory::_('Compiler.Builder.Access.Switch')->exists($nameSingleCode) + && !CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.access')) + { + $field_filter_sets[] = Indent::_(2) . ''; + } + // now add the dynamic fields + if (CFactory::_('Compiler.Builder.Filter')->exists($nameListCode)) + { + foreach (CFactory::_('Compiler.Builder.Filter')->get($nameListCode) as $n => $filter) + { + if ($filter['type'] != 'category') + { + $field_filter_sets[] = Indent::_(2) . 'set("{$nameListCode}.{$n}.class", $filter_class); + + $field_filter_sets[] = Indent::_(3) . 'name="' + . $filter['code'] . '"'; + $field_filter_sets[] = Indent::_(3) . 'label="' + . $filter['label'] . '"'; + + // if this is a multi field + if ($filter['multi'] == 2) + { + $field_filter_sets[] = Indent::_(3) . 'class="multiple' . $filter_class . '"'; + $field_filter_sets[] = Indent::_(3) . 'multiple="true"'; + } + else + { + $field_filter_sets[] = Indent::_(3) . 'multiple="false"'; + } + + $field_filter_sets[] = Indent::_(3) + . 'onchange="this.form.submit();"'; + $field_filter_sets[] = Indent::_(2) . '/>'; + } + } + } + $field_filter_sets[] = Indent::_(2) + . ''; + $field_filter_sets[] = Indent::_(1) . ''; + + // now update the file + return implode(PHP_EOL, $field_filter_sets); + } + + return ''; + } + + /** + * set the Filter List set of a view + * + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The fields set in xml + * + */ + public function setFieldFilterListSetJ3(&$nameSingleCode, &$nameListCode) + { + // check if this is the above/new filter option + if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) + { + // keep track of all fields already added + $donelist = array('ordering' => true, 'id' => true); + // now build the XML + $list_sets = []; + $list_sets[] = Indent::_(1) . ''; + $list_sets[] = Indent::_(2) . 'getListViewDefaultOrdering( + $nameListCode + ); + // set the default ordering + $list_sets[] = Indent::_(3) . 'default="' + . $default_ordering['name'] . ' ' + . $default_ordering['direction'] . '"'; + $list_sets[] = Indent::_(3) . 'validate="options"'; + $list_sets[] = Indent::_(2) . '>'; + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + // add the published filter if published is not set + if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) + { + // add to done list + $donelist['published'] = true; + // add to xml :) + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + } + + // add the rest of the set filters + if (CFactory::_('Compiler.Builder.Sort')->exists($nameListCode)) + { + foreach (CFactory::_('Compiler.Builder.Sort')->get($nameListCode) as $filter) + { + if (!isset($donelist[$filter['code']])) + { + if ($filter['type'] === 'category') + { + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + } + elseif (ArrayHelper::check( + $filter['custom'] + )) + { + $list_sets[] = Indent::_(3) . ''; + $list_sets[] = Indent::_(3) . ''; + } + else + { + $list_sets[] = Indent::_(3) . ''; + $list_sets[] = Indent::_(3) . ''; + } + // do not add again + $donelist[$filter['code']] = true; + } + } + } + + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(2) . '' . PHP_EOL; + + $list_sets[] = Indent::_(2) . ''; + $list_sets[] = Indent::_(1) . ''; + + return implode(PHP_EOL, $list_sets); + } + + return ''; + } + + /** + * set the Filter Field set of a view + * + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The fields set in xml + * + */ + public function setFieldFilterSetJ4(&$nameSingleCode, &$nameListCode) + { + // check if this is the above/new filter option + if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) + { + // we first create the file + $target = ['admin' => 'filter_' . $nameListCode]; + CFactory::_('Utilities.Structure')->build( + $target, 'filter' + ); + // the search language string + $lang_search = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH'; + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_search, 'Search' + . StringHelper::safe($nameListCode, 'w') + ); + // the search description language string + $lang_search_desc = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH_' + . strtoupper($nameListCode); + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_search_desc, 'Search the ' + . StringHelper::safe($nameSingleCode, 'w') + . ' items. Prefix with ID: to search for an item by ID.' + ); + // now build the XML + $field_filter_sets = []; + $field_filter_sets[] = Indent::_(1) . ''; + // we first add the search + $field_filter_sets[] = Indent::_(2) . ''; + // add the published filter if published is not set + if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) + { + // the published language string + $lang_published = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED'; + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_published, 'Status' + ); + // the published description language string + $lang_published_desc = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED_' + . strtoupper($nameListCode); + // and to translation + CFactory::_('Language')->set( + CFactory::_('Config')->lang_target, $lang_published_desc, 'Status options for ' + . StringHelper::safe($nameListCode, 'w') + ); + $field_filter_sets[] = Indent::_(2) . ''; + $field_filter_sets[] = Indent::_(3) + . ''; + $field_filter_sets[] = Indent::_(2) . ''; + } + // add the category if found + if (CFactory::_('Compiler.Builder.Category')->exists("{$nameListCode}.extension") + && CFactory::_('Compiler.Builder.Category')->get("{$nameListCode}.filter", 0) >= 1) + { + $field_filter_sets[] = Indent::_(2) . ''; + } + // add the access filter if this view has access + // and if access manually is not set + if (CFactory::_('Compiler.Builder.Access.Switch')->exists($nameSingleCode) + && !CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.access')) + { + $field_filter_sets[] = Indent::_(2) . ''; + } + // now add the dynamic fields + if (CFactory::_('Compiler.Builder.Filter')->exists($nameListCode)) + { + foreach (CFactory::_('Compiler.Builder.Filter')->get($nameListCode) as $n => $filter) + { + if ($filter['type'] != 'category') + { + $field_filter_sets[] = Indent::_(2) . ''; + } + } + } + $field_filter_sets[] = Indent::_(2) + . ''; + $field_filter_sets[] = Indent::_(1) . ''; + + // now update the file + return implode(PHP_EOL, $field_filter_sets); + } + + return ''; + } + + /** + * set the Filter List set of a view + * + * @param string $nameSingleCode The single view name + * @param string $nameListCode The list view name + * + * @return string The fields set in xml + * + */ + public function setFieldFilterListSetJ4(&$nameSingleCode, &$nameListCode) + { + // check if this is the above/new filter option + if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2) + { + // keep track of all fields already added + $donelist = ['ordering' => true, 'id' => true]; + // now build the XML + $list_sets = []; + $list_sets[] = Indent::_(1) . ''; + $list_sets[] = Indent::_(2) . 'getListViewDefaultOrdering( + $nameListCode + ); + // set the default ordering + $list_sets[] = Indent::_(3) . 'default="' + . $default_ordering['name'] . ' ' + . $default_ordering['direction'] . '"'; + $list_sets[] = Indent::_(3) . 'validate="options"'; + $list_sets[] = Indent::_(2) . '>'; + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + // add the published filter if published is not set + if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published')) + { + // add to done list + $donelist['published'] = true; + // add to xml :) + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + } + + // add the rest of the set filters + if (CFactory::_('Compiler.Builder.Sort')->exists($nameListCode)) + { + foreach (CFactory::_('Compiler.Builder.Sort')->get($nameListCode) as $filter) + { + if (!isset($donelist[$filter['code']])) + { + if ($filter['type'] === 'category') + { + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + } + elseif (ArrayHelper::check( + $filter['custom'] + )) + { + $list_sets[] = Indent::_(3) . ''; + $list_sets[] = Indent::_(3) . ''; + } + else + { + $list_sets[] = Indent::_(3) . ''; + $list_sets[] = Indent::_(3) . ''; + } + // do not add again + $donelist[$filter['code']] = true; + } + } + } + + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(3) + . ''; + $list_sets[] = Indent::_(2) . '' . PHP_EOL; + + $list_sets[] = Indent::_(2) . ''; + $list_sets[] = Indent::_(1) . ''; + + return implode(PHP_EOL, $list_sets); + } + + return ''; + } + + /** + * set Custom Field for Filter + * + * @param string $getOptions The get options php string/code + * @param array $filter The filter details + * + * @return void + * + */ + public function setFilterFieldFile($getOptions, $filter) + { + // make sure it is not already been build + if (!CFactory::_('Compiler.Builder.Content.Multi')-> + isArray('customfilterfield_' . $filter['filter_type'])) + { + // start loading the field type + // $this->fileContentDynamic['customfilterfield_' + // . $filter['filter_type']] + // = []; + // JPREFIX <>> + CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|JPREFIX', 'J'); + // Type <<>> + CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|Type', + StringHelper::safe( + $filter['filter_type'], 'F' + ) + ); + // type <<>> + CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|type', + StringHelper::safe($filter['filter_type']) + ); + // JFORM_GETOPTIONS_PHP <<>> + CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|JFORM_GETOPTIONS_PHP', + $getOptions + ); + // ADD_BUTTON <<>> + CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|ADD_BUTTON', ''); + // now build the custom filter field type file + $target = array('admin' => 'customfilterfield'); + CFactory::_('Utilities.Structure')->build( + $target, 'fieldlist', + $filter['filter_type'] + ); + } + } + + /** + * set Add Button To List Field (getInput tweak) + * + * @param array $fieldData The field custom data + * + * @return string of getInput class on success empty string otherwise + * @deprecated 3.3 Use CFactory::_('Field.Input.Button')->get($fieldData); + */ + protected function setAddButtonToListField($fieldData) + { + return CFactory::_('Field.Input.Button')->get($fieldData); + } + + /** + * xmlPrettyPrint + * + * @param SimpleXMLElement $xml The XML element containing a node to be output + * @param string $nodename node name of the input xml element to print out. this is done to omit the pretty($xml, $nodename); + */ + public function xmlPrettyPrint($xml, $nodename) + { + return CFactory::_('Utilities.Xml')->pretty($xml, $nodename); + } + + /** + * xmlIndent + * + * @param string $string The XML input + * @param string $char Character or characters to use as the repeated indent + * @param integer $depth number of times to repeat the indent character + * @param boolean $skipfirst Skip the first line of the input. + * @param boolean $skiplast Skip the last line of the input; + * + * @return string XML output + * @deprecated 3.3 Use CFactory::_('Utilities.Xml')->indent(...); + */ + public function xmlIndent($string, $char = ' ', $depth = 0, + $skipfirst = false, $skiplast = false + ) { + return CFactory::_('Utilities.Xml')->indent($string, $char, $depth, $skipfirst, $skiplast); } } + diff --git a/admin/helpers/compiler/a_Get.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php similarity index 93% rename from admin/helpers/compiler/a_Get.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php index 5bcbdae97..c3c75de59 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Get.php @@ -1,36 +1,37 @@ - - * @gitea Joomla Component Builder - * @github Joomla Component Builder + * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - + +namespace VDM\Joomla\Componentbuilder\Compiler\Helper; + + use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Component\ComponentHelper; -use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Utilities\JsonHelper; -use VDM\Joomla\Utilities\ArrayHelper; -use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Unique; - -/** +// use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; (for Joomla 4 and above) +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Unique; + + +/** * Get class as the main compilers class - * @deprecated 3.3 - */ -class Get -{ - + * + * @deprecated 3.3 + */ +class Get +{ /** * The Joomla Version * @@ -1047,7 +1048,7 @@ class Get // set the global language @deprecated $this->langTag = CFactory::_('Config')->get('lang_tag', 'en-GB'); // also set the helper class langTag (for safeStrings) - ComponentbuilderHelper::$langTag = CFactory::_('Config')->get('lang_tag', 'en-GB'); + \ComponentbuilderHelper::$langTag = CFactory::_('Config')->get('lang_tag', 'en-GB'); // setup the main language array $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')] = []; // check if we have Tidy enabled @deprecated @@ -1061,7 +1062,7 @@ class Get $this->fieldBuilderType = 1; // load the sugestion to use string manipulation $this->app->enqueueMessage( - Text::_('

Field Notice

'), 'Notice' + Text::_('COM_COMPONENTBUILDER_HR_HTHREEFIELD_NOTICEHTHREE'), 'Notice' ); $this->app->enqueueMessage( Text::_( @@ -1420,7 +1421,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1509,7 +1510,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1600,7 +1601,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1655,7 +1656,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1775,7 +1776,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1909,7 +1910,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1932,7 +1933,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1970,7 +1971,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -1994,7 +1995,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2579,7 +2580,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2620,7 +2621,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2641,7 +2642,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2662,7 +2663,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2694,7 +2695,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2713,7 +2714,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2732,7 +2733,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2753,7 +2754,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2817,7 +2818,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2838,7 +2839,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2880,7 +2881,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2944,7 +2945,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -2986,7 +2987,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -3012,7 +3013,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -3038,7 +3039,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -3086,7 +3087,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -3142,7 +3143,7 @@ class Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -3151,6 +3152,6 @@ class Get ); return []; - } - -} + } +} + diff --git a/admin/helpers/compiler/f_Infusion.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php similarity index 96% rename from admin/helpers/compiler/f_Infusion.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php index 45d236f9f..4b163f1ad 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Infusion.php @@ -1,40 +1,42 @@ - - * @gitea Joomla Component Builder - * @github Joomla Component Builder + * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - + +namespace VDM\Joomla\Componentbuilder\Compiler\Helper; + + use Joomla\CMS\Factory; use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\Folder; use Joomla\Filter\OutputFilter; -use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Utilities\ArrayHelper; -use VDM\Joomla\Utilities\ObjectHelper; -use VDM\Joomla\Utilities\FileHelper; -use VDM\Joomla\Utilities\String\NamespaceHelper; -use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Minify; - -/** +// use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; (for Joomla 4 and above) +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\String\NamespaceHelper; +use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Minify; +use VDM\Joomla\Componentbuilder\Compiler\Helper\Interpretation; + + +/** * Infusion class - * @deprecated 3.3 - */ -class Infusion extends Interpretation -{ - + * + * @deprecated 3.3 + */ +class Infusion extends Interpretation +{ public $langFiles = []; /** @@ -107,7 +109,7 @@ class Infusion extends Interpretation // COMPANYNAME $companyname = CFactory::_('Component')->get('companyname'); CFactory::_('Compiler.Builder.Content.One')->set('COMPANYNAME', trim( - (string) JFilterOutput::cleanText($companyname) + (string) \JFilterOutput::cleanText($companyname) )); // POWER_LIBRARY_FOLDER @@ -1581,19 +1583,19 @@ class Infusion extends Interpretation // IMPORT_EXT_METHOD <<>> CFactory::_('Compiler.Builder.Content.Multi')->set('import' . '|IMPORT_EXT_METHOD', PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update_( - ComponentbuilderHelper::getDynamicScripts('ext') + \ComponentbuilderHelper::getDynamicScripts('ext') ) ); // IMPORT_SETDATA_METHOD <<>> CFactory::_('Compiler.Builder.Content.Multi')->set('import' . '|IMPORT_SETDATA_METHOD', PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update_( - ComponentbuilderHelper::getDynamicScripts('setdata') + \ComponentbuilderHelper::getDynamicScripts('setdata') ) ); // IMPORT_SAVE_METHOD <<>> CFactory::_('Compiler.Builder.Content.Multi')->set('import' . '|IMPORT_SAVE_METHOD', PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update_( - ComponentbuilderHelper::getDynamicScripts('save') + \ComponentbuilderHelper::getDynamicScripts('save') ) ); // IMPORT_CONTROLLER_HEADER <<>> add the header details for the controller @@ -2544,5 +2546,6 @@ class Infusion extends Interpretation CFactory::_('Utilities.File')->write($xmlPath, $componentXML); } } - } -} + } +} + diff --git a/admin/helpers/compiler/e_Interpretation.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php similarity index 95% rename from admin/helpers/compiler/e_Interpretation.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php index abad0f8f9..389e64fae 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php @@ -1,43 +1,43 @@ - - * @gitea Joomla Component Builder - * @github Joomla Component Builder + * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -use Joomla\CMS\Factory; + +namespace VDM\Joomla\Componentbuilder\Compiler\Helper; + + use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\Folder; -use Joomla\Filter\OutputFilter; use Joomla\CMS\Language\Text; -use VDM\Joomla\FOF\Encrypt\AES; -use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Utilities\ArrayHelper; -use VDM\Joomla\Utilities\ObjectHelper; -use VDM\Joomla\Utilities\GetHelper; -use VDM\Joomla\Utilities\FileHelper; -use VDM\Joomla\Utilities\MathHelper; -use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; -use VDM\Joomla\Componentbuilder\Compiler\Utilities\Minify; - -/** - * Compiler class - * @deprecated 3.3 - */ -class Interpretation extends Fields -{ - +// use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; (for Joomla 4 and above) +use VDM\Joomla\FOF\Encrypt\AES; +use VDM\Joomla\Utilities\StringHelper; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Utilities\MathHelper; +use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; +use VDM\Joomla\Componentbuilder\Compiler\Utilities\Minify; +use VDM\Joomla\Componentbuilder\Compiler\Helper\Fields; + + +/** + * Interpretation class + * + * @deprecated 3.3 + */ +class Interpretation extends Fields +{ /** * The global config Field Sets * @@ -311,7 +311,7 @@ class Interpretation extends Fields // the text for the file BAKING CFactory::_('Compiler.Builder.Content.Multi')->set('emailer_' . $component . '|BAKING', ''); // <<-- to insure it gets updated // return the code need to load the abstract class - return PHP_EOL . "JLoader::register('" . $Component + return PHP_EOL . "\JLoader::register('" . $Component . "Email', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/" . $component . "email.php'); "; } @@ -448,7 +448,7 @@ class Interpretation extends Fields $bool[] = Indent::_(3) . "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_" . CFactory::_('Config')->component_code_name . "');"; - $bool[] = Indent::_(3) . "\$the = new WHMCS(\$whmcs_key);"; + $bool[] = Indent::_(3) . "\$the = new \WHMCS(\$whmcs_key);"; $bool[] = Indent::_(3) . "\$this->" . $globalbool . " = \$the->_is;"; $bool[] = Indent::_(3) . "return \$this->" . $globalbool . ";"; $bool[] = Indent::_(2) . "}"; @@ -488,7 +488,7 @@ class Interpretation extends Fields $helper[] = Indent::_(3) . "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_" . CFactory::_('Config')->component_code_name . "');"; - $helper[] = Indent::_(3) . "\$the = new WHMCS(\$whmcs_key);"; + $helper[] = Indent::_(3) . "\$the = new \WHMCS(\$whmcs_key);"; $helper[] = Indent::_(3) . "return \$the->_is;"; $helper[] = Indent::_(2) . "}"; $helper[] = Indent::_(2) . "return false;"; @@ -533,7 +533,7 @@ class Interpretation extends Fields if (CFactory::_('Component')->isString('whmcs_key')) { // Get the basic encryption. - $basickey = ComponentbuilderHelper::getCryptKey('basic'); + $basickey = \ComponentbuilderHelper::getCryptKey('basic'); $key = CFactory::_('Component')->get('whmcs_key'); // Get the encryption object. @@ -808,7 +808,7 @@ class Interpretation extends Fields } // give notice of this issue $this->app->enqueueMessage( - Text::_('

WHMCS Error

'), 'Error' + Text::_('COM_COMPONENTBUILDER_HR_HTHREEWHMCS_ERRORHTHREE'), 'Error' ); $this->app->enqueueMessage( Text::_( @@ -882,7 +882,7 @@ class Interpretation extends Fields $function[] = Indent::_(3) . "\$basic_key = \$params->get('basic_key', \$default);"; $function[] = Indent::_(3) - . "if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$basic_key))"; + . "if (Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$basic_key))"; $function[] = Indent::_(3) . "{"; $function[] = Indent::_(4) . "return \$basic_key;"; $function[] = Indent::_(3) . "}"; @@ -898,7 +898,7 @@ class Interpretation extends Fields $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " check if medium key is already loaded."; $function[] = Indent::_(3) - . "if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(self::\$mediumCryptKey))"; + . "if (Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(self::\$mediumCryptKey))"; $function[] = Indent::_(3) . "{"; $function[] = Indent::_(4) . "return (self::\$mediumCryptKey !== 'none') ? trim(self::\$mediumCryptKey) : \$default;"; @@ -908,7 +908,7 @@ class Interpretation extends Fields $function[] = Indent::_(3) . "\$medium_key_path = \$params->get('medium_key_path', null);"; $function[] = Indent::_(3) - . "if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$medium_key_path))"; + . "if (Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$medium_key_path))"; $function[] = Indent::_(3) . "{"; $function[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " load the key from the file."; @@ -932,14 +932,14 @@ class Interpretation extends Fields $function[] = Indent::_(2) . "{"; $function[] = Indent::_(3) . "\$key = \$params->get('whmcs_key', \$default);"; - $function[] = Indent::_(3) . "if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$key))"; + $function[] = Indent::_(3) . "if (Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$key))"; $function[] = Indent::_(3) . "{"; $function[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " load the file"; $function[] = Indent::_(4) . "JLoader::import( 'whmcs', JPATH_COMPONENT_ADMINISTRATOR);"; $function[] = PHP_EOL . Indent::_(4) - . "\$the = new WHMCS(\$key);"; + . "\$the = new \WHMCS(\$key);"; $function[] = PHP_EOL . Indent::_(4) . "return \$the->_key;"; $function[] = Indent::_(3) . "}"; $function[] = Indent::_(2) . "}"; @@ -1160,7 +1160,7 @@ class Interpretation extends Fields $newJ['component_version'] = CFactory::_('Component')->get('component_version'); // update the component with the new dynamic SQL - $modelJ = ComponentbuilderHelper::getModel('joomla_component'); + $modelJ = \ComponentbuilderHelper::getModel('joomla_component'); $modelJ->save($newJ); // <-- to insure the history is also updated // reset the watch here CFactory::_('History')->get('joomla_component', CFactory::_('Config')->component_id); @@ -1177,7 +1177,7 @@ class Interpretation extends Fields } $newU['version_update'] = json_encode($buket); // update the component with the new dynamic SQL - $modelU = ComponentbuilderHelper::getModel('component_updates'); + $modelU = \ComponentbuilderHelper::getModel('component_updates'); $modelU->save($newU); // <-- to insure the history is also updated } } @@ -1463,7 +1463,7 @@ class Interpretation extends Fields $help[] = Indent::_(2) . "if(\$db->getNumRows())"; $help[] = Indent::_(2) . "{"; $help[] = Indent::_(3) . "\$helps = \$db->loadObjectList();"; - $help[] = Indent::_(3) . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$helps))"; + $help[] = Indent::_(3) . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$helps))"; $help[] = Indent::_(3) . "{"; $help[] = Indent::_(4) . "foreach (\$helps as \$nr => \$help)"; $help[] = Indent::_(4) . "{"; @@ -1643,7 +1643,7 @@ class Interpretation extends Fields $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Add some data"; $exel[] = Indent::_(2) - . "if ((\$size = Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$rows)) !== false)"; + . "if ((\$size = Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$rows)) !== false)"; $exel[] = Indent::_(2) . "{"; $exel[] = Indent::_(3) . "\$i = 1;"; $exel[] = PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) @@ -1907,7 +1907,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "}"; $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if we have params/config"; - $method[] = Indent::_(2) . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$params))"; + $method[] = Indent::_(2) . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$params))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Make changes to user config"; @@ -1923,7 +1923,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set username to email if not set"; $method[] = Indent::_(2) - . "if (!isset(\$credentials['username']) || !Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['username']))"; + . "if (!isset(\$credentials['username']) || !Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['username']))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "\$credentials['username'] = \$credentials['email'];"; @@ -1957,7 +1957,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if password was set"; $method[] = Indent::_(2) - . "if (\$mode == 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password']) || !Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password2'])))"; + . "if (\$mode == 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password']) || !Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password2'])))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set random password when empty password was submitted,"; @@ -1972,7 +1972,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Now Add password if set"; $method[] = Indent::_(2) - . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password']) && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password2']))"; + . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password']) && Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$credentials['password2']))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "if (\$mode == 1) //" . Line::_( __LINE__,__CLASS__ @@ -1994,7 +1994,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Load the group/s value if set, only for Admin Registration (\$mode == 0)"; $method[] = Indent::_(2) - . "if (\$mode == 0 && isset(\$credentials['groups']) && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$credentials['groups']))"; + . "if (\$mode == 0 && isset(\$credentials['groups']) && Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$credentials['groups']))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "\$data['groups'] = \$credentials['groups'];"; @@ -2018,7 +2018,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if we have params"; - $method[] = Indent::_(2) . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$params))"; + $method[] = Indent::_(2) . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$params))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Change user params/config back"; @@ -2118,7 +2118,7 @@ class Interpretation extends Fields . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');"; $method[] = Indent::_(2) . "// Check if password was set"; $method[] = Indent::_(2) - . "if (isset(\$new['password']) && isset(\$new['password2']) && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$new['password']) && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$new['password2']))"; + . "if (isset(\$new['password']) && isset(\$new['password2']) && Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$new['password']) && Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$new['password2']))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "// Use the users passwords"; $method[] = Indent::_(3) . "\$password = \$new['password'];"; @@ -2126,7 +2126,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "}"; $method[] = Indent::_(2) . "// set username"; $method[] = Indent::_(2) - . "if (!isset(\$new['username']) || !Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$new['username']))"; + . "if (!isset(\$new['username']) || !Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$new['username']))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "\$new['username'] = \$new['email'];"; @@ -2144,7 +2144,7 @@ class Interpretation extends Fields $method[] = Indent::_(3) . "'block' => 0 );"; $method[] = Indent::_(2) . "// set groups if found"; $method[] = Indent::_(2) - . "if (isset(\$new['groups']) && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$new['groups']))"; + . "if (isset(\$new['groups']) && Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$new['groups']))"; $method[] = Indent::_(2) . "{"; $method[] = Indent::_(3) . "\$data['groups'] = \$new['groups'];"; $method[] = Indent::_(2) . "}"; @@ -2598,7 +2598,7 @@ class Interpretation extends Fields $filter .= PHP_EOL . PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(" . $string . "->" + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(" . $string . "->" . $field . "))"; $filter .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{"; @@ -2650,7 +2650,7 @@ class Interpretation extends Fields . $as . " based on repeatable value"; $filter .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "if (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(" . $string . "->" + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(" . $string . "->" . $field . "))"; $filter .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{"; @@ -2660,7 +2660,7 @@ class Interpretation extends Fields . $string . "->" . $field . ",true);"; $filter .= PHP_EOL . Indent::_(2) . $tab . Indent::_(1) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$array))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$array))"; $filter .= PHP_EOL . Indent::_(2) . $tab . Indent::_(1) . "{"; @@ -2778,7 +2778,7 @@ class Interpretation extends Fields { $if = PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "if (isset(" . $string . "->" . $field . ") && " - . "Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(" + . "Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(" . $string . "->" . $field . "))" . PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{"; // json_decode @@ -2915,7 +2915,7 @@ class Interpretation extends Fields $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_( 1 ) . "\$params = (isset(" . $string . "->params) && " - . "Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(" . $string + . "Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(" . $string . "->params)) ? json_decode(" . $string . "->params) : " . $string . ";"; $params = true; @@ -3155,7 +3155,7 @@ class Interpretation extends Fields . "\$array = " . $ter['state_key'] . ";"; $string .= PHP_EOL . Indent::_(2) . $tab . "if (isset(\$array) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$array))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$array))"; $string .= PHP_EOL . Indent::_(2) . $tab . "{"; $string .= PHP_EOL . Indent::_(2) . $tab . Indent::_(1) . "\$query->where('" @@ -3183,7 +3183,7 @@ class Interpretation extends Fields . "\$checkValue = " . $ter['state_key'] . ";"; $string .= PHP_EOL . Indent::_(2) . $tab . "if (isset(\$checkValue) && " - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$checkValue))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$checkValue))"; $string .= PHP_EOL . Indent::_(2) . $tab . "{"; $string .= PHP_EOL . Indent::_(2) . $tab . Indent::_(1) . "\$query->where('" @@ -3389,7 +3389,7 @@ class Interpretation extends Fields || $whe['operator'] === 'NOT IN') { $string = "if (isset(" . $whe['value_key'] . ") && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(" + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(" . $whe['value_key'] . "))"; $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(1) . "{"; @@ -3813,7 +3813,7 @@ class Interpretation extends Fields . "//" . Line::_(__Line__, __Class__) . " Get the encryption object."; $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) - . "\$" . $cryptionType . " = new Super___99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" + . "\$" . $cryptionType . " = new Super_" . "__99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; } elseif (CFactory::_('Compiler.Builder.Model.' . ucfirst($cryptionType). '.Field.Initiator')-> @@ -4166,11 +4166,11 @@ class Interpretation extends Fields $ukit[] = Indent::_(3) . "}"; $ukit[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " sorter"; - $ukit[] = Indent::_(3) . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$temp))"; + $ukit[] = Indent::_(3) . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$temp))"; $ukit[] = Indent::_(3) . "{"; $ukit[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " merger"; - $ukit[] = Indent::_(4) . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$classes))"; + $ukit[] = Indent::_(4) . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$classes))"; $ukit[] = Indent::_(4) . "{"; $ukit[] = Indent::_(5) . "\$newTemp = array_merge(\$temp,\$classes);"; @@ -4179,7 +4179,7 @@ class Interpretation extends Fields $ukit[] = Indent::_(4) . "return \$temp;"; $ukit[] = Indent::_(3) . "}"; $ukit[] = Indent::_(2) . "}"; - $ukit[] = Indent::_(2) . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$classes))"; + $ukit[] = Indent::_(2) . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$classes))"; $ukit[] = Indent::_(2) . "{"; $ukit[] = Indent::_(3) . "return \$classes;"; $ukit[] = Indent::_(2) . "}"; @@ -4213,7 +4213,7 @@ class Interpretation extends Fields $method .= PHP_EOL . Indent::_(1) . "{"; $method .= PHP_EOL . Indent::_(2) . "if (isset(\$this->uikitComp) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->uikitComp))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->uikitComp))"; $method .= PHP_EOL . Indent::_(2) . "{"; $method .= PHP_EOL . Indent::_(3) . "return \$this->uikitComp;"; $method .= PHP_EOL . Indent::_(2) . "}"; @@ -4316,14 +4316,14 @@ class Interpretation extends Fields . $default['on_field'] . " is an array with values."; $methods .= PHP_EOL . Indent::_(2) . "\$array = (" - . "Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$" + . "Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$" . $default['on_field'] . ", true)) ? json_decode(\$" . $default['on_field'] . ",true) : \$" . $default['on_field'] . ";"; $methods .= PHP_EOL . Indent::_(2) . "if (isset(\$array) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$array, true))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$array, true))"; $methods .= PHP_EOL . Indent::_(2) . "{"; $methods .= PHP_EOL . Indent::_(3) . "\$query->where('" . $get['join_field'] . " " @@ -4533,7 +4533,7 @@ class Interpretation extends Fields . " Get the encryption object."; $script .= PHP_EOL . Indent::_(2) . "\$" . $cryptionType - . " = new Super___99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" + . " = new Super_" . "__99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);" . PHP_EOL; } elseif (CFactory::_('Compiler.Builder.Model.' . ucfirst($cryptionType). '.Field.Initiator')-> @@ -4729,7 +4729,7 @@ class Interpretation extends Fields . Line::_(__Line__, __Class__) . " Insure all item fields are adapted where needed."; $getItem .= PHP_EOL . Indent::_(2) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))"; $getItem .= PHP_EOL . Indent::_(2) . "{"; $getItem .= Placefix::_h("DISPATCHER") ; $getItem .= PHP_EOL . Indent::_(3) @@ -4862,7 +4862,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " Get the encryption object."; $script .= PHP_EOL . Indent::_(2) . "\$" . $cryptionType - . " = new Super___99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; + . " = new Super_" . "__99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; } elseif (CFactory::_('Compiler.Builder.Model.' . ucfirst($cryptionType). '.Field.Initiator')-> exists("{$code}.get")) @@ -5054,7 +5054,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " Process the content plugins."; $method .= PHP_EOL . Indent::_(2) . "if (" - . "Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$this->item))"; + . "Super_" . "__91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$this->item))"; $method .= PHP_EOL . Indent::_(2) . "{"; $method .= PHP_EOL . Indent::_(3) . "PluginHelper::importPlugin('content');"; @@ -5062,13 +5062,13 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " Setup Event Object."; $method .= PHP_EOL . Indent::_(3) - . "\$this->item->event = new stdClass;"; + . "\$this->item->event = new \stdClass;"; $method .= PHP_EOL . Indent::_(3) . "//" . Line::_( __LINE__,__CLASS__ ) . " Check if item has params, or pass global params"; $method .= PHP_EOL . Indent::_(3) . "\$params = (isset(\$this->item->params) && " - . "Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;"; + . "Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;"; // load the defaults foreach ( $view['settings']->main_get->plugin_events as $plugin_event @@ -5218,7 +5218,7 @@ class Interpretation extends Fields $addModule[] = Indent::_(3) . "\$modules = ModuleHelper::getModules(\$position);"; $addModule[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$modules, true))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$modules, true))"; $addModule[] = Indent::_(3) . "{"; $addModule[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " set the place holder"; @@ -5236,12 +5236,12 @@ class Interpretation extends Fields . " check if modules were found"; $addModule[] = Indent::_(2) . "if (\$found && isset(\$this->setModules[\$position]) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->setModules[\$position]))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->setModules[\$position]))"; $addModule[] = Indent::_(2) . "{"; $addModule[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " set class"; $addModule[] = Indent::_(3) . "if (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$class))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$class))"; $addModule[] = Indent::_(3) . "{"; $addModule[] = Indent::_(4) . "\$class = ' class=\"'.\$class.'\" ';"; @@ -6246,7 +6246,7 @@ class Interpretation extends Fields $library = CFactory::_('Registry')->get("builder.libraries.$id", null); $this->app->enqueueMessage( - Text::_('

Conditional Script Warning

'), 'Warning' + Text::_('COM_COMPONENTBUILDER_HR_HTHREECONDITIONAL_SCRIPT_WARNINGHTHREE'), 'Warning' ); // message with name @@ -6577,11 +6577,11 @@ class Interpretation extends Fields . "\$uikitFieldComp = \$this->get('UikitComp');"; $setter .= PHP_EOL . $tabV . Indent::_(3) . "if (isset(\$uikitFieldComp) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitFieldComp))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitFieldComp))"; $setter .= PHP_EOL . $tabV . Indent::_(3) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(4) . "if (isset(\$uikitComp) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitComp))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitComp))"; $setter .= PHP_EOL . $tabV . Indent::_(4) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "\$uikitComp = array_merge(\$uikitComp, \$uikitFieldComp);"; @@ -6601,7 +6601,7 @@ class Interpretation extends Fields . " Load the needed uikit components in this view."; $setter .= PHP_EOL . $tabV . Indent::_(2) . "if (\$uikit != 2 && isset(\$uikitComp) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitComp))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitComp))"; $setter .= PHP_EOL . $tabV . Indent::_(2) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(3) . "//" . Line::_( __LINE__,__CLASS__ @@ -6658,7 +6658,7 @@ class Interpretation extends Fields . "\$uikitComp = \$this->get('UikitComp');"; $setter .= PHP_EOL . $tabV . Indent::_(2) . "if (\$uikit != 2 && isset(\$uikitComp) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitComp))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uikitComp))"; $setter .= PHP_EOL . $tabV . Indent::_(2) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(3) . "//" . Line::_( __LINE__,__CLASS__ @@ -7254,7 +7254,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " Get the encryption object."; $script .= PHP_EOL . Indent::_(3) . "\$" . $cryptionType - . " = new Super___99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; + . " = new Super_" . "__99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; foreach (CFactory::_('Compiler.Builder.Model.' . ucfirst($cryptionType). '.Field')->get($view) as $baseString) { $script .= PHP_EOL . PHP_EOL . Indent::_(3) @@ -7519,7 +7519,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " Get the encryption object"; $script .= PHP_EOL . Indent::_(2) . "\$" . $cryptionType - . " = new Super___99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; + . " = new Super_" . "__99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; foreach (CFactory::_('Compiler.Builder.Model.' . ucfirst($cryptionType). '.Field')-> get($view) as $baseString) { @@ -8657,7 +8657,7 @@ class Interpretation extends Fields $codeA = implode(PHP_EOL, $script); // reverted message $messageA = Indent::_(4) - . "\$app->enqueueMessage(Text::_('Reverted the #__assets table rules column back to its default size of varchar(5120)'));"; + . "\$app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_REVERTED_THE_B_ASSETSB_TABLE_RULES_COLUMN_BACK_TO_ITS_DEFAULT_SIZE_OF_VARCHARFIVE_THOUSAND_ONE_HUNDRED_AND_TWENTY'));"; // do nothing $codeB = ""; // not reverted message @@ -9425,7 +9425,7 @@ class Interpretation extends Fields $batchmove[] = PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " insert all set values."; $batchmove[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$values))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$values))"; $batchmove[] = Indent::_(3) . "{"; $batchmove[] = Indent::_(4) . "foreach (\$values as \$key => \$value)"; $batchmove[] = Indent::_(4) . "{"; @@ -9728,7 +9728,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " Only for strings"; $batchcopy[] = Indent::_(3) . "if (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->table->" . implode('', $titles) + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->table->" . implode('', $titles) . ") && !is_numeric(\$this->table->" . implode('', $titles) . "))"; $batchcopy[] = Indent::_(3) . "{"; @@ -9742,7 +9742,7 @@ class Interpretation extends Fields $batchcopy[] = PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " insert all set values"; $batchcopy[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$values))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$values))"; $batchcopy[] = Indent::_(3) . "{"; $batchcopy[] = Indent::_(4) . "foreach (\$values as \$key => \$value)"; $batchcopy[] = Indent::_(4) . "{"; @@ -9757,7 +9757,7 @@ class Interpretation extends Fields $batchcopy[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " update all unique fields"; $batchcopy[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uniqueFields))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uniqueFields))"; $batchcopy[] = Indent::_(3) . "{"; $batchcopy[] = Indent::_(4) . "foreach (\$uniqueFields as \$uniqueField)"; @@ -10006,7 +10006,7 @@ class Interpretation extends Fields $fixUnique[] = Indent::_(3) . "\$uniqueFields = \$this->getUniqueFields();"; $fixUnique[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uniqueFields))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$uniqueFields))"; $fixUnique[] = Indent::_(3) . "{"; $fixUnique[] = Indent::_(4) . "foreach (\$uniqueFields as \$uniqueField)"; @@ -10057,7 +10057,7 @@ class Interpretation extends Fields $newFunction[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Check if this is an array of titles"; $newFunction[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$title))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$title))"; $newFunction[] = Indent::_(3) . "{"; $newFunction[] = Indent::_(4) . "foreach(\$title as \$nr => &\$_title)"; @@ -10079,7 +10079,7 @@ class Interpretation extends Fields $newFunction[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if this is an array of titles"; $newFunction[] = Indent::_(2) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$title))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$title))"; $newFunction[] = Indent::_(2) . "{"; $newFunction[] = Indent::_(3) . "\$title[] = \$alias;"; $newFunction[] = Indent::_(3) . "return \$title;"; @@ -13059,7 +13059,7 @@ class Interpretation extends Fields else { $this->app->enqueueMessage( - Text::_('

Field Warning

'), 'Warning' + Text::_('COM_COMPONENTBUILDER_HR_HTHREEFIELD_WARNINGHTHREE'), 'Warning' ); $this->app->enqueueMessage( Text::sprintf( @@ -13145,7 +13145,7 @@ class Interpretation extends Fields if ($fieldsAddedRight) { $this->app->enqueueMessage( - Text::_('

Field Notice

'), 'Notice' + Text::_('COM_COMPONENTBUILDER_HR_HTHREEFIELD_NOTICEHTHREE'), 'Notice' ); $this->app->enqueueMessage( Text::sprintf( @@ -13648,7 +13648,7 @@ class Interpretation extends Fields $headerscript .= PHP_EOL . '//' . Line::_(__Line__, __Class__) . ' check if return value was set'; $headerscript .= PHP_EOL . 'if (' - . 'Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($return))'; + . 'Super' . '___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($return))'; $headerscript .= PHP_EOL . '{'; $headerscript .= PHP_EOL . Indent::_(1) . '//' . Line::_( __LINE__,__CLASS__ @@ -14137,7 +14137,7 @@ class Interpretation extends Fields } $head .= PHP_EOL . '' . PHP_EOL; } - $head .= ''; + $head .= ''; // set the style for V2 $metro_blue = (2 == $footable_version) ? ' metro-blue' : ''; // set the toggle for V3 @@ -14451,7 +14451,7 @@ class Interpretation extends Fields . "\$query->where('a.access = ' . (int) \$_access);"; $query .= PHP_EOL . Indent::_(2) . "}"; $query .= PHP_EOL . Indent::_(2) . "elseif (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_access))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_access))"; $query .= PHP_EOL . Indent::_(2) . "{"; $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) @@ -14545,19 +14545,19 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " Filter by " . $globalKey . " in this Repetable Field"; $query .= PHP_EOL . Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && isset(\$this->" + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && isset(\$this->" . $globalKey . "))"; $query .= PHP_EOL . Indent::_(3) . "{"; $query .= PHP_EOL . Indent::_(4) . "foreach (\$items as \$nr => &\$item)"; $query .= PHP_EOL . Indent::_(4) . "{"; $query .= PHP_EOL . Indent::_(5) . "if (isset(\$item->" . $field - . ") && Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$item->" . $field . "))"; + . ") && Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$item->" . $field . "))"; $query .= PHP_EOL . Indent::_(5) . "{"; $query .= PHP_EOL . Indent::_(6) . "\$tmpArray = json_decode(\$item->" . $field . ",true);"; $query .= PHP_EOL . Indent::_(6) . "if (!isset(\$tmpArray['" - . $target . "']) || !Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$tmpArray['" + . $target . "']) || !Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$tmpArray['" . $target . "']) || !in_array(\$this->" . $globalKey . ", \$tmpArray['" . $target . "']))"; $query .= PHP_EOL . Indent::_(6) . "{"; @@ -14590,7 +14590,7 @@ class Interpretation extends Fields $query .= PHP_EOL . Indent::_(3) . "\$" . $globalKey . " = \$this->" . $globalKey . ";"; $query .= PHP_EOL . Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && \$" . $globalKey + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && \$" . $globalKey . ")"; $query .= PHP_EOL . Indent::_(3) . "{"; $query .= PHP_EOL . Indent::_(4) @@ -14600,13 +14600,13 @@ class Interpretation extends Fields if (StringHelper::check($target)) { $query .= PHP_EOL . Indent::_(5) . "if (isset(\$item->" . $target - . ") && Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$item->" . $target . "))"; + . ") && Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$item->" . $target . "))"; $query .= PHP_EOL . Indent::_(5) . "{"; $query .= PHP_EOL . Indent::_(6) . "\$item->" . $target . " = json_decode(\$item->" . $target . ", true);"; $query .= PHP_EOL . Indent::_(5) . "}"; $query .= PHP_EOL . Indent::_(5) . "elseif (!isset(\$item->" - . $target . ") || !Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$item->" + . $target . ") || !Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$item->" . $target . "))"; $query .= PHP_EOL . Indent::_(5) . "{"; $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);"; @@ -14618,13 +14618,13 @@ class Interpretation extends Fields else { $query .= PHP_EOL . Indent::_(5) . "if (isset(\$item->" . $_key . ") && " - . "Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$item->" . $_key . "))"; + . "Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::check(\$item->" . $_key . "))"; $query .= PHP_EOL . Indent::_(5) . "{"; $query .= PHP_EOL . Indent::_(6) . "\$item->" . $_key . " = json_decode(\$item->" . $_key . ", true);"; $query .= PHP_EOL . Indent::_(5) . "}"; $query .= PHP_EOL . Indent::_(5) . "elseif (!isset(\$item->" - . $_key . ") || !Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$item->" + . $_key . ") || !Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$item->" . $_key . "))"; $query .= PHP_EOL . Indent::_(5) . "{"; $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);"; @@ -14658,8 +14658,8 @@ class Interpretation extends Fields $query .= PHP_EOL . Indent::_(3) . "\$" . $globalKey . " = json_decode(\$this->" . $globalKey . ",true);"; $query .= PHP_EOL . Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && isset(\$" - . $globalKey . ") && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && isset(\$" + . $globalKey . ") && Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $globalKey . "))"; $query .= PHP_EOL . Indent::_(3) . "{"; $query .= PHP_EOL . Indent::_(4) @@ -14667,7 +14667,7 @@ class Interpretation extends Fields $query .= PHP_EOL . Indent::_(4) . "{"; $query .= PHP_EOL . Indent::_(5) . "if (\$item->" . $_key . " && isset(\$" . $globalKey . "['" . $target . "']) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $globalKey . "['" + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $globalKey . "['" . $target . "']))"; $query .= PHP_EOL . Indent::_(5) . "{"; $query .= PHP_EOL . Indent::_(6) . "if (!in_array(\$item->" . $_key @@ -14702,8 +14702,8 @@ class Interpretation extends Fields $query .= PHP_EOL . Indent::_(3) . "\$" . $globalKey . " = \$this->" . $globalKey . ";"; $query .= PHP_EOL . Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $globalKey . "))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items) && " + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $globalKey . "))"; $query .= PHP_EOL . Indent::_(3) . "{"; $query .= PHP_EOL . Indent::_(4) . "foreach (\$items as \$nr => &\$item)"; @@ -14712,7 +14712,7 @@ class Interpretation extends Fields if (StringHelper::check($target)) { $query .= PHP_EOL . Indent::_(5) . "if (\$item->" . $_key - . " && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $globalKey . "['" + . " && Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $globalKey . "['" . $target . "']))"; $query .= PHP_EOL . Indent::_(5) . "{"; $query .= PHP_EOL . Indent::_(6) . "if (!in_array(\$item->" @@ -14948,7 +14948,7 @@ class Interpretation extends Fields $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " setup the query"; $query .= PHP_EOL . Indent::_(2) . "if ((\$pks_size = " - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$pks)) !== false || 'bulk' === \$pks)"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$pks)) !== false || 'bulk' === \$pks)"; $query .= PHP_EOL . Indent::_(2) . "{"; $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set a value to know this is " . $config['type'] @@ -14958,7 +14958,7 @@ class Interpretation extends Fields $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Get the user object if not set."; $query .= PHP_EOL . Indent::_(3) . "if (!isset(\$user) || !" - . "Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$user))"; + . "Super_" . "__91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$user))"; $query .= PHP_EOL . Indent::_(3) . "{"; if (CFactory::_('Config')->get('joomla_version', 3) == 3) { @@ -15166,7 +15166,7 @@ class Interpretation extends Fields // get the header script if ($isExport) { - $header = ComponentbuilderHelper::getDynamicScripts('headers'); + $header = \ComponentbuilderHelper::getDynamicScripts('headers'); // add getExImPortHeaders $query .= CFactory::_('Customcode.Dispenser')->get( @@ -15236,7 +15236,7 @@ class Interpretation extends Fields $method[] = Indent::_(3) . "\$data = \$model->getExportData(\$pks);"; $method[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$data))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$data))"; $method[] = Indent::_(3) . "{"; $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " now set the data to the spreadsheet"; @@ -15295,7 +15295,7 @@ class Interpretation extends Fields $method[] = Indent::_(3) . "\$headers = \$model->getExImPortHeaders();"; $method[] = Indent::_(3) . "if (" - . "Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$headers))"; + . "Super_" . "__91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$headers))"; $method[] = Indent::_(3) . "{"; $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " Load headers to session."; @@ -15583,7 +15583,7 @@ class Interpretation extends Fields . "\$query->where('a.access = ' . (int) \$_access);"; $query .= PHP_EOL . Indent::_(2) . "}"; $query .= PHP_EOL . Indent::_(2) . "elseif (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_access))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_access))"; $query .= PHP_EOL . Indent::_(2) . "{"; $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) @@ -15963,7 +15963,7 @@ class Interpretation extends Fields $filterQuery .= PHP_EOL . Indent::_(3) . "}"; $filterQuery .= PHP_EOL . Indent::_(2) . "}"; $filterQuery .= PHP_EOL . Indent::_(2) . "elseif (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$_" . $filter['code'] . "))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$_" . $filter['code'] . "))"; $filterQuery .= PHP_EOL . Indent::_(2) . "{"; $filterQuery .= PHP_EOL . Indent::_(3) . "\$query->where('" . $a . "." . $filter['code'] @@ -16007,7 +16007,7 @@ class Interpretation extends Fields $filterQuery .= PHP_EOL . Indent::_(3) . "}"; $filterQuery .= PHP_EOL . Indent::_(2) . "}"; $filterQuery .= PHP_EOL . Indent::_(2) . "elseif (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$_" . $filter['code'] . "))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$_" . $filter['code'] . "))"; $filterQuery .= PHP_EOL . Indent::_(2) . "{"; $filterQuery .= PHP_EOL . Indent::_(3) . "\$query->where('" . $a . "." . $filter['code'] @@ -16015,7 +16015,7 @@ class Interpretation extends Fields . ")));"; $filterQuery .= PHP_EOL . Indent::_(2) . "}"; $filterQuery .= PHP_EOL . Indent::_(2) . "elseif (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_" . $filter['code'] . "))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_" . $filter['code'] . "))"; $filterQuery .= PHP_EOL . Indent::_(2) . "{"; $filterQuery .= PHP_EOL . Indent::_(3) . "//" @@ -16035,7 +16035,7 @@ class Interpretation extends Fields $filterQuery .= PHP_EOL . Indent::_(5) . "}"; $filterQuery .= PHP_EOL . Indent::_(4) . "}"; $filterQuery .= PHP_EOL . Indent::_(4) . "elseif (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$val))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$val))"; $filterQuery .= PHP_EOL . Indent::_(4) . "{"; $filterQuery .= PHP_EOL . Indent::_(5) . "return \$db->quote(\$db->escape(\$val));"; @@ -17487,7 +17487,7 @@ class Interpretation extends Fields . " check if the not_required field is set"; $fix .= PHP_EOL . Indent::_(2) . "if (isset(\$data['not_required']) && " - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$data['not_required']))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$data['not_required']))"; $fix .= PHP_EOL . Indent::_(2) . "{"; $fix .= PHP_EOL . Indent::_(3) . "\$requiredFields = (array) explode(',',(string) \$data['not_required']);"; @@ -17501,7 +17501,7 @@ class Interpretation extends Fields $fix .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " make sure there is a string value"; $fix .= PHP_EOL . Indent::_(4) . "if (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$requiredField))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$requiredField))"; $fix .= PHP_EOL . Indent::_(4) . "{"; $fix .= PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__) . " change to false"; @@ -18137,7 +18137,7 @@ class Interpretation extends Fields { // for now we just give an error message (don't fix it) $this->app->enqueueMessage( - Text::_('

Multi Filter Error

'), + Text::_('COM_COMPONENTBUILDER_HR_HTHREEMULTI_FILTER_ERRORHTHREE'), 'Error' ); $field_url @@ -18283,13 +18283,13 @@ class Interpretation extends Fields ) . " We do some sanitation for " . $CodeName . " filter"; $fieldFilters[] = Indent::_(2) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $codeName + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $codeName . "Options) &&"; $fieldFilters[] = Indent::_(3) . "isset(\$this->" . $codeName . "Options[0]->value) &&"; $fieldFilters[] = Indent::_(3) . "!" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $codeName + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $codeName . "Options[0]->value))"; $fieldFilters[] = Indent::_(2) . "{"; $fieldFilters[] = Indent::_(3) . "unset(\$this->" @@ -18301,7 +18301,7 @@ class Interpretation extends Fields ) . " Only load " . $CodeName . " filter if it has values"; $fieldFilters[] = Indent::_(2) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $codeName + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $codeName . "Options))"; $fieldFilters[] = Indent::_(2) . "{"; $fieldFilters[] = Indent::_(3) . "//" . Line::_( @@ -18350,12 +18350,12 @@ class Interpretation extends Fields ) . " We do some sanitation for " . $Codename . " filter"; $fieldFilters[] = Indent::_(2) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $filter['code'] + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $filter['code'] . "Options) &&"; $fieldFilters[] = Indent::_(3) . "isset(\$this->" . $filter['code'] . "Options[0]->value) &&"; $fieldFilters[] = Indent::_(3) . "!" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $filter['code'] + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $filter['code'] . "Options[0]->value))"; $fieldFilters[] = Indent::_(2) . "{"; $fieldFilters[] = Indent::_(3) . "unset(\$this->" @@ -18366,7 +18366,7 @@ class Interpretation extends Fields ) . " Only load " . $Codename . " filter if it has values"; $fieldFilters[] = Indent::_(2) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $filter['code'] + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $filter['code'] . "Options))"; $fieldFilters[] = Indent::_(2) . "{"; $fieldFilters[] = Indent::_(3) . "//" . Line::_( @@ -18550,13 +18550,13 @@ class Interpretation extends Fields ) . " We do some sanitation for " . $CodeName . " filter"; $fieldBatch[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $codeName + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $codeName . "Options) &&"; $fieldBatch[] = Indent::_(4) . "isset(\$this->" . $codeName . "Options[0]->value) &&"; $fieldBatch[] = Indent::_(4) . "!" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $codeName + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $codeName . "Options[0]->value))"; $fieldBatch[] = Indent::_(3) . "{"; $fieldBatch[] = Indent::_(4) . "unset(\$this->" @@ -18608,12 +18608,12 @@ class Interpretation extends Fields ) . " We do some sanitation for " . $CodeName . " filter"; $fieldBatch[] = Indent::_(3) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $filter['code'] + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$this->" . $filter['code'] . "Options) &&"; $fieldBatch[] = Indent::_(4) . "isset(\$this->" . $filter['code'] . "Options[0]->value) &&"; $fieldBatch[] = Indent::_(4) . "!" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $filter['code'] + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->" . $filter['code'] . "Options[0]->value))"; $fieldBatch[] = Indent::_(3) . "{"; $fieldBatch[] = Indent::_(4) . "unset(\$this->" @@ -19338,7 +19338,7 @@ class Interpretation extends Fields . "', null, '');"; $allow[] = Indent::_(3) . "}"; $allow[] = Indent::_(3) . "elseif (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$val))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$val))"; $allow[] = Indent::_(3) . "{"; $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " We have to unset then (TODO)"; @@ -19821,7 +19821,7 @@ class Interpretation extends Fields . "\$_" . $key . " = \$this->getState('filter." . $key . "');"; $stored .= PHP_EOL . Indent::_(2) - . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_" + . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$_" . $key . "))"; $stored .= PHP_EOL . Indent::_(2) . "{"; @@ -19835,7 +19835,7 @@ class Interpretation extends Fields $stored .= PHP_EOL . Indent::_(2) . "elseif (is_numeric(\$_" . $key . ")"; $stored .= PHP_EOL . Indent::_(2) - . " || Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$_" . $key . "))"; + . " || Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$_" . $key . "))"; $stored .= PHP_EOL . Indent::_(2) . "{"; $stored .= PHP_EOL . Indent::_(3) @@ -19943,7 +19943,7 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Built the actions for new and existing records."; $toolBar .= PHP_EOL . Indent::_(2) . "if (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->referral))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->referral))"; $toolBar .= PHP_EOL . Indent::_(2) . "{"; $toolBar .= PHP_EOL . Indent::_(3) . "if (\$this->canDo->get('" . CFactory::_('Compiler.Creator.Permission')->getGlobal($nameSingleCode, 'core.create') . "') && \$isNew)"; @@ -20082,7 +20082,7 @@ class Interpretation extends Fields . CFactory::_('Compiler.Builder.Content.One')->get('Component') . "Helper::getHelpUrl('" . $nameSingleCode . "');"; $toolBar .= PHP_EOL . Indent::_(2) . "if (" - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->help_url))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$this->help_url))"; $toolBar .= PHP_EOL . Indent::_(2) . "{"; $toolBar .= PHP_EOL . Indent::_(3) . "ToolbarHelper::help('" . CFactory::_('Config')->lang_prefix . "_HELP_MANAGER', false, \$this->help_url);"; @@ -20575,7 +20575,7 @@ class Interpretation extends Fields . $item['name'] . "Array = " . $decode . "(\$item->" . $item['name'] . $suffix_decode . ");"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) - . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" + . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $item['name'] . "Array))"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "\$" @@ -20597,7 +20597,7 @@ class Interpretation extends Fields { $fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "//".Line::_(__Line__, __Class__)." decode ".$item['name']; $fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "\$".$item['name']."Array = ".$decode."(\$item->".$item['name'].$suffix_decode.");"; - $fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$".$item['name']."Array))"; + $fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$".$item['name']."Array))"; $fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "{"; $fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(4) . "\$item->".$item['name']." = implode('|',\$".$item['name']."Array);"; $fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "}"; @@ -20611,7 +20611,7 @@ class Interpretation extends Fields . $item['name'] . "Array = " . $decode . "(\$item->" . $item['name'] . $suffix_decode . ");"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) - . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" + . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $item['name'] . "Array))"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "\$" @@ -20731,7 +20731,7 @@ class Interpretation extends Fields . "(\$item->" . $item['name'] . $suffix_decode . ");"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) - . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" + . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $item['name'] . "Array))"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{"; @@ -20744,7 +20744,7 @@ class Interpretation extends Fields $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "{"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5) - . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" + . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$" . $item['name'] . "))"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5) . "{"; @@ -20761,7 +20761,7 @@ class Interpretation extends Fields . "//" . Line::_(__Line__, __Class__) . " make sure the bucket has values."; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) - . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$bucket" + . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$bucket" . $item['name'] . "))"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "{"; @@ -20812,7 +20812,7 @@ class Interpretation extends Fields } $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "\$item->" . $item['name'] - . " = Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::string(\$item->" + . " = Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::string(\$item->" . $item['name'] . ", ', ', '" . $keyTableNAme . "', '" . $item['custom']['id'] . "', '" @@ -20822,7 +20822,7 @@ class Interpretation extends Fields { $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "\$item->" . $item['name'] - . " = Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::string(\$item->" + . " = Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::string(\$item->" . $item['name'] . ", ', ', '" . $item['name'] . "');"; } @@ -20838,7 +20838,7 @@ class Interpretation extends Fields ) . " convert " . $item['name']; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "\$item->" . $item['name'] - . " = Super___4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::string(\$item->" + . " = Super_" . "__4b225c51_d293_48e4_b3f6_5136cf5c3f18___Power::string(\$item->" . $item['name'] . ");"; } } @@ -20881,7 +20881,7 @@ class Interpretation extends Fields ) . "//" . Line::_(__Line__, __Class__) . " Set values to display correctly."; $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) - . "if (Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))"; + . "if (Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))"; $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{"; // do not add to export since it is already done if (!$export) @@ -20891,7 +20891,7 @@ class Interpretation extends Fields . " Get the user object if not set."; $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "if (!isset(\$user) || !" - . "Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$user))"; + . "Super_" . "__91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$user))"; $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "{"; if (CFactory::_('Config')->get('joomla_version', 3) == 3) @@ -21034,7 +21034,7 @@ class Interpretation extends Fields $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "\$headers = \$this->getExImPortHeaders();"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "if (" - . "Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$headers))"; + . "Super_" . "__91004529_94a9_4590_b842_e7c6b624ecf5___Power::check(\$headers))"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "array_unshift(\$items,\$headers);"; @@ -21065,7 +21065,7 @@ class Interpretation extends Fields . "//" . Line::_(__Line__, __Class__) . " Get the encryption object."; $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) - . "\$" . $cryptionType . " = new Super___99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" + . "\$" . $cryptionType . " = new Super_" . "__99175f6d_dba8_4086_8a65_5c4ec175e61d___Power(\$" . $cryptionType . "key);"; } elseif (CFactory::_('Compiler.Builder.Model.' . ucfirst($cryptionType). '.Field.Initiator')-> @@ -21114,7 +21114,7 @@ class Interpretation extends Fields { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -21136,7 +21136,7 @@ class Interpretation extends Fields { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -21203,7 +21203,7 @@ class Interpretation extends Fields . "//" . Line::_(__Line__, __Class__) . " set selection value to a translatable value"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "if (" - . "Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))"; + . "Super_" . "__0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{"; $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "foreach (\$items as \$nr => &\$item)"; @@ -21288,7 +21288,7 @@ class Interpretation extends Fields ) . " Now check if value is found in this array"; $fix .= PHP_EOL . Indent::_(3) . "if (isset(\$" . $name . "Array[\$value]) && " - . "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$" . $name . "Array[\$value]))"; + . "Super_" . "__1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check(\$" . $name . "Array[\$value]))"; $fix .= PHP_EOL . Indent::_(3) . "{"; $fix .= PHP_EOL . Indent::_(4) . "return \$" . $name . "Array[\$value];"; @@ -21324,7 +21324,7 @@ class Interpretation extends Fields public function setComponentImageType($path) { - $type = ComponentbuilderHelper::imageInfo($path); + $type = \ComponentbuilderHelper::imageInfo($path); if ($type) { $imagePath = CFactory::_('Utilities.Paths')->component_path . '/admin/assets/images'; @@ -21369,7 +21369,7 @@ class Interpretation extends Fields if (isset($view['dashboard_add']) && $view['dashboard_add'] == 1) { - $type = ComponentbuilderHelper::imageInfo( + $type = \ComponentbuilderHelper::imageInfo( $view['settings']->icon_add ); if ($type) @@ -21407,7 +21407,7 @@ class Interpretation extends Fields if (isset($view['dashboard_list']) && $view['dashboard_list'] == 1) { - $type = ComponentbuilderHelper::imageInfo( + $type = \ComponentbuilderHelper::imageInfo( $view['settings']->icon ); if ($type) @@ -21484,7 +21484,7 @@ class Interpretation extends Fields ); CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName); // get image type - $type = ComponentbuilderHelper::imageInfo( + $type = \ComponentbuilderHelper::imageInfo( $view['settings']->icon_category ); if ($type) @@ -21779,7 +21779,7 @@ class Interpretation extends Fields && $menu['dashboard_list'] == 1 && $menu['before'] == $view['adminview']) { - $type = ComponentbuilderHelper::imageInfo( + $type = \ComponentbuilderHelper::imageInfo( $menu['settings']->icon ); if ($type) @@ -21816,7 +21816,7 @@ class Interpretation extends Fields && $menu['dashboard_list'] == 1 && empty($menu['before'])) { - $type = ComponentbuilderHelper::imageInfo( + $type = \ComponentbuilderHelper::imageInfo( $menu['settings']->icon ); if ($type) @@ -21858,7 +21858,7 @@ class Interpretation extends Fields && $menu['dashboard_list'] == 1 && $view['adminview'] == $menu['before']) { - $type = ComponentbuilderHelper::imageInfo( + $type = \ComponentbuilderHelper::imageInfo( 'images/' . $menu['icon'] ); if ($type) @@ -21914,7 +21914,7 @@ class Interpretation extends Fields && $menu['dashboard_list'] == 1 && empty($menu['before'])) { - $type = ComponentbuilderHelper::imageInfo( + $type = \ComponentbuilderHelper::imageInfo( 'images/' . $menu['icon'] ); if ($type) @@ -23790,6 +23790,6 @@ class Interpretation extends Fields } return true; - } - -} + } +} + diff --git a/admin/helpers/compiler/b_Structure.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Structure.php similarity index 90% rename from admin/helpers/compiler/b_Structure.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Structure.php index 9130b74d4..8e05da03b 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Structure.php @@ -1,32 +1,33 @@ - - * @gitea Joomla Component Builder - * @github Joomla Component Builder + * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - + +namespace VDM\Joomla\Componentbuilder\Compiler\Helper; + + use Joomla\CMS\Filesystem\File; -use Joomla\CMS\Language\Text; -use VDM\Joomla\Utilities\ArrayHelper; -use VDM\Joomla\Utilities\GetHelper; -use VDM\Joomla\Utilities\FileHelper; -use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; - -/** +use Joomla\CMS\Language\Text; +use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\FileHelper; +use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; +use VDM\Joomla\Componentbuilder\Compiler\Helper\Get; + + +/** * Structure class - * @deprecated 3.3 - */ -class Structure extends Get -{ - + * + * @deprecated 3.3 + */ +class Structure extends Get +{ /** * The folder counter * @@ -475,7 +476,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -494,7 +495,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -513,7 +514,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -532,7 +533,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -551,7 +552,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -570,7 +571,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -600,7 +601,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -619,7 +620,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -638,7 +639,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -815,7 +816,7 @@ class Structure extends Get { // set notice that we could not get a valid string from the target $this->app->enqueueMessage( - Text::sprintf('

%s Warning

', __CLASS__), 'Error' + Text::sprintf('COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE', __CLASS__), 'Error' ); $this->app->enqueueMessage( Text::sprintf( @@ -895,6 +896,6 @@ class Structure extends Get protected function removeFolder($dir, $ignore = false) { return CFactory::_('Utilities.Folder')->remove($dir, $ignore); - } - -} + } +} + diff --git a/admin/helpers/compiler/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/index.html similarity index 100% rename from admin/helpers/compiler/index.html rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Helper/index.html diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Header.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Header.php index 4172e7577..b48b73b88 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Header.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Header.php @@ -417,7 +417,7 @@ final class Header implements HeaderInterface case 'form.custom.field': $headers[] = 'use Joomla\CMS\HTML\HTMLHelper as Html;'; $headers[] = "jimport('joomla.form.helper');"; - $headers[] = "JFormHelper::loadFieldClass('###JFORM_extends###');"; + $headers[] = "\JFormHelper::loadFieldClass('###JFORM_extends###');"; break; default: diff --git a/admin/helpers/extrusion/b_builder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Builder.php similarity index 74% rename from admin/helpers/extrusion/b_builder.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Builder.php index 7c373a8b0..94d6734c8 100644 --- a/admin/helpers/extrusion/b_builder.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Builder.php @@ -1,295 +1,287 @@ + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ - @version 1.0.0 - @created 26th December, 2016 - @package Component Builder - @subpackage builder.php - @author Llewellyn van der Merwe - @my wife Roline van der Merwe - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ +namespace VDM\Joomla\Componentbuilder\Extrusion\Helper; -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); -use Joomla\CMS\Factory; +use Joomla\CMS\Factory; +// use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; (for Joomla 4 and above) use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Componentbuilder\Extrusion\Helper\Mapping; + /** - * Builder class + * Builder class + * + * @since 3.2.0 */ class Builder extends Mapping { - /** - * Some default fields - */ - public $user; - public $today; - public $db; - public $views = array(); - public $admin_fields = array(); - protected $fields = array(); - protected $title = array(); - protected $description = array(); - protected $alias = array(); - protected $list = array(); - - /** - * Field that should not be used in name, alias, disc, and list view - * (TODO) We may need to set this dynamicly - */ - protected $avoidList = array('not_required'); - - /*** - * Constructor - */ - public function __construct(&$data) - { - // first we run the perent constructor - if (parent::__construct($data)) - { - // always reset the building values if found - $data['buildcomp'] = 0; - $data['buildcompsql'] = ''; - // set some globals - $this->db = Factory::getDbo(); - $this->user = Factory::getUser(); - $this->today = Factory::getDate()->toSql(); - - // no start the building of the views and fields - if ($this->setBuild()) - { - return true; - } - } - return false; - } - - /** - * The building function - * To build the views and fields that are needed - */ - protected function setBuild() - { - foreach ($this->map as $view => $fields) - { - // set this field with all its needed data - foreach ($fields as $field) - { - $this->setField($view, $field); - } - // set this view with all its needed data - $this->setView($view); - } - return true; - } - - /** - * The building function for views - */ - protected function setView(&$name) - { - // set the view object - $object = new stdClass(); - $object->system_name = StringHelper::check($name, 'W') . ' (dynamic build)'; - $object->name_single = $name; - $object->name_list = $name. 's'; - $object->short_description = $name. ' view (dynamic build)'; - $object->type = 1; - $object->description = $name. ' view (dynamic build)'; - $object->add_fadein = 1; - $object->add_sql = (isset($this->addSql[$name])) ? $this->addSql[$name]: 0; - $object->source = (isset($this->source[$name])) ? $this->source[$name]: 0; - $object->sql = (isset($this->sql[$name])) ? base64_encode($this->sql[$name]): ''; - $object->addpermissions = '{"action":["view.edit","view.edit.own","view.edit.state","view.create","view.delete","view.access"],"implementation":["3","3","3","3","3","3"]}'; - $object->created = $this->today; - $object->created_by = $this->user->id; - $object->published = 1; - // add to data base - if ($this->db->insertObject('#__componentbuilder_admin_view', $object)) - { - // make sure the access of asset is set - $id = $this->db->insertid(); - ComponentbuilderHelper::setAsset($id, 'admin_view'); - // load the views - $this->views[] = $id; - // load the admin view fields - return $this->addFields($name, $id); - } - return false; - } - - /** - * Add the fields to the view - */ - protected function addFields(&$view, &$view_id) - { - if (isset($this->fields[$view])) - { - // set some defaults - $addField = array (); - $fixLink = (isset($this->title[$view])) ? 0 : 1; - // build the field data... hmmm - foreach ($this->fields[$view] as $nr => $id) - { - $alignment = 1; - if ($nr % 2 == 0) - { - $alignment = 2; - } - // some defaults - $isTitle = (isset($this->title[$view]) && $this->title[$view] == $id) ? 1 : 0; - $isAlias = (isset($this->alias[$view]) && $this->alias[$view] == $id) ? 1 : 0; - $isList = ($key = array_search($id, $this->list[$view])) ? 1 : 0; - $isLink = ($isTitle) ? 1 : (($isList && $fixLink) ? 1 : 0); - if ($isLink) - { - $fixLink = 0; - } - // load the field values - $addField['addfields'.$nr]['field'] = $id; - $addField['addfields'.$nr]['list'] = $isList; - $addField['addfields'.$nr]['order_list'] = ($key) ? $key : 0; - $addField['addfields'.$nr]['title'] = $isTitle; - $addField['addfields'.$nr]['alias'] = $isAlias; - $addField['addfields'.$nr]['sort'] = $isList; - $addField['addfields'.$nr]['search'] = $isList; - $addField['addfields'.$nr]['filter'] = $isList; - $addField['addfields'.$nr]['link'] = $isLink; - $addField['addfields'.$nr]['tab'] = 1; - $addField['addfields'.$nr]['alignment'] = ($isTitle || $isAlias) ? 4 : $alignment; - $addField['addfields'.$nr]['order_edit'] = $nr; - $addField['addfields'.$nr]['permission'] = 0; - } - - // set the field object - $object = new stdClass(); - $object->admin_view = $view_id; - $object->addfields = json_encode($addField, JSON_FORCE_OBJECT); - $object->created = $this->today; - $object->created_by = $this->user->id; - $object->published = 1; - // add to data base - return $this->db->insertObject('#__componentbuilder_admin_fields', $object); - } - return false; - } - - /** - * The building function for fields - */ - protected function setField(&$view, &$field) - { - if ($fieldType = CFactory::_('Field.Type.Name')->get($field['fieldType'])) - { - // set the field object - $object = new stdClass(); - $object->name = $field['label'] . ' (dynamic build)'; - $object->fieldtype = $fieldType; - $object->datatype = $field['dataType']; - $object->indexes = $field['key']; - $object->null_switch = $field['null']; - $object->datalenght = $field['size']; - $object->datalenght_other = $field['sizeOther']; - $object->datadefault = $field['default']; - $object->datadefault_other = $field['defaultOther']; - $object->created = $this->today; - $object->created_by = $this->user->id; - $object->published = 1; - $object->store = 0; - $object->xml = $this->setFieldXML($field, $fieldType); - // add to data base - if ($this->db->insertObject('#__componentbuilder_field', $object)) - { - // make sure the access of asset is set - $id = $this->db->insertid(); - ComponentbuilderHelper::setAsset($id, 'field'); - // check if any field for this field was already set, if not set array - if (!isset($this->fields[$view])) - { - $this->fields[$view] = array(); - } - // load the field - $this->fields[$view][] = $id; - - if (!isset($this->list[$view])) - { - $this->list[$view] = array(); - } - // insure that some fields are avoided - if (!in_array($field['name'], $this->avoidList)) - { - // set the name/title field if found - if (!isset($this->title[$view]) && (stripos($field['name'], 'name') !== false || stripos($field['name'], 'title') !== false)) - { - $this->title[$view] = $id; - $this->list[$view][] = $id; - } - // set the alias field if found - elseif (!isset($this->alias[$id]) && stripos($field['name'], 'alias') !== false) - { - $this->alias[$view] = $id; - } - // set the alias field if found - elseif (!isset($this->description[$id]) && stripos($field['name'], 'desc') !== false) - { - $this->description[$view] = $id; - $this->list[$view][] = $id; - } - elseif ('Text' == $field['fieldType'] && count($this->list[$view]) < 5) - { - $this->list[$view][] = $id; - } - } - return true; - } - } - return false; - } - - /** - * get the field type id from system - */ - protected function getFieldType($fieldName) - { - // load the field settings - return GetHelper::var('fieldtype', $fieldName, 'name', 'id'); - } - - /** - * The building function for field xml - */ - protected function setFieldXML(&$field, $fieldId) - { - // load the field settings - $settings = array(); - $settings['name'] = $field['name']; - $settings['description'] = 'The '.strtolower($field['label']) . ' is set here.'; - $settings['message'] = "Error! Please add some ".strtolower($field['label'])." here."; - $settings['label'] = $field['label']; - $settings['default'] = ($field['default'] == 'Other') ? $field['defaultOther'] : $field['default']; - $settings['hint'] = $field['label'] .' Here!'; - // okay set the xml field values - if ($fieldOptions = ComponentbuilderHelper::getFieldTypeProperties($fieldId, 'id', $settings)) - { - return json_encode($fieldOptions['values']); - } - return ''; + /** + * Some default fields + */ + public $user; + public $today; + public $db; + public array $views = []; + public array $admin_fields = []; + protected array $fields = []; + protected array $title = []; + protected array $description = []; + protected array $alias = []; + protected array $list = []; + + /** + * Field that should not be used in name, alias, disc, and list view + * (TODO) We may need to set this dynamicly + */ + protected array $avoidList = ['not_required']; + + /*** + * Constructor + */ + public function __construct(&$data) + { + // first we run the perent constructor + if (parent::__construct($data)) + { + // always reset the building values if found + $data['buildcomp'] = 0; + $data['buildcompsql'] = ''; + // set some globals + $this->db = Factory::getDbo(); + $this->user = Factory::getUser(); + $this->today = Factory::getDate()->toSql(); + + // no start the building of the views and fields + if ($this->setBuild()) + { + return true; + } + } + return false; + } + + /** + * The building function + * To build the views and fields that are needed + */ + protected function setBuild() + { + foreach ($this->map as $view => $fields) + { + // set this field with all its needed data + foreach ($fields as $field) + { + $this->setField($view, $field); + } + // set this view with all its needed data + $this->setView($view); + } + return true; + } + + /** + * The building function for views + */ + protected function setView(&$name) + { + // set the view object + $object = new \stdClass(); + $object->system_name = StringHelper::check($name, 'W') . ' (dynamic build)'; + $object->name_single = $name; + $object->name_list = $name. 's'; + $object->short_description = $name. ' view (dynamic build)'; + $object->type = 1; + $object->description = $name. ' view (dynamic build)'; + $object->add_fadein = 1; + $object->add_sql = (isset($this->addSql[$name])) ? $this->addSql[$name]: 0; + $object->source = (isset($this->source[$name])) ? $this->source[$name]: 0; + $object->sql = (isset($this->sql[$name])) ? base64_encode($this->sql[$name]): ''; + $object->addpermissions = '{"action":["view.edit","view.edit.own","view.edit.state","view.create","view.delete","view.access"],"implementation":["3","3","3","3","3","3"]}'; + $object->created = $this->today; + $object->created_by = $this->user->id; + $object->published = 1; + // add to data base + if ($this->db->insertObject('#__componentbuilder_admin_view', $object)) + { + // make sure the access of asset is set + $id = $this->db->insertid(); + \ComponentbuilderHelper::setAsset($id, 'admin_view'); + // load the views + $this->views[] = $id; + // load the admin view fields + return $this->addFields($name, $id); + } + return false; + } + + /** + * Add the fields to the view + */ + protected function addFields(&$view, &$view_id) + { + if (isset($this->fields[$view])) + { + // set some defaults + $addField = array (); + $fixLink = (isset($this->title[$view])) ? 0 : 1; + // build the field data... hmmm + foreach ($this->fields[$view] as $nr => $id) + { + $alignment = 1; + if ($nr % 2 == 0) + { + $alignment = 2; + } + // some defaults + $isTitle = (isset($this->title[$view]) && $this->title[$view] == $id) ? 1 : 0; + $isAlias = (isset($this->alias[$view]) && $this->alias[$view] == $id) ? 1 : 0; + $isList = ($key = array_search($id, $this->list[$view])) ? 1 : 0; + $isLink = ($isTitle) ? 1 : (($isList && $fixLink) ? 1 : 0); + if ($isLink) + { + $fixLink = 0; + } + // load the field values + $addField['addfields'.$nr]['field'] = $id; + $addField['addfields'.$nr]['list'] = $isList; + $addField['addfields'.$nr]['order_list'] = ($key) ? $key : 0; + $addField['addfields'.$nr]['title'] = $isTitle; + $addField['addfields'.$nr]['alias'] = $isAlias; + $addField['addfields'.$nr]['sort'] = $isList; + $addField['addfields'.$nr]['search'] = $isList; + $addField['addfields'.$nr]['filter'] = $isList; + $addField['addfields'.$nr]['link'] = $isLink; + $addField['addfields'.$nr]['tab'] = 1; + $addField['addfields'.$nr]['alignment'] = ($isTitle || $isAlias) ? 4 : $alignment; + $addField['addfields'.$nr]['order_edit'] = $nr; + $addField['addfields'.$nr]['permission'] = 0; + } + + // set the field object + $object = new \stdClass(); + $object->admin_view = $view_id; + $object->addfields = json_encode($addField, JSON_FORCE_OBJECT); + $object->created = $this->today; + $object->created_by = $this->user->id; + $object->published = 1; + // add to data base + return $this->db->insertObject('#__componentbuilder_admin_fields', $object); + } + return false; + } + + /** + * The building function for fields + */ + protected function setField(&$view, &$field) + { + if ($fieldType = CFactory::_('Field.Type.Name')->get($field['fieldType'])) + { + // set the field object + $object = new \stdClass(); + $object->name = $field['label'] . ' (dynamic build)'; + $object->fieldtype = $fieldType; + $object->datatype = $field['dataType']; + $object->indexes = $field['key']; + $object->null_switch = $field['null']; + $object->datalenght = $field['size']; + $object->datalenght_other = $field['sizeOther']; + $object->datadefault = $field['default']; + $object->datadefault_other = $field['defaultOther']; + $object->created = $this->today; + $object->created_by = $this->user->id; + $object->published = 1; + $object->store = 0; + $object->xml = $this->setFieldXML($field, $fieldType); + // add to data base + if ($this->db->insertObject('#__componentbuilder_field', $object)) + { + // make sure the access of asset is set + $id = $this->db->insertid(); + \ComponentbuilderHelper::setAsset($id, 'field'); + // check if any field for this field was already set, if not set array + if (!isset($this->fields[$view])) + { + $this->fields[$view] = []; + } + // load the field + $this->fields[$view][] = $id; + + if (!isset($this->list[$view])) + { + $this->list[$view] = []; + } + // insure that some fields are avoided + if (!in_array($field['name'], $this->avoidList)) + { + // set the name/title field if found + if (!isset($this->title[$view]) && (stripos($field['name'], 'name') !== false || stripos($field['name'], 'title') !== false)) + { + $this->title[$view] = $id; + $this->list[$view][] = $id; + } + // set the alias field if found + elseif (!isset($this->alias[$id]) && stripos($field['name'], 'alias') !== false) + { + $this->alias[$view] = $id; + } + // set the alias field if found + elseif (!isset($this->description[$id]) && stripos($field['name'], 'desc') !== false) + { + $this->description[$view] = $id; + $this->list[$view][] = $id; + } + elseif ('Text' == $field['fieldType'] && count($this->list[$view]) < 5) + { + $this->list[$view][] = $id; + } + } + return true; + } + } + return false; + } + + /** + * get the field type id from system + */ + protected function getFieldType($fieldName) + { + // load the field settings + return GetHelper::var('fieldtype', $fieldName, 'name', 'id'); + } + + /** + * The building function for field xml + */ + protected function setFieldXML(&$field, $fieldId) + { + // load the field settings + $settings = []; + $settings['name'] = $field['name']; + $settings['description'] = 'The '.strtolower($field['label']) . ' is set here.'; + $settings['message'] = "Error! Please add some ".strtolower($field['label'])." here."; + $settings['label'] = $field['label']; + $settings['default'] = ($field['default'] == 'Other') ? $field['defaultOther'] : $field['default']; + $settings['hint'] = $field['label'] .' Here!'; + // okay set the xml field values + if ($fieldOptions = \ComponentbuilderHelper::getFieldTypeProperties($fieldId, 'id', $settings)) + { + return json_encode($fieldOptions['values']); + } + return ''; } } + diff --git a/admin/helpers/extrusion/c_extrusion.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Extrusion.php similarity index 56% rename from admin/helpers/extrusion/c_extrusion.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Extrusion.php index 718858cbf..2f2a7e55c 100644 --- a/admin/helpers/extrusion/c_extrusion.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Extrusion.php @@ -1,111 +1,103 @@ + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ - @version 1.0.0 - @created 26th December, 2016 - @package Component Builder - @subpackage extrusion.php - @author Llewellyn van der Merwe - @my wife Roline van der Merwe - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ +namespace VDM\Joomla\Componentbuilder\Extrusion\Helper; -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); -use VDM\Joomla\Utilities\GetHelper; +use Joomla\CMS\Language\Text; use VDM\Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Componentbuilder\Extrusion\Helper\Builder; + /** - * Extrusion class + * Extrusion class + * + * @since 3.2.0 */ class Extrusion extends Builder { - /*** - * Constructor - */ - public function __construct(&$data) - { - // first we run the perent constructor - if (parent::__construct($data)) - { - // link the view data to the component - if ($this->setAdminViews($data['id'])) - { - $this->app->enqueueMessage( - JText::_('All the fields and views from your sql dump has been created and linked to this component.'), - 'Success' - ); - return true; - } - } - return false; + /*** + * Constructor + */ + public function __construct(&$data) + { + // first we run the perent constructor + if (parent::__construct($data)) + { + // link the view data to the component + if ($this->setAdminViews($data['id'])) + { + $this->app->enqueueMessage( + Text::_('COM_COMPONENTBUILDER_ALL_THE_FIELDS_AND_VIEWS_FROM_YOUR_SQL_DUMP_HAS_BEEN_CREATED_AND_LINKED_TO_THIS_COMPONENT'), + 'Success' + ); + return true; + } + } + return false; + } + + /** + * link the build views to the component + */ + protected function setAdminViews(&$component_id) + { + // check if views were set + if (ArrayHelper::check($this->views)) + { + $count = 0; + if (ArrayHelper::check($this->addadmin_views)) + { + $count = (int) count((array)$this->addadmin_views) + 3; + } + // set the admin view data linking + foreach ($this->views as $nr => $id) + { + $pointer = $count + $nr; + $this->addadmin_views['addadmin_views'.$pointer]['adminview'] = $id; + $this->addadmin_views['addadmin_views'.$pointer]['icomoon'] = 'joomla'; + $this->addadmin_views['addadmin_views'.$pointer]['mainmenu'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['dashboard_add'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['dashboard_list'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['submenu'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['checkin'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['history'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['metadata'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['access'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['port'] = 1; + $this->addadmin_views['addadmin_views'.$pointer]['edit_create_site_view'] = 0; + $this->addadmin_views['addadmin_views'.$pointer]['order'] = $pointer + 1; + } + } + if (isset($this->addadmin_views) && ArrayHelper::check($this->addadmin_views)) + { + // set the field object + $object = new \stdClass(); + $object->joomla_component = $component_id; + $object->addadmin_views = json_encode($this->addadmin_views, JSON_FORCE_OBJECT); + $object->created = $this->today; + $object->created_by = $this->user->id; + $object->published = 1; + // check if it is already set + if ($item_id = GetHelper::var('component_admin_views', $component_id, 'joomla_component', 'id')) + { + // set ID + $object->id = (int) $item_id; + return $this->db->updateObject('#__componentbuilder_component_admin_views', $object, 'id'); + } + // add to data base + return $this->db->insertObject('#__componentbuilder_component_admin_views', $object); + } + return false; } - - /** - * link the build views to the component - */ - protected function setAdminViews(&$component_id) - { - // check if views were set - if (ArrayHelper::check($this->views)) - { - $count = 0; - if (ArrayHelper::check($this->addadmin_views)) - { - $count = (int) count((array)$this->addadmin_views) + 3; - } - // set the admin view data linking - foreach ($this->views as $nr => $id) - { - $pointer = $count + $nr; - $this->addadmin_views['addadmin_views'.$pointer]['adminview'] = $id; - $this->addadmin_views['addadmin_views'.$pointer]['icomoon'] = 'joomla'; - $this->addadmin_views['addadmin_views'.$pointer]['mainmenu'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['dashboard_add'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['dashboard_list'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['submenu'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['checkin'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['history'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['metadata'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['access'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['port'] = 1; - $this->addadmin_views['addadmin_views'.$pointer]['edit_create_site_view'] = 0; - $this->addadmin_views['addadmin_views'.$pointer]['order'] = $pointer + 1; - } - } - if (isset($this->addadmin_views) && ArrayHelper::check($this->addadmin_views)) - { - // set the field object - $object = new stdClass(); - $object->joomla_component = $component_id; - $object->addadmin_views = json_encode($this->addadmin_views, JSON_FORCE_OBJECT); - $object->created = $this->today; - $object->created_by = $this->user->id; - $object->published = 1; - // check if it is already set - if ($item_id = GetHelper::var('component_admin_views', $component_id, 'joomla_component', 'id')) - { - // set ID - $object->id = (int) $item_id; - return $this->db->updateObject('#__componentbuilder_component_admin_views', $object, 'id'); - } - // add to data base - return $this->db->insertObject('#__componentbuilder_component_admin_views', $object); - } - return false; - } } + diff --git a/admin/helpers/extrusion/a_mapping.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Mapping.php similarity index 70% rename from admin/helpers/extrusion/a_mapping.php rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Mapping.php index 3f645e78f..aac396e9b 100644 --- a/admin/helpers/extrusion/a_mapping.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/Mapping.php @@ -1,421 +1,422 @@ + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ - @version 1.0.0 - @created 26th December, 2016 - @package Component Builder - @subpackage mapping.php - @author Llewellyn van der Merwe - @my wife Roline van der Merwe - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ +namespace VDM\Joomla\Componentbuilder\Extrusion\Helper; -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); -use Joomla\CMS\Factory; +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +// use Joomla\Database\DatabaseDriver; (for Joomla 4 and above) use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\ArrayHelper; + /** - * Mapping class + * Mapping class + * + * @since 3.2.0 */ class Mapping { - /** - * Some default fields - */ - protected $buildcompsql; - public $id; - public $name_code; - public $addadmin_views; - public $addSql = array(); - public $source = array(); - public $sql = array(); - - /** - * The map of the needed fields and views - */ - public $map; - - /** - * The app to load messages mostly - */ - public $app; - - /** - * The needed set of keys needed to set - */ - protected $setting = array('id' => 'default', 'buildcompsql' => 'base64', 'name_code' => 'safeString'); - - /** - * The needed set of keys needed to set - */ - protected $notRequiered = array('id', 'asset_id', 'published', - 'created_by', 'modified_by', 'created', 'modified', 'checked_out','checked_out_time', - 'version', 'hits', 'access', 'ordering', - 'metakey', 'metadesc', 'metadata', 'params'); - - /** - * The datatypes and it linked field types (basic) - * (TODO) We may need to set this dynamicly - */ - protected $dataTypes = array( 'VARCHAR' => 'Text', 'CHAR' => 'Text', - 'MEDIUMTEXT' => 'Textarea', 'LONGTEXT' => 'Textarea', - 'TEXT' => 'Textarea', 'DATETIME' => 'Calendar', - 'DATE' => 'Text', 'TIME' => 'Text', 'TINYINT' => 'Text', - 'BIGINT' => 'Text', 'INT' => 'Text', 'FLOAT' => 'Text', - 'DECIMAL' => 'Text', 'DOUBLE' => 'Text'); - - /** - * The datasize identifiers - */ - protected $dataSize = array( - 'CHAR', 'VARCHAR', 'INT', 'TINYINT', - 'BIGINT', 'FLOAT', 'DECIMAL', 'DOUBLE'); - - /** - * The default identifiers - */ - protected $defaults = array(0, 1, "CURRENT_TIMESTAMP", "DATETIME"); // Other - - /** - * The sizes identifiers - */ - protected $sizes = array("1", "7", "10", "11", "50", "64", "100", "255", "1024", "2048"); // Other - - - /** - * Constructor - */ - public function __construct($data = false) - { - // set the app to insure messages can be set - $this->app = Factory::getApplication(); - // check that we have data - if (ArrayHelper::check($data)) - { - // make sure we have an id - if (isset($data['id']) && $data['id'] > 0) - { - if (isset($data['buildcomp']) && 1 == $data['buildcomp'] && isset($data['buildcompsql'])) - { - foreach ($data as $key => $value) - { - if (isset($this->setting[$key])) - { - switch($this->setting[$key]) - { - case 'base64': - // set needed value - $this->$key = base64_decode((string) $value); - break; - case 'json': - // set needed value - $this->$key = json_decode((string) $value, true); - break; - case 'safeString': - // set needed value - $this->$key = StringHelper::check($value); - break; - default : - $this->$key = $value; - break; - } - } - } - // get linked admin views - $addadmin_views = GetHelper::var('component_admin_views', $data['id'], 'joomla_component', 'addadmin_views'); - if (JsonHelper::check($addadmin_views)) - { - $this->addadmin_views = json_decode((string)$addadmin_views, true); - } - // set the map of the views needed - if ($this->setMap()) - { - return true; - } - $this->app->enqueueMessage( - JText::_('No "CREATE TABLE.." were found, please check your sql.'), - 'Error' - ); - return false; - } - return false; // not set so just return without any error - } - $this->app->enqueueMessage( - JText::_('Please try again, this error usualy happens if it is a new component, beacues we need a component ID to do this build with your sql dump.'), - 'Error' - ); - return false; - } - $this->app->enqueueMessage( - JText::_('Could not find the data needed to continue.'), - 'Error' - ); - return false; - } - - /** - * The mapping function - * To Map the views and fields that are needed - */ - protected function setMap() - { - // start parsing the sql dump data - $queries = JDatabaseDriver::splitSql($this->buildcompsql); - if (ArrayHelper::check($queries)) - { - foreach ($queries as $query) - { - // only use create table queries - if (strpos($query, 'CREATE TABLE IF NOT EXISTS') !== false || - strpos($query, 'CREATE TABLE') !== false) - { - if ($tableName = $this->getTableName($query)) - { - // now get the fields/columns of this view/table - if ($fields = $this->getFields($query)) - { - // make sure it is all lower case from here on - $tableName = strtolower($tableName); - $this->map[$tableName] = $fields; - } - } - else - { - continue; - } - } - // get the insert data if set - if (strpos($query, 'INSERT INTO `') !== false) - { - if ($tableName = $this->getTableName($query)) - { - $this->addSql[$tableName] = 1; - $this->source[$tableName] = 2; - $this->sql[$tableName] = $query; - } - } - } - // check if the mapping was done - if (ArrayHelper::check($this->map)) - { - return true; - } - } - return false; - } - - /** - * Get the table name - */ - protected function getTableName(&$query) - { - if (strpos($query, '`#__') !== false) - { - // get table name - $tableName = GetHelper::between($query, '`#__', "`"); - } - elseif (strpos($query, "'#__") !== false) - { - // get table name - $tableName = GetHelper::between($query, "'#__", "'"); - } - // if it still was not found - if (!isset($tableName) || !ComponentbuilderHelper::checkString($tableName)) - { - // skip this query - return false; - } - // clean the table name (so only view name remain) - if (strpos($tableName, $this->name_code) !== false) - { - $tableName = trim(str_replace($this->name_code, '', $tableName), '_'); - } - // if found - if (ComponentbuilderHelper::checkString($tableName)) - { - return $tableName; - } - // skip this query - return false; - } - - /** - * Get the field details - */ - protected function getFields(&$query) - { - $rows = array_map('trim', explode(PHP_EOL, $query)); - $fields = array(); - foreach ($rows as $row) - { - // make sure we have a lower case string - $row = strtoupper($row); - $field = array(); - $name = ''; - if (0 === strpos($row, '`')) - { - // get field name - $name = GetHelper::between($row, '`', '`'); - } - if (0 === strpos($row, "'")) - { - // get field name - $name = GetHelper::between($row, "'", "'"); - } - // check if the name was found - if (ComponentbuilderHelper::checkString($name)) - { - // insure we have the name in lower case from here on - $name = strtolower($name); - // only continue if field is requered - if (in_array($name, $this->notRequiered)) - { - continue; - } - // check if the field type is found - if ($fieldType = $this->getType($row, $field, $name)) - { - $field['row'] = $row; - $field['name'] = $name; - $field['label'] = StringHelper::check($name, 'W'); - $field['fieldType'] = $fieldType; - $field['size'] = $this->getSize($row, $field); - $field['sizeOther'] = ''; - if (!in_array($field['size'], $this->sizes)) - { - if (ComponentbuilderHelper::checkString($field['size'])) - { - $field['sizeOther'] = $field['size']; - $field['size'] = 'Other'; - } - } - $field['default'] = $this->getDefault($row); - $field['defaultOther'] = ''; - if (!in_array($field['default'], $this->defaults)) - { - if (ComponentbuilderHelper::checkString($field['default'])) - { - $field['defaultOther'] = $field['default']; - $field['default'] = 'Other'; - } - } - $field['null'] = $this->getNullValue($row, $field); - // check if field is a key - $field['key'] = $this->getKeyStatus($rows, $name); - // load to fields - $fields[] = $field; - } - } - } - if (ArrayHelper::check($fields)) - { - return $fields; - } - return false; - } - - /** - * Get the field types - */ - protected function getType($row, &$field, &$name) - { - // first remove field name - $row = str_replace($name, '', $row); - // get the data type first - foreach ($this->dataTypes as $type => $fieldType) - { - if (strpos($row, $type) !== false) - { - $field['dataType'] = $type; - return $fieldType; - } - } - return false; - } - - /** - * Get the field size - */ - protected function getSize(&$row, $field) - { - if (in_array($field['dataType'], $this->dataSize)) - { - return GetHelper::between($row, $field['dataType'].'(', ')'); - } - return ''; - } - - /** - * Get the field default - */ - protected function getDefault(&$row) - { - // get default value - if (strpos($row, 'DEFAULT "') !== false) // to sure it this is correct... - { - return GetHelper::between($row, 'DEFAULT "', '"'); - } - // get default value - if (strpos($row, "DEFAULT '") !== false) - { - return GetHelper::between($row, "DEFAULT '", "'"); - } - return ''; - } - - /** - * Get the field Null Value - */ - protected function getNullValue(&$row, &$field) - { - // get the result of null - if (strpos($row, 'NOT NULL') !== false) - { - return 'NOT NULL'; - } - if (strpos($row, 'DEFAULT NULL') !== false) - { - $field['default'] = 'NULL'; - return ''; - } - return 'NULL'; - } - - /** - * Get the field key status - */ - protected function getKeyStatus(&$rows, &$name) - { - // get the data type first - foreach ($rows as $row) - { - if (strpos($row, 'UNIQUE KEY ') !== false && stripos($row, $name) !== false) - { - return 1; - } - if ((strpos($row, 'PRIMARY KEY ') !== false && stripos($row, $name) !== false) || (strpos($row, 'KEY ') !== false && stripos($row, $name) !== false)) - { - return 2; - } - } - return 0; + /** + * Some default fields + */ + protected $buildcompsql; + public $id; + public $name_code; + public array $addadmin_views; + public array $addSql = []; + public array $source = []; + public array $sql = []; + + /** + * The map of the needed fields and views + */ + public $map; + + /** + * The app to load messages mostly + */ + public $app; + + /** + * The needed set of keys needed to set + */ + protected array $setting = ['id' => 'default', 'buildcompsql' => 'base64', 'name_code' => 'safeString']; + + /** + * The needed set of keys needed to set + */ + protected array $notRequiered = [ + 'id', 'asset_id', 'published', + 'created_by', 'modified_by', 'created', 'modified', 'checked_out','checked_out_time', + 'version', 'hits', 'access', 'ordering', + 'metakey', 'metadesc', 'metadata', 'params' + ]; + + /** + * The datatypes and it linked field types (basic) + * (TODO) We may need to set this dynamicly + */ + protected array $dataTypes = [ + 'VARCHAR' => 'Text', 'CHAR' => 'Text', + 'MEDIUMTEXT' => 'Textarea', 'LONGTEXT' => 'Textarea', + 'TEXT' => 'Textarea', 'DATETIME' => 'Calendar', + 'DATE' => 'Text', 'TIME' => 'Text', 'TINYINT' => 'Text', + 'BIGINT' => 'Text', 'INT' => 'Text', 'FLOAT' => 'Text', + 'DECIMAL' => 'Text', 'DOUBLE' => 'Text' + ]; + + /** + * The datasize identifiers + */ + protected array $dataSize = [ + 'CHAR', 'VARCHAR', 'INT', 'TINYINT', + 'BIGINT', 'FLOAT', 'DECIMAL', 'DOUBLE' + ]; + + /** + * The default identifiers + */ + protected $defaults = [ + 0, 1, "CURRENT_TIMESTAMP", "DATETIME" + ]; // Other + + /** + * The sizes identifiers + */ + protected $sizes = [ + "1", "7", "10", "11", "50", "64", "100", "255", "1024", "2048" + ]; // Other + + /** + * Constructor + */ + public function __construct($data = false) + { + // set the app to insure messages can be set + $this->app = Factory::getApplication(); + + // check that we have data + if (ArrayHelper::check($data)) + { + // make sure we have an id + if (isset($data['id']) && $data['id'] > 0) + { + if (isset($data['buildcomp']) && 1 == $data['buildcomp'] && isset($data['buildcompsql'])) + { + foreach ($data as $key => $value) + { + if (isset($this->setting[$key])) + { + switch($this->setting[$key]) + { + case 'base64': + // set needed value + $this->$key = base64_decode((string) $value); + break; + case 'json': + // set needed value + $this->$key = json_decode((string) $value, true); + break; + case 'safeString': + // set needed value + $this->$key = StringHelper::check($value); + break; + default : + $this->$key = $value; + break; + } + } + } + // get linked admin views + $addadmin_views = GetHelper::var('component_admin_views', $data['id'], 'joomla_component', 'addadmin_views'); + if (JsonHelper::check($addadmin_views)) + { + $this->addadmin_views = json_decode((string)$addadmin_views, true); + } + // set the map of the views needed + if ($this->setMap()) + { + return true; + } + $this->app->enqueueMessage( + Text::_('COM_COMPONENTBUILDER_NO_CREATE_TABLE_WERE_FOUND_PLEASE_CHECK_YOUR_SQL'), + 'Error' + ); + return false; + } + return false; // not set so just return without any error + } + $this->app->enqueueMessage( + Text::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_THIS_ERROR_USUALY_HAPPENS_IF_IT_IS_A_NEW_COMPONENT_BEACUES_WE_NEED_A_COMPONENT_ID_TO_DO_THIS_BUILD_WITH_YOUR_SQL_DUMP'), + 'Error' + ); + return false; + } + $this->app->enqueueMessage( + Text::_('COM_COMPONENTBUILDER_COULD_NOT_FIND_THE_DATA_NEEDED_TO_CONTINUE'), + 'Error' + ); + return false; + } + + /** + * The mapping function + * To Map the views and fields that are needed + */ + protected function setMap() + { + // start parsing the sql dump data + $queries = \JDatabaseDriver::splitSql($this->buildcompsql); + if (ArrayHelper::check($queries)) + { + foreach ($queries as $query) + { + // only use create table queries + if (strpos($query, 'CREATE TABLE IF NOT EXISTS') !== false || + strpos($query, 'CREATE TABLE') !== false) + { + if ($tableName = $this->getTableName($query)) + { + // now get the fields/columns of this view/table + if ($fields = $this->getFields($query)) + { + // make sure it is all lower case from here on + $tableName = strtolower($tableName); + $this->map[$tableName] = $fields; + } + } + else + { + continue; + } + } + // get the insert data if set + if (strpos($query, 'INSERT INTO `') !== false) + { + if ($tableName = $this->getTableName($query)) + { + $this->addSql[$tableName] = 1; + $this->source[$tableName] = 2; + $this->sql[$tableName] = $query; + } + } + } + // check if the mapping was done + if (ArrayHelper::check($this->map)) + { + return true; + } + } + return false; + } + + /** + * Get the table name + */ + protected function getTableName(&$query) + { + if (strpos($query, '`#__') !== false) + { + // get table name + $tableName = GetHelper::between($query, '`#__', "`"); + } + elseif (strpos($query, "'#__") !== false) + { + // get table name + $tableName = GetHelper::between($query, "'#__", "'"); + } + // if it still was not found + if (!isset($tableName) || !StringHelper::check($tableName)) + { + // skip this query + return false; + } + // clean the table name (so only view name remain) + if (strpos($tableName, $this->name_code) !== false) + { + $tableName = trim(str_replace($this->name_code, '', $tableName), '_'); + } + // if found + if (StringHelper::check($tableName)) + { + return $tableName; + } + // skip this query + return false; + } + + /** + * Get the field details + */ + protected function getFields(&$query) + { + $rows = array_map('trim', explode(PHP_EOL, $query)); + $fields = array(); + foreach ($rows as $row) + { + // make sure we have a lower case string + $row = strtoupper($row); + $field = array(); + $name = ''; + if (0 === strpos($row, '`')) + { + // get field name + $name = GetHelper::between($row, '`', '`'); + } + if (0 === strpos($row, "'")) + { + // get field name + $name = GetHelper::between($row, "'", "'"); + } + // check if the name was found + if (StringHelper::check($name)) + { + // insure we have the name in lower case from here on + $name = strtolower($name); + // only continue if field is required + if (in_array($name, $this->notRequiered)) + { + continue; + } + // check if the field type is found + if ($fieldType = $this->getType($row, $field, $name)) + { + $field['row'] = $row; + $field['name'] = $name; + $field['label'] = StringHelper::check($name, 'W'); + $field['fieldType'] = $fieldType; + $field['size'] = $this->getSize($row, $field); + $field['sizeOther'] = ''; + if (!in_array($field['size'], $this->sizes)) + { + if (StringHelper::check($field['size'])) + { + $field['sizeOther'] = $field['size']; + $field['size'] = 'Other'; + } + } + $field['default'] = $this->getDefault($row); + $field['defaultOther'] = ''; + if (!in_array($field['default'], $this->defaults)) + { + if (StringHelper::check($field['default'])) + { + $field['defaultOther'] = $field['default']; + $field['default'] = 'Other'; + } + } + $field['null'] = $this->getNullValue($row, $field); + // check if field is a key + $field['key'] = $this->getKeyStatus($rows, $name); + // load to fields + $fields[] = $field; + } + } + } + if (ArrayHelper::check($fields)) + { + return $fields; + } + return false; + } + + /** + * Get the field types + */ + protected function getType($row, &$field, &$name) + { + // first remove field name + $row = str_replace($name, '', $row); + // get the data type first + foreach ($this->dataTypes as $type => $fieldType) + { + if (strpos($row, $type) !== false) + { + $field['dataType'] = $type; + return $fieldType; + } + } + return false; + } + + /** + * Get the field size + */ + protected function getSize(&$row, $field) + { + if (in_array($field['dataType'], $this->dataSize)) + { + return GetHelper::between($row, $field['dataType'].'(', ')'); + } + return ''; + } + + /** + * Get the field default + */ + protected function getDefault(&$row) + { + // get default value + if (strpos($row, 'DEFAULT "') !== false) // to sure it this is correct... + { + return GetHelper::between($row, 'DEFAULT "', '"'); + } + // get default value + if (strpos($row, "DEFAULT '") !== false) + { + return GetHelper::between($row, "DEFAULT '", "'"); + } + return ''; + } + + /** + * Get the field Null Value + */ + protected function getNullValue(&$row, &$field) + { + // get the result of null + if (strpos($row, 'NOT NULL') !== false) + { + return 'NOT NULL'; + } + if (strpos($row, 'DEFAULT NULL') !== false) + { + $field['default'] = 'NULL'; + return ''; + } + return 'NULL'; + } + + /** + * Get the field key status + */ + protected function getKeyStatus(&$rows, &$name) + { + // get the data type first + foreach ($rows as $row) + { + if (strpos($row, 'UNIQUE KEY ') !== false && stripos($row, $name) !== false) + { + return 1; + } + if ((strpos($row, 'PRIMARY KEY ') !== false && stripos($row, $name) !== false) || (strpos($row, 'KEY ') !== false && stripos($row, $name) !== false)) + { + return 2; + } + } + return 0; } } + diff --git a/admin/helpers/extrusion/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/index.html similarity index 100% rename from admin/helpers/extrusion/index.html rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extrusion/Helper/index.html diff --git a/script.php b/script.php index 001ba6027..4e279585b 100644 --- a/script.php +++ b/script.php @@ -4478,7 +4478,7 @@ class Com_ComponentbuilderInstallerScript $revert_rule = "ALTER TABLE `#__assets` CHANGE `rules` `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.';"; $db->setQuery($revert_rule); $db->execute(); - $app->enqueueMessage(Text::_('Reverted the #__assets table rules column back to its default size of varchar(5120)')); + $app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_REVERTED_THE_B_ASSETSB_TABLE_RULES_COLUMN_BACK_TO_ITS_DEFAULT_SIZE_OF_VARCHARFIVE_THOUSAND_ONE_HUNDRED_AND_TWENTY')); } else { @@ -6215,10 +6215,15 @@ class Com_ComponentbuilderInstallerScript } } } - // path to the new compiler - $jcb_powers = JPATH_LIBRARIES . '/jcb_powers/VDM.Joomla/src/Componentbuilder'; - // we always remove all the old files to avoid mismatching - ComponentbuilderHelper::removeFolder($jcb_powers); + // all things to clear out + $jcb_cleaner = []; + $jcb_cleaner[] = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/compiler'; + $jcb_cleaner[] = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/extrusion'; + $jcb_cleaner[] = JPATH_LIBRARIES . '/jcb_powers/VDM.Joomla/src/Componentbuilder'; + foreach ($jcb_cleaner as $cleaner) + { + ComponentbuilderHelper::removeFolder($cleaner); + } } // do any install needed if ($type === 'install') @@ -9613,7 +9618,7 @@ class Com_ComponentbuilderInstallerScript echo '
-

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

'; +

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

'; // Set db if not set already. if (!isset($db)) diff --git a/site/componentbuilder.php b/site/componentbuilder.php index a60acd2c9..7523dba04 100644 --- a/site/componentbuilder.php +++ b/site/componentbuilder.php @@ -78,7 +78,7 @@ Html::_('script', 'components/com_componentbuilder/assets/js/site.js', ['version // Require helper files JLoader::register('ComponentbuilderHelper', __DIR__ . '/helpers/componentbuilder.php'); -JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php'); +\JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php'); JLoader::register('ComponentbuilderHelperRoute', __DIR__ . '/helpers/route.php'); //Trigger the Global Site Event diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index d17605154..610b71036 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -1120,15 +1120,6 @@ abstract class ComponentbuilderHelper jimport('joomla.application'); } - /** - * The dynamic builder of views, tables and fields - **/ - public static function dynamicBuilder(&$data, $type) - { - self::autoLoader('extrusion'); - $extruder = new Extrusion($data); - } - /* * Convert repeatable field to subform * diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini index c5dde40ad..3701d6482 100644 --- a/site/language/en-GB/en-GB.com_componentbuilder.ini +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -1,5 +1,6 @@ COM_COMPONENTBUILDER="Component Builder" COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!" +COM_COMPONENTBUILDER_ALL_THE_FIELDS_AND_VIEWS_FROM_YOUR_SQL_DUMP_HAS_BEEN_CREATED_AND_LINKED_TO_THIS_COMPONENT="All the fields and views from your sql dump has been created and linked to this component." COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?" COM_COMPONENTBUILDER_API="Api" COM_COMPONENTBUILDER_API_DESC="Sync Portal API" @@ -10,12 +11,14 @@ COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_ COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_SSA="Get the key from %s" COM_COMPONENTBUILDER_BGET_THE_KEY_FROM_SB_FOR_A_SSA="Get the key from %s for %s" COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." +COM_COMPONENTBUILDER_CODESTRINGS="code/strings" COM_COMPONENTBUILDER_COMPANY_S="Company: %s" COM_COMPONENTBUILDER_COMPONENT="Component" COM_COMPONENTBUILDER_COMPONENT_DID_NOT_COMPILE="Component did not compile!" COM_COMPONENTBUILDER_COMPONENT_IS_NOT_PUBLISHED_OR_IS_CHECKED_OUT="Component is not published, or is checked out!" COM_COMPONENTBUILDER_COMPONENT_WAS_NOT_FOUND="Component was not found!" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" +COM_COMPONENTBUILDER_COULD_NOT_FIND_THE_DATA_NEEDED_TO_CONTINUE="Could not find the data needed to continue." COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DTCOMPANYDTDDSDD="
Company
%s
" @@ -44,7 +47,11 @@ COM_COMPONENTBUILDER_FREEOPEN="Free/Open" COM_COMPONENTBUILDER_GREAT_THIS_PLACEHOLDER_WILL_WORK="Great, this placeholder will work!" COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERCOPYRIGHTHFOURPSP="

%s

" COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERLICENSEHFOURPSP="

%s

" +COM_COMPONENTBUILDER_HR_HTHREEASSETS_TABLE_NOTICEHTHREE="

Assets Table Notice

" +COM_COMPONENTBUILDER_HR_HTHREEASSETS_TABLE_WARNINGHTHREE="

Assets Table Warning

" +COM_COMPONENTBUILDER_HR_HTHREECONDITIONAL_SCRIPT_WARNINGHTHREE="

Conditional Script Warning

" COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODES_WARNINGHTHREE="

Custom Codes Warning

" +COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODE_WARNINGHTHREE="

Custom Code Warning

" COM_COMPONENTBUILDER_HR_HTHREECZEROMPZERONTHREENT_ISSUE_FOUNDHTHREEPTHE_PATH_S_COULD_NOT_BE_USEDP="

c0mp0n3nt issue found

The path (%s) could not be used.

" COM_COMPONENTBUILDER_HR_HTHREEDASHBOARD_ERRORHTHREE="

Dashboard Error

" COM_COMPONENTBUILDER_HR_HTHREEDYNAMIC_FOLDERS_WERE_DETECTEDHTHREE="

Dynamic folder(s) were detected.

" @@ -52,9 +59,15 @@ COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_ERRORHTHREE="

External Code COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE="

External Code Notice

" COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE="

External Code Warning

" COM_COMPONENTBUILDER_HR_HTHREEFIELD_NOTICEHTHREE="

Field Notice

" +COM_COMPONENTBUILDER_HR_HTHREEFIELD_WARNINGHTHREE="

Field Warning

" COM_COMPONENTBUILDER_HR_HTHREEFILE_PATH_ERRORHTHREE="

File Path Error

" COM_COMPONENTBUILDER_HR_HTHREEFOLDER_PATH_ERRORHTHREE="

Folder Path Error

" +COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_NOTICEHTHREE="

Language Notice

" +COM_COMPONENTBUILDER_HR_HTHREELANGUAGE_WARNINGHTHREE="

Language Warning

" +COM_COMPONENTBUILDER_HR_HTHREEMULTI_FILTER_ERRORHTHREE="

Multi Filter Error

" +COM_COMPONENTBUILDER_HR_HTHREES_WARNINGHTHREE="

%s Warning

" COM_COMPONENTBUILDER_HR_HTHREETIDY_ERRORHTHREE="

Tidy Error

" +COM_COMPONENTBUILDER_HR_HTHREEWHMCS_ERRORHTHREE="

WHMCS Error

" 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="

%s namespace error (%s)

You must at-least have two sections in your namespace, you just have one (%s). This is an unacceptable action, please see psr-4 for more info.

This %s was therefore removed, click here to fix this issue.

" COM_COMPONENTBUILDER_HTHREES_NAMESPACE_ERROR_SHTHREEPYOU_MUST_ATLEAST_HAVE_TWO_SECTIONS_IN_YOUR_NAMESPACE_YOU_JUST_HAVE_ONE_THIS_IS_AN_UNACCEPTABLE_ACTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPTHIS_S_WAS_THEREFORE_REMOVED_A_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP="

%s namespace error (%s)

You must at-least have two sections in your namespace, you just have one. This is an unacceptable action, please see psr-4 for more info.

This %s was therefore removed, click here to fix this issue.

" COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="

Curl Not Found!

Please setup curl on your system, or componentbuilder will not function correctly!

" @@ -78,6 +91,7 @@ COM_COMPONENTBUILDER_NONE="None" COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" 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_CREATE_TABLE_WERE_FOUND_PLEASE_CHECK_YOUR_SQL="No "CREATE TABLE.." were found, please check your sql." COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_NO_VALID_MODE_HAS_BEEN_SPECIFIED="No valid mode has been specified!" COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set" @@ -87,11 +101,13 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set" COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked" COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="

File at %s/%s gave the following error!
%s

" +COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_THIS_ERROR_USUALY_HAPPENS_IF_IT_IS_A_NEW_COMPONENT_BEACUES_WE_NEED_A_COMPONENT_ID_TO_DO_THIS_BUILD_WITH_YOUR_SQL_DUMP="Please try again, this error usualy happens if it is a new component, beacues we need a component ID to do this build with your sql dump." COM_COMPONENTBUILDER_PLUGIN="Plugin" COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="

Power guid:%s not found!

" COM_COMPONENTBUILDER_PROPERTY="Property" COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="

Super Power repository at %s/%s gave the following error!
%s

" COM_COMPONENTBUILDER_PS_NAMING_MISMATCH_ERROR_SPPTHE_S_NAME_IS_BSB_AND_THE_ENDING_FILE_NAME_IN_THE_NAMESPACE_IS_BSB_THIS_IS_BAD_CONVENTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPA_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP="

%s naming mismatch error (%s)

The %s name is %s and the ending file name in the namespace is %s. This is bad convention, please see psr-4 for more info.

Click here to fix this issue.

" +COM_COMPONENTBUILDER_REVERTED_THE_B_ASSETSB_TABLE_RULES_COLUMN_BACK_TO_ITS_DEFAULT_SIZE_OF_VARCHARFIVE_THOUSAND_ONE_HUNDRED_AND_TWENTY="Reverted the #__assets table rules column back to its default size of varchar(5120)" COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_A_BGITHUB_ACCESS_TOKENB_TO_COMPONENTBUILDER_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_TO_GITHUB_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO_TO_RETRIEVE_S="%s
You can add a gitHub Access Token to Componentbuilder global options to make authenticated requests to gitHub. An access token with only public access will do to retrieve %s." COM_COMPONENTBUILDER_SELECT_EXTENSION="Select Extension" COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." @@ -142,6 +158,12 @@ COM_COMPONENTBUILDER_TRANSLATOR_MODULE_NOT_READYBR_THIS_AREA_IS_STILL_UNDER_PROD COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM=" COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" COM_COMPONENTBUILDER_WE_FOUND_DYNAMIC_CODE_BALL_IN_ONE_LINEB_AND_IGNORED_IT_PLEASE_REVIEW_S_FOR_MORE_DETAILS="We found dynamic code all in one line, and ignored it! Please review (%s) for more details!" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_COMPONENT_TO_THE_GIT_REPOSITORY="We where was unable to transfer the component to the git repository:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_COMPONENT_ZIP_FILE_TO_THE_BACKUP_FOLDER="We where was unable to transfer the component ZIP file to the backup folder:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_MODULE_TO_THE_GIT_REPOSITORY="We where was unable to transfer the (%s) module to the git repository:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_MODULE_ZIP_FILE_TO_THE_BACKUP_FOLDER="We where was unable to transfer the (%s) module zip file to the backup folder:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_PLUGIN_TO_THE_GIT_REPOSITORY="We where was unable to transfer the (%s) plugin to the git repository:" +COM_COMPONENTBUILDER_WE_WHERE_WAS_UNABLE_TO_TRANSFER_THE_S_PLUGIN_ZIP_FILE_TO_THE_BACKUP_FOLDER="We where was unable to transfer the (%s) plugin zip file to the backup folder:" COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY="Your data is encrypted with a AES 256 bit encryption using the above 32 character key." 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 (%s - denied), please contact your system administrator for more info." 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 Tidy extension in your php.ini file so we can tidy up your xml! If you need help please start here!"