Moved some arrays to the Registry, and marked and updated deprecated class methods and values in the compiler.

This commit is contained in:
Llewellyn van der Merwe 2022-09-10 10:16:44 +02:00
parent c5a85f167e
commit 1dddba0fc8
Signed by untrusted user: Llewellyn
GPG Key ID: A9201372263741E7
15 changed files with 340 additions and 1288 deletions

View File

@ -140,14 +140,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 3rd September, 2022
+ *Last Build*: 10th September, 2022
+ *Version*: 3.1.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **321830**
+ *Line count*: **324186**
+ *Field count*: **2002**
+ *File count*: **2107**
+ *Folder count*: **363**
+ *File count*: **2125**
+ *Folder count*: **366**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -140,14 +140,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 3rd September, 2022
+ *Last Build*: 10th September, 2022
+ *Version*: 3.1.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **321830**
+ *Line count*: **324186**
+ *Field count*: **2002**
+ *File count*: **2107**
+ *Folder count*: **363**
+ *File count*: **2125**
+ *Folder count*: **366**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -678,16 +678,6 @@
size="60"
default=""
/>
<field type="note" name="medium_key_note" class="alert alert-info" label="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_DESC" />
<field name="medium_key_path"
type="text"
label="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_DESC"
size="160"
filter="PATH"
hint="/home/user/hiddenfolder123/"
default=""
/>
</fieldset>
<fieldset
name="compiler_custom_config"

View File

@ -123,7 +123,7 @@ class Compiler extends Infusion
$this->writeFile($xmlPath, $componentXML);
}
// Trigger Event: jcb_ce_onBeforeUpdateFiles
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeUpdateFiles',
array(&$this->componentContext, &$this)
);
@ -133,7 +133,7 @@ class Compiler extends Infusion
return false;
}
// Trigger Event: jcb_ce_onBeforeGetCustomCode
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeGetCustomCode',
array(&$this->componentContext, &$this)
);
@ -141,7 +141,7 @@ class Compiler extends Infusion
if (CFactory::_('Customcode')->get())
{
// Trigger Event: jcb_ce_onBeforeAddCustomCode
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeAddCustomCode',
array(&$this->componentContext, &$this)
);
@ -149,7 +149,7 @@ class Compiler extends Infusion
$this->addCustomCode();
}
// Trigger Event: jcb_ce_onBeforeSetLangFileData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeSetLangFileData',
array(&$this->componentContext, &$this)
);
@ -627,7 +627,7 @@ class Compiler extends Infusion
protected function setFileContent(&$name, &$path, &$bom, $view = null)
{
// Trigger Event: jcb_ce_onBeforeSetFileContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeSetFileContent',
array(&$this->componentContext, &$name, &$path, &$bom, &$view)
);
@ -642,7 +642,7 @@ class Compiler extends Infusion
// get content of the file
$string = ComponentbuilderHelper::getFileContents($path);
// Trigger Event: jcb_ce_onGetFileContents
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onGetFileContents',
array(&$this->componentContext, &$string, &$name, &$path, &$bom,
&$view)
@ -670,7 +670,7 @@ class Compiler extends Infusion
$answer = CFactory::_('Customcode')->update($answer);
}
// Trigger Event: jcb_ce_onBeforeSetFileContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeWriteFileContent',
array(&$this->componentContext, &$answer, &$name, &$path, &$bom,
&$view)
@ -983,7 +983,7 @@ class Compiler extends Infusion
. $this->componentData->sales_name . '__joomla_'
. CFactory::_('Config')->get('version', 3);
// Trigger Event: jcb_ce_onBeforeUpdateRepo
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeUpdateRepo',
array(&$this->componentContext, &$this->componentPath,
&$repoFullPath, &$this->componentData)
@ -993,7 +993,7 @@ class Compiler extends Infusion
// set the new data
Folder::copy($this->componentPath, $repoFullPath, '', true);
// Trigger Event: jcb_ce_onAfterUpdateRepo
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterUpdateRepo',
array(&$this->componentContext, &$this->componentPath,
&$repoFullPath, &$this->componentData)
@ -1014,7 +1014,7 @@ class Compiler extends Infusion
. $module->folder_name . '__joomla_'
. CFactory::_('Config')->get('version', 3);
// Trigger Event: jcb_ce_onBeforeUpdateRepo
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeUpdateRepo',
array(&$module_context, &$module->folder_path,
&$repoFullPath, &$module)
@ -1028,7 +1028,7 @@ class Compiler extends Infusion
$module->folder_path, $repoFullPath, '', true
);
// Trigger Event: jcb_ce_onAfterUpdateRepo
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterUpdateRepo',
array(&$module_context, &$module->folder_path,
&$repoFullPath, &$module)
@ -1051,7 +1051,7 @@ class Compiler extends Infusion
. $plugin->folder_name . '__joomla_'
. CFactory::_('Config')->get('version', 3);
// Trigger Event: jcb_ce_onBeforeUpdateRepo
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeUpdateRepo',
array(&$plugin_context, &$plugin->folder_path,
&$repoFullPath, &$plugin)
@ -1065,7 +1065,7 @@ class Compiler extends Infusion
$plugin->folder_path, $repoFullPath, '', true
);
// Trigger Event: jcb_ce_onAfterUpdateRepo
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterUpdateRepo',
array(&$plugin_context, &$plugin->folder_path,
&$repoFullPath, &$plugin)
@ -1084,7 +1084,7 @@ class Compiler extends Infusion
$this->filepath['component'] = $this->tempPath . '/'
. $this->filepath['component-folder'] . '.zip';
// Trigger Event: jcb_ce_onBeforeZipComponent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeZipComponent',
array(&$this->componentContext, &$this->componentPath,
&$this->filepath['component'], &$this->tempPath,
@ -1099,7 +1099,7 @@ class Compiler extends Infusion
if ($this->backupPath && $this->dynamicIntegration)
{
// Trigger Event: jcb_ce_onBeforeBackupZip
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBackupZip', array(&$this->componentContext,
&$this->filepath['component'],
&$this->tempPath,
@ -1121,7 +1121,7 @@ class Compiler extends Infusion
if (isset($this->componentData->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeMoveToServer',
array(&$this->componentContext,
&$this->filepath['component'], &$this->tempPath,
@ -1137,7 +1137,7 @@ class Compiler extends Infusion
}
}
// Trigger Event: jcb_ce_onAfterZipComponent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterZipComponent',
array(&$this->componentContext, &$this->filepath['component'],
&$this->tempPath, &$this->componentFolderName,
@ -1176,7 +1176,7 @@ class Compiler extends Infusion
$this->filepath['modules'][$module->id] = $this->tempPath
. '/' . $module->zip_name . '.zip';
// Trigger Event: jcb_ce_onBeforeZipModule
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeZipModule',
array(&$module_context, &$module->folder_path,
&$this->filepath['modules'][$module->id],
@ -1193,7 +1193,7 @@ class Compiler extends Infusion
{
$__module_context = 'module.' . $module_context;
// Trigger Event: jcb_ce_onBeforeBackupZip
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBackupZip',
array(&$__module_context,
&$this->filepath['modules'][$module->id],
@ -1215,7 +1215,7 @@ class Compiler extends Infusion
if (isset($module->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeMoveToServer',
array(&$__module_context,
&$this->filepath['modules'][$module->id],
@ -1232,7 +1232,7 @@ class Compiler extends Infusion
}
}
// Trigger Event: jcb_ce_onAfterZipModule
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterZipModule', array(&$module_context,
&$this->filepath['modules'][$module->id],
&$this->tempPath,
@ -1270,7 +1270,7 @@ class Compiler extends Infusion
$this->filepath['plugins'][$plugin->id] = $this->tempPath
. '/' . $plugin->zip_name . '.zip';
// Trigger Event: jcb_ce_onBeforeZipPlugin
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeZipPlugin',
array(&$plugin_context, &$plugin->folder_path,
&$this->filepath['plugins'][$plugin->id],
@ -1287,7 +1287,7 @@ class Compiler extends Infusion
{
$__plugin_context = 'plugin.' . $plugin_context;
// Trigger Event: jcb_ce_onBeforeBackupZip
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBackupZip',
array(&$__plugin_context,
&$this->filepath['plugins'][$plugin->id],
@ -1309,7 +1309,7 @@ class Compiler extends Infusion
if (isset($plugin->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeMoveToServer',
array(&$__plugin_context,
&$this->filepath['plugins'][$plugin->id],
@ -1326,7 +1326,7 @@ class Compiler extends Infusion
}
}
// Trigger Event: jcb_ce_onAfterZipPlugin
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterZipPlugin', array(&$plugin_context,
&$this->filepath['plugins'][$plugin->id],
&$this->tempPath,

File diff suppressed because it is too large Load Diff

View File

@ -436,7 +436,7 @@ class Structure extends Get
// set the Joomla Version Data
$this->joomlaVersionData = $this->setJoomlaVersionData();
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterSetJoomlaVersionData',
array(&$this->componentContext, &$this->joomlaVersionData)
);
@ -477,7 +477,7 @@ class Structure extends Get
// for plugin event TODO change event api signatures
$this->powers = CFactory::_('Power')->active;
// Trigger Event: jcb_ce_onBeforeSetModules
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildPowers',
array(&$this->componentContext, &$this->powers)
);
@ -590,7 +590,7 @@ class Structure extends Get
if (ArrayHelper::check($this->joomlaModules))
{
// Trigger Event: jcb_ce_onBeforeSetModules
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildModules',
array(&$this->componentContext, &$this->joomlaModules)
);
@ -1171,7 +1171,7 @@ class Structure extends Get
if (ArrayHelper::check($this->joomlaPlugins))
{
// Trigger Event: jcb_ce_onBeforeSetPlugins
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildPlugins',
array(&$this->componentContext, &$this->joomlaPlugins)
);
@ -1587,7 +1587,7 @@ class Structure extends Get
if (ArrayHelper::check($this->libraries))
{
// Trigger Event: jcb_ce_onBeforeSetLibraries
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeSetLibraries',
array(&$this->componentContext, &$this->libraries)
);
@ -2495,11 +2495,11 @@ class Structure extends Get
}
}
// check if this has validation that should be moved
if (isset($this->validationLinkedFields[$field['field']]))
if (CFactory::_('Registry')->get('validation.linked.' . $field['field']) !== null)
{
$check = md5(
$path . 'rule'
. $this->validationLinkedFields[$field['field']]
. CFactory::_('Registry')->get('validation.linked.' . $field['field'])
);
// lets check if we already moved this
if (!isset($this->extentionTrackingFilesMoved[$check]))
@ -2507,16 +2507,16 @@ class Structure extends Get
// check files exist
if (File::exists(
$this->componentPath . '/admin/models/rules/'
. $this->validationLinkedFields[$field['field']]
. CFactory::_('Registry')->get('validation.linked.' . $field['field'])
. '.php'
))
{
// copy the custom field
File::copy(
$this->componentPath . '/admin/models/rules/'
. $this->validationLinkedFields[$field['field']]
. CFactory::_('Registry')->get('validation.linked.' . $field['field'])
. '.php', $path . '/rules/'
. $this->validationLinkedFields[$field['field']]
. CFactory::_('Registry')->get('validation.linked.' . $field['field'])
. '.php'
);
}
@ -2555,7 +2555,7 @@ class Structure extends Get
// setup the field
$field = array();
$field['field'] = $id;
$this->setFieldDetails($field);
CFactory::_('Field')->set($field);
// move field and rules if needed
$this->moveFieldsRules($field, $path);
}

View File

@ -153,6 +153,7 @@ class Fields extends Structure
* list builder
*
* @var array
* @deprecated 3.3 Use CFactory::_('Registry')->get('builder.list');
*/
public $listBuilder = array();
@ -609,7 +610,7 @@ class Fields extends Structure
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildFields
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildFields',
array(&$this->componentContext, &$dynamicFields, &$readOnly,
&$dbkey, &$view, &$component, &$nameSingleCode,
@ -630,7 +631,7 @@ class Fields extends Structure
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildFields
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildFields',
array(&$this->componentContext, &$dynamicFields, &$readOnly,
&$dbkey, &$view, &$component, &$nameSingleCode,
@ -1028,7 +1029,7 @@ class Fields extends Structure
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildFields
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildFields',
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
&$dbkey, &$view, &$component, &$nameSingleCode,
@ -1049,7 +1050,7 @@ class Fields extends Structure
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildFields
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildFields',
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
&$dbkey, &$view, &$component, &$nameSingleCode,
@ -1606,8 +1607,8 @@ class Fields extends Structure
))
{
// reset some values
$name = $this->getFieldName($field, $nameListCode);
$typeName = $this->getFieldType($field);
$name = CFactory::_('Field.Name')->get($field, $nameListCode);
$typeName = CFactory::_('Field.Type.Name')->get($field);
$multiple = false;
$langLabel = '';
$fieldSet = '';
@ -2313,7 +2314,7 @@ class Fields extends Structure
$field = array();
$field['field'] = $id;
// set the field details
$this->setFieldDetails(
CFactory::_('Field')->set(
$field, $nameSingleCode, $nameListCode,
$_resolverKey
);
@ -2330,10 +2331,10 @@ class Fields extends Structure
$fieldData['settings']
))
{
$r_name = $this->getFieldName(
$r_name = CFactory::_('Field.Name')->get(
$fieldData, $nameListCode, $_resolverKey
);
$r_typeName = $this->getFieldType($fieldData);
$r_typeName = CFactory::_('Field.Type.Name')->get($fieldData);
$r_multiple = false;
$r_langLabel = '';
// add the tabs needed
@ -2479,7 +2480,7 @@ class Fields extends Structure
$field = array();
$field['field'] = $id;
// set the field details
$this->setFieldDetails(
CFactory::_('Field')->set(
$field, $nameSingleCode, $nameListCode,
$_resolverKey
);
@ -2496,10 +2497,10 @@ class Fields extends Structure
$fieldData['settings']
))
{
$r_name = $this->getFieldName(
$r_name = CFactory::_('Field.Name')->get(
$fieldData, $nameListCode, $_resolverKey
);
$r_typeName = $this->getFieldType($fieldData);
$r_typeName = CFactory::_('Field.Type.Name')->get($fieldData);
$r_multiple = false;
$r_langLabel = '';
// add the tabs needed
@ -3309,7 +3310,7 @@ class Fields extends Structure
$field = array();
$field['field'] = $id;
// set the field details
$this->setFieldDetails(
CFactory::_('Field')->set(
$field, $nameSingleCode, $nameListCode,
$_resolverKey
);
@ -3326,10 +3327,10 @@ class Fields extends Structure
$fieldData['settings']
))
{
$r_name = $this->getFieldName(
$r_name = CFactory::_('Field.Name')->get(
$fieldData, $nameListCode, $_resolverKey
);
$r_typeName = $this->getFieldType($fieldData);
$r_typeName = CFactory::_('Field.Type.Name')->get($fieldData);
$r_multiple = false;
$r_langLabel = '';
// get field values
@ -3493,7 +3494,7 @@ class Fields extends Structure
$field = array();
$field['field'] = $id;
// set the field details
$this->setFieldDetails(
CFactory::_('Field')->set(
$field, $nameSingleCode, $nameListCode,
$_resolverKey
);
@ -3510,10 +3511,10 @@ class Fields extends Structure
$fieldData['settings']
))
{
$r_name = $this->getFieldName(
$r_name = CFactory::_('Field.Name')->get(
$fieldData, $nameListCode, $_resolverKey
);
$r_typeName = $this->getFieldType($fieldData);
$r_typeName = CFactory::_('Field.Type.Name')->get($fieldData);
$r_multiple = false;
$r_langLabel = '';
// get field values
@ -4047,8 +4048,7 @@ class Fields extends Structure
public function buildSiteFieldData($view, $field, $set, $type)
{
$decode = array('json', 'base64', 'basic_encryption',
'whmcs_encryption', 'medium_encryption',
'expert_mode');
'whmcs_encryption', 'medium_encryption', 'expert_mode');
$textareas = array('textarea', 'editor');
if (isset($this->siteFields[$view][$field])
&& ArrayHelper::check(
@ -4392,11 +4392,11 @@ class Fields extends Structure
if ($property['name'] === 'label')
{
if (isset($fieldAttributes['name'])
&& isset($this->uniqueNames[$nameListCode]['names'][$fieldAttributes['name']]))
&& CFactory::_('Registry')->get("unique.names.$nameListCode.names." . $fieldAttributes['name']) !== null)
{
$xmlValue .= ' ('
. StringHelper::safe(
$this->uniqueNames[$nameListCode]['names'][$fieldAttributes['name']]
CFactory::_('Registry')->get("unique.names.$nameListCode.names." . $fieldAttributes['name'])
) . ')';
}
}
@ -4699,7 +4699,7 @@ class Fields extends Structure
|| $field['list'] == 4));
// set list join
$listJoin
= (isset($this->listJoinBuilder[$nameListCode][(int) $field['field']]));
= CFactory::_('Registry')->exists('builder.list_join.' . $nameListCode . '.' . (int) $field['field']);
// add history to this view
if (isset($view['history']) && $view['history'])
{
@ -4720,12 +4720,9 @@ class Fields extends Structure
// category name fix
if ($typeName === 'category')
{
if (isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.name'))
{
$tempName = $this->catOtherName[$nameListCode]['name'];
$tempName = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.name');
}
else
{
@ -4786,7 +4783,13 @@ class Fields extends Structure
// load to list builder
if ($listSwitch)
{
$this->listBuilder[$nameListCode][] = array(
// check if it does not exists
if (!CFactory::_('Registry')->exists('builder.list.' . $nameListCode))
{
CFactory::_('Registry')->set('builder.list.' . $nameListCode, []);
}
// append values
CFactory::_('Registry')->append('builder.list.' . $nameListCode, [
'id' => (int) $field['field'],
'type' => $typeName,
'code' => $name,
@ -4802,7 +4805,8 @@ class Fields extends Structure
'custom' => $custom,
'multiple' => $multiple,
'options' => $options,
'target' => (int) $field['list']);
'target' => (int) $field['list']
]);
}
// build custom builder list
if ($listSwitch || $listJoin)
@ -4813,8 +4817,7 @@ class Fields extends Structure
// load the list join builder
if ($listJoin)
{
$this->listJoinBuilder[$nameListCode][(int) $field['field']]
= array(
CFactory::_('Registry')->set('builder.list_join.' . $nameListCode . '.' . (int) $field['field'], [
'type' => $typeName,
'code' => $name,
'lang' => $listLangName,
@ -4828,24 +4831,21 @@ class Fields extends Structure
: false,
'custom' => $custom,
'multiple' => $multiple,
'options' => $options);
'options' => $options
]);
}
// update the field relations
if (isset($this->fieldRelations[$nameListCode])
&& isset($this->fieldRelations[$nameListCode][(int) $field['field']])
&& ArrayHelper::check(
$this->fieldRelations[$nameListCode][(int) $field['field']]
))
if (($field_relations =
CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode . '.' . (int) $field['field'])) !== null)
{
foreach (
$this->fieldRelations[$nameListCode][(int) $field['field']] as
$area => &$field_values
)
$field_relations = (array) $field_relations;
foreach ($field_relations as $area => &$field_values)
{
$field_values['type'] = $typeName;
$field_values['code'] = $name;
$field_values['custom'] = $custom;
}
CFactory::_('Registry')->set('builder.field_relations.' . $nameListCode . '.' . (int) $field['field'], $field_relations);
}
// set the hidden field of this view
if ($dbSwitch && $typeName === 'hidden')
@ -4943,13 +4943,11 @@ class Fields extends Structure
// setup category for this view
if ($dbSwitch && $typeName === 'category')
{
if (isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view')
&& CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews = $this->catOtherName[$nameListCode]['views'];
$otherView = $this->catOtherName[$nameListCode]['view'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
$otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view');
}
else
{

View File

@ -1192,7 +1192,7 @@ class Interpretation extends Fields
$modelJ = ComponentbuilderHelper::getModel('joomla_component');
$modelJ->save($newJ); // <-- to insure the history is also updated
// reset the watch here
$this->getHistoryWatch('joomla_component', CFactory::_('Config')->component_id);
CFactory::_('History')->get('joomla_component', CFactory::_('Config')->component_id);
// update the component update table
$newU = array();
@ -10700,7 +10700,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('admin');
// Trigger Event: jcb_ce_onBeforeBuildAdminLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAdminLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -10965,7 +10965,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('admin');
// Trigger Event: jcb_ce_onAfterBuildAdminLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -10993,7 +10993,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('site');
// Trigger Event: jcb_ce_onBeforeBuildSiteLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildSiteLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -11064,7 +11064,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('site');
// Trigger Event: jcb_ce_onAfterBuildSiteLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildSiteLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -11092,7 +11092,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('sitesys');
// Trigger Event: jcb_ce_onBeforeBuildSiteSysLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildSiteSysLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -11124,7 +11124,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('sitesys');
// Trigger Event: jcb_ce_onAfterBuildSiteSysLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildSiteSysLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -11152,7 +11152,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('adminsys');
// Trigger Event: jcb_ce_onBeforeBuildAdminSysLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAdminSysLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -11173,7 +11173,7 @@ class Interpretation extends Fields
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget('adminsys');
// Trigger Event: jcb_ce_onAfterBuildAdminSysLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminSysLang',
array(&$this->componentContext, &$langContent,
&$this->langPrefix, &$componentName)
@ -11275,10 +11275,7 @@ class Interpretation extends Fields
*/
public function setListBody($nameSingleCode, $nameListCode)
{
if (isset($this->listBuilder[$nameListCode])
&& ArrayHelper::check(
$this->listBuilder[$nameListCode]
))
if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null)
{
// component helper name
$Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
@ -11398,7 +11395,7 @@ class Interpretation extends Fields
$doNotEscape = true;
}
// start adding the dynamic
foreach ($this->listBuilder[$nameListCode] as $item)
foreach ($items as $item)
{
// check if target is admin list
if (1 == $item['target'] || 3 == $item['target'])
@ -11524,20 +11521,19 @@ class Interpretation extends Fields
)
{
// check if we have relation fields
if (isset($this->fieldRelations[$nameListCode])
&& isset($this->fieldRelations[$nameListCode][(int) $item['id']])
&& isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]))
if (($field_relations =
CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode . '.' . (int) $item['id'] . '.2')) !== null)
{
// set the fields array
$field = array();
// use custom code
$useCustomCode
= (isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['join_type'])
&& $this->fieldRelations[$nameListCode][(int) $item['id']][2]['join_type']
= (isset($field_relations['join_type'])
&& $field_relations['join_type']
== 2
&& isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'])
&& isset($field_relations['set'])
&& StringHelper::check(
$this->fieldRelations[$nameListCode][(int) $item['id']][2]['set']
$field_relations['set']
));
// load the main list view field
$field['[field=' . (int) $item['id'] . ']'] = $this->getListItem(
@ -11552,34 +11548,28 @@ class Interpretation extends Fields
. $item['code'];
}
// now load the relations
if (isset($this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields'])
&& ArrayHelper::check(
$this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields']
))
if (isset($field_relations['joinfields'])
&& ArrayHelper::check($field_relations['joinfields']))
{
foreach (
$this->fieldRelations[$nameListCode][(int) $item['id']][2]['joinfields']
as $join
)
foreach ($field_relations['joinfields'] as $join)
{
$blankClass = '';
if (isset($this->listJoinBuilder[$nameListCode])
&& isset($this->listJoinBuilder[$nameListCode][(int) $join]))
if (($join_item =
CFactory::_('Registry')->get('builder.list_join.' . $nameListCode . '.' . (int) $join)) !== null)
{
// code block
$field['[field=' . (int) $join . ']']
= $this->getListItem(
$this->listJoinBuilder[$nameListCode][(int) $join],
$nameSingleCode, $nameListCode, $blankClass,
$join_item, $nameSingleCode, $nameListCode, $blankClass,
$doNotEscape, $coreLoad, $core, false, $ref,
$escape, $user, $refview
);
// code name
if (isset($this->listJoinBuilder[$nameListCode][(int) $join]['code'])
if (isset($join_item['code'])
&& $useCustomCode)
{
$field['$item->{' . (int) $join . '}'] = '$item->'
. $this->listJoinBuilder[$nameListCode][(int) $join]['code'];
. $join_item['code'];
}
}
}
@ -11592,18 +11582,18 @@ class Interpretation extends Fields
. CFactory::_('Placeholder')->update(
str_replace(
array_keys($field), array_values($field),
$this->fieldRelations[$nameListCode][(int) $item['id']][2]['set']
$field_relations['set']
), $this->placeholders
) . PHP_EOL . Indent::_(3) . "</div>";
}
elseif (isset($this->fieldRelations[$nameListCode][(int) $item['id']]['set'])
elseif (isset($field_relations['set'])
&& StringHelper::check(
$this->fieldRelations[$nameListCode][(int) $item['id']][2]['set']
$field_relations['set']
))
{
// concatenate
return PHP_EOL . Indent::_(3) . "<div>" . implode(
$this->fieldRelations[$nameListCode][(int) $item['id']][2]['set'],
$field_relations['set'],
$field
) . PHP_EOL . Indent::_(3) . "</div>";
}
@ -12146,7 +12136,7 @@ class Interpretation extends Fields
$body[] = "</script>";
}
// Trigger Event: jcb_ce_onSetDefaultViewsBodyTop
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onSetDefaultViewsBodyTop',
array(&$this,
&$body,
@ -12167,7 +12157,7 @@ class Interpretation extends Fields
$body[] = Indent::_(1) . "<div id=\"j-main-container\">";
$body[] = "<?php endif; ?>";
// Trigger Event: jcb_ce_onSetDefaultViewsFormTop
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onSetDefaultViewsFormTop',
array(&$this,
&$body,
@ -12263,7 +12253,7 @@ class Interpretation extends Fields
. "<input type=\"hidden\" name=\"task\" value=\"\" />";
$body[] = Indent::_(1) . "<?php echo JHtml::_('form.token'); ?>";
// Trigger Event: jcb_ce_onSetDefaultViewsFormBottom
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onSetDefaultViewsFormBottom',
array(&$this,
&$body,
@ -12272,7 +12262,7 @@ class Interpretation extends Fields
);
$body[] = "</form>";
// Trigger Event: jcb_ce_onSetDefaultViewsBodyBottom
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onSetDefaultViewsBodyBottom',
array(&$this,
&$body,
@ -12293,10 +12283,7 @@ class Interpretation extends Fields
*/
public function setListHead($nameSingleCode, $nameListCode)
{
if (isset($this->listBuilder[$nameListCode])
&& ArrayHelper::check(
$this->listBuilder[$nameListCode]
))
if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null)
{
// set the JHtml values based on filter type
$jhtml_sort = "grid.sort";
@ -12354,20 +12341,17 @@ class Interpretation extends Fields
// set footer Column number
$this->listColnrBuilder[$nameListCode] = 4;
// build the dynamic fields
foreach ($this->listBuilder[$nameListCode] as $item)
foreach ($items as $item)
{
// check if target is admin list
if (1 == $item['target'] || 3 == $item['target'])
{
// check if we have an over-ride
if (isset($this->listHeadOverRide[$nameListCode])
&& ArrayHelper::check(
$this->listHeadOverRide[$nameListCode]
)
&& isset($this->listHeadOverRide[$nameListCode][$item['id']]))
if (($list_head_override = CFactory::_('Registry')->get('builder.list_head_override.' .
$nameListCode . '.' . (int) $item['id']))
!== null)
{
$item['lang']
= $this->listHeadOverRide[$nameListCode][$item['id']];
$item['lang'] = $list_head_override;
}
$class = 'nowrap hidden-phone';
if ($item['link'])
@ -14074,10 +14058,7 @@ class Interpretation extends Fields
$refview
)
{
if (isset($this->listBuilder[$nameListCode])
&& ArrayHelper::check(
$this->listBuilder[$nameListCode]
))
if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null)
{
// component helper name
$Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
@ -14112,7 +14093,7 @@ class Interpretation extends Fields
$doNotEscape = true;
}
// start adding the dynamic
foreach ($this->listBuilder[$nameListCode] as $item)
foreach ($items as $item)
{
// check if target is linked list view
if (1 == $item['target'] || 4 == $item['target'])
@ -14267,10 +14248,7 @@ class Interpretation extends Fields
$addNewButon, $refview
)
{
if (isset($this->listBuilder[$nameListCode])
&& ArrayHelper::check(
$this->listBuilder[$nameListCode]
))
if (($items = CFactory::_('Registry')->get('builder.list.' . $nameListCode)) !== null)
{
// component helper name
$Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
@ -14376,20 +14354,17 @@ class Interpretation extends Fields
// set controller for data hiding options
$controller = 1;
// build the dynamic fields
foreach ($this->listBuilder[$nameListCode] as $item)
foreach ($items as $item)
{
// check if target is linked list view
if (1 == $item['target'] || 4 == $item['target'])
{
// check if we have an over-ride
if (isset($this->listHeadOverRide[$nameListCode])
&& ArrayHelper::check(
$this->listHeadOverRide[$nameListCode]
)
&& isset($this->listHeadOverRide[$nameListCode][$item['id']]))
if (($list_head_override = CFactory::_('Registry')->get('builder.list_head_override.' .
$nameListCode . '.' . (int) $item['id']))
!== null)
{
$item['lang']
= $this->listHeadOverRide[$nameListCode][$item['id']];
$item['lang'] = $list_head_override;
}
$setin = (2 == $this->footableVersion)
? ' data-hide="phone"' : ' data-breakpoints="xs sm"';
@ -14689,7 +14664,7 @@ class Interpretation extends Fields
as $order_field
)
{
if (($order_field_name = $this->getFieldDatabaseName(
if (($order_field_name = CFactory::_('Field.Database.Name')->get(
$nameListCode, $order_field['field']
// We Removed This 'listJoinBuilder' as targetArea
// we will keep an eye on this
@ -15277,7 +15252,7 @@ class Interpretation extends Fields
as $order_field
)
{
if (($order_field_name = $this->getFieldDatabaseName(
if (($order_field_name = CFactory::_('Field.Database.Name')->get(
$nameListCode, $order_field['field']
)) !== false)
{
@ -15831,7 +15806,7 @@ class Interpretation extends Fields
as $order_field
)
{
if (($order_field_name = $this->getFieldDatabaseName(
if (($order_field_name = CFactory::_('Field.Database.Name')->get(
$nameListCode, $order_field['field']
)) !== false)
{
@ -18924,13 +18899,11 @@ class Interpretation extends Fields
$component = $this->componentCodeName;
}
// check if category has another name
if (isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view')
&& CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews = $this->catOtherName[$nameListCode]['views'];
$otherView = $this->catOtherName[$nameListCode]['view'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
$otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view');
}
else
{
@ -19019,13 +18992,11 @@ class Interpretation extends Fields
if (0) //isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check
{
// check if category has another name
if ($coreLoad && isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view')
&& CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews = $this->catOtherName[$nameListCode]['views'];
$otherView = $this->catOtherName[$nameListCode]['view'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
$otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view');
}
else
{
@ -19178,13 +19149,11 @@ class Interpretation extends Fields
))
{
// check if category has another name
if ($coreLoad && isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if ($coreLoad && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view')
&& CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews = $this->catOtherName[$nameListCode]['views'];
$otherView = $this->catOtherName[$nameListCode]['view'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
$otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view');
}
else
{
@ -19567,13 +19536,11 @@ class Interpretation extends Fields
if (0) //isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check
{
// check if category has another name
if ($coreLoad && isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if ($coreLoad && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view')
&& CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews = $this->catOtherName[$nameListCode]['views'];
$otherView = $this->catOtherName[$nameListCode]['view'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
$otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view');
}
else
{
@ -20184,13 +20151,11 @@ class Interpretation extends Fields
if (0) //isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check
{
// check if category has another name
if ($coreLoad && isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if ($coreLoad && CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view')
&& CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews = $this->catOtherName[$nameListCode]['views'];
$otherView = $this->catOtherName[$nameListCode]['view'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
$otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view');
}
else
{
@ -20308,13 +20273,11 @@ class Interpretation extends Fields
if (0) // isset($this->categoryBuilder[$nameListCode]) && ArrayHelper::check($this->categoryBuilder[$nameListCode])) <-- remove category from check
{
// check if category has another name
if (isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view')
&& CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews = $this->catOtherName[$nameListCode]['views'];
$otherView = $this->catOtherName[$nameListCode]['view'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
$otherView = CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.view');
}
else
{
@ -21703,14 +21666,10 @@ class Interpretation extends Fields
$methodName = 'getItemsMethodListStringFixBuilder';
}
// load the relations before modeling
if (isset($this->fieldRelations[$nameListCode])
&& ArrayHelper::check(
$this->fieldRelations[$nameListCode]
))
if (($field_relations =
CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode)) !== null)
{
foreach (
$this->fieldRelations[$nameListCode] as $field_id => $fields
)
foreach ($field_relations as $field_id => $fields)
{
foreach ($fields as $area => $field)
{
@ -22072,12 +22031,10 @@ class Interpretation extends Fields
}
} */
// load the relations after modeling
if (isset($this->fieldRelations[$nameListCode])
&& ArrayHelper::check(
$this->fieldRelations[$nameListCode]
))
if (($field_relations =
CFactory::_('Registry')->get('builder.field_relations.' . $nameListCode)) !== null)
{
foreach ($this->fieldRelations[$nameListCode] as $fields)
foreach ($field_relations as $fields)
{
foreach ($fields as $area => $field)
{
@ -22437,7 +22394,7 @@ class Interpretation extends Fields
break;
}
// Trigger Event: jcb_ce_setClassHeader
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_setClassHeader',
array(&$this->componentContext, &$context, &$codeName,
&$headers)
@ -22602,7 +22559,7 @@ class Interpretation extends Fields
foreach ($item['joinfields'] as $join)
{
$field['$item->{' . (int) $join . '}'] = '$item->'
. $this->listJoinBuilder[$nameListCode][(int) $join]['code'];
. CFactory::_('Registry')->get('builder.list_join.' . $nameListCode . '.' . (int) $join . '.code');
}
}
// set based on join_type
@ -22917,13 +22874,11 @@ class Interpretation extends Fields
$catCode = $this->categoryBuilder[$name_list]['code'];
// check if category has another name
if (isset($this->catOtherName[$name_list])
&& ArrayHelper::check(
$this->catOtherName[$name_list]
))
if (CFactory::_('Registry')->get('category.other.name.' . $name_list . '.views')
&& CFactory::_('Registry')->get('category.other.name.' . $name_list . '.name'))
{
$otherViews = $this->catOtherName[$name_list]['views'];
$otherNames = $this->catOtherName[$name_list]['name'];
$otherViews = CFactory::_('Registry')->get('category.other.name.' . $name_list . '.views');
$otherNames = CFactory::_('Registry')->get('category.other.name.' . $name_list . '.name');
// build lang
$langName = StringHelper::safe(
$otherNames, 'W'
@ -23503,13 +23458,10 @@ class Interpretation extends Fields
$view['settings']->name_list
);
// check if category has another name
if (isset($this->catOtherName[$nameListCode])
&& ArrayHelper::check(
$this->catOtherName[$nameListCode]
))
if (CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views'))
{
$otherViews
= $this->catOtherName[$nameListCode]['views'];
= CFactory::_('Registry')->get('category.other.name.' . $nameListCode . '.views');
}
else
{
@ -24171,7 +24123,7 @@ class Interpretation extends Fields
// set the custom table key
$dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeSetConfigFieldsets',
array(&$this->componentContext, &$timer,
&$this->configFieldSets,
@ -24248,7 +24200,7 @@ class Interpretation extends Fields
elseif (2 == $timer) // this is after the admin views are build
{
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeSetConfigFieldsets',
array(&$this->componentContext, &$timer,
&$this->configFieldSets,
@ -24267,7 +24219,7 @@ class Interpretation extends Fields
$this->setCustomControlConfigFieldsets($lang);
}
// Trigger Event: jcb_ce_onAfterSetConfigFieldsets
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterSetConfigFieldsets',
array(&$this->componentContext, &$timer, &$this->configFieldSets,
&$this->configFieldSetsCustomField, &$this->extensionsParams,
@ -26629,9 +26581,9 @@ function vdm_dkim() {
// enable the loading of dynamic field sets
$dynamicAddFields = array();
// Add encryption if needed
if ((isset($this->basicEncryption) && $this->basicEncryption)
|| (isset($this->whmcsEncryption) && $this->whmcsEncryption)
|| (isset($this->mediumEncryption) && $this->mediumEncryption)
if (CFactory::_('Config')->basic_encryption
|| CFactory::_('Config')->whmcs_encryption
|| CFactory::_('Config')->medium_encryption
|| $this->componentData->add_license
|| (isset($this->configFieldSetsCustomField['Encryption Settings'])
&& ArrayHelper::check(
@ -26649,11 +26601,9 @@ function vdm_dkim() {
. '_ENCRYPTION_DESC">';
// set tab lang
if (((isset($this->basicEncryption) && $this->basicEncryption)
|| (isset($this->mediumEncryption)
&& $this->mediumEncryption)
|| (isset($this->whmcsEncryption)
&& $this->whmcsEncryption))
if ((CFactory::_('Config')->basic_encryption
|| CFactory::_('Config')->medium_encryption
|| CFactory::_('Config')->whmcs_encryption)
&& $this->componentData->add_license
&& $this->componentData->license_type == 3)
{
@ -26668,11 +26618,9 @@ function vdm_dkim() {
// add the next dynamic option
$dynamicAddFields[] = "License & Encryption Settings";
}
elseif (((isset($this->basicEncryption) && $this->basicEncryption)
|| (isset($this->mediumEncryption)
&& $this->mediumEncryption)
|| (isset($this->whmcsEncryption)
&& $this->whmcsEncryption))
elseif ((CFactory::_('Config')->basic_encryption
|| CFactory::_('Config')->medium_encryption
|| CFactory::_('Config')->whmcs_encryption)
&& $this->componentData->add_license
&& $this->componentData->license_type == 2)
{
@ -26725,7 +26673,7 @@ function vdm_dkim() {
);
}
if (isset($this->basicEncryption) && $this->basicEncryption)
if (CFactory::_('Config')->basic_encryption)
{
// set field lang
CFactory::_('Language')->set(
@ -26759,7 +26707,7 @@ function vdm_dkim() {
$this->configFieldSets[] = Indent::_(3) . 'default=""';
$this->configFieldSets[] = Indent::_(2) . "/>";
}
if (isset($this->mediumEncryption) && $this->mediumEncryption)
if (CFactory::_('Config')->medium_encryption)
{
// set field lang
CFactory::_('Language')->set(
@ -26802,7 +26750,7 @@ function vdm_dkim() {
"Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component."
);
}
if (isset($this->whmcsEncryption) && $this->whmcsEncryption
if (CFactory::_('Config')->whmcs_encryption
|| $this->componentData->add_license)
{
// set field lang label and description
@ -26863,7 +26811,7 @@ function vdm_dkim() {
}
else
{
if (isset($this->whmcsEncryption) && $this->whmcsEncryption)
if (CFactory::_('Config')->whmcs_encryption)
{
CFactory::_('Language')->set(
CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_LABEL',
@ -26880,7 +26828,7 @@ function vdm_dkim() {
}
}
// add the description based on global settings
if (isset($this->whmcsEncryption) && $this->whmcsEncryption)
if (CFactory::_('Config')->whmcs_encryption)
{
CFactory::_('Language')->set(
CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_DESC',
@ -27010,7 +26958,7 @@ function vdm_dkim() {
$this->permissionViews = array();
// Trigger Event: jcb_ce_onBeforeBuildAccessSections
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAccessSections',
array(&$this->componentContext, &$this)
);
@ -27372,8 +27320,8 @@ function vdm_dkim() {
$field['settings']->properties
))
{
$fieldType = $this->getFieldType($field);
$fieldName = $this->getFieldName(
$fieldType = CFactory::_('Field.Type.Name')->get($field);
$fieldName = CFactory::_('Field.Name')->get(
$field, $nameViews
);
// loop the permission options
@ -27447,7 +27395,7 @@ function vdm_dkim() {
}
// Trigger Event: jcb_ce_onAfterBuildAccessSections
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAccessSections',
array(&$this->componentContext, &$this)
);
@ -28175,7 +28123,7 @@ function vdm_dkim() {
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget($module->key);
// Trigger Event: jcb_ce_onBeforeBuildModuleLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildModuleLang',
array(&$this->componentContext, &$module,
&$langContent, &$module->lang_prefix, &$module->official_name)
@ -28197,7 +28145,7 @@ function vdm_dkim() {
$total = count($values);
unset($values);
// Trigger Event: jcb_ce_onBeforeBuildModuleLangFiles
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildModuleLangFiles',
array(&$this->componentContext, &$module,
&$this->languages['modules'],
@ -28563,7 +28511,7 @@ function vdm_dkim() {
// for plugin event TODO change event api signatures
$langContent = CFactory::_('Language')->getTarget($plugin->key);
// Trigger Event: jcb_ce_onBeforeBuildPluginLang
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildPluginLang',
array(&$this->componentContext, &$plugin,
&$langContent,
@ -28586,7 +28534,7 @@ function vdm_dkim() {
$total = count($values);
unset($values);
// Trigger Event: jcb_ce_onBeforeBuildPluginLangFiles
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildPluginLangFiles',
array(&$this->componentContext, &$plugin,
&$this->languages['plugins'],

View File

@ -67,7 +67,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildFilesContent',
array(&$this->componentContext, &$this->componentData,
&$this->fileContentStatic, &$this->fileContentDynamic,
@ -391,7 +391,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@ -641,7 +641,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@ -666,7 +666,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAdminListViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@ -982,7 +982,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminListViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@ -1156,7 +1156,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildAdminViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@ -1241,7 +1241,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildCustomAdminViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@ -1430,7 +1430,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildCustomAdminViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@ -1624,10 +1624,9 @@ class Infusion extends Interpretation
}
// build the validation rules
if (isset($this->validationRules)
&& ArrayHelper::check($this->validationRules))
if (($validationRules = CFactory::_('Registry')->_('validation.rules')) !== null)
{
foreach ($this->validationRules as $rule => $_php)
foreach ($validationRules as $rule => $_php)
{
// setup rule file
$target = array('admin' => 'a_rule_zi');
@ -1716,7 +1715,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildSiteViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@ -1933,7 +1932,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildSiteViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@ -2089,7 +2088,7 @@ class Infusion extends Interpretation
if (ObjectHelper::check($power))
{
// Trigger Event: jcb_ce_onBeforeInfusePowerData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeInfusePowerData',
array(&$this->componentContext, &$power, &$this)
);
@ -2099,7 +2098,7 @@ class Infusion extends Interpretation
// build the autoloader
$autoloader[implode('.', $power->_namespace_prefix)] = $power->_namespace_prefix;
// Trigger Event: jcb_ce_onAfterInfusePowerData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterInfusePowerData',
array(&$this->componentContext, &$power, &$this)
);
@ -2120,7 +2119,7 @@ class Infusion extends Interpretation
if (ObjectHelper::check($module))
{
// Trigger Event: jcb_ce_onBeforeInfuseModuleData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeInfuseModuleData',
array(&$this->componentContext, &$module, &$this)
);
@ -2150,7 +2149,7 @@ class Infusion extends Interpretation
{
// INSTALLCLASS
$this->fileContentDynamic[$module->key][Placefix::_h('INSTALLCLASS')]
= CFactory::_J('Extension.InstallScript')->get($module);
= CFactory::_('Extension.InstallScript')->get($module);
}
// FIELDSET
if (isset($module->form_files)
@ -2178,7 +2177,7 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$module->key][Placefix::_h('MAINXML')]
= $this->getModuleMainXML($module);
// Trigger Event: jcb_ce_onAfterInfuseModuleData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterInfuseModuleData',
array(&$this->componentContext, &$module, &$this)
);
@ -2193,7 +2192,7 @@ class Infusion extends Interpretation
if (ObjectHelper::check($plugin))
{
// Trigger Event: jcb_ce_onBeforeInfusePluginData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeInfusePluginData',
array(&$this->componentContext, &$plugin, &$this)
);
@ -2209,7 +2208,7 @@ class Infusion extends Interpretation
{
// INSTALLCLASS
$this->fileContentDynamic[$plugin->key][Placefix::_h('INSTALLCLASS')]
= CFactory::_J('Extension.InstallScript')->get($plugin);
= CFactory::_('Extension.InstallScript')->get($plugin);
}
// FIELDSET
if (isset($plugin->form_files)
@ -2237,7 +2236,7 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$plugin->key][Placefix::_h('MAINXML')]
= $this->getPluginMainXML($plugin);
// Trigger Event: jcb_ce_onAfterInfusePluginData
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterInfusePluginData',
array(&$this->componentContext, &$plugin, &$this)
);
@ -2252,7 +2251,7 @@ class Infusion extends Interpretation
// for plugin event TODO change event api signatures
$this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildFilesContent
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildFilesContent',
array(&$this->componentContext, &$this->componentData,
&$this->fileContentStatic, &$this->fileContentDynamic,
@ -2438,7 +2437,7 @@ class Infusion extends Interpretation
// path to INI file
$getPAth = $this->templatePath . '/en-GB.com_admin.ini';
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
CFactory::_J('Event')->trigger(
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildAllLangFiles',
array(&$this->componentContext, &$this->languages['components'],
&$this->langTag)

View File

@ -191,7 +191,7 @@ class Builder extends Mapping
*/
protected function setField(&$view, &$field)
{
if ($fieldType = $this->getFieldType($field['fieldType']))
if ($fieldType = CFactory::_('Field.Type.Name')->get($field['fieldType']))
{
// set the field object
$object = new stdClass();

View File

@ -3528,11 +3528,6 @@ COM_COMPONENTBUILDER_CONFIG_MAIL_CONFIGURATION="Mail Configuration"
COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can choose to manually select what directories should show, or turn them off altogether."
COM_COMPONENTBUILDER_CONFIG_MANAGE_JCB_PACKAGE_DIRECTORIES_LABEL="Manage JCB Package Directories"
COM_COMPONENTBUILDER_CONFIG_MANUAL_SELECTION="Manual Selection"
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_DESC="Set the full path to where the key file must be stored. Make sure it is behind the root folder of your website, so that it is not public accessible."
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_LABEL="Medium Key (Path)"
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_DESC="When using the medium encryption option, the system generates its own key and stores it in a file at the folder/path you set here.<br />Never change this key once it is set, or remove the key file! <b>DATA WILL GET CORRUPTED IF YOU DO!</b> Also make sure the full path to where the the key file should be stored, is behind the root folder of your website/system, so that it is not public accessible. Making a backup of this key file over a <b>secure connection</b> is recommended!"
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_NOTE_LABEL="Medium Encryption"
COM_COMPONENTBUILDER_CONFIG_MEDIUM_KEY_PATH_ERROR="Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component."
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION="Add the prefix you would like to use. Make sure that it is HTML Character Entities since it is being used in XML."
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT="&#187;"
COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL="Prefix<br />

View File

@ -29,10 +29,10 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'name',
'description',
'extends',
'implements_custom',
'implements',
'namespace',
'extends_custom',
'implements',
'implements_custom',
'namespace',
'add_head'
);

View File

@ -33,10 +33,10 @@ class ComponentbuilderModelPower extends AdminModel
'name',
'description',
'extends',
'implements_custom',
'implements',
'namespace',
'extends_custom',
'implements',
'implements_custom',
'namespace',
'add_head'
),
'right' => array(

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>3rd September, 2022</creationDate>
<creationDate>10th September, 2022</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl>