diff --git a/README.md b/README.md
index 680ab3df8..84cd3b690 100644
--- a/README.md
+++ b/README.md
@@ -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*: 21st August, 2022
++ *Last Build*: 30th August, 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*: **312270**
++ *Line count*: **319334**
+ *Field count*: **2002**
-+ *File count*: **2057**
-+ *Folder count*: **351**
++ *File count*: **2087**
++ *Folder count*: **359**
> 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)
diff --git a/admin/README.txt b/admin/README.txt
index 680ab3df8..84cd3b690 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -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*: 21st August, 2022
++ *Last Build*: 30th August, 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*: **312270**
++ *Line count*: **319334**
+ *Field count*: **2002**
-+ *File count*: **2057**
-+ *Folder count*: **351**
++ *File count*: **2087**
++ *Folder count*: **359**
> 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)
diff --git a/admin/config.xml b/admin/config.xml
index 4535b441b..974a94e8f 100644
--- a/admin/config.xml
+++ b/admin/config.xml
@@ -930,11 +930,11 @@
min="1"
showon="development_method:2">
diff --git a/admin/controllers/compiler.php b/admin/controllers/compiler.php
index 0274d1e0e..e4411c370 100644
--- a/admin/controllers/compiler.php
+++ b/admin/controllers/compiler.php
@@ -14,6 +14,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
/**
* Compiler Admin Controller
@@ -89,20 +90,10 @@ class ComponentbuilderControllerCompiler extends AdminController
// currently only those with admin access can compile a component
if($user->authorise('core.manage', 'com_componentbuilder'))
{
- // get the post values
- $jinput = JFactory::getApplication()->input;
- $componentId = $jinput->post->get('component', 0, 'INT');
- $version = $jinput->post->get('version', 0, 'INT');
- $addBackup = $jinput->post->get('backup', 0, 'INT');
- $addRepo = $jinput->post->get('repository', 0, 'INT');
- $addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
- $addPowers = $jinput->post->get('powers', 2, 'INT');
- $debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT');
- $minify = $jinput->post->get('minify', 2, 'INT');
// include component compiler
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php';
$model = $this->getModel('compiler');
- if ($model->builder($version, $componentId, $addBackup, $addRepo, $addPlaceholders, $addPowers, $debugLinenr, $minify))
+ if ($model->builder())
{
$cache = JFactory::getCache('mod_menu');
$cache->clean();
@@ -123,7 +114,7 @@ class ComponentbuilderControllerCompiler extends AdminController
$redirect_url = $app->getUserState('com_componentbuilder.redirect_url');
// get system messages
$message = $app->getUserState('com_componentbuilder.message');
- if (empty($redirect_url) && $componentId > 0)
+ if (empty($redirect_url) && CFactory::_('Config')->component_id > 0)
{
// start new message
$message = array();
diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php
index e4760daf5..9a37ffa38 100644
--- a/admin/helpers/compiler.php
+++ b/admin/helpers/compiler.php
@@ -20,7 +20,10 @@ use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\MathHelper;
-use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
+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();
@@ -30,6 +33,8 @@ ComponentbuilderHelper::autoLoader();
*/
class Compiler extends Infusion
{
+
+
/**
* The Temp path
*
@@ -75,13 +80,13 @@ class Compiler extends Infusion
// to check the compiler speed
$this->time_start = microtime(true);
// first we run the perent constructors
- if (parent::__construct($config))
+ if (parent::__construct())
{
// set temp directory
$comConfig = JFactory::getConfig();
$this->tempPath = $comConfig->get('tmp_path');
// set some folder paths in relation to distribution
- if ($config['backup'])
+ if (CFactory::_('Config')->backup)
{
$this->backupPath = $this->params->get(
'backup_folder_path', $this->tempPath
@@ -89,7 +94,7 @@ class Compiler extends Infusion
$this->dynamicIntegration = true;
}
// set local repos switch
- if ($config['repository'])
+ if (CFactory::_('Config')->repository)
{
$this->repoPath = $this->params->get('git_folder_path', null);
}
@@ -100,8 +105,7 @@ class Compiler extends Infusion
$this->removeFolder($this->componentPath . '/site');
// clear form component xml
$xmlPath = $this->componentPath . '/'
- . $this->fileContentStatic[$this->hhh . 'component'
- . $this->hhh] . '.xml';
+ . $this->fileContentStatic[Placefix::_h('component')] . '.xml';
$componentXML = ComponentbuilderHelper::getFileContents(
$xmlPath
);
@@ -119,7 +123,7 @@ class Compiler extends Infusion
$this->writeFile($xmlPath, $componentXML);
}
// Trigger Event: jcb_ce_onBeforeUpdateFiles
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeUpdateFiles',
array(&$this->componentContext, &$this)
);
@@ -129,15 +133,15 @@ class Compiler extends Infusion
return false;
}
// Trigger Event: jcb_ce_onBeforeGetCustomCode
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeGetCustomCode',
array(&$this->componentContext, &$this)
);
// now insert into the new files
- if ($this->getCustomCode())
+ if (CFactory::_('Customcode')->load())
{
// Trigger Event: jcb_ce_onBeforeAddCustomCode
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeAddCustomCode',
array(&$this->componentContext, &$this)
);
@@ -145,7 +149,7 @@ class Compiler extends Infusion
$this->addCustomCode();
}
// Trigger Event: jcb_ce_onBeforeSetLangFileData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeSetLangFileData',
array(&$this->componentContext, &$this)
);
@@ -184,7 +188,7 @@ class Compiler extends Infusion
'because more then %s% of the strings have been translated.',
$this->percentageLanguageAdd
);
- if (Config::get('debug_line_nr', false))
+ if (CFactory::_('Config')->get('debug_line_nr', false))
{
$whyAddedLang = JText::_(
'because the debugging mode is on. (debug line numbers)'
@@ -215,12 +219,12 @@ class Compiler extends Infusion
'The SQL fix updates the #__assets table\'s column size on installation of the component and reverses it back to the Joomla default on uninstall of the component.'
);
// set assets table rules column notice
- if (Config::get('add_assets_table_fix'))
+ if (CFactory::_('Config')->add_assets_table_fix)
{
$this->app->enqueueMessage(
JText::_('Assets Table Notice '), 'Notice'
);
- $asset_table_fix_type = (Config::get('add_assets_table_fix') == 2)
+ $asset_table_fix_type = (CFactory::_('Config')->add_assets_table_fix == 2)
? 'intelligent' : 'sql';
$this->app->enqueueMessage(
JText::sprintf(
@@ -245,7 +249,7 @@ class Compiler extends Infusion
);
}
// set assets table name column warning if not set
- if (!Config::get('add_assets_table_fix') && $this->addAssetsTableNameFix)
+ if (!CFactory::_('Config')->add_assets_table_fix && $this->addAssetsTableNameFix)
{
// only add if not already added
if ($this->accessSize < 30)
@@ -282,18 +286,18 @@ class Compiler extends Infusion
// if there are plugins zip them
$this->zipPlugins();
// do lang mismatch check
- if (ArrayHelper::check($this->langMismatch))
+ if (ArrayHelper::check(CFactory::_('Language.Extractor')->langMismatch))
{
- if (ArrayHelper::check($this->langMatch))
+ if (ArrayHelper::check(CFactory::_('Language.Extractor')->langMatch))
{
$mismatch = array_diff(
- array_unique($this->langMismatch),
- array_unique($this->langMatch)
+ array_unique(CFactory::_('Language.Extractor')->langMismatch),
+ array_unique(CFactory::_('Language.Extractor')->langMatch)
);
}
else
{
- $mismatch = array_unique($this->langMismatch);
+ $mismatch = array_unique(CFactory::_('Language.Extractor')->langMismatch);
}
// set a notice if we have a mismatch
if (isset($mismatch)
@@ -323,7 +327,7 @@ class Compiler extends Infusion
// add the mismatching issues
foreach ($mismatch as $string)
{
- $constant = Config::get('lang_prefix') . '_'
+ $constant = CFactory::_('Config')->lang_prefix . '_'
. StringHelper::safe($string, 'U');
$this->app->enqueueMessage(
JText::sprintf(
@@ -365,24 +369,6 @@ class Compiler extends Infusion
return false;
}
- /**
- * Set the line number in comments
- *
- * @param int $nr The line number
- *
- * @return void
- *
- */
- private function setLine($nr)
- {
- if (Config::get('debug_line_nr', false))
- {
- return ' [Compiler ' . $nr . ']';
- }
-
- return '';
- }
-
/**
* Set the dynamic data to the created fils
*
@@ -598,9 +584,9 @@ class Compiler extends Infusion
}
}
// do powers if found
- if (ArrayHelper::check($this->powers))
+ if (ArrayHelper::check(CFactory::_('Power')->active))
{
- foreach ($this->powers as $power)
+ foreach (CFactory::_('Power')->active as $power)
{
if (ObjectHelper::check($power)
&& isset($this->newFiles[$power->key])
@@ -641,12 +627,12 @@ class Compiler extends Infusion
protected function setFileContent(&$name, &$path, &$bom, $view = null)
{
// Trigger Event: jcb_ce_onBeforeSetFileContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeSetFileContent',
array(&$this->componentContext, &$name, &$path, &$bom, &$view)
);
// set the file name
- $this->fileContentStatic[$this->hhh . 'FILENAME' . $this->hhh] = $name;
+ $this->fileContentStatic[Placefix::_h('FILENAME')] = $name;
// check if the file should get PHP opening
$php = '';
if (ComponentbuilderHelper::checkFileType($name, 'php'))
@@ -656,35 +642,35 @@ class Compiler extends Infusion
// get content of the file
$string = ComponentbuilderHelper::getFileContents($path);
// Trigger Event: jcb_ce_onGetFileContents
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onGetFileContents',
array(&$this->componentContext, &$string, &$name, &$path, &$bom,
&$view)
);
// see if we should add a BOM
- if (strpos($string, $this->hhh . 'BOM' . $this->hhh) !== false)
+ if (strpos($string, Placefix::_h('BOM')) !== false)
{
list($wast, $code) = explode(
- $this->hhh . 'BOM' . $this->hhh, $string
+ Placefix::_h('BOM'), $string
);
$string = $php . $bom . $code;
}
// set the answer
- $answer = $this->setPlaceholders($string, $this->fileContentStatic, 3);
+ $answer = CFactory::_('Placeholder')->update($string, $this->fileContentStatic, 3);
// set the dynamic answer
if ($view)
{
- $answer = $this->setPlaceholders(
+ $answer = CFactory::_('Placeholder')->update(
$answer, $this->fileContentDynamic[$view], 3
);
}
// check if this file needs extra care :)
if (isset($this->updateFileContent[$path]))
{
- $answer = $this->setDynamicValues($answer);
+ $answer = CFactory::_('Customcode')->add($answer);
}
// Trigger Event: jcb_ce_onBeforeSetFileContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeWriteFileContent',
array(&$this->componentContext, &$answer, &$name, &$path, &$bom,
&$view)
@@ -805,7 +791,7 @@ class Compiler extends Infusion
{
foreach ($data['config'] as $key => $value)
{
- if ($this->hhh . 'VERSION' . $this->hhh === $key)
+ if (Placefix::_h('VERSION') === $key)
{
// hmm we sould in some way make it known that this version number
// is not in relation the the project but to the file only... any ideas?
@@ -825,14 +811,14 @@ class Compiler extends Infusion
return true;
}
// else insure to reset to global
- $this->fileContentStatic[$this->hhh . 'CREATIONDATE' . $this->hhh]
- = $this->fileContentStatic[$this->hhh . 'CREATIONDATE' . $this->hhh
+ $this->fileContentStatic[Placefix::_h('CREATIONDATE')]
+ = $this->fileContentStatic[Placefix::_h('CREATIONDATE')
. 'GLOBAL'];
- $this->fileContentStatic[$this->hhh . 'BUILDDATE' . $this->hhh]
- = $this->fileContentStatic[$this->hhh . 'BUILDDATE' . $this->hhh
+ $this->fileContentStatic[Placefix::_h('BUILDDATE')]
+ = $this->fileContentStatic[Placefix::_h('BUILDDATE')
. 'GLOBAL'];
- $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh]
- = $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh
+ $this->fileContentStatic[Placefix::_h('VERSION')]
+ = $this->fileContentStatic[Placefix::_h('VERSION')
. 'GLOBAL'];
}
@@ -898,9 +884,9 @@ class Compiler extends Infusion
{
// set readme data if not set already
if (!isset(
- $this->fileContentStatic[$this->hhh . 'LINE_COUNT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('LINE_COUNT')]
)
- || $this->fileContentStatic[$this->hhh . 'LINE_COUNT' . $this->hhh]
+ || $this->fileContentStatic[Placefix::_h('LINE_COUNT')]
!= $this->lineCount)
{
$this->buildReadMeData();
@@ -908,7 +894,7 @@ class Compiler extends Infusion
// get the file
$string = ComponentbuilderHelper::getFileContents($path);
// update the file
- $answer = $this->setPlaceholders($string, $this->fileContentStatic);
+ $answer = CFactory::_('Placeholder')->update($string, $this->fileContentStatic);
// add to zip array
$this->writeFile($path, $answer);
}
@@ -916,71 +902,71 @@ class Compiler extends Infusion
private function buildReadMeData()
{
// set some defaults
- $this->fileContentStatic[$this->hhh . 'LINE_COUNT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('LINE_COUNT')]
= $this->lineCount;
- $this->fileContentStatic[$this->hhh . 'FIELD_COUNT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('FIELD_COUNT')]
= $this->fieldCount;
- $this->fileContentStatic[$this->hhh . 'FILE_COUNT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('FILE_COUNT')]
= $this->fileCount;
- $this->fileContentStatic[$this->hhh . 'FOLDER_COUNT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('FOLDER_COUNT')]
= $this->folderCount;
- $this->fileContentStatic[$this->hhh . 'PAGE_COUNT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('PAGE_COUNT')]
= $this->pageCount;
- $this->fileContentStatic[$this->hhh . 'folders' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('folders')]
= $this->folderSeconds;
- $this->fileContentStatic[$this->hhh . 'foldersSeconds' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('foldersSeconds')]
= $this->folderSeconds;
- $this->fileContentStatic[$this->hhh . 'files' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('files')]
= $this->fileSeconds;
- $this->fileContentStatic[$this->hhh . 'filesSeconds' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('filesSeconds')]
= $this->fileSeconds;
- $this->fileContentStatic[$this->hhh . 'lines' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('lines')]
= $this->lineSeconds;
- $this->fileContentStatic[$this->hhh . 'linesSeconds' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('linesSeconds')]
= $this->lineSeconds;
- $this->fileContentStatic[$this->hhh . 'seconds' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('seconds')]
= $this->actualSeconds;
- $this->fileContentStatic[$this->hhh . 'actualSeconds' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('actualSeconds')]
= $this->actualSeconds;
- $this->fileContentStatic[$this->hhh . 'totalHours' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('totalHours')]
= $this->totalHours;
- $this->fileContentStatic[$this->hhh . 'totalDays' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('totalDays')]
= $this->totalDays;
- $this->fileContentStatic[$this->hhh . 'debugging' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('debugging')]
= $this->secondsDebugging;
- $this->fileContentStatic[$this->hhh . 'secondsDebugging' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('secondsDebugging')]
= $this->secondsDebugging;
- $this->fileContentStatic[$this->hhh . 'planning' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('planning')]
= $this->secondsPlanning;
- $this->fileContentStatic[$this->hhh . 'secondsPlanning' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('secondsPlanning')]
= $this->secondsPlanning;
- $this->fileContentStatic[$this->hhh . 'mapping' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('mapping')]
= $this->secondsMapping;
- $this->fileContentStatic[$this->hhh . 'secondsMapping' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('secondsMapping')]
= $this->secondsMapping;
- $this->fileContentStatic[$this->hhh . 'office' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('office')]
= $this->secondsOffice;
- $this->fileContentStatic[$this->hhh . 'secondsOffice' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('secondsOffice')]
= $this->secondsOffice;
- $this->fileContentStatic[$this->hhh . 'actualTotalHours' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('actualTotalHours')]
= $this->actualTotalHours;
- $this->fileContentStatic[$this->hhh . 'actualTotalDays' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('actualTotalDays')]
= $this->actualTotalDays;
- $this->fileContentStatic[$this->hhh . 'debuggingHours' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('debuggingHours')]
= $this->debuggingHours;
- $this->fileContentStatic[$this->hhh . 'planningHours' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('planningHours')]
= $this->planningHours;
- $this->fileContentStatic[$this->hhh . 'mappingHours' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('mappingHours')]
= $this->mappingHours;
- $this->fileContentStatic[$this->hhh . 'officeHours' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('officeHours')]
= $this->officeHours;
- $this->fileContentStatic[$this->hhh . 'actualHoursSpent' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('actualHoursSpent')]
= $this->actualHoursSpent;
- $this->fileContentStatic[$this->hhh . 'actualDaysSpent' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('actualDaysSpent')]
= $this->actualDaysSpent;
- $this->fileContentStatic[$this->hhh . 'projectWeekTime' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('projectWeekTime')]
= $this->projectWeekTime;
- $this->fileContentStatic[$this->hhh . 'projectMonthTime' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('projectMonthTime')]
= $this->projectMonthTime;
}
@@ -995,9 +981,9 @@ class Compiler extends Infusion
// set the repo path
$repoFullPath = $this->repoPath . '/com_'
. $this->componentData->sales_name . '__joomla_'
- . Config::get('version', 3);
+ . CFactory::_('Config')->get('version', 3);
// Trigger Event: jcb_ce_onBeforeUpdateRepo
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeUpdateRepo',
array(&$this->componentContext, &$this->componentPath,
&$repoFullPath, &$this->componentData)
@@ -1007,7 +993,7 @@ class Compiler extends Infusion
// set the new data
Folder::copy($this->componentPath, $repoFullPath, '', true);
// Trigger Event: jcb_ce_onAfterUpdateRepo
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterUpdateRepo',
array(&$this->componentContext, &$this->componentPath,
&$repoFullPath, &$this->componentData)
@@ -1026,9 +1012,9 @@ class Compiler extends Infusion
// set the repo path
$repoFullPath = $this->repoPath . '/'
. $module->folder_name . '__joomla_'
- . Config::get('version', 3);
+ . CFactory::_('Config')->get('version', 3);
// Trigger Event: jcb_ce_onBeforeUpdateRepo
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeUpdateRepo',
array(&$module_context, &$module->folder_path,
&$repoFullPath, &$module)
@@ -1042,7 +1028,7 @@ class Compiler extends Infusion
$module->folder_path, $repoFullPath, '', true
);
// Trigger Event: jcb_ce_onAfterUpdateRepo
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterUpdateRepo',
array(&$module_context, &$module->folder_path,
&$repoFullPath, &$module)
@@ -1063,9 +1049,9 @@ class Compiler extends Infusion
// set the repo path
$repoFullPath = $this->repoPath . '/'
. $plugin->folder_name . '__joomla_'
- . Config::get('version', 3);
+ . CFactory::_('Config')->get('version', 3);
// Trigger Event: jcb_ce_onBeforeUpdateRepo
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeUpdateRepo',
array(&$plugin_context, &$plugin->folder_path,
&$repoFullPath, &$plugin)
@@ -1079,7 +1065,7 @@ class Compiler extends Infusion
$plugin->folder_path, $repoFullPath, '', true
);
// Trigger Event: jcb_ce_onAfterUpdateRepo
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterUpdateRepo',
array(&$plugin_context, &$plugin->folder_path,
&$repoFullPath, &$plugin)
@@ -1098,7 +1084,7 @@ class Compiler extends Infusion
$this->filepath['component'] = $this->tempPath . '/'
. $this->filepath['component-folder'] . '.zip';
// Trigger Event: jcb_ce_onBeforeZipComponent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeZipComponent',
array(&$this->componentContext, &$this->componentPath,
&$this->filepath['component'], &$this->tempPath,
@@ -1113,7 +1099,7 @@ class Compiler extends Infusion
if ($this->backupPath && $this->dynamicIntegration)
{
// Trigger Event: jcb_ce_onBeforeBackupZip
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBackupZip', array(&$this->componentContext,
&$this->filepath['component'],
&$this->tempPath,
@@ -1135,7 +1121,7 @@ class Compiler extends Infusion
if (isset($this->componentData->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeMoveToServer',
array(&$this->componentContext,
&$this->filepath['component'], &$this->tempPath,
@@ -1151,7 +1137,7 @@ class Compiler extends Infusion
}
}
// Trigger Event: jcb_ce_onAfterZipComponent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterZipComponent',
array(&$this->componentContext, &$this->filepath['component'],
&$this->tempPath, &$this->componentFolderName,
@@ -1190,7 +1176,7 @@ class Compiler extends Infusion
$this->filepath['modules'][$module->id] = $this->tempPath
. '/' . $module->zip_name . '.zip';
// Trigger Event: jcb_ce_onBeforeZipModule
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeZipModule',
array(&$module_context, &$module->folder_path,
&$this->filepath['modules'][$module->id],
@@ -1207,7 +1193,7 @@ class Compiler extends Infusion
{
$__module_context = 'module.' . $module_context;
// Trigger Event: jcb_ce_onBeforeBackupZip
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBackupZip',
array(&$__module_context,
&$this->filepath['modules'][$module->id],
@@ -1229,7 +1215,7 @@ class Compiler extends Infusion
if (isset($module->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeMoveToServer',
array(&$__module_context,
&$this->filepath['modules'][$module->id],
@@ -1246,7 +1232,7 @@ class Compiler extends Infusion
}
}
// Trigger Event: jcb_ce_onAfterZipModule
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterZipModule', array(&$module_context,
&$this->filepath['modules'][$module->id],
&$this->tempPath,
@@ -1284,7 +1270,7 @@ class Compiler extends Infusion
$this->filepath['plugins'][$plugin->id] = $this->tempPath
. '/' . $plugin->zip_name . '.zip';
// Trigger Event: jcb_ce_onBeforeZipPlugin
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeZipPlugin',
array(&$plugin_context, &$plugin->folder_path,
&$this->filepath['plugins'][$plugin->id],
@@ -1301,7 +1287,7 @@ class Compiler extends Infusion
{
$__plugin_context = 'plugin.' . $plugin_context;
// Trigger Event: jcb_ce_onBeforeBackupZip
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBackupZip',
array(&$__plugin_context,
&$this->filepath['plugins'][$plugin->id],
@@ -1323,7 +1309,7 @@ class Compiler extends Infusion
if (isset($plugin->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeMoveToServer',
array(&$__plugin_context,
&$this->filepath['plugins'][$plugin->id],
@@ -1340,7 +1326,7 @@ class Compiler extends Infusion
}
}
// Trigger Event: jcb_ce_onAfterZipPlugin
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterZipPlugin', array(&$plugin_context,
&$this->filepath['plugins'][$plugin->id],
&$this->tempPath,
@@ -1358,9 +1344,9 @@ class Compiler extends Infusion
protected function addCustomCode()
{
// reset all these
- $this->clearFromPlaceHolders('view');
- $this->clearFromPlaceHolders('arg');
- foreach ($this->customCode as $nr => $target)
+ CFactory::_('Placeholder')->clearType('view');
+ CFactory::_('Placeholder')->clearType('arg');
+ foreach (CFactory::_('Customcode')->active as $nr => $target)
{
// reset each time per custom code
$fingerPrint = array();
@@ -1471,13 +1457,13 @@ class Compiler extends Infusion
}
if ($found)
{
- $placeholder = $this->getPlaceHolder(
+ $placeholder = CFactory::_('Placeholder')->keys(
(int) $target['comment_type'] . $target['type'],
$target['id']
);
$data = $placeholder['start'] . PHP_EOL
- . $this->setPlaceholders(
- $target['code'], $this->placeholders
+ . CFactory::_('Placeholder')->update(
+ $target['code'], CFactory::_('Placeholder')->active
) . $placeholder['end'] . PHP_EOL;
if ($target['type'] == 2)
{
@@ -1566,7 +1552,7 @@ class Compiler extends Infusion
$_commentType . PHP_EOL . $commentType, $code
) . $_commentType . PHP_EOL;
// get place holders
- $placeholder = $this->getPlaceHolder(
+ $placeholder = CFactory::_('Placeholder')->keys(
(int) $target['comment_type'] . $target['type'], $target['id']
);
// build the data
diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php
index fe7727f3d..5da9bf912 100644
--- a/admin/helpers/compiler/a_Get.php
+++ b/admin/helpers/compiler/a_Get.php
@@ -27,7 +27,10 @@ use VDM\Joomla\Utilities\String\TypeHelper;
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
use VDM\Joomla\Utilities\String\NamespaceHelper;
use VDM\Joomla\Utilities\String\PluginHelper;
-use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
+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;
/**
* Get class as the main compilers class
@@ -39,7 +42,7 @@ class Get
* The Joomla Version
*
* @var string
- * @deprecated 4.0 Use Config::get('version');
+ * @deprecated 3.3 Use CFactory::_('Config')->joomla_version;
*/
public $joomlaVersion;
@@ -57,6 +60,7 @@ class Get
* The hash placeholder
*
* @var string
+ * @deprecated 3.3 Use Placefix::h();
*/
public $hhh = '#' . '#' . '#';
@@ -64,6 +68,7 @@ class Get
* The open bracket placeholder
*
* @var string
+ * @deprecated 3.3 Use Placefix::b();
*/
public $bbb = '[' . '[' . '[';
@@ -71,6 +76,7 @@ class Get
* The close bracket placeholder
*
* @var string
+ * @deprecated 3.3 Use Placefix::d();
*/
public $ddd = ']' . ']' . ']';
@@ -106,6 +112,7 @@ class Get
* The global placeholders
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Component.Placeholder')->get();
*/
public $globalPlaceholders = array();
@@ -113,6 +120,7 @@ class Get
* The placeholders
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Placeholder')->active[];
*/
public $placeholders = array();
@@ -120,7 +128,7 @@ class Get
* The Compiler Path
*
* @var object
- * @deprecated 4.0 Use Config::get('compiler_path');
+ * @deprecated 3.3 Use CFactory::_('Config')->compiler_path;
*/
public $compilerPath;
@@ -128,7 +136,7 @@ class Get
* The JCB Powers Path
*
* @var object
- * @deprecated 4.0 Use Config::get('jcb_powers_path');
+ * @deprecated 3.3 Use CFactory::_('Config')->jcb_powers_path;
*/
public $jcbPowersPath;
@@ -136,7 +144,7 @@ class Get
* Switch to add assets table fix
*
* @var int
- * @deprecated 4.0 Use Config::get('add_assets_table_fix');
+ * @deprecated 3.3 Use CFactory::_('Config')->add_assets_table_fix;
*/
public $addAssetsTableFix = 1;
@@ -158,7 +166,7 @@ class Get
* Switch to add custom code placeholders
*
* @var bool
- * @deprecated 4.0 Use Config::get('add_placeholders');
+ * @deprecated 3.3 Use CFactory::_('Config')->add_placeholders;
*/
public $addPlaceholders = false;
@@ -166,7 +174,7 @@ class Get
* Switch to remove line breaks from language strings
*
* @var bool
- * @deprecated 4.0 Use Config::get('remove_line_breaks');
+ * @deprecated 3.3 Use CFactory::_('Config')->remove_line_breaks;
*/
public $removeLineBreaks = false;
@@ -174,6 +182,7 @@ class Get
* The placeholders for custom code keys
*
* @var array
+ * @deprecated 3.3
*/
protected $customCodeKeyPlacholders
= array(
@@ -195,7 +204,7 @@ class Get
* The Switch to add Powers data
*
* @var boolean
- * @deprecated 4.0 Use Config::get('add_power');
+ * @deprecated 3.3 Use CFactory::_('Config')->add_power;
*/
public $addPower;
@@ -203,6 +212,7 @@ class Get
* The Powers data
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Power')->active;
*/
public $powers = array();
@@ -210,6 +220,7 @@ class Get
* The state of all Powers
*
* @var array
+ * @deprecated 3.3
*/
public $statePowers = array();
@@ -279,6 +290,7 @@ class Get
* The custom code to be added
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Customcode')->active
*/
public $customCode;
@@ -286,6 +298,7 @@ class Get
* The custom code to be added
*
* @var array
+ * @deprecated 3.3
*/
protected $customCodeData = array();
@@ -293,6 +306,7 @@ class Get
* The function name memory ids
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Customcode')->functionNameMemory
*/
public $functionNameMemory = array();
@@ -300,6 +314,7 @@ class Get
* The custom code for local memory
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Customcode')->memory
*/
public $customCodeMemory = array();
@@ -328,6 +343,7 @@ class Get
* The external code/string to be added
*
* @var array
+ * @deprecated 3.3
*/
protected $externalCodeString = array();
@@ -335,6 +351,7 @@ class Get
* The external code/string cutter
*
* @var array
+ * @deprecated 3.3
*/
protected $externalCodeCutter = array();
@@ -342,7 +359,7 @@ class Get
* The line numbers Switch
*
* @var boolean
- * @deprecated 4.0 Use Config::get('debug_line_nr');
+ * @deprecated 3.3 Use CFactory::_('Config')->debug_line_nr;
*/
public $debugLinenr = false;
@@ -357,7 +374,7 @@ class Get
* The Placholder Language prefix
*
* @var string
- * @deprecated 4.0 Use Config::get('lang_prefix');
+ * @deprecated 3.3 Use CFactory::_('Config')->lang_prefix;
*/
public $langPrefix;
@@ -365,6 +382,7 @@ class Get
* The Language content
*
* @var array
+ * @deprecated 3.3
*/
public $langContent = array();
@@ -381,7 +399,7 @@ class Get
* The Main Languages
*
* @var string
- * @deprecated 4.0 Use Config::get('lang_tag');
+ * @deprecated 3.3 Use CFactory::_('Config')->lang_tag;
*/
public $langTag = 'en-GB';
@@ -410,6 +428,7 @@ class Get
* The Language JS matching check
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Language.Extractor')->langMismatch;
*/
public $langMismatch = array();
@@ -417,6 +436,7 @@ class Get
* The Language SC matching check
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Language.Extractor')->langMatch;
*/
public $langMatch = array();
@@ -424,6 +444,7 @@ class Get
* The Language string targets
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Config')->lang_string_targets;
*/
public $langStringTargets
= array(
@@ -438,7 +459,7 @@ class Get
* The Component Code Name
*
* @var string
- * @deprecated 4.0 Use Config::get('component_code_name');
+ * @deprecated 3.3 Use CFactory::_('Config')->component_code_name;
*/
public $componentCodeName;
@@ -446,7 +467,7 @@ class Get
* The Component Context
*
* @var string
- * @deprecated 4.0 Use Config::get('component_context');
+ * @deprecated 3.3 Use CFactory::_('Config')->component_context;
*/
public $componentContext;
@@ -454,7 +475,7 @@ class Get
* The Component Code Name Length
*
* @var int
- * @deprecated 4.0 Use Config::get('component_code_name_length');
+ * @deprecated 3.3 Use CFactory::_('Config')->component_code_name_length;
*/
public $componentCodeNameLength;
@@ -462,7 +483,7 @@ class Get
* The Component ID
*
* @var int
- * @deprecated 4.0 Use Config::get('component_id');
+ * @deprecated 3.3 Use CFactory::_('Config')->component_id;
*/
public $componentID;
@@ -582,6 +603,7 @@ class Get
* The Language target
*
* @var string
+ * @deprecated 3.3 Use CFactory::_('Config')->lang_target;
*/
public $lang = 'admin';
@@ -589,6 +611,7 @@ class Get
* The lang keys for extentions
*
* @var array
+ * @deprecated 3.3 Use CFactory::_('Language.Extractor')->langKeys;
*/
public $langKeys = array();
@@ -596,6 +619,7 @@ class Get
* The Build target Switch
*
* @var string
+ * @deprecated 3.3 Use CFactory::_('Config')->build_target;
*/
public $target;
@@ -690,7 +714,7 @@ class Get
* 2 = SimpleXMLElement
*
* @var int
- * @deprecated 4.0 Use Config::get('field_builder_type');
+ * @deprecated 3.3 Use CFactory::_('Config')->field_builder_type;
*/
public $fieldBuilderType;
@@ -903,7 +927,7 @@ class Get
* Is minify Enabled
*
* @var int
- * @deprecated 4.0 Use Config::get('minify');
+ * @deprecated 3.3 Use CFactory::_('Config')->minify;
*/
public $minify = 0;
@@ -911,7 +935,7 @@ class Get
* Is Tidy Enabled
*
* @var bool
- * @deprecated 4.0 Use Config::get('tidy');
+ * @deprecated 3.3 Use CFactory::_('Config')->tidy;
*/
public $tidy = false;
@@ -942,18 +966,12 @@ class Get
*/
public $mysqlTableSetting = array();
- /**
- * event plugin trigger switch
- *
- * @var boolean
- */
- protected $active_plugins = false;
-
/**
* Constructor
*/
- public function __construct($config = array())
+ public function __construct()
{
+ echo '';
// we do not yet have this set as an option
$config['remove_line_breaks']
= 2; // 2 is global (use the components value)
@@ -961,42 +979,24 @@ class Get
$this->app = JFactory::getApplication();
// Set the params
$this->params = JComponentHelper::getParams('com_componentbuilder');
- // get active plugins
- if (($plugins = $this->params->get('compiler_plugin', false))
- !== false)
- {
- foreach ($plugins as $plugin)
- {
- // get possible plugins
- if (\JPluginHelper::isEnabled('extension', $plugin))
- {
- // Import the appropriate plugin group.
- \JPluginHelper::importPlugin('extension', $plugin);
- // activate events
- $this->active_plugins = true;
- }
- }
- }
// Trigger Event: jcb_ce_onBeforeGet
- $this->triggerEvent('jcb_ce_onBeforeGet', array(&$config, &$this));
- // load the global config
- Config::init($config);
+ CFactory::_J('Event')->trigger('jcb_ce_onBeforeGet', array(&$config, &$this));
// set the Joomla version @deprecated
- $this->joomlaVersion = Config::get('version', 3);
+ $this->joomlaVersion = CFactory::_('Config')->joomla_version;
// set the minfy switch of the JavaScript @deprecated
- $this->minify = Config::get('minify', 0);
+ $this->minify = CFactory::_('Config')->get('minify', 0);
// set the global language @deprecated @deprecated
- $this->langTag = Config::get('lang_tag', 'en-GB');
+ $this->langTag = CFactory::_('Config')->get('lang_tag', 'en-GB');
// also set the helper class langTag (for safeStrings)
- ComponentbuilderHelper::$langTag = Config::get('lang_tag', 'en-GB');
+ ComponentbuilderHelper::$langTag = CFactory::_('Config')->get('lang_tag', 'en-GB');
// setup the main language array
- $this->languages['components'][Config::get('lang_tag', 'en-GB')] = array();
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')] = array();
// check if we have Tidy enabled @deprecated
- $this->tidy = Config::get('tidy', false);
+ $this->tidy = CFactory::_('Config')->get('tidy', false);
// set the field type builder @deprecated
- $this->fieldBuilderType = Config::get('field_builder_type', 2);
+ $this->fieldBuilderType = CFactory::_('Config')->get('field_builder_type', 2);
// check the field builder type logic
- if (!Config::get('tidy', false) && Config::get('field_builder_type', 2) == 2)
+ if (!CFactory::_('Config')->get('tidy', false) && CFactory::_('Config')->get('field_builder_type', 2) == 2)
{
// we do not have the tidy extension set fall back to StringManipulation
$this->fieldBuilderType = 1;
@@ -1010,37 +1010,37 @@ class Get
), 'Notice'
);
}
- Config::set('field_builder_type', $this->fieldBuilderType);
+ CFactory::_('Config')->set('field_builder_type', $this->fieldBuilderType);
// load the compiler path @deprecated
- $this->compilerPath = Config::get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler');
+ $this->compilerPath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler');
// load the jcb powers path @deprecated
- $this->jcbPowersPath = Config::get('jcb_powers_path', 'libraries/jcb_powers');
+ $this->jcbPowersPath = CFactory::_('Config')->get('jcb_powers_path', 'libraries/jcb_powers');
// set the component ID @deprecated
- $this->componentID = Config::get('component_id');
+ $this->componentID = CFactory::_('Config')->component_id;
// set lang prefix @deprecated
- $this->langPrefix = Config::get('lang_prefix');
+ $this->langPrefix = CFactory::_('Config')->lang_prefix;
// set component code name @deprecated
- $this->componentCodeName = Config::get('component_code_name');
+ $this->componentCodeName = CFactory::_('Config')->component_code_name;
// set component context @deprecated
- $this->componentContext = Config::get('component_context');
+ $this->componentContext = CFactory::_('Config')->component_context;
// set the component name length @deprecated
- $this->componentCodeNameLength = Config::get('component_code_name_length');
+ $this->componentCodeNameLength = CFactory::_('Config')->component_code_name_length;
// add assets table fix @deprecated
- $this->addAssetsTableFix = Config::get('add_assets_table_fix');
+ $this->addAssetsTableFix = CFactory::_('Config')->add_assets_table_fix;
// set if language strings line breaks should be removed @deprecated
- $this->removeLineBreaks = Config::get('remove_line_breaks');
+ $this->removeLineBreaks = CFactory::_('Config')->remove_line_breaks;
// set if placeholders should be added to customcode @deprecated
- $this->addPlaceholders = Config::get('add_placeholders', false);
+ $this->addPlaceholders = CFactory::_('Config')->get('add_placeholders', false);
// set if line numbers should be added to comments @deprecated
- $this->debugLinenr = Config::get('debug_line_nr', false);
+ $this->debugLinenr = CFactory::_('Config')->get('debug_line_nr', false);
// set if powers should be added to component (default is true) @deprecated
- $this->addPower = Config::get('add_power', true);
+ $this->addPower = CFactory::_('Config')->get('add_power', true);
// set the current user
$this->user = JFactory::getUser();
// Get a db connection.
$this->db = JFactory::getDbo();
- // get global placeholders
- $this->globalPlaceholders = $this->getGlobalPlaceholders();
+ // get global placeholders @deprecated
+ $this->globalPlaceholders = CFactory::_('Component.Placeholder')->get();
// check if this component is installed on the current website
if ($paths = $this->getLocalInstallPaths())
{
@@ -1050,14 +1050,14 @@ class Get
$this->customCodeFactory($paths, $today);
}
// Trigger Event: jcb_ce_onBeforeGetComponentData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeGetComponentData',
array(&$this->componentContext, &$this)
);
// get the component data
$this->componentData = $this->getComponentData();
// Trigger Event: jcb_ce_onAfterGetComponentData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterGetComponentData',
array(&$this->componentContext, &$this)
);
@@ -1092,14 +1092,14 @@ class Get
);
}
// get powers *+*+*+*+*+*+*+*PRO
- $this->getPowers($this->linkedPowers);
+ CFactory::_('Power')->load($this->linkedPowers);
// set the percentage when a language can be added
$this->percentageLanguageAdd = (int) $this->params->get(
'percentagelanguageadd', 50
);
// Trigger Event: jcb_ce_onBeforeGet
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterGet', array(&$this->componentContext, &$this)
);
@@ -1120,24 +1120,6 @@ class Get
return ComponentbuilderHelper::_t($nr);
}
- /**
- * Set the line number in comments
- *
- * @param int $nr The line number
- *
- * @return void
- *
- */
- private function setLine($nr)
- {
- if (Config::get('debug_line_nr', false))
- {
- return ' [Get ' . $nr . ']';
- }
-
- return '';
- }
-
/**
* Trigger events
*
@@ -1145,99 +1127,22 @@ class Get
* @param mix $data The values to pass to the event/plugin
*
* @return void
- *
+ * @deprecated 3.3 Use CFactory::_J('Event')->trigger($event, $data);
*/
public function triggerEvent($event, $data)
{
- // only exicute if plugins were loaded (active)
- if ($this->active_plugins)
- {
- // Get the dispatcher.
- $dispatcher = \JEventDispatcher::getInstance();
-
- // Trigger this compiler event.
- $results = $dispatcher->trigger($event, $data);
-
- // Check for errors encountered while trigger the event
- if (count((array) $results) && in_array(false, $results, true))
- {
- // Get the last error.
- $error = $dispatcher->getError();
-
- if (!($error instanceof \Exception))
- {
- throw new \Exception($error);
- }
- }
- }
+ return CFactory::_J('Event')->trigger($event, $data);
}
/**
* get all System Placeholders
*
* @return array The global placeholders
- *
+ * @deprecated 3.3 Use CFactory::_('Component.Placeholder')->get();
*/
public function getGlobalPlaceholders()
{
- // reset bucket
- $bucket = array();
- // Create a new query object.
- $query = $this->db->getQuery(true);
- $query->select($this->db->quoteName(array('a.target', 'a.value')));
- // from these tables
- $query->from('#__componentbuilder_placeholder AS a');
- // Reset the query using our newly populated query object.
- $this->db->setQuery($query);
- // Load the items
- $this->db->execute();
- if ($this->db->getNumRows())
- {
- $bucket = $this->db->loadAssocList('target', 'value');
- // open all the code
- foreach ($bucket as $key => &$code)
- {
- $code = base64_decode($code);
- }
- }
- // set component place holders
- $bucket[$this->hhh . 'component' . $this->hhh]
- = Config::get('component_code_name');
- $bucket[$this->hhh . 'Component' . $this->hhh]
- = StringHelper::safe(
- Config::get('component_code_name'), 'F'
- );
- $bucket[$this->hhh . 'COMPONENT' . $this->hhh]
- = StringHelper::safe(
- Config::get('component_code_name'), 'U'
- );
- $bucket[$this->bbb . 'component' . $this->ddd] = $bucket[$this->hhh
- . 'component' . $this->hhh];
- $bucket[$this->bbb . 'Component' . $this->ddd] = $bucket[$this->hhh
- . 'Component' . $this->hhh];
- $bucket[$this->bbb . 'COMPONENT' . $this->ddd] = $bucket[$this->hhh
- . 'COMPONENT' . $this->hhh];
- $bucket[$this->hhh . 'LANG_PREFIX' . $this->hhh] = Config::get('lang_prefix');
- $bucket[$this->bbb . 'LANG_PREFIX' . $this->ddd] = $bucket[$this->hhh
- . 'LANG_PREFIX' . $this->hhh];
- // get the current components overides
- if (($_placeholders = GetHelper::var(
- 'component_placeholders', Config::get('component_id'),
- 'joomla_component', 'addplaceholders'
- )) !== false
- && JsonHelper::check($_placeholders))
- {
- $_placeholders = json_decode($_placeholders, true);
- if (ArrayHelper::check($_placeholders))
- {
- foreach ($_placeholders as $row)
- {
- $bucket[$row['target']] = $row['value'];
- }
- }
- }
-
- return $bucket;
+ return CFactory::_('Component.Placeholder')->get();
}
/**
@@ -1307,11 +1212,11 @@ class Get
);
}
$query->where(
- $this->db->quoteName('a.id') . ' = ' . (int) Config::get('component_id')
+ $this->db->quoteName('a.id') . ' = ' . (int) CFactory::_('Config')->component_id
);
// Trigger Event: jcb_ce_onBeforeQueryComponentData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeQueryComponentData',
array(&$this->componentContext, &$this->componentID, &$query,
&$this->db)
@@ -1324,7 +1229,7 @@ class Get
$component = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelComponentData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeModelComponentData',
array(&$this->componentContext, &$component)
);
@@ -1336,36 +1241,36 @@ class Get
'val' => (int) $component->addadmin_views_id,
'key' => 'id'),
'addconfig' => array('table' => 'component_config',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'addcustom_admin_views' => array('table' => 'component_custom_admin_views',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'addcustommenus' => array('table' => 'component_custom_admin_menus',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'addfiles' => array('table' => 'component_files_folders',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'addfolders' => array('table' => 'component_files_folders',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'addsite_views' => array('table' => 'component_site_views',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'dashboard_tab' => array('table' => 'component_dashboard',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'sql_tweak' => array('table' => 'component_mysql_tweaks',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component'),
'version_update' => array('table' => 'component_updates',
- 'val' => (int) Config::get('component_id'),
+ 'val' => (int) CFactory::_('Config')->component_id,
'key' => 'joomla_component')
),
'table' => 'joomla_component',
'key' => 'id',
- 'val' => (int) Config::get('component_id')
+ 'val' => (int) CFactory::_('Config')->component_id
);
// repeatable fields to update
$searchRepeatables = array(
@@ -1390,7 +1295,7 @@ class Get
// load the global placeholders
if (ArrayHelper::check($this->globalPlaceholders))
{
- $this->placeholders = $this->globalPlaceholders;
+ CFactory::_('Placeholder')->active = $this->globalPlaceholders;
}
// set component sales name
@@ -1542,8 +1447,8 @@ class Get
? json_decode($component->addadmin_views, true) : null;
if (ArrayHelper::check($component->addadmin_views))
{
- $this->lang = 'admin';
- $this->target = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
+ CFactory::_('Config')->build_target = 'admin';
// sort the views according to order
usort(
$component->addadmin_views, function ($a, $b) {
@@ -1586,7 +1491,7 @@ class Get
&& $array['edit_create_site_view'] > 0)
{
$this->siteEditView[$array['adminview']] = true;
- $this->lang = 'both';
+ CFactory::_('Config')->lang_target = 'both';
}
// set the import/export option for this view
if (isset($array['port']) && $array['port']
@@ -1636,8 +1541,8 @@ class Get
? json_decode($component->addsite_views, true) : null;
if (ArrayHelper::check($component->addsite_views))
{
- $this->lang = 'site';
- $this->target = 'site';
+ CFactory::_('Config')->lang_target = 'site';
+ CFactory::_('Config')->build_target = 'site';
// build the site_views settings
$component->site_views = array_map(
function ($array) {
@@ -1675,8 +1580,8 @@ class Get
$component->addcustom_admin_views
))
{
- $this->lang = 'admin';
- $this->target = 'custom_admin';
+ CFactory::_('Config')->lang_target = 'admin';
+ CFactory::_('Config')->build_target = 'custom_admin';
// build the custom_admin_views settings
$component->custom_admin_views = array_map(
function ($array) {
@@ -1764,7 +1669,7 @@ class Get
'component_admin_views', $component->addadmin_views_id
);
$old_component = $this->getHistoryWatch(
- 'joomla_component', Config::get('component_id')
+ 'joomla_component', CFactory::_('Config')->component_id
);
if ($old_component || $old_admin_views)
{
@@ -1805,7 +1710,7 @@ class Get
// set GUI mapper
$guiMapper = array('table' => 'joomla_component',
- 'id' => (int) Config::get('component_id'),
+ 'id' => (int) CFactory::_('Config')->component_id,
'field' => 'javascript', 'type' => 'js');
// add_javascript
@@ -1849,7 +1754,7 @@ class Get
unset($component->{'css_' . $area});
}
// set the lang target
- $this->lang = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
// add PHP in ADMIN
$addScriptMethods = array('php_preflight', 'php_postflight',
'php_method');
@@ -1892,7 +1797,7 @@ class Get
$component->php_helper_admin
))
{
- $this->lang = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
// update GUI mapper
$guiMapper['field'] = 'php_helper_admin';
$guiMapper['prefix'] = PHP_EOL . PHP_EOL;
@@ -1914,7 +1819,7 @@ class Get
if ($component->add_admin_event == 1
&& StringHelper::check($component->php_admin_event))
{
- $this->lang = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
// update GUI mapper field
$guiMapper['field'] = 'php_admin_event';
$this->setCustomScriptBuilder(
@@ -1934,7 +1839,7 @@ class Get
if ($component->add_php_helper_both == 1
&& StringHelper::check($component->php_helper_both))
{
- $this->lang = 'both';
+ CFactory::_('Config')->lang_target = 'both';
// update GUI mapper field
$guiMapper['field'] = 'php_helper_both';
$guiMapper['prefix'] = PHP_EOL . PHP_EOL;
@@ -1955,7 +1860,7 @@ class Get
if ($component->add_php_helper_site == 1
&& StringHelper::check($component->php_helper_site))
{
- $this->lang = 'site';
+ CFactory::_('Config')->lang_target = 'site';
// update GUI mapper field
$guiMapper['field'] = 'php_helper_site';
$guiMapper['prefix'] = PHP_EOL . PHP_EOL;
@@ -1977,7 +1882,7 @@ class Get
if ($component->add_site_event == 1
&& StringHelper::check($component->php_site_event))
{
- $this->lang = 'site';
+ CFactory::_('Config')->lang_target = 'site';
// update GUI mapper field
$guiMapper['field'] = 'php_site_event';
$this->setCustomScriptBuilder(
@@ -2015,17 +1920,17 @@ class Get
// bom
if (StringHelper::check($component->bom))
{
- $this->bomPath = Config::get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' . $component->bom;
+ $this->bomPath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/' . $component->bom;
}
else
{
- $this->bomPath = Config::get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/default.txt';
+ $this->bomPath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/default.txt';
}
unset($component->bom);
// README
if ($component->addreadme)
{
- $component->readme = $this->setDynamicValues(
+ $component->readme = CFactory::_('Customcode')->add(
base64_decode($component->readme)
);
}
@@ -2035,8 +1940,8 @@ class Get
}
// set lang now
- $nowLang = $this->lang;
- $this->lang = 'admin';
+ $nowLang = CFactory::_('Config')->lang_target;
+ CFactory::_('Config')->lang_target = 'admin';
// dashboard methods
$component->dashboard_tab = (isset($component->dashboard_tab)
&& JsonHelper::check($component->dashboard_tab))
@@ -2045,7 +1950,7 @@ class Get
{
$component->dashboard_tab = array_map(
function ($array) {
- $array['html'] = $this->setDynamicValues($array['html']);
+ $array['html'] = CFactory::_('Customcode')->add($array['html']);
return $array;
}, array_values($component->dashboard_tab)
@@ -2062,8 +1967,8 @@ class Get
))
{
// load the php for the dashboard model
- $component->php_dashboard_methods = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ $component->php_dashboard_methods = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($component->php_dashboard_methods)
),
array(
@@ -2078,7 +1983,7 @@ class Get
$component->php_dashboard_methods = '';
}
// reset back to nowlang
- $this->lang = $nowLang;
+ CFactory::_('Config')->lang_target = $nowLang;
// add the update/sales server FTP details if that is the expected protocol
$serverArray = array('update_server', 'sales_server');
@@ -2173,7 +2078,7 @@ class Get
unset($component->addjoomla_plugins);
// Trigger Event: jcb_ce_onAfterModelComponentData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterModelComponentData',
array(&$this->componentContext, &$component)
);
@@ -2191,26 +2096,14 @@ class Get
* @param boolean $addPrefix The switch to add langPrefix
*
* @return void
+ * @deprecated 3.3 Use CFactory::_('Language')->set($target, $language, $string, $addPrefix);
*
*/
public function setLangContent($target, $language, $string,
$addPrefix = false
)
{
- if ($addPrefix
- && !isset(
- $this->langContent[$target][Config::get('lang_prefix') . '_' . $language]
- ))
- {
- $this->langContent[$target][Config::get('lang_prefix') . '_' . $language]
- = $this->fixLangString($string);
- }
- elseif (!isset($this->langContent[$target][$language]))
- {
- $this->langContent[$target][$language] = $this->fixLangString(
- $string
- );
- }
+ CFactory::_('Language')->set($target, $language, $string, $addPrefix);
}
/**
@@ -2219,11 +2112,12 @@ class Get
* @param string $string The language string
*
* @return string
+ * @deprecated 3.3
*
*/
public function fixLangString(&$string)
{
- if (Config::get('remove_line_breaks'))
+ if (CFactory::_('Config')->remove_line_breaks)
{
return trim(str_replace(array(PHP_EOL, "\r", "\n"), '', $string));
}
@@ -2294,7 +2188,7 @@ class Get
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Trigger Event: jcb_ce_onBeforeQueryViewData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeQueryViewData',
array(&$this->componentContext, &$id, &$query, &$this->db)
);
@@ -2324,7 +2218,7 @@ class Get
}
// check the length of the view name (+5 for com_ and _)
- $name_length = Config::get('component_code_name_length') + strlen(
+ $name_length = CFactory::_('Config')->component_code_name_length + strlen(
$view->name_single_code
) + 5;
// when the name is larger then 49 we need to add the assets table name fix
@@ -2373,44 +2267,48 @@ class Get
= false;
$this->customScriptBuilder['token'][$view->name_list_code] = false;
// set some placeholders
- $this->placeholders[$this->hhh . 'view' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('view')]
= $view->name_single_code;
- $this->placeholders[$this->hhh . 'views' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('views')]
= $view->name_list_code;
- $this->placeholders[$this->hhh . 'View' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('View')]
= StringHelper::safe(
$view->name_single, 'F'
);
- $this->placeholders[$this->hhh . 'Views' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('Views')]
= StringHelper::safe(
$view->name_list, 'F'
);
- $this->placeholders[$this->hhh . 'VIEW' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('VIEW')]
= StringHelper::safe(
$view->name_single, 'U'
);
- $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')]
= StringHelper::safe(
$view->name_list, 'U'
);
- $this->placeholders[$this->bbb . 'view' . $this->ddd]
- = $this->placeholders[$this->hhh . 'view' . $this->hhh];
- $this->placeholders[$this->bbb . 'views' . $this->ddd]
- = $this->placeholders[$this->hhh . 'views' . $this->hhh];
- $this->placeholders[$this->bbb . 'View' . $this->ddd]
- = $this->placeholders[$this->hhh . 'View' . $this->hhh];
- $this->placeholders[$this->bbb . 'Views' . $this->ddd]
- = $this->placeholders[$this->hhh . 'Views' . $this->hhh];
- $this->placeholders[$this->bbb . 'VIEW' . $this->ddd]
- = $this->placeholders[$this->hhh . 'VIEW' . $this->hhh];
- $this->placeholders[$this->bbb . 'VIEWS' . $this->ddd]
- = $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
+ CFactory::_('Placeholder')->active[Placefix::_('view')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('view')];
+ CFactory::_('Placeholder')->active[Placefix::_('views')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('views')];
+ CFactory::_('Placeholder')->active[Placefix::_('View')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('View')];
+ CFactory::_('Placeholder')->active[Placefix::_('Views')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('Views')];
+ CFactory::_('Placeholder')->active[Placefix::_('VIEW')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('VIEW')];
+ CFactory::_('Placeholder')->active[Placefix::_('VIEWS')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')];
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeModelViewData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeModelViewData',
array(&$this->componentContext, &$view, &$this->placeholders)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// add the tables
$view->addtables = (isset($view->addtables)
@@ -2436,9 +2334,9 @@ class Get
// set the view name
$tab['view'] = $view->name_single_code;
// load the dynamic data
- $tab['html'] = $this->setPlaceholders(
- $this->setDynamicValues($tab['html']),
- $this->placeholders
+ $tab['html'] = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($tab['html']),
+ CFactory::_('Placeholder')->active
);
// set the tab name
$tab['name'] = (isset($tab['name'])
@@ -2446,13 +2344,13 @@ class Get
$tab['name']
)) ? $tab['name'] : 'Tab';
// set lang
- $tab['lang'] = Config::get('lang_prefix') . '_'
+ $tab['lang'] = CFactory::_('Config')->lang_prefix . '_'
. StringHelper::safe(
$tab['view'], 'U'
) . '_' . StringHelper::safe(
$tab['name'], 'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'both', $tab['lang'], $tab['name']
);
// set code name
@@ -2464,7 +2362,7 @@ class Get
if (isset($tab['permission'])
&& $tab['permission'] == 1)
{
- $_tab = $this->_t(1);
+ $_tab = Indent::_(1);
}
// check if the php of the tab is set, if not load it now
if (strpos($tab['html'], 'bootstrap.addTab') === false
@@ -2472,31 +2370,31 @@ class Get
=== false)
{
// add the tab
- $tmp = PHP_EOL . $_tab . $this->_t(1)
+ $tmp = PHP_EOL . $_tab . Indent::_(1)
. "";
- $tmp .= PHP_EOL . $_tab . $this->_t(2)
+ $tmp .= PHP_EOL . $_tab . Indent::_(2)
. '';
- $tmp .= PHP_EOL . $_tab . $this->_t(1)
+ $tmp .= PHP_EOL . $_tab . Indent::_(3) . '';
+ $tmp .= PHP_EOL . $_tab . Indent::_(2) . '';
+ $tmp .= PHP_EOL . $_tab . Indent::_(1)
. "";
// update html
$tab['html'] = $tmp;
}
else
{
- $tab['html'] = PHP_EOL . $_tab . $this->_t(1)
+ $tab['html'] = PHP_EOL . $_tab . Indent::_(1)
. implode(
- PHP_EOL . $_tab . $this->_t(1),
+ PHP_EOL . $_tab . Indent::_(1),
(array) explode(PHP_EOL, trim($tab['html']))
);
}
@@ -2504,12 +2402,12 @@ class Get
if (isset($tab['permission'])
&& $tab['permission'] == 1)
{
- $tmp = PHP_EOL . $this->_t(1)
+ $tmp = PHP_EOL . Indent::_(1)
. "canDo->get('"
. $tab['view'] . "." . $tab['code']
. ".viewtab')) : ?>";
$tmp .= $tab['html'];
- $tmp .= PHP_EOL . $this->_t(1) . "";
+ $tmp .= PHP_EOL . Indent::_(1) . "";
// update html
$tab['html'] = $tmp;
// set lang for permissions
@@ -2518,19 +2416,17 @@ class Get
$tab['lang_permission_desc'] = $tab['lang']
. '_TAB_PERMISSION_DESC';
$tab['lang_permission_title']
- = $this->placeholders[$this->hhh
- . 'Views' . $this->hhh] . ' View '
+ = CFactory::_('Placeholder')->active[Placefix::_h('Views')] . ' View '
. $tab['name'] . ' Tab';
- $this->setLangContent(
+ CFactory::_('Language')->set(
'both', $tab['lang_permission'],
$tab['lang_permission_title']
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'both', $tab['lang_permission_desc'],
'Allow the users in this group to view '
. $tab['name'] . ' Tab of '
- . $this->placeholders[$this->hhh . 'views'
- . $this->hhh]
+ . CFactory::_('Placeholder')->active[Placefix::_h('views')]
);
// set the sort key
$tab['sortKey']
@@ -2712,7 +2608,7 @@ class Get
$tmpfield['settings'] = new stdClass();
// convert the xml json string to normal string
$tmpfield['settings']->xml
- = $this->setDynamicValues(
+ = CFactory::_('Customcode')->add(
json_decode(
$field['settings']->history->xml
)
@@ -2944,7 +2840,7 @@ class Get
$relationsValue['set']
))
{
- $relationsValue['set'] = $this->setDynamicValues(
+ $relationsValue['set'] = CFactory::_('Customcode')->add(
$relationsValue['set']
);
}
@@ -2984,14 +2880,14 @@ class Get
// confirm it should really make the over ride
if ('default' !== $check_column_name)
{
- $column_name_lang = Config::get('lang_prefix') . '_'
+ $column_name_lang = CFactory::_('Config')->lang_prefix . '_'
. StringHelper::safe(
$view->name_list_code, 'U'
) . '_'
. StringHelper::safe(
$relationsValue['column_name'], 'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'admin', $column_name_lang,
$relationsValue['column_name']
);
@@ -3019,10 +2915,10 @@ class Get
}
unset($view->addlinked_views);
// set the lang target
- $this->lang = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
if (isset($this->siteEditView[$id]))
{
- $this->lang = 'both';
+ CFactory::_('Config')->lang_target = 'both';
}
// set GUI mapper
$guiMapper = array('table' => 'admin_view', 'id' => (int) $id,
@@ -3147,8 +3043,8 @@ class Get
// set field
$guiMapper['field'] = $button_code_field;
$view->{$button_code_field}
- = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($view->{$button_code_field})
),
$guiMapper
@@ -3364,25 +3260,29 @@ class Get
unset($view->{'mysql_table_' . $_mysqlTableKey});
}
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterModelViewData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterModelViewData',
array(&$this->componentContext, &$view, &$this->placeholders)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// clear placeholders
- unset($this->placeholders[$this->hhh . 'view' . $this->hhh]);
- unset($this->placeholders[$this->hhh . 'views' . $this->hhh]);
- unset($this->placeholders[$this->hhh . 'View' . $this->hhh]);
- unset($this->placeholders[$this->hhh . 'Views' . $this->hhh]);
- unset($this->placeholders[$this->hhh . 'VIEW' . $this->hhh]);
- unset($this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]);
- unset($this->placeholders[$this->bbb . 'view' . $this->ddd]);
- unset($this->placeholders[$this->bbb . 'views' . $this->ddd]);
- unset($this->placeholders[$this->bbb . 'View' . $this->ddd]);
- unset($this->placeholders[$this->bbb . 'Views' . $this->ddd]);
- unset($this->placeholders[$this->bbb . 'VIEW' . $this->ddd]);
- unset($this->placeholders[$this->bbb . 'VIEWS' . $this->ddd]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_h('view')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_h('views')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_h('View')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_h('Views')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_h('VIEW')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('view')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('views')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('View')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('Views')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('VIEW')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('VIEWS')]);
// store this view to class object
$this->_adminViewData[$id] = $view;
@@ -3411,7 +3311,7 @@ class Get
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Trigger Event: jcb_ce_onBeforeQueryCustomViewData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeQueryCustomViewData',
array(&$this->componentContext, &$id, &$table, &$query, &$this->db)
);
@@ -3428,14 +3328,14 @@ class Get
$view->Code = StringHelper::safe($view->code, 'F');
$view->CODE = StringHelper::safe($view->code, 'U');
// Trigger Event: jcb_ce_onBeforeModelCustomViewData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeModelCustomViewData',
array(&$this->componentContext, &$view, &$id, &$table)
);
if ($table === 'site_view')
{
- $this->lang = 'site';
+ CFactory::_('Config')->lang_target = 'site';
// repeatable fields to update
$searchRepeatables = array(
// repeatablefield => checker
@@ -3445,7 +3345,7 @@ class Get
}
else
{
- $this->lang = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
// repeatable fields to update
$searchRepeatables = array(
// repeatablefield => checker
@@ -3468,8 +3368,8 @@ class Get
'field' => 'default', 'type' => 'html');
// set the default data
- $view->default = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(base64_decode($view->default)),
+ $view->default = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(base64_decode($view->default)),
$guiMapper
);
// load context if not set
@@ -3486,13 +3386,13 @@ class Get
$view->context = StringHelper::safe($view->context);
}
// load the library
- if (!isset($this->libManager[$this->target]))
+ if (!isset($this->libManager[CFactory::_('Config')->build_target]))
{
- $this->libManager[$this->target] = array();
+ $this->libManager[CFactory::_('Config')->build_target] = array();
}
- if (!isset($this->libManager[$this->target][$view->code]))
+ if (!isset($this->libManager[CFactory::_('Config')->build_target][$view->code]))
{
- $this->libManager[$this->target][$view->code] = array();
+ $this->libManager[CFactory::_('Config')->build_target][$view->code] = array();
}
// make sure json become array
if (JsonHelper::check($view->libraries))
@@ -3504,27 +3404,27 @@ class Get
{
foreach ($view->libraries as $library)
{
- if (!isset($this->libManager[$this->target][$view->code][$library]))
+ if (!isset($this->libManager[CFactory::_('Config')->build_target][$view->code][$library]))
{
if ($this->getMediaLibrary((int) $library))
{
- $this->libManager[$this->target][$view->code][(int) $library]
+ $this->libManager[CFactory::_('Config')->build_target][$view->code][(int) $library]
= true;
}
}
}
}
elseif (is_numeric($view->libraries)
- && !isset($this->libManager[$this->target][$view->code][(int) $view->libraries]))
+ && !isset($this->libManager[CFactory::_('Config')->build_target][$view->code][(int) $view->libraries]))
{
if ($this->getMediaLibrary((int) $view->libraries))
{
- $this->libManager[$this->target][$view->code][(int) $view->libraries]
+ $this->libManager[CFactory::_('Config')->build_target][$view->code][(int) $view->libraries]
= true;
}
}
// setup template array
- $this->templateData[$this->target][$view->code] = array();
+ $this->templateData[CFactory::_('Config')->build_target][$view->code] = array();
// setup template and layout data
$this->setTemplateAndLayoutData($view->default, $view->code);
// insure the uikit components are loaded
@@ -3540,13 +3440,13 @@ class Get
);
}
// check for footable
- if (!isset($this->footableScripts[$this->target][$view->code])
- || !$this->footableScripts[$this->target][$view->code])
+ if (!isset($this->footableScripts[CFactory::_('Config')->build_target][$view->code])
+ || !$this->footableScripts[CFactory::_('Config')->build_target][$view->code])
{
$foundFoo = $this->getFootableScripts($view->default);
if ($foundFoo)
{
- $this->footableScripts[$this->target][$view->code] = true;
+ $this->footableScripts[CFactory::_('Config')->build_target][$view->code] = true;
}
if ($foundFoo && !$this->footableScripts)
{
@@ -3554,13 +3454,13 @@ class Get
}
}
// check for get module
- if (!isset($this->getModule[$this->target][$view->code])
- || !$this->getModule[$this->target][$view->code])
+ if (!isset($this->getModule[CFactory::_('Config')->build_target][$view->code])
+ || !$this->getModule[CFactory::_('Config')->build_target][$view->code])
{
$found = $this->getGetModule($view->default);
if ($found)
{
- $this->getModule[$this->target][$view->code] = true;
+ $this->getModule[CFactory::_('Config')->build_target][$view->code] = true;
}
}
// set the main get data
@@ -3589,8 +3489,8 @@ class Get
{
// set field
$guiMapper['field'] = $scripter;
- $view->$scripter = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ $view->$scripter = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($view->$scripter)
),
$guiMapper
@@ -3598,7 +3498,7 @@ class Get
}
else
{
- $view->$scripter = $this->setDynamicValues(
+ $view->$scripter = CFactory::_('Customcode')->add(
base64_decode($view->$scripter)
);
}
@@ -3618,13 +3518,13 @@ class Get
$this->setTemplateAndLayoutData($view->$scripter, $view->code);
// check for footable
- if (!isset($this->footableScripts[$this->target][$view->code])
- || !$this->footableScripts[$this->target][$view->code])
+ if (!isset($this->footableScripts[CFactory::_('Config')->build_target][$view->code])
+ || !$this->footableScripts[CFactory::_('Config')->build_target][$view->code])
{
$foundFoo = $this->getFootableScripts($view->$scripter);
if ($foundFoo)
{
- $this->footableScripts[$this->target][$view->code]
+ $this->footableScripts[CFactory::_('Config')->build_target][$view->code]
= true;
}
if ($foundFoo && !$this->footable)
@@ -3633,13 +3533,13 @@ class Get
}
}
// check for google chart
- if (!isset($this->googleChart[$this->target][$view->code])
- || !$this->googleChart[$this->target][$view->code])
+ if (!isset($this->googleChart[CFactory::_('Config')->build_target][$view->code])
+ || !$this->googleChart[CFactory::_('Config')->build_target][$view->code])
{
$found = $this->getGoogleChart($view->$scripter);
if ($found)
{
- $this->googleChart[$this->target][$view->code] = true;
+ $this->googleChart[CFactory::_('Config')->build_target][$view->code] = true;
}
if ($found && !$this->googlechart)
{
@@ -3647,13 +3547,13 @@ class Get
}
}
// check for get module
- if (!isset($this->getModule[$this->target][$view->code])
- || !$this->getModule[$this->target][$view->code])
+ if (!isset($this->getModule[CFactory::_('Config')->build_target][$view->code])
+ || !$this->getModule[CFactory::_('Config')->build_target][$view->code])
{
$found = $this->getGetModule($view->$scripter);
if ($found)
{
- $this->getModule[$this->target][$view->code] = true;
+ $this->getModule[CFactory::_('Config')->build_target][$view->code] = true;
}
}
}
@@ -3662,7 +3562,7 @@ class Get
if (isset($view->add_php_ajax) && $view->add_php_ajax == 1)
{
// ajax target (since we only have two options really)
- if ('site' === $this->target)
+ if ('site' === CFactory::_('Config')->build_target)
{
$target = 'site';
}
@@ -3702,7 +3602,7 @@ class Get
if ($setAjax)
{
// turn on ajax area
- if ('site' === $this->target)
+ if ('site' === CFactory::_('Config')->build_target)
{
$this->addSiteAjax = true;
}
@@ -3729,8 +3629,8 @@ class Get
{
// set field
$guiMapper['field'] = $button_code_field;
- $view->{$button_code_field} = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ $view->{$button_code_field} = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($view->{$button_code_field})
),
$guiMapper
@@ -3749,7 +3649,7 @@ class Get
}
// Trigger Event: jcb_ce_onAfterModelCustomViewData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterModelCustomViewData',
array(&$this->componentContext, &$view)
);
@@ -3795,7 +3695,7 @@ class Get
);
// Trigger Event: jcb_ce_onBeforeQueryFieldData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeQueryFieldData',
array(&$this->componentContext, &$id, &$query, &$this->db)
);
@@ -3809,7 +3709,7 @@ class Get
$field = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelFieldData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeModelFieldData',
array(&$this->componentContext, &$field)
);
@@ -3834,7 +3734,7 @@ class Get
);
// load the values form params
- $field->xml = $this->setDynamicValues(json_decode($field->xml));
+ $field->xml = CFactory::_('Customcode')->add(json_decode($field->xml));
// check if we have validate (validation rule set)
$validationRule = GetHelper::between(
@@ -3871,13 +3771,13 @@ class Get
{
// open and set the validation rule
$this->validationRules[$validationRule]
- = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode(
$this->validationRules[$validationRule]
)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
array(
'table' => 'validation_rule',
@@ -3951,12 +3851,12 @@ class Get
$field->initiator_on_save_model
);
$field->initiator_save = explode(
- PHP_EOL, $this->setPlaceholders(
- $this->setDynamicValues(
+ PHP_EOL, CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode(
$field->initiator_on_save_model
)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
)
);
}
@@ -3968,28 +3868,28 @@ class Get
$field->initiator_on_get_model
);
$field->initiator_get = explode(
- PHP_EOL, $this->setPlaceholders(
- $this->setDynamicValues(
+ PHP_EOL, CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode(
$field->initiator_on_get_model
)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
)
);
}
// set the field modeling
$field->model_field['save'] = explode(
- PHP_EOL, $this->setPlaceholders(
- $this->setDynamicValues(
+ PHP_EOL, CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($field->on_save_model_field)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
)
);
$field->model_field['get'] = explode(
- PHP_EOL, $this->setPlaceholders(
- $this->setDynamicValues(
+ PHP_EOL, CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($field->on_get_model_field)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
)
);
// remove the original values
@@ -4000,7 +3900,7 @@ class Get
$field->history = $this->getHistoryWatch('field', $id);
// Trigger Event: jcb_ce_onAfterModelFieldData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterModelFieldData',
array(&$this->componentContext, &$field)
);
@@ -4496,8 +4396,8 @@ class Get
|| strpos($requeSt_id, '_request_catid') !== false)
{
// keep it then, don't change
- $name = $this->setPlaceholders(
- $requeSt_id, $this->placeholders
+ $name = CFactory::_('Placeholder')->update(
+ $requeSt_id, CFactory::_('Placeholder')->active
);
}
else
@@ -4508,20 +4408,20 @@ class Get
if (StringHelper::check($listViewName))
{
// check if we should use another Text Name as this views name
- $otherName = $this->setPlaceholders(
+ $otherName = CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'othername="', '"'
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
- $otherViews = $this->setPlaceholders(
+ $otherViews = CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'views="', '"'
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
- $otherView = $this->setPlaceholders(
+ $otherView = CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'view="', '"'
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
// This is to link other view category
if (StringHelper::check($otherName)
@@ -4561,10 +4461,10 @@ class Get
{
// get value from xml
$xml = FieldHelper::safe(
- $this->setPlaceholders(
+ CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'name="', '"'
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
)
);
// check if a value was found
@@ -4701,7 +4601,7 @@ class Get
foreach ($results as $_nr => &$result)
{
// Trigger Event: jcb_ce_onBeforeModelDynamicGetData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeModelDynamicGetData',
array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context)
);
@@ -4716,8 +4616,8 @@ class Get
// set GUI mapper field
$guiMapper['field'] = 'php_calculation';
$result->php_calculation
- = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($result->php_calculation)
),
$guiMapper
@@ -4734,8 +4634,8 @@ class Get
// set GUI mapper field
$guiMapper['field'] = 'php_router_parse';
$result->php_router_parse
- = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($result->php_router_parse)
),
$guiMapper
@@ -4770,7 +4670,7 @@ class Get
$guiMapper['prefix'] = PHP_EOL . PHP_EOL;
$this->setCustomScriptBuilder(
$result->{$script},
- $this->target . '_' . $script,
+ CFactory::_('Config')->build_target . '_' . $script,
$view_code,
false,
$guiMapper,
@@ -4790,8 +4690,8 @@ class Get
$guiMapper['prefix'] = PHP_EOL;
// only for custom gets
$result->{$script}
- = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($result->{$script})
),
$guiMapper
@@ -4859,8 +4759,8 @@ class Get
$guiMapper['field'] = 'php_custom_get';
// get the custom query
$customQueryString
- = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($result->php_custom_get)
),
$guiMapper
@@ -4989,12 +4889,12 @@ class Get
|| isset($_part_of_a[$join_field[0]])
|| isset($_part_of_a[$on_field[0]]))
{
- $this->siteMainGet[$this->target][$view_code][$option['as']]
+ $this->siteMainGet[CFactory::_('Config')->build_target][$view_code][$option['as']]
= $option['as'];
}
else
{
- $this->siteDynamicGet[$this->target][$view_code][$option['as']][$join_field[1]]
+ $this->siteDynamicGet[CFactory::_('Config')->build_target][$view_code][$option['as']][$join_field[1]]
= $on_field[0];
}
}
@@ -5003,7 +4903,7 @@ class Get
$result->custom_get[] = $option;
if ($on_field[0] != 'a')
{
- $this->siteDynamicGet[$this->target][$view_code][$option['as']][$join_field[1]]
+ $this->siteDynamicGet[CFactory::_('Config')->build_target][$view_code][$option['as']][$join_field[1]]
= $on_field[0];
}
}
@@ -5089,12 +4989,12 @@ class Get
|| isset($_part_of_a[$join_field[0]])
|| isset($_part_of_a[$on_field[0]]))
{
- $this->siteMainGet[$this->target][$view_code][$option1['as']]
+ $this->siteMainGet[CFactory::_('Config')->build_target][$view_code][$option1['as']]
= $option1['as'];
}
else
{
- $this->siteDynamicGet[$this->target][$view_code][$option1['as']][$join_field[1]]
+ $this->siteDynamicGet[CFactory::_('Config')->build_target][$view_code][$option1['as']][$join_field[1]]
= $on_field[0];
}
}
@@ -5103,7 +5003,7 @@ class Get
$result->custom_get[] = $option1;
if ($on_field[0] != 'a')
{
- $this->siteDynamicGet[$this->target][$view_code][$option1['as']][$join_field[1]]
+ $this->siteDynamicGet[CFactory::_('Config')->build_target][$view_code][$option1['as']][$join_field[1]]
= $on_field[0];
}
}
@@ -5127,10 +5027,10 @@ class Get
$option2['operator']
= $operatorArray[$option2['operator']];
$option2['state_key']
- = $this->setPlaceholders(
- $this->setDynamicValues(
+ = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
$option2['state_key']
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
$option2['key'] = $result->key;
}
@@ -5216,7 +5116,7 @@ class Get
$result->plugin_events = '';
}
// Trigger Event: jcb_ce_onAfterModelDynamicGetData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterModelDynamicGetData',
array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context)
);
@@ -5294,7 +5194,7 @@ class Get
// prep the script string
if ($base64 && $dynamic)
{
- $script = $this->setDynamicValues(base64_decode($script));
+ $script = CFactory::_('Customcode')->add(base64_decode($script));
}
elseif ($base64)
{
@@ -5302,7 +5202,7 @@ class Get
}
elseif ($dynamic) // this does not happen (just incase)
{
- $script = $this->setDynamicValues($script);
+ $script = CFactory::_('Customcode')->add($script);
}
// check if we still have a string
if (StringHelper::check($script))
@@ -5310,7 +5210,7 @@ class Get
// now load the placeholder snippet if needed
if ($base64 || $dynamic)
{
- $script = $this->setGuiCodePlaceholder($script, $config);
+ $script = CFactory::_('Customcode.Gui')->set($script, $config);
}
// add Dynamic HASHING option of a file/string
$script = $this->setDynamicHASHING($script);
@@ -5395,8 +5295,8 @@ class Get
}
// load the actual script
$script .= $prefix . str_replace(
- array_keys($this->placeholders),
- array_values($this->placeholders),
+ array_keys(CFactory::_('Placeholder')->active),
+ array_values(CFactory::_('Placeholder')->active),
$this->customScriptBuilder[$first][$second]
) . $sufix;
// clear some memory
@@ -5814,7 +5714,7 @@ class Get
// remove watch
if (isset($version_note['component'])
&& ($key = array_search(
- Config::get('component_id'), $version_note['component']
+ CFactory::_('Config')->component_id, $version_note['component']
)) !== false)
{
// last version that was used to build/compile
@@ -5830,9 +5730,9 @@ class Get
break;
case 1:
// add watch
- if (!in_array(Config::get('component_id'), $version_note['component']))
+ if (!in_array(CFactory::_('Config')->component_id, $version_note['component']))
{
- $version_note['component'][] = Config::get('component_id');
+ $version_note['component'][] = CFactory::_('Config')->component_id;
}
else
{
@@ -5913,9 +5813,9 @@ class Get
{
foreach ($templates as $template)
{
- if (!isset($this->templateData[$this->target][$view])
+ if (!isset($this->templateData[CFactory::_('Config')->build_target][$view])
|| !array_key_exists(
- $template, $this->templateData[$this->target][$view]
+ $template, $this->templateData[CFactory::_('Config')->build_target][$view]
))
{
$data = $this->getDataWithAlias(
@@ -5924,7 +5824,7 @@ class Get
if (ArrayHelper::check($data))
{
// load it to the template data array
- $this->templateData[$this->target][$view][$template]
+ $this->templateData[CFactory::_('Config')->build_target][$view][$template]
= $data;
// call self to get child data
$again[] = array($data['html'], $view);
@@ -5933,7 +5833,7 @@ class Get
}
// check if we have the template set (and nothing yet found)
if (!$found
- && isset($this->templateData[$this->target][$view][$template]))
+ && isset($this->templateData[CFactory::_('Config')->build_target][$view][$template]))
{
// something was found
$found = true;
@@ -5972,27 +5872,27 @@ class Get
{
// get the other target if both
$_target = null;
- if ($this->lang === 'both')
+ if (CFactory::_('Config')->lang_target === 'both')
{
- $_target = ($this->target === 'admin') ? 'site' : 'admin';
+ $_target = (CFactory::_('Config')->build_target === 'admin') ? 'site' : 'admin';
}
foreach ($layouts as $layout)
{
- if (!isset($this->layoutData[$this->target])
+ if (!isset($this->layoutData[CFactory::_('Config')->build_target])
|| !ArrayHelper::check(
- $this->layoutData[$this->target]
+ $this->layoutData[CFactory::_('Config')->build_target]
)
|| !array_key_exists(
- $layout, $this->layoutData[$this->target]
+ $layout, $this->layoutData[CFactory::_('Config')->build_target]
))
{
$data = $this->getDataWithAlias($layout, 'layout', $view);
if (ArrayHelper::check($data))
{
// load it to the layout data array
- $this->layoutData[$this->target][$layout] = $data;
+ $this->layoutData[CFactory::_('Config')->build_target][$layout] = $data;
// check if other target is set
- if ($this->lang === 'both' && $_target)
+ if (CFactory::_('Config')->lang_target === 'both' && $_target)
{
$this->layoutData[$_target][$layout] = $data;
}
@@ -6002,7 +5902,7 @@ class Get
}
}
// check if we have the layout set (and nothing yet found)
- if (!$found && isset($this->layoutData[$this->target][$layout]))
+ if (!$found && isset($this->layoutData[CFactory::_('Config')->build_target][$layout]))
{
// something was found
$found = true;
@@ -6060,8 +5960,8 @@ class Get
$this->db->quoteName('a.id') . ' = ' . (int) $ID
);
// get the other target if both
- $_targets = array($this->target);
- if ($this->lang === 'both')
+ $_targets = array(CFactory::_('Config')->build_target);
+ if (CFactory::_('Config')->lang_target === 'both')
{
$_targets = array('site', 'admin');
}
@@ -6073,8 +5973,8 @@ class Get
if ($row->add_php_view == 1
&& StringHelper::check($row->php_view))
{
- $php_view = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(base64_decode($row->php_view)),
+ $php_view = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(base64_decode($row->php_view)),
array(
'table' => $table,
'field' => 'php_view',
@@ -6082,8 +5982,8 @@ class Get
'type' => 'php')
);
}
- $contnent = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(base64_decode($row->{$table})),
+ $contnent = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(base64_decode($row->{$table})),
array(
'table' => $table,
'field' => $table,
@@ -6188,7 +6088,7 @@ class Get
return array(
'id' => $row->id,
- 'html' => $this->setGuiCodePlaceholder(
+ 'html' => CFactory::_('Customcode.Gui')->set(
$contnent,
array(
'table' => $table,
@@ -6197,7 +6097,7 @@ class Get
'type' => 'html'
)
),
- 'php_view' => $this->setGuiCodePlaceholder(
+ 'php_view' => CFactory::_('Customcode.Gui')->set(
$php_view,
array(
'table' => $table,
@@ -6460,8 +6360,8 @@ class Get
$library->php_setdocument
))
{
- $library->document = $this->setGuiCodePlaceholder(
- $this->setDynamicValues(
+ $library->document = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Customcode')->add(
base64_decode($library->php_setdocument)
),
array(
@@ -6515,156 +6415,11 @@ class Get
* @param string $content The content
*
* @return string The content with the updated Language place holder
- *
+ * @deprecated 3.3 Use CFactory::_('Language.Extractor')->engine($content)
*/
public function setLangStrings($content)
{
- // get targets to search for
- $langStringTargets = array_filter(
- $this->langStringTargets, function ($get) use ($content) {
- if (strpos($content, $get) !== false)
- {
- return true;
- }
-
- return false;
- }
- );
- // check if we should continue
- if (ArrayHelper::check($langStringTargets))
- {
- // insure string is not broken
- $content = $this->setPlaceholders($content, $this->placeholders);
- // reset some buckets
- $langHolders = array();
- $langCheck = array();
- $langOnly = array();
- $jsTEXT = array();
- $scTEXT = array();
- // first get the Joomla .JText._()
- if (in_array('Joomla' . '.JText._(', $langStringTargets))
- {
- $jsTEXT[] = GetHelper::allBetween(
- $content, "Joomla" . ".JText._('", "'"
- );
- $jsTEXT[] = GetHelper::allBetween(
- $content, 'Joomla' . '.JText._("', '"'
- );
- // combine into one array
- $jsTEXT = ArrayHelper::merge($jsTEXT);
- // we need to add a check to insure these JavaScript lang matchup
- if (ArrayHelper::check(
- $jsTEXT
- )) //<-- not really needed hmmm
- {
- // load the JS text to mismatch array
- $langCheck[] = $jsTEXT;
- $this->langMismatch = ArrayHelper::merge(
- array($jsTEXT, $this->langMismatch)
- );
- }
- }
- // now get the JText: :script()
- if (in_array('JText:' . ':script(', $langStringTargets))
- {
- $scTEXT[] = GetHelper::allBetween(
- $content, "JText:" . ":script('", "'"
- );
- $scTEXT[] = GetHelper::allBetween(
- $content, 'JText:' . ':script("', '"'
- );
- // combine into one array
- $scTEXT = ArrayHelper::merge($scTEXT);
- // we need to add a check to insure these JavaScript lang matchup
- if (ArrayHelper::check($scTEXT))
- {
- // load the Script text to match array
- $langCheck[] = $scTEXT;
- $this->langMatch = ArrayHelper::merge(
- array($scTEXT, $this->langMatch)
- );
- }
- }
- // now do the little trick for JustTEXT: :_('Just uppercase text');
- if (in_array('JustTEXT:' . ':_(', $langStringTargets))
- {
- $langOnly[] = GetHelper::allBetween(
- $content, "JustTEXT:" . ":_('", "')"
- );
- $langOnly[] = GetHelper::allBetween(
- $content, 'JustTEXT:' . ':_("', '")'
- );
- // merge lang only
- $langOnly = ArrayHelper::merge($langOnly);
- }
- // set language data
- foreach ($langStringTargets as $langStringTarget)
- {
- // need some special treatment here
- if ($langStringTarget === 'Joomla' . '.JText._('
- || $langStringTarget === 'JText:' . ':script('
- || $langStringTarget === 'JustTEXT:' . ':_(')
- {
- continue;
- }
- $langCheck[] = GetHelper::allBetween(
- $content, $langStringTarget . "'", "'"
- );
- $langCheck[] = GetHelper::allBetween(
- $content, $langStringTarget . '"', '"'
- );
- }
- // the normal loading of the language strings
- $langCheck = ArrayHelper::merge($langCheck);
- if (ArrayHelper::check(
- $langCheck
- )) //<-- not really needed hmmm
- {
- foreach ($langCheck as $string)
- {
- if ($keyLang = $this->setLang($string))
- {
- // load the language targets
- foreach ($langStringTargets as $langStringTarget)
- {
- // need some special treatment here
- if ($langStringTarget === 'JustTEXT:' . ':_(')
- {
- continue;
- }
- $langHolders[$langStringTarget . "'" . $string
- . "'"]
- = $langStringTarget . "'" . $keyLang . "'";
- $langHolders[$langStringTarget . '"' . $string
- . '"']
- = $langStringTarget . '"' . $keyLang . '"';
- }
- }
- }
- }
- // the uppercase loading only (for arrays and other tricks)
- if (ArrayHelper::check($langOnly))
- {
- foreach ($langOnly as $string)
- {
- if ($keyLang = $this->setLang($string))
- {
- // load the language targets
- $langHolders["JustTEXT:" . ":_('" . $string . "')"]
- = "'" . $keyLang . "'";
- $langHolders['JustTEXT:' . ':_("' . $string . '")']
- = '"' . $keyLang . '"';
- }
- }
- }
- // only continue if we have value to replace
- if (ArrayHelper::check($langHolders))
- {
- $content = $this->setPlaceholders($content, $langHolders);
- }
- }
-
- return $content;
+ return CFactory::_('Language.Extractor')->engine($content);
}
/**
@@ -6673,24 +6428,11 @@ class Get
* @param string $string The plan text string (English)
*
* @return string The key language string (all uppercase)
- *
+ * @deprecated 3.3 Use CFactory::_('Language')->key($string);
*/
public function setLang($string)
{
- // this is there to insure we dont break already added Language strings
- if (StringHelper::safe($string, 'U', '_', false, false)
- === $string)
- {
- return false;
- }
- // build lang key
- $keyLang = Config::get('lang_prefix') . '_' . StringHelper::safe(
- $string, 'U'
- );
- // set the language string
- $this->setLangContent($this->lang, $keyLang, $string);
-
- return $keyLang;
+ return CFactory::_('Language')->key($string);
}
/**
@@ -6722,7 +6464,7 @@ class Get
elseif ('view' === $type)
{
$view = $this->getViewTableName($asset);
- $table = '#__' . Config::get('component_code_name') . '_' . $view;
+ $table = '#__' . CFactory::_('Config')->component_code_name . '_' . $view;
$queryName = $view;
}
// just get all values from table if * is found
@@ -6836,9 +6578,9 @@ class Get
else
{
$querySelect = '$query->select($db->quoteName('
- . PHP_EOL . $this->_t(3) . 'array(' . implode(
+ . PHP_EOL . Indent::_(3) . 'array(' . implode(
',', $gets
- ) . '),' . PHP_EOL . $this->_t(3) . 'array('
+ ) . '),' . PHP_EOL . Indent::_(3) . 'array('
. implode(',', $keys) . ')));';
}
$queryFrom = '$db->quoteName(' . $this->db->quote($table)
@@ -7042,11 +6784,10 @@ class Get
// start building the MySql dump
$dump = "--";
$dump .= PHP_EOL . "-- Dumping data for table `#__"
- . $this->bbb . "component" . $this->ddd . "_" . $view
+ . Placefix::_( "component" ) . "_" . $view
. "`";
$dump .= PHP_EOL . "--";
- $dump .= PHP_EOL . PHP_EOL . "INSERT INTO `#__" . $this->bbb
- . "component" . $this->ddd . "_" . $view . "` (";
+ $dump .= PHP_EOL . PHP_EOL . "INSERT INTO `#__" . Placefix::_("component" ) . "_" . $view . "` (";
foreach ($data as $line)
{
$comaSet = 0;
@@ -7147,12 +6888,12 @@ class Get
*/
public function uniqueCode($code)
{
- if (!isset($this->uniquecodes[$this->target])
+ if (!isset($this->uniquecodes[CFactory::_('Config')->build_target])
|| !in_array(
- $code, $this->uniquecodes[$this->target]
+ $code, $this->uniquecodes[CFactory::_('Config')->build_target]
))
{
- $this->uniquecodes[$this->target][] = $code;
+ $this->uniquecodes[CFactory::_('Config')->build_target][] = $code;
return $code;
}
@@ -7262,25 +7003,11 @@ class Get
* dynamic build values if it gets broken
*
* @return string
- *
+ * @deprecated 3.3 Use CFactory::_('Customcode')->add($string, $debug);
*/
public function setDynamicValues($string, $debug = 0)
{
- if (StringHelper::check($string))
- {
- $string = $this->setLangStrings(
- $this->setCustomCodeData(
- $this->setExternalCodeString($string, $debug), $debug
- )
- );
- }
- // if debug
- if ($debug)
- {
- jexit();
- }
-
- return $string;
+ return CFactory::_('Customcode')->add($string, $debug);
}
/**
@@ -7290,94 +7017,11 @@ class Get
* @param int $debug The switch to debug the update
*
* @return string
- *
+ * @deprecated 3.3 Use CFactory::_('Customcode.External')->set($string, $debug);
*/
public function setExternalCodeString($string, $debug = 0)
{
- // check if content has custom code placeholder
- if (strpos($string, '[EXTERNA' . 'LCODE=') !== false)
- {
- // if debug
- if ($debug)
- {
- echo 'External Code String:';
- var_dump($string);
- }
- // target content
- $bucket = array();
- $found = GetHelper::allBetween(
- $string, '[EXTERNA' . 'LCODE=', ']'
- );
- if (ArrayHelper::check($found))
- {
- // build local bucket
- foreach ($found as $target)
- {
- // check for cutting sequence
- // example: >{3|4
- // will cut 3 rows at top and 4 rows at bottom
- // if the external code has 8 or more lines
- if (($pos = strpos($target, '>{')) !== false)
- {
- // the length
- $target_len = strlen($target);
- // where to cut
- $cutting = $target_len - $pos;
- // get the sequence
- $sequence = substr($target, "-$cutting");
- // remove from the URL
- $target_url = str_replace($sequence, '', $target);
- // set the cut key for this target if not set
- $this->externalCodeCutter[trim($target)] = str_replace('>{', '', $sequence);
- }
- else
- {
- $target_url = $target;
- }
- // check if the target is valid URL or path
- if ((!filter_var($target_url, FILTER_VALIDATE_URL) === false
- && ComponentbuilderHelper::urlExists($target_url))
- || (JPath::clean($target_url) === $target_url
- && File::exists($target_url)))
- {
- $this->getExternalCodeString($target, $bucket);
- }
- // give notice that target is not a valid url/path
- else
- {
- // set key
- $key = '[EXTERNA' . 'LCODE=' . $target . ']';
- // set the notice
- $this->app->enqueueMessage(
- JText::_(
- 'External Code Warning '
- ), 'Warning'
- );
- $this->app->enqueueMessage(
- JText::sprintf(
- 'The %s is not a valid url/path!',
- $key
- ), 'Warning'
- );
- // remove the placeholder
- $bucket[$key] = '';
- }
- }
- // now update local string if bucket has values
- if (ArrayHelper::check($bucket))
- {
- $string = $this->setPlaceholders($string, $bucket);
- }
- }
- // if debug
- if ($debug)
- {
- echo 'External Code String After Update:';
- var_dump($string);
- }
- }
-
- return $string;
+ return CFactory::_('Customcode.External')->set($string, $debug);
}
/**
@@ -7387,161 +7031,19 @@ class Get
* @param array $bucket The Placeholders bucket
*
* @return void
- *
+ * @deprecated 3.3
*/
protected function getExternalCodeString($target, &$bucket)
{
- // set URL key
- $target_key = trim($target);
- // set key
- $key = '[EXTERNA' . 'LCODE=' . $target . ']';
- // remove the cut sequence from the url
- if (isset($this->externalCodeCutter[$target_key]))
- {
- // remove from the URL
- $target_url = trim(str_replace('>{' . $this->externalCodeCutter[$target_key], '', $target));
- }
- else
- {
- $target_url = trim($target);
- }
- // check if we already fetched this
- if (!isset($this->externalCodeString[$target_key]))
- {
- // get the data string (code)
- $this->externalCodeString[$target_key]
- = FileHelper::getContent($target_url);
- // check if we must cut this
- if (isset($this->externalCodeCutter[$target_key]) &&
- $this->externalCodeCutter[$target_key])
- {
- $this->externalCodeString[$target_key] = $this->cutExternalCodeString(
- $this->externalCodeString[$target_key],
- $this->externalCodeCutter[$target_key],
- $key
- );
- }
- // did we get any value
- if (StringHelper::check(
- $this->externalCodeString[$target_key]
- ))
- {
- // check for changes
- $live_hash = md5($this->externalCodeString[$target_key]);
- // check if it exists local
- if ($hash = GetHelper::var(
- 'external_code', $target_key, 'target', 'hash'
- ))
- {
- // must be an admin make a change to use EXTERNAL code (we may add a custom access switch - use ADMIN for now)
- if ($hash !== $live_hash && $this->user->authorise(
- 'core.admin', 'com_componentbuilder'
- ))
- {
- // update the hash since it changed
- $object = new stdClass();
- $object->target = $target_key;
- $object->hash = $live_hash;
- // update local hash
- $this->db->updateObject(
- '#__componentbuilder_external_code', $object,
- 'target'
- );
- // give notice of the change
- $this->app->enqueueMessage(
- JText::_('External Code Warning '),
- 'Warning'
- );
- $this->app->enqueueMessage(
- JText::sprintf(
- 'The code/string from %s has been changed since the last compilation. Please investigate to ensure the changes are safe! Should you not expect this change to the external code/string being added, then this is a serious issue! and requires immediate attention! Do not ignore this warning as it will only show once .',
- $key
- ), 'Warning'
- );
- }
- elseif ($hash !== $live_hash)
- {
- // set the notice
- $this->app->enqueueMessage(
- JText::_('External Code Error '),
- 'Error'
- );
- $this->app->enqueueMessage(
- JText::sprintf(
- '%s, we detected a change in EXTERNALCODE , but you do not have permission to allow this change so %s was removed from the compilation. Please contact your system administrator for more info!(admin access required) ',
- $this->user->get('name'), $key
- ), 'Error'
- );
- // remove the code/string
- $this->externalCodeString[$target_key] = '';
- }
- }
- // only an admin can add new EXTERNAL code (we may add a custom access switch - use ADMIN for now)
- elseif ($this->user->authorise(
- 'core.admin', 'com_componentbuilder'
- ))
- {
- // add the hash to track changes
- $object = new stdClass();
- $object->target = $target_key;
- $object->hash = $live_hash;
- // insert local hash
- $this->db->insertObject(
- '#__componentbuilder_external_code', $object
- );
- // give notice the first time this is added
- $this->app->enqueueMessage(
- JText::_('External Code Notice '),
- 'Warning'
- );
- $this->app->enqueueMessage(
- JText::sprintf(
- 'The code/string from %s has been added for the first time . Please investigate to ensure the correct code/string was used! Should you not know about this NEW external code/string being added, then this is a serious danger! and requires immediate attention! Do not ignore this warning as it will only show once .',
- $key
- ), 'Warning'
- );
- }
- else
- {
- // set the notice
- $this->app->enqueueMessage(
- JText::_('External Code Error '),
- 'Error'
- );
- $this->app->enqueueMessage(
- JText::sprintf(
- '%s, we detected NEW EXTERNALCODE , but you do not have permission to allow this new code/string so %s was removed from the compilation. Please contact you system administrator for more info!(admin access required) ',
- $this->user->get('name'), $key
- ), 'Error'
- );
- // remove the code/string
- $this->externalCodeString[$target_key] = '';
- }
- }
- else
- {
- // set notice that we could not get a valid string from the target
- $this->app->enqueueMessage(
- JText::_('External Code Warning '), 'Error'
- );
- $this->app->enqueueMessage(
- JText::sprintf(
- 'The %s returned an invalid string!', $key
- ), 'Error'
- );
- }
- }
- // add to local bucket
- if (isset($this->externalCodeString[$target_key]))
- {
- // update the placeholder with the external code string
- $bucket[$key] = $this->externalCodeString[$target_key];
- }
- else
- {
- // remove the placeholder
- $bucket[$key] = '';
- }
+ // set notice that we could not get a valid string from the target
+ $this->app->enqueueMessage(
+ JText::_('External Code Warning '), 'Error'
+ );
+ $this->app->enqueueMessage(
+ JText::_(
+ 'Use of a deprecated method (getExternalCodeString)!'
+ ), 'Error'
+ );
}
/**
@@ -7552,41 +7054,17 @@ class Get
* @param string $key The content key
*
* @return string
- *
+ * @deprecated 3.3
*/
protected function cutExternalCodeString($string, $sequence, $key)
{
- // we first break the string up in rows
- $rows = (array) explode(PHP_EOL, $string);
- // get the cutting sequence
- $cutter = (array) explode('|', $sequence);
- // we only continue if we have more rows than we have to cut
- if (array_sum($cutter) < ArrayHelper::check($rows))
- {
- // remove the rows at the bottom if needed
- if (isset($cutter[1]) && $cutter[1] > 0)
- {
- array_splice($rows, "-$cutter[1]");
- }
- // remove the rows at the top if needed
- if ($cutter[0] > 0)
- {
- $rows = array_splice($rows, $cutter[0]);
- }
-
- // return the remaining rows
- return implode(PHP_EOL, $rows);
- }
-
- // we set an error message about too few lines to cut
+ // set notice that we could not get a valid string from the target
$this->app->enqueueMessage(
- JText::_('External Code Notice '),
- 'Error'
+ JText::_('External Code Warning '), 'Error'
);
$this->app->enqueueMessage(
- JText::sprintf(
- 'The %s cut sequence failed on the returned external code/string as more lines has to be cut then was found in the code/string. We have completely removed the code. Please check this code/string!',
- $key
+ JText::_(
+ 'Use of a deprecated method (cutExternalCodeString)!'
), 'Error'
);
@@ -7600,182 +7078,11 @@ class Get
* @param int $debug The switch to debug the update
*
* @return string
- *
+ * @deprecated 3.3 Use CFactory::_('Customcode')->set($string, $debug, $not);
*/
public function setCustomCodeData($string, $debug = 0, $not = null)
{
- // insure the code is loaded
- $loaded = false;
- // check if content has custom code place holder
- if (strpos($string, '[CUSTO' . 'MCODE=') !== false)
- {
- // if debug
- if ($debug)
- {
- echo 'Custom Code String:';
- var_dump($string);
- }
- // the ids found in this content
- $bucket = array();
- $found = GetHelper::allBetween(
- $string, '[CUSTO' . 'MCODE=', ']'
- );
- if (ArrayHelper::check($found))
- {
- foreach ($found as $key)
- {
- // if debug
- if ($debug)
- {
- echo '$key before update:';
- var_dump($key);
- }
- // check if we have args
- if (is_numeric($key))
- {
- $id = (int) $key;
- }
- elseif (StringHelper::check($key)
- && strpos(
- $key, '+'
- ) === false)
- {
- $getFuncName = trim($key);
- if (!isset($this->functionNameMemory[$getFuncName]))
- {
- if (!$found_local = GetHelper::var(
- 'custom_code', $getFuncName, 'function_name',
- 'id'
- ))
- {
- continue;
- }
- $this->functionNameMemory[$getFuncName]
- = $found_local;
- }
- $id = (int) $this->functionNameMemory[$getFuncName];
- }
- elseif (StringHelper::check($key)
- && strpos(
- $key, '+'
- ) !== false)
- {
- $array = explode('+', $key);
- // set ID
- if (is_numeric($array[0]))
- {
- $id = (int) $array[0];
- }
- elseif (StringHelper::check($array[0]))
- {
- $getFuncName = trim($array[0]);
- if (!isset($this->functionNameMemory[$getFuncName]))
- {
- if (!$found_local
- = GetHelper::var(
- 'custom_code', $getFuncName,
- 'function_name', 'id'
- ))
- {
- continue;
- }
- $this->functionNameMemory[$getFuncName]
- = $found_local;
- }
- $id = (int) $this->functionNameMemory[$getFuncName];
- }
- else
- {
- continue;
- }
- // load args for this ID
- if (isset($array[1]))
- {
- if (!isset($this->customCodeData[$id]['args']))
- {
- $this->customCodeData[$id]['args'] = array();
- }
- // only load if not already loaded
- if (!isset($this->customCodeData[$id]['args'][$key]))
- {
- if (strpos($array[1], ',') !== false)
- {
- // update the function values with the custom code key placholdres (this allow the use of [] + and , in the values)
- $this->customCodeData[$id]['args'][$key]
- = array_map(
- function ($_key) {
- return $this->setPlaceholders(
- $_key,
- $this->customCodeKeyPlacholders
- );
- }, (array) explode(',', $array[1])
- );
- }
- elseif (StringHelper::check(
- $array[1]
- ))
- {
- $this->customCodeData[$id]['args'][$key]
- = array();
- // update the function values with the custom code key placholdres (this allow the use of [] + and , in the values)
- $this->customCodeData[$id]['args'][$key][]
- = $this->setPlaceholders(
- $array[1],
- $this->customCodeKeyPlacholders
- );
- }
- }
- }
- }
- else
- {
- continue;
- }
- // make sure to remove the not if set
- if ($not && is_numeric($not) && $not > 0 && $not == $id)
- {
- continue;
- }
- $bucket[$id] = $id;
- }
- }
- // if debug
- if ($debug)
- {
- echo 'Bucket:';
- var_dump($bucket);
- }
- // check if any custom code placeholders where found
- if (ArrayHelper::check($bucket))
- {
- $_tmpLang = $this->lang;
- // insure we add the langs to both site and admin
- $this->lang = 'both';
- // now load the code to memory
- $loaded = $this->getCustomCode($bucket, false, $debug);
- // revert lang to current setting
- $this->lang = $_tmpLang;
- }
- // if debug
- if ($debug)
- {
- echo 'Loaded:';
- var_dump($loaded);
- }
- // when the custom code is loaded
- if ($loaded === true)
- {
- $string = $this->insertCustomCode($bucket, $string, $debug);
- }
- // if debug
- if ($debug)
- {
- echo 'Custom Code String After Update:';
- var_dump($string);
- }
- }
-
- return $string;
+ return CFactory::_('Customcode')->set($string, $debug, $not);
}
/**
@@ -7785,29 +7092,21 @@ class Get
* @param int $debug The switch to debug the update
*
* @return string on success
- *
+ * @deprecated 3.3
*/
protected function insertCustomCode($ids, $string, $debug = 0)
{
- $code = array();
- // load the code
- foreach ($ids as $id)
- {
- $this->buildCustomCodePlaceholders(
- $this->customCodeMemory[$id], $code, $debug
- );
- }
- // if debug
- if ($debug)
- {
- echo 'Place holders to Update String:';
- var_dump($code);
- echo 'Custom Code String Before Update:';
- var_dump($string);
- }
+ // set notice that we could not get a valid string from the target
+ $this->app->enqueueMessage(
+ JText::_('External Code Warning '), 'Error'
+ );
+ $this->app->enqueueMessage(
+ JText::_(
+ 'Use of a deprecated method (insertCustomCode)!'
+ ), 'Error'
+ );
- // now update the string
- return $this->setPlaceholders($string, $code);
+ return '';
}
/**
@@ -7817,73 +7116,21 @@ class Get
* @param int $debug The switch to debug the update
*
* @return string on success
- *
+ * @deprecated 3.3
*/
protected function buildCustomCodePlaceholders($item, &$code, $debug = 0)
{
- // check if there is args for this code
- if (isset($this->customCodeData[$item['id']]['args'])
- && ArrayHelper::check(
- $this->customCodeData[$item['id']]['args']
- ))
- {
- // since we have args we cant update this code via IDE (TODO)
- $placeholder = $this->getPlaceHolder(3, null);
- // if debug
- if ($debug)
- {
- echo 'Custom Code Placeholders:';
- var_dump($placeholder);
- }
- // we have args and so need to load each
- foreach (
- $this->customCodeData[$item['id']]['args'] as $key => $args
- )
- {
- $this->setThesePlaceHolders('arg', $args);
- // if debug
- if ($debug)
- {
- echo 'Custom Code Global Placholders:';
- var_dump($this->placeholders);
- }
- $code['[CUSTOM' . 'CODE=' . $key . ']'] = $placeholder['start']
- . PHP_EOL . $this->setPlaceholders(
- $item['code'], $this->placeholders
- ) . $placeholder['end'];
- }
- // always clear the args
- $this->clearFromPlaceHolders('arg');
- }
- else
- {
- if (($keyPlaceholder = array_search(
- $item['id'], $this->functionNameMemory
- )) === false)
- {
- $keyPlaceholder = $item['id'];
- }
- // check what type of place holders we should load here
- $placeholderType = (int) $item['comment_type'] . '2';
- if (stripos($item['code'], $this->bbb . 'view') !== false
- || stripos($item['code'], $this->bbb . 'sview') !== false
- || stripos($item['code'], $this->bbb . 'arg') !== false)
- {
- // if view is being set dynamicly then we can't update this code via IDE (TODO)
- $placeholderType = 3;
- }
- // if now ars were found, clear it
- $this->clearFromPlaceHolders('arg');
- // load args for this code
- $placeholder = $this->getPlaceHolder(
- $placeholderType, $item['id']
- );
- $code['[CUSTOM' . 'CODE=' . $keyPlaceholder . ']']
- = $placeholder['start'] . PHP_EOL
- . $this->setPlaceholders(
- $item['code'], $this->placeholders
- ) . $placeholder['end'];
- }
+ // set notice that we could not get a valid string from the target
+ $this->app->enqueueMessage(
+ JText::_('External Code Warning '), 'Error'
+ );
+ $this->app->enqueueMessage(
+ JText::_(
+ 'Use of a deprecated method (buildCustomCodePlaceholders)!'
+ ), 'Error'
+ );
+
+ return '';
}
/**
@@ -7893,21 +7140,12 @@ class Get
* @param array $values The values to add
*
* @return void
+ * @deprecated 3.3 Use CFactory::_('Placeholder')->setType($key, $values);
*/
public function setThesePlaceHolders($key, $values)
{
- // aways fist reset these
- $this->clearFromPlaceHolders($key);
- if (ArrayHelper::check($values))
- {
- $number = 0;
- foreach ($values as $value)
- {
- $this->placeholders[$this->bbb . $key . $number . $this->ddd]
- = $value;
- $number++;
- }
- }
+ // use the new container class
+ CFactory::_('Placeholder')->setType($key, $values);
}
/**
@@ -7916,16 +7154,12 @@ class Get
* @param string $like The main string for placeholder key
*
* @return void
+ * @deprecated 3.3 Use CFactory::_('Placeholder')->clearType($key);
*/
public function clearFromPlaceHolders($like)
{
- foreach ($this->placeholders as $something => $value)
- {
- if (stripos($something, $like) !== false)
- {
- unset($this->placeholders[$something]);
- }
- }
+ // use the new container class
+ CFactory::_('Placeholder')->clearType($like);
}
/**
@@ -7998,7 +7232,7 @@ class Get
$counterUpdate = 0;
$today = JFactory::getDate()->toSql();
foreach (
- $this->languages[$target][Config::get('lang_tag', 'en-GB')] as $area => $placeholders
+ $this->languages[$target][CFactory::_('Config')->get('lang_tag', 'en-GB')] as $area => $placeholders
)
{
foreach ($placeholders as $placeholder => $string)
@@ -8455,130 +7689,40 @@ class Get
/**
* get the custom code from the system
*
- * @return void
+ * @param array|null $ids The custom code ides if known
+ * @param int|null $setLang The set lang switch
+ * @param int $debug The switch to debug the update
*
+ * @return void
+ * @deprecated 3.3 Use CFactory::_('Customcode')->load($ids, $setLang, $debug);
*/
- public function getCustomCode($ids = null, $setLang = true, $debug = 0)
+ public function getCustomCode(?array $ids = null, bool $setLang = true, int $debug = 0)
{
- // should the result be stored in memory
- $loadInMemory = false;
- // Create a new query object.
- $query = $this->db->getQuery(true);
- $query->from(
- $this->db->quoteName('#__componentbuilder_custom_code', 'a')
- );
+ CFactory::_('Customcode')->load($ids, $setLang, $debug);
+ }
+
+ /**
+ * check if we already have these ids in local memory
+ *
+ * @return void
+ * @deprecated 3.3
+ */
+ protected function checkCustomCodeMemory($ids)
+ {
+ // reset custom code
+ CFactory::_('Customcode')->active = array();
+ foreach ($ids as $pointer => $id)
+ {
+ if (isset(CFactory::_('Customcode')->memory[$id]))
+ {
+ CFactory::_('Customcode')->active[] = CFactory::_('Customcode')->memory[$id];
+ unset($ids[$pointer]);
+ }
+ }
+ // check if any ids left to fetch
if (ArrayHelper::check($ids))
{
- if ($idArray = $this->checkCustomCodeMemory($ids))
- {
- $query->select(
- $this->db->quoteName(
- array('a.id', 'a.code', 'a.comment_type')
- )
- );
- $query->where(
- $this->db->quoteName('a.id') . ' IN (' . implode(
- ',', $idArray
- ) . ')'
- );
- $query->where(
- $this->db->quoteName('a.target') . ' = 2'
- ); // <--- to load the correct target
- $loadInMemory = true;
- }
- else
- {
- // all values are already in memory continue
- return true;
- }
- }
- else
- {
- $query->select(
- $this->db->quoteName(
- array('a.id', 'a.code', 'a.comment_type', 'a.component',
- 'a.from_line', 'a.hashtarget', 'a.hashendtarget',
- 'a.path', 'a.to_line', 'a.type')
- )
- );
- $query->where(
- $this->db->quoteName('a.component') . ' = '
- . (int) $this->componentData->id
- );
- $query->where(
- $this->db->quoteName('a.target') . ' = 1'
- ); // <--- to load the correct target
- $query->order(
- $this->db->quoteName('a.from_line') . ' ASC'
- ); // <--- insure we always add code from top of file
- // reset custom code
- $this->customCode = array();
- }
- $query->where($this->db->quoteName('a.published') . ' >= 1');
- $this->db->setQuery($query);
- $this->db->execute();
- if ($this->db->getNumRows())
- {
- $bucket = $this->db->loadAssocList('id');
- // open the code
- foreach ($bucket as $nr => &$customCode)
- {
- $customCode['code'] = base64_decode($customCode['code']);
- // always insure that the external code is loaded
- $customCode['code'] = $this->setExternalCodeString(
- $customCode['code']
- );
- // set the lang only if needed
- if ($setLang)
- {
- $customCode['code'] = $this->setLangStrings(
- $customCode['code']
- );
- }
- // check for more custom code (since this is a custom code placeholder)
- else
- {
- $customCode['code'] = $this->setCustomCodeData(
- $customCode['code'], $debug, $nr
- );
- }
- // build the hash array
- if (isset($customCode['hashtarget']))
- {
- $customCode['hashtarget'] = explode(
- "__", $customCode['hashtarget']
- );
- // is this a replace code, set end has array
- if ($customCode['type'] == 1
- && strpos(
- $customCode['hashendtarget'], '__'
- ) !== false)
- {
- $customCode['hashendtarget'] = explode(
- "__", $customCode['hashendtarget']
- );
- // NOW see if this is an end of page target (TODO not sure if the string is always d41d8cd98f00b204e9800998ecf8427e)
- // I know this fix is not air-tight, but it should work as the value of an empty line when md5'ed is ^^^^
- // Then if the line number is only >>>one<<< it is almost always end of the page.
- // So I am using those two values to detect end of page replace ending, to avoid mismatching the ending target hash.
- if ($customCode['hashendtarget'][0] == 1
- && 'd41d8cd98f00b204e9800998ecf8427e'
- === $customCode['hashendtarget'][1])
- {
- // unset since this will force the replacement unto end of page.
- unset($customCode['hashendtarget']);
- }
- }
- }
- }
- // load this code into memory if needed
- if ($loadInMemory === true)
- {
- $this->customCodeMemory = $this->customCodeMemory + $bucket;
- }
- $this->customCode = array_merge($this->customCode, $bucket);
-
- return true;
+ return $ids;
}
return false;
@@ -8588,374 +7732,43 @@ class Get
* get all the powers linkd to this component
*
* @return void
- *
+ * @deprecated 3.3 Use CFactory::_('Power')->load($guids);
*/
protected function getPowers($guids)
{
- if (ArrayHelper::check($guids))
- {
- foreach ($guids as $guid => $build)
- {
- $this->getPower($guid, $build);
- }
- }
+ CFactory::_('Power')->load($guids);
}
/**
* get a power linkd to this component
*
* @return mixed
- *
+ * @deprecated 3.3 Use CFactory::_('Power')->get($guid, $build);
*/
public function getPower($guid, $build = 0)
{
- if ((Config::get('add_power', true) || $build == 1) && $this->setPower($guid))
- {
- return $this->powers[$guid];
- }
-
- return false;
+ CFactory::_('Power')->get($guid, $build);
}
/**
* set a power linkd to this component
*
* @return bool
- *
+ * @deprecated 3.3
*/
protected function setPower($guid)
{
- // check if we have been here before
- if (isset($this->statePowers[$guid]))
- {
- return $this->statePowers[$guid];
- }
- elseif (GuidHelper::valid($guid))
- {
- // Create a new query object.
- $query = $this->db->getQuery(true);
+ // set notice that we could not get a valid string from the target
+ $this->app->enqueueMessage(
+ JText::_('Power building error '), 'Error'
+ );
+ $this->app->enqueueMessage(
+ JText::_(
+ 'Use of a deprecated method (setPower)!'
+ ), 'Error'
+ );
- $query->select('a.*');
- // from these tables
- $query->from('#__componentbuilder_power AS a');
- $query->where($this->db->quoteName('a.guid') . ' = ' . $this->db->quote($guid));
- $this->db->setQuery($query);
- $this->db->execute();
- if ($this->db->getNumRows())
- {
- // make sure that in recursion we
- // don't try to load this power again
- $this->statePowers[$guid] = true;
- // get the power data
- $power = $this->db->loadObject();
- // we set the fix usr if needed
- $fix_url
- = '"index.php?option=com_componentbuilder&view=powers&task=power.edit&id='
- . $power->id . '" target="_blank"';
- // set some keys
- $power->target_type = 'P0m3R!';
- $power->key = $power->id . '_' . $power->target_type;
- // now set the name
- $power->name = $this->setPlaceholders(
- $this->setDynamicValues($power->name),
- $this->placeholders
- );
- // now set the code_name and class name
- $power->code_name = $power->class_name = ClassfunctionHelper::safe(
- $power->name
- );
- // set official name
- $power->official_name = StringHelper::safe(
- $power->name, 'W'
- );
- // set namespace
- $power->namespace = $this->setPlaceholders(
- $power->namespace, $this->placeholders
- );
- // validate namespace
- if (strpos($power->namespace, '\\') === false)
- {
- // we raise an error message
- $this->app->enqueueMessage(
- JText::sprintf('%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.
',
- ucfirst($power->type), $power->name, $power->namespace,
- '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $power->type,
- $fix_url),
- 'Error'
- );
- $this->statePowers[$guid] = false;
-
- // we break out here
- return false;
- }
- else
- {
- // setup the path array
- $path_array = (array) explode('\\', $power->namespace);
- // make sure all sub folders in src dir is set and remove all characters that will not work in folders naming
- $power->namespace = NamespaceHelper::safe(str_replace('.', '\\', $power->namespace));
- // make sure it has two or more
- if (ArrayHelper::check($path_array) <= 1)
- {
- // we raise an error message
- $this->app->enqueueMessage(
- JText::sprintf('%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.
',
- ucfirst($power->type), $power->name, $power->namespace,
- '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $power->type,
- $fix_url),
- 'Error'
- );
- $this->statePowers[$guid] = false;
-
- // we break out here
- return false;
- }
- // get the file and class name (the last value in array)
- $file_name = array_pop($path_array);
- // src array bucket
- $src_array = array();
- // do we have src folders
- if (strpos($file_name, '.') !== false)
- {
- // we have src folders in the namespace
- $src_array = (array) explode('.', $file_name);
- // get the file and class name (the last value in array)
- $power->file_name = array_pop($src_array);
- // namespace array
- $namespace_array = array_merge($path_array, $src_array);
- }
- else
- {
- // set the file name
- $power->file_name = $file_name;
- // namespace array
- $namespace_array = $path_array;
- }
- // the last value is the same as the class name
- if ($power->file_name !== $power->class_name)
- {
- // we raise an error message
- $this->app->enqueueMessage(
- JText::sprintf('%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.
',
- ucfirst($power->type), $power->name, $power->type, $power->class_name, $power->file_name,
- '"https://www.php-fig.org/psr/psr-4/" target="_blank"',
- $fix_url),
- 'Error'
- );
- $this->statePowers[$guid] = false;
-
- // we break out here
- return false;
- }
- // make sure the arrays are namespace safe
- $path_array = array_map(function ($val) {
- return NamespaceHelper::safe($val);
- }, $path_array);
- $namespace_array = array_map(function ($val) {
- return NamespaceHelper::safe($val);
- }, $namespace_array);
- // set the actual class namespace
- $power->_namespace = implode('\\', $namespace_array);
- // prefix values
- $power->_namespace_prefix = $path_array;
- // get the parent folder (the first value in array)
- $prefix_folder = implode('.', $path_array);
- // make sub folders if still found
- $sub_folder = '';
- if (ArrayHelper::check($src_array))
- {
- // make sure the arrays are namespace safe
- $sub_folder = '/' . implode('/', array_map(function ($val) {
- return NamespaceHelper::safe($val);
- }, $src_array));
- }
- // now we set the paths
- $power->path_jcb = Config::get('jcb_powers_path', 'libraries/jcb_powers');
- $power->path_parent = $power->path_jcb . '/' . $prefix_folder;
- $power->path = $power->path_parent . '/src' . $sub_folder;
- }
- // load use ids
- $use = array();
- $as = array();
- // check if we have use selection
- $power->use_selection = (isset($power->use_selection)
- && JsonHelper::check(
- $power->use_selection
- )) ? json_decode($power->use_selection, true) : null;
- if ($power->use_selection)
- {
- $use = array_values(array_map(function ($u) use(&$as) {
- // track the AS options
- if (empty($u['as']))
- {
- $as[$u['use']] = 'default';
- }
- else
- {
- $as[$u['use']] = (string) $u['as'];
- }
- // return the guid
- return $u['use'];
- }, $power->use_selection));
- }
- // check if we have load selection
- $power->load_selection = (isset($power->load_selection)
- && JsonHelper::check(
- $power->load_selection
- )) ? json_decode($power->load_selection, true) : null;
- if ($power->load_selection)
- {
- // load use ids
- array_map(function ($l) {
- // just load it directly and be done with it
- return $this->setPower($l['load']);
- }, $power->load_selection);
- }
- // see if we have implements
- $power->implement_names = array();
- // does this implement
- $power->implements = (isset($power->implements)
- && JsonHelper::check(
- $power->implements
- )) ? json_decode($power->implements, true) : null;
- if ($power->implements)
- {
- foreach ($power->implements as $implement)
- {
- if ($implement == -1
- && StringHelper::check($power->implements_custom))
- {
- $power->implement_names[] = $this->setPlaceholders(
- $this->setDynamicValues($power->implements_custom),
- $this->placeholders
- );
- // just add this once
- unset($power->implements_custom);
- }
- // does this extend existing
- elseif (GuidHelper::valid($implement))
- {
- // check if it was set
- if ($this->setPower($implement))
- {
- // get the name
- $power->implement_names[] = $this->getPower($implement, 1)->class_name;
- // add to use
- $use[] = $implement;
- }
- }
- }
- }
- // does this extend something
- $power->extends_name = null;
- // we first check for custom extending options
- if ($power->extends == -1
- && StringHelper::check($power->extends_custom))
- {
- $power->extends_name = $this->setPlaceholders(
- $this->setDynamicValues($power->extends_custom),
- $this->placeholders
- );
- // just add once
- unset($power->extends_custom);
- }
- // does this extend existing
- elseif (GuidHelper::valid($power->extends))
- {
- // check if it was set
- if ($this->setPower($power->extends))
- {
- // get the name
- $power->extends_name = $this->getPower($power->extends, 1)->class_name;
- // add to use
- $use[] = $power->extends;
- }
- }
- // set GUI mapper
- $guiMapper = array('table' => 'power', 'id' => (int) $power->id, 'type' => 'php');
- // add the header script
- if ($power->add_head == 1)
- {
- // set GUI mapper field
- $guiMapper['field'] = 'head';
- // base64 Decode code
- $power->head = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
- base64_decode(
- $power->head
- )
- ), $this->placeholders
- ),
- $guiMapper
- ) . PHP_EOL;
- }
- // now add all the extra use statements
- if (ArrayHelper::check($use))
- {
- foreach (array_unique($use) as $u)
- {
- if ($this->setPower($u))
- {
- $add_use = $this->getPower($u, 1)->namespace;
- // check if it is already added manually, you know how some people are
- if (strpos($power->head, $add_use) === false)
- {
- // check if it has an AS option
- if (isset($as[$u]) && StringHelper::check($as[$u]) && $as[$u] !== 'default')
- {
- $power->head .= 'use ' . $add_use . ' as ' . $as[$u] . ';' . PHP_EOL;
- }
- else
- {
- $power->head .= 'use ' . $add_use . ';' . PHP_EOL;
- }
- }
- }
- }
- }
- // now set the description
- $power->description = (StringHelper::check($power->description)) ? $this->setPlaceholders(
- $this->setDynamicValues($power->description),
- $this->placeholders
- ) : '';
- // add the main code if set
- if (StringHelper::check($power->main_class_code))
- {
- // set GUI mapper field
- $guiMapper['field'] = 'main_class_code';
- // base64 Decode code
- $power->main_class_code = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
- base64_decode(
- $power->main_class_code
- )
- ), $this->placeholders
- ),
- $guiMapper
- );
- }
- // store the power
- $this->powers[$guid] = $power;
-
- return true;
- }
- }
- // we failed to get the power,
- // so we raise an error message
- // only if guid is valid
- if (GuidHelper::valid($guid))
- {
- $this->app->enqueueMessage(
- JText::sprintf('Power guid:%s not found!
', $guid),
- 'Error'
- );
- }
- // let's not try again
- $this->statePowers[$guid] = false;
-
- return false;
+ return '';
}
/**
@@ -8993,8 +7806,8 @@ class Get
// get the module data
$module = $this->db->loadObject();
// update the name if it has dynamic values
- $module->name = $this->setPlaceholders(
- $this->setDynamicValues($module->name),
+ $module->name = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($module->name),
$this->globalPlaceholders
);
// set safe class function name
@@ -9005,7 +7818,7 @@ class Get
// set module folder name
$module->folder_name = 'mod_' . strtolower($module->code_name);
// set the lang key
- $this->langKeys[strtoupper($module->folder_name)] = $module->id
+ CFactory::_('Language.Extractor')->langKeys[strtoupper($module->folder_name)] = $module->id
. '_M0dU|3';
// return the path
if ($module->target == 2)
@@ -9034,7 +7847,7 @@ class Get
protected function getModuleIDs()
{
if (($addjoomla_modules = GetHelper::var(
- 'component_modules', Config::get('component_id'), 'joomla_component',
+ 'component_modules', CFactory::_('Config')->component_id, 'joomla_component',
'addjoomla_modules'
)) !== false)
{
@@ -9132,15 +7945,15 @@ class Get
// get the module data
$module = $this->db->loadObject();
// tweak system to set stuff to the module domain
- $_backup_target = $this->target;
- $_backup_lang = $this->lang;
- $_backup_langPrefix = Config::get('lang_prefix');
+ $_backup_target = CFactory::_('Config')->build_target;
+ $_backup_lang = CFactory::_('Config')->lang_target;
+ $_backup_langPrefix = CFactory::_('Config')->lang_prefix;
// set some keys
$module->target_type = 'M0dU|3';
$module->key = $module->id . '_' . $module->target_type;
// update to point to module
- $this->target = $module->key;
- $this->lang = $module->key;
+ CFactory::_('Config')->build_target = $module->key;
+ CFactory::_('Config')->lang_target = $module->key;
// set version if not set
if (empty($module->module_version))
{
@@ -9160,8 +7973,8 @@ class Get
$guiMapper = array('table' => 'joomla_module',
'id' => (int) $id, 'type' => 'php');
// update the name if it has dynamic values
- $module->name = $this->setPlaceholders(
- $this->setDynamicValues($module->name), $this->placeholders
+ $module->name = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($module->name), CFactory::_('Placeholder')->active
);
// set safe class function name
$module->code_name
@@ -9176,9 +7989,9 @@ class Get
);
// set langPrefix
$this->langPrefix = 'MOD_' . strtoupper($module->code_name);
- Config::set('lang_prefix', $this->langPrefix);
+ CFactory::_('Config')->set('lang_prefix', $this->langPrefix);
// set lang prefix
- $module->lang_prefix = Config::get('lang_prefix');
+ $module->lang_prefix = CFactory::_('Config')->lang_prefix;
// set module class name
$module->class_helper_name = 'Mod' . ucfirst($module->code_name)
. 'Helper';
@@ -9193,29 +8006,29 @@ class Get
// set the zip name
$module->zip_name = $module->folder_name . '_v' . str_replace(
'.', '_', $module->module_version
- ) . '__J' . Config::get('version', 3);
+ ) . '__J' . CFactory::_('Config')->joomla_version;
// set module file name
$module->file_name = $module->folder_name;
// set module context
$module->context = $module->file_name . '.' . $module->id;
// set official_name lang strings
- $this->setLangContent(
- $module->key, Config::get('lang_prefix'), $module->official_name
+ CFactory::_('Language')->set(
+ $module->key, CFactory::_('Config')->lang_prefix, $module->official_name
);
// set some placeholder for this module
- $this->placeholders[$this->bbb . 'Module_name' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Module_name')]
= $module->official_name;
- $this->placeholders[$this->bbb . 'Module' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Module')]
= ucfirst(
$module->code_name
);
- $this->placeholders[$this->bbb . 'module' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('module')]
= strtolower(
$module->code_name
);
- $this->placeholders[$this->bbb . 'module.version' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('module.version')]
= $module->module_version;
- $this->placeholders[$this->bbb . 'module_version' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('module_version')]
= str_replace(
'.', '_', $module->module_version
);
@@ -9229,11 +8042,11 @@ class Get
}
else
{
- $module->description = $this->setPlaceholders(
- $this->setDynamicValues($module->description),
- $this->placeholders
+ $module->description = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($module->description),
+ CFactory::_('Placeholder')->active
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
$module->key, $module->lang_prefix . '_DESCRIPTION',
$module->description
);
@@ -9251,16 +8064,16 @@ class Get
. JFactory::getDate($module->created)->format("jS F, Y")
. "";
// set xml description
- $this->setLangContent(
+ CFactory::_('Language')->set(
$module->key, $module->lang_prefix . '_XML_DESCRIPTION',
$module->xml_description
);
// update the readme if set
if ($module->addreadme == 1 && !empty($module->readme))
{
- $module->readme = $this->setPlaceholders(
- $this->setDynamicValues(base64_decode($module->readme)),
- $this->placeholders
+ $module->readme = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(base64_decode($module->readme)),
+ CFactory::_('Placeholder')->active
);
}
else
@@ -9297,13 +8110,13 @@ class Get
$guiMapper['field'] = 'class_helper_header';
// base64 Decode code
$module->class_helper_header = PHP_EOL
- . $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ . CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode(
$module->class_helper_header
)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
) . PHP_EOL;
@@ -9316,11 +8129,11 @@ class Get
// set GUI mapper field
$guiMapper['field'] = 'class_helper_code';
// base64 Decode code
- $module->class_helper_code = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $module->class_helper_code = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($module->class_helper_code)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -9346,11 +8159,11 @@ class Get
{
// set GUI mapper field
$guiMapper['field'] = 'mod_code';
- $module->mod_code = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $module->mod_code = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($module->mod_code)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -9374,11 +8187,11 @@ class Get
{
// set GUI mapper field
$guiMapper['field'] = 'default_header';
- $module->default_header = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $module->default_header = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($module->default_header)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -9394,11 +8207,11 @@ class Get
// set GUI mapper field
$guiMapper['field'] = 'default';
$guiMapper['type'] = 'html';
- $module->default = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $module->default = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($module->default)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -9520,7 +8333,7 @@ class Get
))
{
$module->fieldsets_label[$unique]
- = $this->setLang($form['label']);
+ = CFactory::_('Language')->key($form['label']);
}
// build the fields
$form['fields'] = array_map(
@@ -9676,13 +8489,13 @@ class Get
unset($module->{'add' . $addTarget});
}
// load the library
- if (!isset($this->libManager[$this->target]))
+ if (!isset($this->libManager[CFactory::_('Config')->build_target]))
{
- $this->libManager[$this->target] = array();
+ $this->libManager[CFactory::_('Config')->build_target] = array();
}
- if (!isset($this->libManager[$this->target][$module->code_name]))
+ if (!isset($this->libManager[CFactory::_('Config')->build_target][$module->code_name]))
{
- $this->libManager[$this->target][$module->code_name]
+ $this->libManager[CFactory::_('Config')->build_target][$module->code_name]
= array();
}
// make sure json become array
@@ -9695,22 +8508,22 @@ class Get
{
foreach ($module->libraries as $library)
{
- if (!isset($this->libManager[$this->target][$module->code_name][$library]))
+ if (!isset($this->libManager[CFactory::_('Config')->build_target][$module->code_name][$library]))
{
if ($this->getMediaLibrary((int) $library))
{
- $this->libManager[$this->target][$module->code_name][(int) $library]
+ $this->libManager[CFactory::_('Config')->build_target][$module->code_name][(int) $library]
= true;
}
}
}
}
elseif (is_numeric($module->libraries)
- && !isset($this->libManager[$this->target][$module->code_name][(int) $module->libraries]))
+ && !isset($this->libManager[CFactory::_('Config')->build_target][$module->code_name][(int) $module->libraries]))
{
if ($this->getMediaLibrary((int) $module->libraries))
{
- $this->libManager[$this->target][$module->code_name][(int) $module->libraries]
+ $this->libManager[CFactory::_('Config')->build_target][$module->code_name][(int) $module->libraries]
= true;
}
}
@@ -9741,14 +8554,14 @@ class Get
$guiMapper['field'] = $scriptMethod . '_'
. $scriptType;
$module->{$scriptMethod . '_' . $scriptType}
- = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode(
$module->{$scriptMethod . '_'
. $scriptType}
)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -9767,9 +8580,9 @@ class Get
if ($module->add_sql == 1
&& StringHelper::check($module->sql))
{
- $module->sql = $this->setPlaceholders(
- $this->setDynamicValues(base64_decode($module->sql)),
- $this->placeholders
+ $module->sql = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(base64_decode($module->sql)),
+ CFactory::_('Placeholder')->active
);
}
else
@@ -9783,10 +8596,10 @@ class Get
$module->sql_uninstall
))
{
- $module->sql_uninstall = $this->setPlaceholders(
- $this->setDynamicValues(
+ $module->sql_uninstall = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($module->sql_uninstall)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
}
else
@@ -9800,9 +8613,9 @@ class Get
$module->update_server_url
))
{
- $module->update_server_url = $this->setPlaceholders(
- $this->setDynamicValues($module->update_server_url),
- $this->placeholders
+ $module->update_server_url = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($module->update_server_url),
+ CFactory::_('Placeholder')->active
);
}
// add the update/sales server FTP details if that is the expected protocol
@@ -9837,23 +8650,21 @@ class Get
// update_server_xml_file_name
// rest globals
- $this->target = $_backup_target;
- $this->lang = $_backup_lang;
+ CFactory::_('Config')->build_target = $_backup_target;
+ CFactory::_('Config')->lang_target = $_backup_lang;
$this->langPrefix = $_backup_langPrefix;
- Config::set('lang_prefix', $_backup_langPrefix);
+ CFactory::_('Config')->set('lang_prefix', $_backup_langPrefix);
unset(
- $this->placeholders[$this->bbb . 'Module_name' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Module_name')]
);
- unset($this->placeholders[$this->bbb . 'Module' . $this->ddd]);
- unset($this->placeholders[$this->bbb . 'module' . $this->ddd]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('Module')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('module')]);
unset(
- $this->placeholders[$this->bbb . 'module.version'
- . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('module.version')]
);
unset(
- $this->placeholders[$this->bbb . 'module_version'
- . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('module_version')]
);
$this->joomlaModules[$id] = $module;
@@ -9875,27 +8686,21 @@ class Get
{
$xml = '';
$xml .= PHP_EOL . '';
- $xml .= PHP_EOL . $this->_t(1) . '' . $module->lang_prefix
+ $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix
. ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'BUILDDATE' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh . 'AUTHOR'
- . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'AUTHOREMAIL' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'AUTHORWEBSITE' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'COPYRIGHT' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh . 'LICENSE'
- . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $module->module_version
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('BUILDDATE') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOR') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOREMAIL') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHORWEBSITE') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('COPYRIGHT') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('LICENSE') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . $module->module_version
. ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $module->lang_prefix
+ $xml .= PHP_EOL . Indent::_(1) . '' . $module->lang_prefix
. '_XML_DESCRIPTION ';
- $xml .= $this->hhh . 'MAINXML' . $this->hhh;
+ $xml .= Placefix::_h('MAINXML');
$xml .= PHP_EOL . ' ';
return $xml;
@@ -9910,8 +8715,8 @@ class Get
public function getModAdminVvvvvvvdm($fieldScriptBucket)
{
$form_field_class = array();
- $form_field_class[] = $this->hhh . 'BOM' . $this->hhh . PHP_EOL;
- $form_field_class[] = "//" . $this->setLine(__LINE__)
+ $form_field_class[] = Placefix::_h('BOM') . PHP_EOL;
+ $form_field_class[] = "//" . Line::_(__Line__, __Class__)
. " No direct access to this file";
$form_field_class[] = "defined('_JEXEC') or die('Restricted access');";
$form_field_class[] = PHP_EOL . "use Joomla\CMS\Form\FormField;";
@@ -9919,23 +8724,23 @@ class Get
$form_field_class[] = PHP_EOL
. "class JFormFieldModadminvvvvvvvdm extends FormField";
$form_field_class[] = "{";
- $form_field_class[] = $this->_t(1)
+ $form_field_class[] = Indent::_(1)
. "protected \$type = 'modadminvvvvvvvdm';";
- $form_field_class[] = PHP_EOL . $this->_t(1)
+ $form_field_class[] = PHP_EOL . Indent::_(1)
. "protected function getLabel()";
- $form_field_class[] = $this->_t(1) . "{";
- $form_field_class[] = $this->_t(2) . "return;";
- $form_field_class[] = $this->_t(1) . "}";
- $form_field_class[] = PHP_EOL . $this->_t(1)
+ $form_field_class[] = Indent::_(1) . "{";
+ $form_field_class[] = Indent::_(2) . "return;";
+ $form_field_class[] = Indent::_(1) . "}";
+ $form_field_class[] = PHP_EOL . Indent::_(1)
. "protected function getInput()";
- $form_field_class[] = $this->_t(1) . "{";
- $form_field_class[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $form_field_class[] = Indent::_(1) . "{";
+ $form_field_class[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get the document";
- $form_field_class[] = $this->_t(2)
+ $form_field_class[] = Indent::_(2)
. "\$document = Factory::getDocument();";
$form_field_class[] = implode(PHP_EOL, $fieldScriptBucket);
- $form_field_class[] = $this->_t(2) . "return; // noting for now :)";
- $form_field_class[] = $this->_t(1) . "}";
+ $form_field_class[] = Indent::_(2) . "return; // noting for now :)";
+ $form_field_class[] = Indent::_(1) . "}";
$form_field_class[] = "}";
return implode(PHP_EOL, $form_field_class);
@@ -9950,7 +8755,7 @@ class Get
protected function getPluginIDs()
{
if (($addjoomla_plugins = GetHelper::var(
- 'component_plugins', Config::get('component_id'), 'joomla_component',
+ 'component_plugins', CFactory::_('Config')->component_id, 'joomla_component',
'addjoomla_plugins'
)) !== false)
{
@@ -10027,8 +8832,8 @@ class Get
// get the plugin data
$plugin = $this->db->loadObject();
// update the name if it has dynamic values
- $plugin->name = $this->setPlaceholders(
- $this->setDynamicValues($plugin->name),
+ $plugin->name = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($plugin->name),
$this->globalPlaceholders
);
// update the name if it has dynamic values
@@ -10041,7 +8846,7 @@ class Get
// set plugin file name
$plugin->file_name = strtolower($plugin->code_name);
// set the lang key
- $this->langKeys['PLG_' . strtoupper(
+ CFactory::_('Language.Extractor')->langKeys['PLG_' . strtoupper(
$plugin->group . '_' . $plugin->file_name
)]
= $plugin->id . '_P|uG!n';
@@ -10138,15 +8943,15 @@ class Get
// get the plugin data
$plugin = $this->db->loadObject();
// tweak system to set stuff to the plugin domain
- $_backup_target = $this->target;
- $_backup_lang = $this->lang;
- $_backup_langPrefix = Config::get('lang_prefix');
+ $_backup_target = CFactory::_('Config')->build_target;
+ $_backup_lang = CFactory::_('Config')->lang_target;
+ $_backup_langPrefix = CFactory::_('Config')->lang_prefix;
// set some keys
$plugin->target_type = 'P|uG!n';
$plugin->key = $plugin->id . '_' . $plugin->target_type;
// update to point to plugin
- $this->target = $plugin->key;
- $this->lang = $plugin->key;
+ CFactory::_('Config')->build_target = $plugin->key;
+ CFactory::_('Config')->lang_target = $plugin->key;
// set version if not set
if (empty($plugin->plugin_version))
{
@@ -10156,8 +8961,8 @@ class Get
$guiMapper = array('table' => 'joomla_plugin',
'id' => (int) $id, 'type' => 'php');
// update the name if it has dynamic values
- $plugin->name = $this->setPlaceholders(
- $this->setDynamicValues($plugin->name), $this->placeholders
+ $plugin->name = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($plugin->name), CFactory::_('Placeholder')->active
);
// update the name if it has dynamic values
$plugin->code_name
@@ -10174,9 +8979,9 @@ class Get
$plugin->code_name,
$plugin->group
);
- Config::set('lang_prefix', $this->langPrefix);
+ CFactory::_('Config')->set('lang_prefix', $this->langPrefix);
// set lang prefix
- $plugin->lang_prefix = Config::get('lang_prefix');
+ $plugin->lang_prefix = CFactory::_('Config')->lang_prefix;
// set plugin class name
$plugin->class_name
= PluginHelper::safeClassName(
@@ -10198,46 +9003,46 @@ class Get
// set the zip name
$plugin->zip_name = $plugin->folder_name . '_v' . str_replace(
'.', '_', $plugin->plugin_version
- ) . '__J' . Config::get('version', 3);
+ ) . '__J' . CFactory::_('Config')->joomla_version;
// set plugin file name
$plugin->file_name = strtolower($plugin->code_name);
// set plugin context
$plugin->context = $plugin->folder_name . '.' . $plugin->id;
// set official_name lang strings
- $this->setLangContent(
- $plugin->key, Config::get('lang_prefix'), $plugin->official_name
+ CFactory::_('Language')->set(
+ $plugin->key, CFactory::_('Config')->lang_prefix, $plugin->official_name
);
// set some placeholder for this plugin
- $this->placeholders[$this->bbb . 'Plugin_name' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Plugin_name')]
= $plugin->official_name;
- $this->placeholders[$this->hhh . 'PLUGIN_NAME' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('PLUGIN_NAME')]
= $plugin->official_name;
- $this->placeholders[$this->bbb . 'Plugin' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Plugin')]
= ucfirst(
$plugin->code_name
);
- $this->placeholders[$this->bbb . 'plugin' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('plugin')]
= strtolower(
$plugin->code_name
);
- $this->placeholders[$this->bbb . 'Plugin_group' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Plugin_group')]
= ucfirst(
$plugin->group
);
- $this->placeholders[$this->bbb . 'plugin_group' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('plugin_group')]
= strtolower(
$plugin->group
);
- $this->placeholders[$this->bbb . 'plugin.version' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('plugin.version')]
= $plugin->plugin_version;
- $this->placeholders[$this->hhh . 'VERSION' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('VERSION')]
= $plugin->plugin_version;
- $this->placeholders[$this->bbb . 'plugin_version' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('plugin_version')]
= str_replace(
'.', '_', $plugin->plugin_version
);
// set description
- $this->placeholders[$this->hhh . 'DESCRIPTION' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('DESCRIPTION')]
= '';
if (!isset($plugin->description)
|| !StringHelper::check(
@@ -10248,16 +9053,16 @@ class Get
}
else
{
- $plugin->description = $this->setPlaceholders(
- $this->setDynamicValues($plugin->description),
- $this->placeholders
+ $plugin->description = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($plugin->description),
+ CFactory::_('Placeholder')->active
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
$plugin->key, $plugin->lang_prefix . '_DESCRIPTION',
$plugin->description
);
// set description
- $this->placeholders[$this->hhh . 'DESCRIPTION' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('DESCRIPTION')]
= $plugin->description;
$plugin->description = '' . $plugin->description
. '
';
@@ -10273,16 +9078,16 @@ class Get
. JFactory::getDate($plugin->created)->format("jS F, Y")
. "";
// set xml discription
- $this->setLangContent(
+ CFactory::_('Language')->set(
$plugin->key, $plugin->lang_prefix . '_XML_DESCRIPTION',
$plugin->xml_description
);
// update the readme if set
if ($plugin->addreadme == 1 && !empty($plugin->readme))
{
- $plugin->readme = $this->setPlaceholders(
- $this->setDynamicValues(base64_decode($plugin->readme)),
- $this->placeholders
+ $plugin->readme = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(base64_decode($plugin->readme)),
+ CFactory::_('Placeholder')->active
);
}
else
@@ -10296,11 +9101,11 @@ class Get
// set GUI mapper field
$guiMapper['field'] = 'main_class_code';
// base64 Decode main_class_code.
- $plugin->main_class_code = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $plugin->main_class_code = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($plugin->main_class_code)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -10311,11 +9116,11 @@ class Get
// set GUI mapper field
$guiMapper['field'] = 'head';
// base64 Decode head.
- $plugin->head = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $plugin->head = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($plugin->head)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -10323,11 +9128,11 @@ class Get
elseif (!empty($plugin->class_head))
{
// base64 Decode head.
- $plugin->head = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $plugin->head = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($plugin->class_head)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
array(
'table' => 'class_extends',
@@ -10341,11 +9146,11 @@ class Get
if (!empty($plugin->comment))
{
// base64 Decode comment.
- $plugin->comment = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ $plugin->comment = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($plugin->comment)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
array(
'table' => 'class_extends',
@@ -10443,7 +9248,7 @@ class Get
))
{
$plugin->fieldsets_label[$unique]
- = $this->setLang($form['label']);
+ = CFactory::_('Language')->key($form['label']);
}
// check for extra rule paths
if (isset($form['addrulepath'])
@@ -10647,14 +9452,14 @@ class Get
$guiMapper['field'] = $scriptMethod . '_'
. $scriptType;
$plugin->{$scriptMethod . '_' . $scriptType}
- = $this->setGuiCodePlaceholder(
- $this->setPlaceholders(
- $this->setDynamicValues(
+ = CFactory::_('Customcode.Gui')->set(
+ CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode(
$plugin->{$scriptMethod . '_'
. $scriptType}
)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
),
$guiMapper
);
@@ -10673,9 +9478,9 @@ class Get
if ($plugin->add_sql == 1
&& StringHelper::check($plugin->sql))
{
- $plugin->sql = $this->setPlaceholders(
- $this->setDynamicValues(base64_decode($plugin->sql)),
- $this->placeholders
+ $plugin->sql = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(base64_decode($plugin->sql)),
+ CFactory::_('Placeholder')->active
);
}
else
@@ -10689,10 +9494,10 @@ class Get
$plugin->sql_uninstall
))
{
- $plugin->sql_uninstall = $this->setPlaceholders(
- $this->setDynamicValues(
+ $plugin->sql_uninstall = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add(
base64_decode($plugin->sql_uninstall)
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
}
else
@@ -10706,9 +9511,9 @@ class Get
$plugin->update_server_url
))
{
- $plugin->update_server_url = $this->setPlaceholders(
- $this->setDynamicValues($plugin->update_server_url),
- $this->placeholders
+ $plugin->update_server_url = CFactory::_('Placeholder')->update(
+ CFactory::_('Customcode')->add($plugin->update_server_url),
+ CFactory::_('Placeholder')->active
);
}
// add the update/sales server FTP details if that is the expected protocol
@@ -10743,43 +9548,36 @@ class Get
// update_server_xml_file_name
// rest globals
- $this->target = $_backup_target;
- $this->lang = $_backup_lang;
+ CFactory::_('Config')->build_target = $_backup_target;
+ CFactory::_('Config')->lang_target = $_backup_lang;
$this->langPrefix = $_backup_langPrefix;
- Config::set('lang_prefix', $_backup_langPrefix);
+ CFactory::_('Config')->set('lang_prefix', $_backup_langPrefix);
unset(
- $this->placeholders[$this->bbb . 'Plugin_name' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Plugin_name')]
);
- unset($this->placeholders[$this->bbb . 'Plugin' . $this->ddd]);
- unset($this->placeholders[$this->bbb . 'plugin' . $this->ddd]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('Plugin')]);
+ unset(CFactory::_('Placeholder')->active[Placefix::_('plugin')]);
unset(
- $this->placeholders[$this->bbb . 'Plugin_group'
- . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Plugin_group')]
);
unset(
- $this->placeholders[$this->bbb . 'plugin_group'
- . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('plugin_group')]
);
unset(
- $this->placeholders[$this->bbb . 'plugin.version'
- . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('plugin.version')]
);
unset(
- $this->placeholders[$this->bbb . 'plugin_version'
- . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('plugin_version')]
);
unset(
- $this->placeholders[$this->hhh . 'VERSION'
- . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('VERSION')]
);
unset(
- $this->placeholders[$this->hhh . 'DESCRIPTION'
- . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('DESCRIPTION')]
);
unset(
- $this->placeholders[$this->hhh . 'PLUGIN_NAME'
- . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('PLUGIN_NAME')]
);
$this->joomlaPlugins[$id] = $plugin;
@@ -10801,59 +9599,26 @@ class Get
{
$xml = '';
$xml .= PHP_EOL . '';
- $xml .= PHP_EOL . $this->_t(1) . '' . $plugin->lang_prefix
+ $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->lang_prefix
. ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'BUILDDATE' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh . 'AUTHOR'
- . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'AUTHOREMAIL' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'AUTHORWEBSITE' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh
- . 'COPYRIGHT' . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $this->hhh . 'LICENSE'
- . $this->hhh . ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $plugin->plugin_version
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('BUILDDATE') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOR') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHOREMAIL') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('AUTHORWEBSITE') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('COPYRIGHT') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . Placefix::_h('LICENSE') . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->plugin_version
. ' ';
- $xml .= PHP_EOL . $this->_t(1) . '' . $plugin->lang_prefix
+ $xml .= PHP_EOL . Indent::_(1) . '' . $plugin->lang_prefix
. '_XML_DESCRIPTION ';
- $xml .= $this->hhh . 'MAINXML' . $this->hhh;
+ $xml .= Placefix::_h('MAINXML');
$xml .= PHP_EOL . ' ';
return $xml;
}
- /**
- * check if we already have these ids in local memory
- *
- * @return void
- *
- */
- protected function checkCustomCodeMemory($ids)
- {
- // reset custom code
- $this->customCode = array();
- foreach ($ids as $pointer => $id)
- {
- if (isset($this->customCodeMemory[$id]))
- {
- $this->customCode[] = $this->customCodeMemory[$id];
- unset($ids[$pointer]);
- }
- }
- // check if any ids left to fetch
- if (ArrayHelper::check($ids))
- {
- return $ids;
- }
-
- return false;
- }
-
/**
* store the code
*
@@ -10954,17 +9719,14 @@ class Get
$this->globalPlaceholders
);
$placeholders[StringHelper::safe(
- Config::get('component_code_name'), 'F'
+ CFactory::_('Config')->component_code_name, 'F'
) . 'Helper::']
- = $this->bbb
- . 'Component' . $this->ddd . 'Helper::';
+ = Placefix::_('Component') . 'Helper::';
$placeholders['COM_' . StringHelper::safe(
- Config::get('component_code_name'), 'U'
+ CFactory::_('Config')->component_code_name, 'U'
)]
- = 'COM_' . $this->bbb
- . 'COMPONENT' . $this->ddd;
- $placeholders['com_' . Config::get('component_code_name')] = 'com_' . $this->bbb
- . 'component' . $this->ddd;
+ = 'COM_' . Placefix::_('COMPONENT');
+ $placeholders['com_' . CFactory::_('Config')->component_code_name] = 'com_' . Placefix::_('component');
// putt the last first
$placeholders = array_reverse($placeholders, true);
@@ -11034,7 +9796,7 @@ class Get
)
{
// we add a new search for the GUI CODE Blocks
- $this->guiCodeSearch($file, $placeholders, $today, $target);
+ CFactory::_('Customcode.Gui')->search($file, $placeholders, $today, $target);
// reset each time per file
$loadEndFingerPrint = false;
$endFingerPrint = array();
@@ -11120,7 +9882,7 @@ class Get
(int) $lineNumber
); // 'toline'
// first reverse engineer this code block
- $c0de = $this->reversePlaceholders(
+ $c0de = CFactory::_('Placeholder.Reverse')->engine(
implode('', $codeBucket[$pointer[$targetKey]]),
$placeholders, $target
);
@@ -11143,7 +9905,7 @@ class Get
= $this->db->quoteName('to_line') . ' = '
. $this->db->quote($lineNumber);
// first reverse engineer this code block
- $c0de = $this->reversePlaceholders(
+ $c0de = CFactory::_('Placeholder.Reverse')->engine(
implode('', $codeBucket[$pointer[$targetKey]]),
$placeholders, $target,
$this->existingCustomCode[$pointer[$targetKey]]['id']
@@ -11309,7 +10071,7 @@ class Get
); // 'comment_type'
$this->newCustomCode[$pointer[$targetKey]][]
= $this->db->quote(
- (int) Config::get('component_id')
+ (int) CFactory::_('Config')->component_id
); // 'component'
$this->newCustomCode[$pointer[$targetKey]][]
= $this->db->quote(
@@ -11366,7 +10128,7 @@ class Get
. $this->db->quote($commentType);
$this->existingCustomCode[$pointer[$targetKey]]['fields'][]
= $this->db->quoteName('component') . ' = '
- . $this->db->quote(Config::get('component_id'));
+ . $this->db->quote(CFactory::_('Config')->component_id);
$this->existingCustomCode[$pointer[$targetKey]]['fields'][]
= $this->db->quoteName('from_line') . ' = '
. $this->db->quote($lineNumber);
@@ -11456,7 +10218,7 @@ class Get
}
// update the script
- return $this->setPlaceholders($script, $locker);
+ return CFactory::_('Placeholder')->update($script, $locker);
}
// check if we should hash a file
if (strpos($script, 'HASHFILE((((') !== false)
@@ -11485,7 +10247,7 @@ class Get
}
// update the script
- return $this->setPlaceholders($script, $locker);
+ return CFactory::_('Placeholder')->update($script, $locker);
}
return $script;
@@ -11513,15 +10275,15 @@ class Get
{
$locker['LOCKBASE64((((' . $value . '))))']
= "base64_decode( preg_replace('/\s+/', ''," .
- PHP_EOL . $this->_t(2) . "'" .
+ PHP_EOL . Indent::_(2) . "'" .
wordwrap(
- base64_encode($value), 64, PHP_EOL . $this->_t(2), true
+ base64_encode($value), 64, PHP_EOL . Indent::_(2), true
) .
"'))";
}
// update the script
- return $this->setPlaceholders($script, $locker);
+ return CFactory::_('Placeholder')->update($script, $locker);
}
return $script;
@@ -11534,93 +10296,11 @@ class Get
* @param array $config The placeholder config values
*
* @return string
- *
+ * @deprecated 3.3 Use CFactory::_('Customcode.Gui')->set($string, $config);
*/
public function setGuiCodePlaceholder($string, $config)
{
- if (StringHelper::check($string))
- {
- if (Config::get('add_placeholders', false)
- && $this->canAddGuiCodePlaceholder(
- $string
- )
- && ArrayHelper::check($config)
- && isset($config['table'])
- && StringHelper::check($config['table'])
- && isset($config['field'])
- && StringHelper::check($config['field'])
- && isset($config['type'])
- && StringHelper::check($config['type'])
- && isset($config['id'])
- && is_numeric($config['id']))
- {
- // if we have a key we must get the ID
- if (isset($config['key'])
- && StringHelper::check($config['key'])
- && $config['key'] !== 'id')
- {
- if (($id = GetHelper::var(
- $config['table'], $config['id'], $config['key'],
- 'id'
- )) !== false
- && is_numeric($id))
- {
- $config['id'] = $id;
- }
- else
- {
- // we must give a error message to inform the user of this issue. (should never happen)
- $this->app->enqueueMessage(
- JText::sprintf(
- 'ID mismatch was detected with the %s.%s.%s.%s GUI code field. So the placeholder was not set.',
- $config['table'], $config['field'],
- $config['key'], $config['id']
- ), 'Error'
- );
- // check some config
- if (!isset($config['prefix']))
- {
- $config['prefix'] = '';
- }
-
- return $config['prefix'] . $string;
- }
- }
- // check some config
- if (!isset($config['prefix']))
- {
- $config['prefix'] = PHP_EOL;
- }
- // add placheolder based on type of code
- switch (strtolower($config['type']))
- {
- // adding with html commenting
- case 'html':
- $front = $config['prefix'] . '' . PHP_EOL;
- $back = ''
- );
-
- if (($guiCode = ArrayHelper::merge($guiCode)) !== false
- && ArrayHelper::check($guiCode, true))
- {
- foreach ($guiCode as $code)
- {
- $first_line = strtok($code, PHP_EOL);
- // get the GUI target details
- $query = explode('.', trim($first_line, '.'));
- // only continue if we have 3 values in the query
- if (is_array($query) && count($query) >= 3)
- {
- // cleanup the newlines around the code
- $code = trim(str_replace($first_line, '', $code), PHP_EOL)
- . PHP_EOL;
- // set the ID
- $id = (int) $query[2];
- // make the field name save
- $field = FieldHelper::safe($query[1]);
- // make the table name save
- $table = StringHelper::safe($query[0]);
- // reverse placeholder as much as we can
- $code = $this->reversePlaceholders(
- $code, $placeholders, $target, $id, $field, $table
- );
- // update the GUI/Tables/Database
- $object = new stdClass();
- $object->id = $id;
- $object->{$field} = base64_encode(
- $code
- ); // (TODO) this may not always work...
- // update the value in GUI
- $this->db->updateObject(
- '#__componentbuilder_' . (string) $table, $object, 'id'
- );
- }
- }
- }
+ CFactory::_('Customcode.Gui')->search($file, $placeholders, $today, $target);
}
/**
@@ -11820,24 +10452,14 @@ class Get
* @param string $table The table name
*
* @return string
- *
+ * @deprecated 3.3 Use CFactory::_('Placeholder.Reverse')->engine($string, $placeholders, $target, $id, $field, $table);
*/
protected function reversePlaceholders($string, &$placeholders, &$target,
$id = null, $field = 'code', $table = 'custom_code'
)
{
- // get local code if set
- if ($id > 0
- && $code = base64_decode(
- GetHelper::var($table, $id, 'id', $field)
- ))
- {
- $string = $this->setReverseLangPlaceholders(
- $string, $code, $target
- );
- }
-
- return $this->setPlaceholders($string, $placeholders, 2);
+ // use the new container class
+ CFactory::_('Placeholder.Reverse')->engine($string, $placeholders, $target, $id, $field, $table);
}
/**
@@ -11848,7 +10470,7 @@ class Get
* @param string $target The target path type
*
* @return string
- *
+ * @deprecated 3.3 See $this->reversePlaceholders();
*/
protected function setReverseLangPlaceholders($updateString, $string,
&$target
@@ -11871,49 +10493,49 @@ class Get
// start lang holder
$langHolders = array();
// set the lang for both since we don't know what area is being targeted
- $_tmp = $this->lang;
+ $_tmp = CFactory::_('Config')->lang_target;
// set the lang based on target
if (strpos($target, 'module') !== false)
{
// backup lang prefix
- $_tmp_lang_prefix = Config::get('lang_prefix');
+ $_tmp_lang_prefix = CFactory::_('Config')->lang_prefix;
// set the new lang prefix
$this->langPrefix = strtoupper(
str_replace('module', 'mod', $target)
);
- Config::set('lang_prefix', $this->langPrefix);
+ CFactory::_('Config')->set('lang_prefix', $this->langPrefix);
// now set the lang
- if (isset($this->langKeys[Config::get('lang_prefix')]))
+ if (isset(CFactory::_('Language.Extractor')->langKeys[CFactory::_('Config')->lang_prefix]))
{
- $this->lang = $this->langKeys[Config::get('lang_prefix')];
+ CFactory::_('Config')->lang_target = CFactory::_('Language.Extractor')->langKeys[CFactory::_('Config')->lang_prefix];
}
else
{
- $this->lang = 'module';
+ CFactory::_('Config')->lang_target = 'module';
}
}
elseif (strpos($target, 'plugin') !== false)
{
// backup lang prefix
- $_tmp_lang_prefix = Config::get('lang_prefix');
+ $_tmp_lang_prefix = CFactory::_('Config')->lang_prefix;
// set the new lang prefix
$this->langPrefix = strtoupper(
str_replace('plugin', 'plg', $target)
);
- Config::set('lang_prefix', $this->langPrefix);
+ CFactory::_('Config')->set('lang_prefix', $this->langPrefix);
// now set the lang
- if (isset($this->langKeys[Config::get('lang_prefix')]))
+ if (isset(CFactory::_('Language.Extractor')->langKeys[CFactory::_('Config')->lang_prefix]))
{
- $this->lang = $this->langKeys[Config::get('lang_prefix')];
+ CFactory::_('Config')->lang_target = CFactory::_('Language.Extractor')->langKeys[CFactory::_('Config')->lang_prefix];
}
else
{
- $this->lang = 'plugin';
+ CFactory::_('Config')->lang_target = 'plugin';
}
}
else
{
- $this->lang = 'both';
+ CFactory::_('Config')->lang_target = 'both';
}
// set language data
foreach ($langStringTargets as $langStringTarget)
@@ -11941,9 +10563,9 @@ class Get
continue;
}
// build lang key
- $keyLang = Config::get('lang_prefix') . '_' . $_keyLang;
+ $keyLang = CFactory::_('Config')->lang_prefix . '_' . $_keyLang;
// set lang content string
- $this->setLangContent($this->lang, $keyLang, $lang);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $keyLang, $lang);
// reverse the placeholders
foreach ($langStringTargets as $langStringTarget)
{
@@ -11954,17 +10576,17 @@ class Get
}
}
// return the found placeholders
- $updateString = $this->setPlaceholders(
+ $updateString = CFactory::_('Placeholder')->update(
$updateString, $langHolders
);
}
// reset the lang
- $this->lang = $_tmp;
+ CFactory::_('Config')->lang_target = $_tmp;
// also rest the lang prefix if set
if (isset($_tmp_lang_prefix))
{
$this->langPrefix = $_tmp_lang_prefix;
- Config::set('lang_prefix', $_tmp_lang_prefix);
+ CFactory::_('Config')->set('lang_prefix', $_tmp_lang_prefix);
}
}
@@ -11984,63 +10606,12 @@ class Get
* 3 -> Remove placeholders not in data string
*
* @return string
- *
+ * @deprecated 3.3 Use CFactory::_('Placeholder')->update($data, $placeholder, $action);
*/
public function setPlaceholders($data, &$placeholder, $action = 1)
{
- // make sure the placeholders is an array
- if (!ArrayHelper::check($placeholder))
- {
- // This is an error, (TODO) actualy we need to add a kind of log here to know that this happened
- return $data;
- }
- // continue with the work of replacement
- if (1 == $action) // <-- just replace (default)
- {
- return str_replace(
- array_keys($placeholder), array_values($placeholder), $data
- );
- }
- elseif (2 == $action) // <-- check if data string has placeholders
- {
- $replace = false;
- foreach ($placeholder as $key => $val)
- {
- if (strpos($data, $key) !== false)
- {
- $replace = true;
- break;
- }
- }
- // only replace if the data has these placeholder values
- if ($replace === true)
- {
-
- return str_replace(
- array_keys($placeholder), array_values($placeholder), $data
- );
- }
- }
- elseif (3 == $action) // <-- remove placeholders not in data string
- {
- $replace = $placeholder;
- foreach ($replace as $key => $val)
- {
- if (strpos($data, $key) === false)
- {
- unset($replace[$key]);
- }
- }
- // only replace if the data has these placeholder values
- if (ArrayHelper::check($replace))
- {
- return str_replace(
- array_keys($replace), array_values($replace), $data
- );
- }
- }
-
- return $data;
+ // use the new container class
+ CFactory::_('Placeholder')->update($data, $placeholder, $action);
}
/**
@@ -12050,80 +10621,11 @@ class Get
* @param int $id The code id in the system
*
* @return array on success
- *
+ * @deprecated 3.3 Use CFactory::_('Placeholder')->keys($type, $id);
*/
public function getPlaceHolder($type, $id)
{
- switch ($type)
- {
- case 11:
- //***[REPLACED$$$$]***//**1**/
- if (Config::get('add_placeholders', false) === true)
- {
- return array(
- 'start' => '/***[REPLACED$$$$]***//**' . $id . '**/',
- 'end' => '/***[/REPLACED$$$$]***/');
- }
- else
- {
- return array(
- 'start' => "",
- 'end' => "");
- }
- break;
- case 12:
- //***[INSERTED$$$$]***//**1**/
- if (Config::get('add_placeholders', false) === true)
- {
- return array(
- 'start' => '/***[INSERTED$$$$]***//**' . $id . '**/',
- 'end' => '/***[/INSERTED$$$$]***/');
- }
- else
- {
- return array(
- 'start' => "",
- 'end' => "");
- }
- break;
- case 21:
- //
- if (Config::get('add_placeholders', false) === true)
- {
- return array(
- 'start' => '',
- 'end' => '');
- }
- else
- {
- return array(
- 'start' => "",
- 'end' => "");
- }
- break;
- case 22:
- //
- if (Config::get('add_placeholders', false) === true)
- {
- return array(
- 'start' => '',
- 'end' => '');
- }
- else
- {
- return array(
- 'start' => "",
- 'end' => " ");
- }
- break;
- case 3:
- return array(
- 'start' => "",
- 'end' => "");
- break;
- }
-
- return false;
+ return CFactory::_('Placeholder')->keys($type, $id);
}
/**
@@ -12138,15 +10640,15 @@ class Get
$localPaths = array();
// admin path
$localPaths['admin'] = JPATH_ADMINISTRATOR . '/components/com_'
- . Config::get('component_code_name');
+ . CFactory::_('Config')->component_code_name;
// site path
$localPaths['site'] = JPATH_ROOT . '/components/com_'
- . Config::get('component_code_name');
+ . CFactory::_('Config')->component_code_name;
// media path
$localPaths['media'] = JPATH_ROOT . '/media/com_'
- . Config::get('component_code_name');
+ . CFactory::_('Config')->component_code_name;
// power path
- $localPaths['power'] = JPATH_ROOT . '/' . Config::get('jcb_powers_path', 'libraries/jcb_powers');
+ $localPaths['power'] = JPATH_ROOT . '/' . CFactory::_('Config')->get('jcb_powers_path', 'libraries/jcb_powers');
// lets also go over the REPOS (TODO)
// Painfull but we need to folder paths for the linked modules
if (($module_ids = $this->getModuleIDs()) !== false)
diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php
index 6c9e1f0ac..5efa2d28a 100644
--- a/admin/helpers/compiler/b_Structure.php
+++ b/admin/helpers/compiler/b_Structure.php
@@ -20,7 +20,10 @@ use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\FileHelper;
-use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
+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;
/**
@@ -29,6 +32,7 @@ use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
class Structure extends Get
{
+
/**
* The folder counter
*
@@ -370,56 +374,50 @@ class Structure extends Get
/**
* Constructor
*/
- public function __construct($config = array())
+ public function __construct()
{
// first we run the perent constructor
- if (parent::__construct($config))
+ if (parent::__construct())
{
// set the standard admin file
$this->stdRootFiles[] = $this->componentData->name_code . '.php';
// set incase no extra admin folder are loaded
- $this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FOLDERS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('EXSTRA_ADMIN_FOLDERS')]
= '';
// set incase no extra site folder are loaded
- $this->fileContentStatic[$this->hhh . 'EXSTRA_SITE_FOLDERS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('EXSTRA_SITE_FOLDERS')]
= '';
// set incase no extra media folder are loaded
- $this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FOLDERS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('EXSTRA_MEDIA_FOLDERS')]
= '';
// set incase no extra admin files are loaded
- $this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FILES'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('EXSTRA_ADMIN_FILES')]
= '';
// set incase no extra site files are loaded
- $this->fileContentStatic[$this->hhh . 'EXSTRA_SITE_FILES'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('EXSTRA_SITE_FILES')]
= '';
// set incase no extra media files are loaded
- $this->fileContentStatic[$this->hhh . 'EXSTRA_MEDIA_FILES'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('EXSTRA_MEDIA_FILES')]
= '';
// run global updater
ComponentbuilderHelper::runGlobalUpdater();
// set the template path
- $this->templatePath = Config::get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/joomla_'
- . $this->joomlaVersions[Config::get('version', 3)]['folder_key'];
+ $this->templatePath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/joomla_'
+ . $this->joomlaVersions[CFactory::_('Config')->joomla_version]['folder_key'];
// set some default names
$this->componentSalesName = 'com_'
. $this->componentData->sales_name . '__J'
- . Config::get('version', 3);
+ . CFactory::_('Config')->joomla_version;
$this->componentBackupName = 'com_'
. $this->componentData->sales_name . '_v' . str_replace(
'.', '_', $this->componentData->component_version
- ) . '__J' . Config::get('version', 3);
+ ) . '__J' . CFactory::_('Config')->joomla_version;
$this->componentFolderName = 'com_'
. $this->componentData->name_code . '_v' . str_replace(
'.', '_', $this->componentData->component_version
- ) . '__J' . Config::get('version', 3);
+ ) . '__J' . CFactory::_('Config')->joomla_version;
// set component folder path
- $this->componentPath = Config::get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/'
+ $this->componentPath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/'
. $this->componentFolderName;
// set the template path for custom
$this->templatePathCustom = $this->params->get(
@@ -438,7 +436,7 @@ class Structure extends Get
// set the Joomla Version Data
$this->joomlaVersionData = $this->setJoomlaVersionData();
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterSetJoomlaVersionData',
array(&$this->componentContext, &$this->joomlaVersionData)
);
@@ -466,24 +464,6 @@ class Structure extends Get
return false;
}
- /**
- * Set the line number in comments
- *
- * @param int $nr The line number
- *
- * @return string
- *
- */
- private function setLine($nr)
- {
- if (Config::get('debug_line_nr', false))
- {
- return ' [Structure ' . $nr . ']';
- }
-
- return '';
- }
-
/**
* Build the Powers files, folders
*
@@ -492,16 +472,20 @@ class Structure extends Get
*/
private function buildPowers()
{
- if (ArrayHelper::check($this->powers))
+ if (ArrayHelper::check(CFactory::_('Power')->active))
{
+ // for plugin event TODO change event api signatures
+ $this->powers = CFactory::_('Power')->active;
// Trigger Event: jcb_ce_onBeforeSetModules
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildPowers',
array(&$this->componentContext, &$this->powers)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Power')->active = $this->powers;
// we track the creation of htaccess files
$htaccess = array();
- foreach ($this->powers as $power)
+ foreach (CFactory::_('Power')->active as $power)
{
if (ObjectHelper::check($power)
&& isset($power->path)
@@ -533,8 +517,8 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL .
- PHP_EOL . $this->hhh . 'POWERCODE' . $this->hhh
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL .
+ PHP_EOL . Placefix::_h('POWERCODE')
);
$this->newFiles[$power->key][] = $fileDetails;
// count the file created
@@ -606,7 +590,7 @@ class Structure extends Get
if (ArrayHelper::check($this->joomlaModules))
{
// Trigger Event: jcb_ce_onBeforeSetModules
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildModules',
array(&$this->componentContext, &$this->joomlaModules)
);
@@ -619,7 +603,7 @@ class Structure extends Get
))
{
// module path
- $module->folder_path = Config::get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/'
+ $module->folder_path = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/'
. $module->folder_name;
// set the module paths
$this->dynamicPaths[$module->key] = $module->folder_path;
@@ -635,11 +619,11 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL .
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL .
PHP_EOL . '// No direct access to this file' . PHP_EOL .
"defined('_JEXEC') or die('Restricted access');"
. PHP_EOL .
- $this->hhh . 'MODCODE' . $this->hhh
+ Placefix::_h('MODCODE')
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
@@ -654,7 +638,7 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL
.
PHP_EOL . '// No direct access to this file'
. PHP_EOL .
@@ -666,7 +650,7 @@ class Structure extends Get
' */' . PHP_EOL .
"class " . $module->class_data_name
. ' extends \JObject' . PHP_EOL .
- "{" . $this->hhh . 'DYNAMICGETS' . $this->hhh . "}"
+ "{" . Placefix::_h('DYNAMICGETS') . "}"
. PHP_EOL
);
$this->newFiles[$module->key][] = $fileDetails;
@@ -683,13 +667,13 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL
.
PHP_EOL . '// No direct access to this file'
. PHP_EOL .
"defined('_JEXEC') or die('Restricted access');"
. PHP_EOL .
- $this->hhh . 'HELPERCODE' . $this->hhh
+ Placefix::_h('HELPERCODE')
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
@@ -717,11 +701,11 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL .
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL .
PHP_EOL . '// No direct access to this file' . PHP_EOL .
"defined('_JEXEC') or die('Restricted access');"
. PHP_EOL .
- $this->hhh . 'MODDEFAULT' . $this->hhh
+ Placefix::_h('MODDEFAULT')
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
@@ -736,13 +720,13 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL
.
PHP_EOL . '// No direct access to this file'
. PHP_EOL .
"defined('_JEXEC') or die('Restricted access');"
. PHP_EOL .
- $this->hhh . 'INSTALLCLASS' . $this->hhh
+ Placefix::_h('INSTALLCLASS')
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
@@ -789,16 +773,16 @@ class Structure extends Get
'zip' => 'mod_admin.css');
$this->writeFile(
$fileDetails['path'],
- $this->hhh . 'BOM' . $this->hhh . PHP_EOL
+ Placefix::_h('BOM') . PHP_EOL
. PHP_EOL . $css
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
// add the field script
- $field_script_bucket[] = $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Custom CSS";
- $field_script_bucket[] = $this->_t(2)
+ $field_script_bucket[] = Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Custom CSS";
+ $field_script_bucket[] = Indent::_(2)
. "\$document->addStyleSheet('" . $target_path
. "/modules/" . $module->folder_name
. "/css/mod_admin.css', ['version' => 'auto', 'relative' => true]);";
@@ -824,16 +808,16 @@ class Structure extends Get
'zip' => 'mod_admin.js');
$this->writeFile(
$fileDetails['path'],
- $this->hhh . 'BOM' . $this->hhh . PHP_EOL
+ Placefix::_h('BOM') . PHP_EOL
. PHP_EOL . $javascript
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
// add the field script
- $field_script_bucket[] = $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Custom JS";
- $field_script_bucket[] = $this->_t(2)
+ $field_script_bucket[] = Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Custom JS";
+ $field_script_bucket[] = Indent::_(2)
. "\$document->addScript('" . $target_path
. "/modules/" . $module->folder_name
. "/js/mod_admin.js', ['version' => 'auto', 'relative' => true]);";
@@ -890,7 +874,7 @@ class Structure extends Get
. '.xml');
// build basic XML
$xml = '';
- $xml .= PHP_EOL . '';
@@ -919,13 +903,13 @@ class Structure extends Get
if ($add_component_path)
{
$xml .= PHP_EOL . ' ';
// add xml to file
@@ -1096,7 +1080,7 @@ class Structure extends Get
$this->createFolder($module->folder_path . '/language');
// also create the lang tag folder
$this->createFolder(
- $module->folder_path . '/language/' . Config::get('lang_tag', 'en-GB')
+ $module->folder_path . '/language/' . CFactory::_('Config')->get('lang_tag', 'en-GB')
);
// check if this lib has files
if (isset($module->files)
@@ -1187,7 +1171,7 @@ class Structure extends Get
if (ArrayHelper::check($this->joomlaPlugins))
{
// Trigger Event: jcb_ce_onBeforeSetPlugins
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildPlugins',
array(&$this->componentContext, &$this->joomlaPlugins)
);
@@ -1200,7 +1184,7 @@ class Structure extends Get
))
{
// plugin path
- $plugin->folder_path = Config::get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/'
+ $plugin->folder_path = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/'
. $plugin->folder_name;
// set the plugin paths
$this->dynamicPaths[$plugin->key] = $plugin->folder_path;
@@ -1216,11 +1200,11 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL .
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL .
PHP_EOL . '// No direct access to this file' . PHP_EOL .
"defined('_JEXEC') or die('Restricted access');"
. PHP_EOL .
- $this->hhh . 'MAINCLASS' . $this->hhh
+ Placefix::_h('MAINCLASS')
);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
@@ -1247,13 +1231,13 @@ class Structure extends Get
$this->writeFile(
$fileDetails['path'],
'hhh . 'BOM' . $this->hhh . PHP_EOL
+ PHP_EOL . Placefix::_h('BOM') . PHP_EOL
.
PHP_EOL . '// No direct access to this file'
. PHP_EOL .
"defined('_JEXEC') or die('Restricted access');"
. PHP_EOL .
- $this->hhh . 'INSTALLCLASS' . $this->hhh
+ Placefix::_h('INSTALLCLASS')
);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
@@ -1299,9 +1283,9 @@ class Structure extends Get
. '.xml');
// biuld basic XML
$xml = '';
- $xml .= PHP_EOL . '';
// search if we must add the component path
$add_component_path = false;
@@ -1328,13 +1312,13 @@ class Structure extends Get
if ($add_component_path)
{
$xml .= PHP_EOL . '';
// add xml to file
@@ -1487,7 +1471,7 @@ class Structure extends Get
$this->createFolder($plugin->folder_path . '/language');
// also creat the lang tag folder path
$this->createFolder(
- $plugin->folder_path . '/language/' . Config::get('lang_tag', 'en-GB')
+ $plugin->folder_path . '/language/' . CFactory::_('Config')->get('lang_tag', 'en-GB')
);
// check if this lib has files
if (isset($plugin->files)
@@ -1603,7 +1587,7 @@ class Structure extends Get
if (ArrayHelper::check($this->libraries))
{
// Trigger Event: jcb_ce_onBeforeSetLibraries
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeSetLibraries',
array(&$this->componentContext, &$this->libraries)
);
@@ -1712,9 +1696,8 @@ class Structure extends Get
if ($addLocalFolder)
{
// add folder to xml of media folders
- $this->fileContentStatic[$this->hhh
- . 'EXSTRA_MEDIA_FOLDERS' . $this->hhh]
- .= PHP_EOL . $this->_t(2) . ""
+ $this->fileContentStatic[Placefix::_h('EXSTRA_MEDIA_FOLDERS')]
+ .= PHP_EOL . Indent::_(2) . ""
. $libFolder . " ";
}
}
@@ -2072,7 +2055,7 @@ class Structure extends Get
$this->joomlaVersionData->move->static
))
{
- $codeName = Config::get('component_code_name');
+ $codeName = CFactory::_('Config')->component_code_name;
// TODO needs more looking at this must be dynamic actually
$this->notNew[] = 'LICENSE.txt';
// do license check
@@ -2289,16 +2272,16 @@ class Structure extends Get
if ($add_to_extra)
{
// set the tab
- $eTab = $this->_t(2);
+ $eTab = Indent::_(2);
if ('admin' === $checker[0])
{
- $eTab = $this->_t(3);
+ $eTab = Indent::_(3);
}
// set the xml file
- $this->fileContentStatic[$this->hhh . 'EXSTRA_'
+ $this->fileContentStatic[Placefix::_h('EXSTRA_'
. StringHelper::safe(
$checker[0], 'U'
- ) . '_' . $eNAME . $this->hhh]
+ ) . '_' . $eNAME)]
.= PHP_EOL . $eTab . "<" . $ename . ">"
. $checker[1] . "" . $ename . ">";
}
@@ -2348,24 +2331,18 @@ class Structure extends Get
{
$target
= array('admin' => $view['settings']->name_list);
- $config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $view['settings']->version);
+ $config = array(Placefix::_h('CREATIONDATE') => $created,
+ Placefix::_h('BUILDDATE') => $modified,
+ Placefix::_h('VERSION') => $view['settings']->version);
$this->buildDynamique($target, 'list', false, $config);
}
if ($view['settings']->name_single != 'null')
{
$target
= array('admin' => $view['settings']->name_single);
- $config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $view['settings']->version);
+ $config = array(Placefix::_h('CREATIONDATE') => $created,
+ Placefix::_h('BUILDDATE') => $modified,
+ Placefix::_h('VERSION') => $view['settings']->version);
$this->buildDynamique(
$target, 'single', false, $config
);
@@ -2379,12 +2356,9 @@ class Structure extends Get
// setup the front site edit-view files
$target
= array('site' => $view['settings']->name_single);
- $config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $view['settings']->version);
+ $config = array(Placefix::_h('CREATIONDATE') => $created,
+ Placefix::_h('BUILDDATE') => $modified,
+ Placefix::_h('VERSION') => $view['settings']->version);
$this->buildDynamique($target, 'edit', false, $config);
}
}
@@ -2416,24 +2390,18 @@ class Structure extends Get
{
// set list view
$target = array('site' => $view['settings']->code);
- $config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $view['settings']->version);
+ $config = array(Placefix::_h('CREATIONDATE') => $created,
+ Placefix::_h('BUILDDATE') => $modified,
+ Placefix::_h('VERSION') => $view['settings']->version);
$this->buildDynamique($target, 'list', false, $config);
}
elseif ($view['settings']->main_get->gettype == 1)
{
// set single view
$target = array('site' => $view['settings']->code);
- $config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $view['settings']->version);
+ $config = array(Placefix::_h('CREATIONDATE') => $created,
+ Placefix::_h('BUILDDATE') => $modified,
+ Placefix::_h('VERSION') => $view['settings']->version);
$this->buildDynamique($target, 'single', false, $config);
}
}
@@ -2456,24 +2424,18 @@ class Structure extends Get
{
// set list view$view
$target = array('custom_admin' => $view['settings']->code);
- $config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $view['settings']->version);
+ $config = array(Placefix::_h('CREATIONDATE') => $created,
+ Placefix::_h('BUILDDATE') => $modified,
+ Placefix::_h('VERSION') => $view['settings']->version);
$this->buildDynamique($target, 'list', false, $config);
}
elseif ($view['settings']->main_get->gettype == 1)
{
// set single view
$target = array('custom_admin' => $view['settings']->code);
- $config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $view['settings']->version);
+ $config = array(Placefix::_h('CREATIONDATE') => $created,
+ Placefix::_h('BUILDDATE') => $modified,
+ Placefix::_h('VERSION') => $view['settings']->version);
$this->buildDynamique($target, 'single', false, $config);
}
}
@@ -2880,7 +2842,7 @@ class Structure extends Get
private function setJoomlaVersionData()
{
// option to load other settings
- $custom_settings = $this->templatePath . '/settings_' . Config::get('component_code_name') . '.json';
+ $custom_settings = $this->templatePath . '/settings_' . CFactory::_('Config')->component_code_name . '.json';
// set the version data
if (File::exists($custom_settings))
{
@@ -3123,8 +3085,8 @@ class Structure extends Get
'//', '/', $custom['file']
);
// update the dynamic component name placholders in file names
- $custom['path'] = $this->setPlaceholders(
- $custom['path'], $this->placeholders
+ $custom['path'] = CFactory::_('Placeholder')->update(
+ $custom['path'], CFactory::_('Placeholder')->active
);
// get the path info
$pathInfo = pathinfo($custom['path']);
@@ -3263,10 +3225,10 @@ class Structure extends Get
*/
protected function updateDynamicPath($path)
{
- return $this->setPlaceholders(
- $this->setPlaceholders(
+ return CFactory::_('Placeholder')->update(
+ CFactory::_('Placeholder')->update(
$path, ComponentbuilderHelper::$constantPaths
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
}
diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php
index 88ab4163b..a657d6ac7 100644
--- a/admin/helpers/compiler/c_Fields.php
+++ b/admin/helpers/compiler/c_Fields.php
@@ -18,7 +18,10 @@ use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\String\FieldHelper;
-use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
+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;
/**
* Compiler class
@@ -26,6 +29,7 @@ use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
class Fields extends Structure
{
+
/**
* Metadate Switch
*
@@ -369,24 +373,6 @@ class Fields extends Structure
*/
public $movedPublishingFields = array();
- /**
- * Set the line number in comments
- *
- * @param int $nr The line number
- *
- * @return void
- *
- */
- private function setLine($nr)
- {
- if (Config::get('debug_line_nr', false))
- {
- return ' [Fields ' . $nr . ']';
- }
-
- return '';
- }
-
/**
* set the Field set of a view
*
@@ -416,162 +402,162 @@ class Fields extends Structure
$this->accessBuilder[$nameSingleCode] = $nameListCode;
}
// main lang prefix
- $langView = Config::get('lang_prefix') . '_'
- . $this->placeholders[$this->hhh . 'VIEW' . $this->hhh];
- $langViews = Config::get('lang_prefix') . '_'
- . $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
+ $langView = CFactory::_('Config')->lang_prefix . '_'
+ . CFactory::_('Placeholder')->active[Placefix::_h('VIEW')];
+ $langViews = CFactory::_('Config')->lang_prefix . '_'
+ . CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')];
// set default lang
- $this->setLangContent(
- $this->lang, $langView, $view['settings']->name_single
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView, $view['settings']->name_single
);
- $this->setLangContent(
- $this->lang, $langViews, $view['settings']->name_list
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews, $view['settings']->name_list
);
// set global item strings
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_ARCHIVED',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_ARCHIVED',
"%s " . $view['settings']->name_list . " archived."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_ARCHIVED_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_ARCHIVED_1',
"%s " . $view['settings']->name_single . " archived."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_CHECKED_IN_0',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_CHECKED_IN_0',
"No " . $view['settings']->name_single
. " successfully checked in."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_CHECKED_IN_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_CHECKED_IN_1',
"%d " . $view['settings']->name_single
. " successfully checked in."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_CHECKED_IN_MORE',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_CHECKED_IN_MORE',
"%d " . $view['settings']->name_list
. " successfully checked in."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_DELETED',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_DELETED',
"%s " . $view['settings']->name_list . " deleted."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_DELETED_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_DELETED_1',
"%s " . $view['settings']->name_single . " deleted."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_FEATURED',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_FEATURED',
"%s " . $view['settings']->name_list . " featured."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_FEATURED_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_FEATURED_1',
"%s " . $view['settings']->name_single . " featured."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_PUBLISHED',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_PUBLISHED',
"%s " . $view['settings']->name_list . " published."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_PUBLISHED_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_PUBLISHED_1',
"%s " . $view['settings']->name_single . " published."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_TRASHED',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_TRASHED',
"%s " . $view['settings']->name_list . " trashed."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_TRASHED_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_TRASHED_1',
"%s " . $view['settings']->name_single . " trashed."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_UNFEATURED',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_UNFEATURED',
"%s " . $view['settings']->name_list . " unfeatured."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_UNFEATURED_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_UNFEATURED_1',
"%s " . $view['settings']->name_single . " unfeatured."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_UNPUBLISHED',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_UNPUBLISHED',
"%s " . $view['settings']->name_list . " unpublished."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_UNPUBLISHED_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_UNPUBLISHED_1',
"%s " . $view['settings']->name_single . " unpublished."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_FAILED_PUBLISHING',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_FAILED_PUBLISHING',
"%s " . $view['settings']->name_list . " failed publishing."
);
- $this->setLangContent(
- $this->lang, $langViews . '_N_ITEMS_FAILED_PUBLISHING_1',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_N_ITEMS_FAILED_PUBLISHING_1',
"%s " . $view['settings']->name_single . " failed publishing."
);
- $this->setLangContent(
- $this->lang, $langViews . '_BATCH_OPTIONS',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_BATCH_OPTIONS',
"Batch process the selected " . $view['settings']->name_list
);
- $this->setLangContent(
- $this->lang, $langViews . '_BATCH_TIP',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langViews . '_BATCH_TIP',
"All changes will be applied to all selected "
. $view['settings']->name_list
);
// set some basic defaults
- $this->setLangContent(
- $this->lang, $langView . '_ERROR_UNIQUE_ALIAS',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_ERROR_UNIQUE_ALIAS',
"Another " . $view['settings']->name_single
. " has the same alias."
);
- $this->setLangContent(
- $this->lang, $langView . '_CREATED_DATE_LABEL', "Created Date"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_CREATED_DATE_LABEL', "Created Date"
);
- $this->setLangContent(
- $this->lang, $langView . '_CREATED_DATE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_CREATED_DATE_DESC',
"The date this " . $view['settings']->name_single
. " was created."
);
- $this->setLangContent(
- $this->lang, $langView . '_MODIFIED_DATE_LABEL', "Modified Date"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_MODIFIED_DATE_LABEL', "Modified Date"
);
- $this->setLangContent(
- $this->lang, $langView . '_MODIFIED_DATE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_MODIFIED_DATE_DESC',
"The date this " . $view['settings']->name_single
. " was modified."
);
- $this->setLangContent(
- $this->lang, $langView . '_CREATED_BY_LABEL', "Created By"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_CREATED_BY_LABEL', "Created By"
);
- $this->setLangContent(
- $this->lang, $langView . '_CREATED_BY_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_CREATED_BY_DESC',
"The user that created this " . $view['settings']->name_single
. "."
);
- $this->setLangContent(
- $this->lang, $langView . '_MODIFIED_BY_LABEL', "Modified By"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_MODIFIED_BY_LABEL', "Modified By"
);
- $this->setLangContent(
- $this->lang, $langView . '_MODIFIED_BY_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_MODIFIED_BY_DESC',
"The last user that modified this "
. $view['settings']->name_single . "."
);
- $this->setLangContent(
- $this->lang, $langView . '_ORDERING_LABEL', "Ordering"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_ORDERING_LABEL', "Ordering"
);
- $this->setLangContent(
- $this->lang, $langView . '_VERSION_LABEL', "Version"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_VERSION_LABEL', "Version"
);
- $this->setLangContent(
- $this->lang, $langView . '_VERSION_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_VERSION_DESC',
"A count of the number of times this "
. $view['settings']->name_single . " has been revised."
);
- $this->setLangContent(
- $this->lang, $langView . '_SAVE_WARNING',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langView . '_SAVE_WARNING',
"Alias already existed so a number was added at the end. You can re-edit the "
. $view['settings']->name_single . " to customise the alias."
);
// check what type of field builder to use
- if (Config::get('field_builder_type', 2) == 1)
+ if (CFactory::_('Config')->get('field_builder_type', 2) == 1)
{
// build field set using string manipulation
return $this->stringFieldSet(
@@ -612,7 +598,7 @@ class Fields extends Structure
$readOnly = false;
if ($view['settings']->type == 2)
{
- $readOnly = $this->_t(3) . 'readonly="true"' . PHP_EOL . $this->_t(
+ $readOnly = Indent::_(3) . 'readonly="true"' . PHP_EOL . Indent::_(
3
) . 'disabled="true"';
}
@@ -620,133 +606,141 @@ class Fields extends Structure
$dynamicFields = '';
// set the custom table key
$dbkey = 'g';
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildFields
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildFields',
array(&$this->componentContext, &$dynamicFields, &$readOnly,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$this->placeholders, &$langView,
&$langViews)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field)
{
$dynamicFields .= $this->setDynamicField(
$field, $view, $view['settings']->type, $langView,
- $nameSingleCode, $nameListCode, $this->placeholders, $dbkey,
+ $nameSingleCode, $nameListCode, CFactory::_('Placeholder')->active, $dbkey,
true
);
}
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildFields
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildFields',
array(&$this->componentContext, &$dynamicFields, &$readOnly,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$this->placeholders, &$langView,
&$langViews)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// set the default fields
$fieldSet = array();
$fieldSet[] = '';
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "";
// if id is not set
if (!isset($this->fieldsNames[$nameSingleCode]['id']))
{
- $fieldSet[] = $this->_t(2) . "_t(3) . "name=" . '"id"';
- $fieldSet[] = $this->_t(3)
+ $fieldSet[] = Indent::_(2) . "_t(3)
+ $fieldSet[] = Indent::_(3)
. 'description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"';
- $fieldSet[] = $this->_t(3) . 'readonly="true"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . 'readonly="true"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
// if created is not set
if (!isset($this->fieldsNames[$nameSingleCode]['created']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "_t(3) . "name=" . '"created"';
- $fieldSet[] = $this->_t(3) . "type=" . '"calendar"';
- $fieldSet[] = $this->_t(3) . "label=" . '"' . $langView
+ $fieldSet[] = Indent::_(2) . "_t(3) . "description=" . '"' . $langView
+ $fieldSet[] = Indent::_(3) . "description=" . '"' . $langView
. '_CREATED_DATE_DESC"';
- $fieldSet[] = $this->_t(3) . "size=" . '"22"';
+ $fieldSet[] = Indent::_(3) . "size=" . '"22"';
if ($readOnly)
{
$fieldSet[] = $readOnly;
}
- $fieldSet[] = $this->_t(3) . "format=" . '"%Y-%m-%d %H:%M:%S"';
- $fieldSet[] = $this->_t(3) . "filter=" . '"user_utc"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . "format=" . '"%Y-%m-%d %H:%M:%S"';
+ $fieldSet[] = Indent::_(3) . "filter=" . '"user_utc"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
// if created_by is not set
if (!isset($this->fieldsNames[$nameSingleCode]['created_by']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "_t(3) . "name=" . '"created_by"';
- $fieldSet[] = $this->_t(3) . "type=" . '"user"';
- $fieldSet[] = $this->_t(3) . "label=" . '"' . $langView
+ $fieldSet[] = Indent::_(2) . "_t(3) . "description=" . '"' . $langView
+ $fieldSet[] = Indent::_(3) . "description=" . '"' . $langView
. '_CREATED_BY_DESC"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
// if published is not set
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "_t(3) . "description="
+ $fieldSet[] = Indent::_(3) . "description="
. '"JFIELD_PUBLISHED_DESC" class="chzn-color-state"';
if ($readOnly)
{
$fieldSet[] = $readOnly;
}
- $fieldSet[] = $this->_t(3) . "filter="
+ $fieldSet[] = Indent::_(3) . "filter="
. '"intval" size="1" default="1" >';
- $fieldSet[] = $this->_t(3) . "';
- $fieldSet[] = $this->_t(4) . "JPUBLISHED ";
- $fieldSet[] = $this->_t(3) . "';
- $fieldSet[] = $this->_t(4) . "JUNPUBLISHED ";
- $fieldSet[] = $this->_t(3) . "';
- $fieldSet[] = $this->_t(4) . "JARCHIVED ";
- $fieldSet[] = $this->_t(3) . "';
- $fieldSet[] = $this->_t(4) . "JTRASHED ";
- $fieldSet[] = $this->_t(2) . " ";
+ $fieldSet[] = Indent::_(3) . "';
+ $fieldSet[] = Indent::_(4) . "JPUBLISHED ";
+ $fieldSet[] = Indent::_(3) . "';
+ $fieldSet[] = Indent::_(4) . "JUNPUBLISHED ";
+ $fieldSet[] = Indent::_(3) . "';
+ $fieldSet[] = Indent::_(4) . "JARCHIVED ";
+ $fieldSet[] = Indent::_(3) . "';
+ $fieldSet[] = Indent::_(4) . "JTRASHED ";
+ $fieldSet[] = Indent::_(2) . " ";
// count the static field created
$this->fieldCount++;
}
// if modified is not set
if (!isset($this->fieldsNames[$nameSingleCode]['modified']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2)
+ $fieldSet[] = Indent::_(2)
. '_t(3) . 'label="' . $langView
+ $fieldSet[] = Indent::_(3) . 'label="' . $langView
. '_MODIFIED_DATE_LABEL" description="' . $langView
. '_MODIFIED_DATE_DESC"';
- $fieldSet[] = $this->_t(3)
+ $fieldSet[] = Indent::_(3)
. 'size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />';
// count the static field created
$this->fieldCount++;
@@ -754,18 +748,18 @@ class Fields extends Structure
// if modified_by is not set
if (!isset($this->fieldsNames[$nameSingleCode]['modified_by']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2)
+ $fieldSet[] = Indent::_(2)
. '_t(3) . 'label="' . $langView
+ $fieldSet[] = Indent::_(3) . 'label="' . $langView
. '_MODIFIED_BY_LABEL"';
- $fieldSet[] = $this->_t(3) . "description=" . '"' . $langView
+ $fieldSet[] = Indent::_(3) . "description=" . '"' . $langView
. '_MODIFIED_BY_DESC"';
- $fieldSet[] = $this->_t(3) . 'class="readonly"';
- $fieldSet[] = $this->_t(3) . 'readonly="true"';
- $fieldSet[] = $this->_t(3) . 'filter="unset"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . 'class="readonly"';
+ $fieldSet[] = Indent::_(3) . 'readonly="true"';
+ $fieldSet[] = Indent::_(3) . 'filter="unset"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
@@ -776,62 +770,62 @@ class Fields extends Structure
)
&& !isset($this->fieldsNames[$nameSingleCode]['access']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . '_t(3) . 'type="accesslevel"';
- $fieldSet[] = $this->_t(3) . 'label="JFIELD_ACCESS_LABEL"';
- $fieldSet[] = $this->_t(3) . 'description="JFIELD_ACCESS_DESC"';
- $fieldSet[] = $this->_t(3) . 'default="1"';
+ $fieldSet[] = Indent::_(2) . '_t(3) . 'required="false"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . 'required="false"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
// if ordering is not set
if (!isset($this->fieldsNames[$nameSingleCode]['ordering']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "_t(3) . 'name="ordering"';
- $fieldSet[] = $this->_t(3) . 'type="number"';
- $fieldSet[] = $this->_t(3) . 'class="inputbox validate-ordering"';
- $fieldSet[] = $this->_t(3) . 'label="' . $langView
+ $fieldSet[] = Indent::_(2) . "_t(3) . 'description=""';
- $fieldSet[] = $this->_t(3) . 'default="0"';
- $fieldSet[] = $this->_t(3) . 'size="6"';
+ $fieldSet[] = Indent::_(3) . 'description=""';
+ $fieldSet[] = Indent::_(3) . 'default="0"';
+ $fieldSet[] = Indent::_(3) . 'size="6"';
if ($readOnly)
{
$fieldSet[] = $readOnly;
}
- $fieldSet[] = $this->_t(3) . 'required="false"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . 'required="false"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
// if version is not set
if (!isset($this->fieldsNames[$nameSingleCode]['version']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "_t(3) . 'name="version"';
- $fieldSet[] = $this->_t(3) . 'type="text"';
- $fieldSet[] = $this->_t(3) . 'class="readonly"';
- $fieldSet[] = $this->_t(3) . 'label="' . $langView
+ $fieldSet[] = Indent::_(2) . "_t(3) . 'description="' . $langView
+ $fieldSet[] = Indent::_(3) . 'description="' . $langView
. '_VERSION_DESC"';
- $fieldSet[] = $this->_t(3) . 'size="6"';
- $fieldSet[] = $this->_t(3) . 'readonly="true"';
- $fieldSet[] = $this->_t(3) . 'filter="unset"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . 'size="6"';
+ $fieldSet[] = Indent::_(3) . 'readonly="true"';
+ $fieldSet[] = Indent::_(3) . 'filter="unset"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
@@ -844,36 +838,36 @@ class Fields extends Structure
// metakey
if (!isset($this->fieldsNames[$nameSingleCode]['metakey']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "_t(3) . 'name="metakey"';
- $fieldSet[] = $this->_t(3) . 'type="textarea"';
- $fieldSet[] = $this->_t(3)
+ $fieldSet[] = Indent::_(2) . "_t(3)
+ $fieldSet[] = Indent::_(3)
. 'description="JFIELD_META_KEYWORDS_DESC"';
- $fieldSet[] = $this->_t(3) . 'rows="3"';
- $fieldSet[] = $this->_t(3) . 'cols="30"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . 'rows="3"';
+ $fieldSet[] = Indent::_(3) . 'cols="30"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
// metadesc
if (!isset($this->fieldsNames[$nameSingleCode]['metadesc']))
{
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "_t(3) . 'name="metadesc"';
- $fieldSet[] = $this->_t(3) . 'type="textarea"';
- $fieldSet[] = $this->_t(3)
+ $fieldSet[] = Indent::_(2) . "_t(3)
+ $fieldSet[] = Indent::_(3)
. 'description="JFIELD_META_DESCRIPTION_DESC"';
- $fieldSet[] = $this->_t(3) . 'rows="3"';
- $fieldSet[] = $this->_t(3) . 'cols="30"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(3) . 'rows="3"';
+ $fieldSet[] = Indent::_(3) . 'cols="30"';
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
}
@@ -886,21 +880,21 @@ class Fields extends Structure
// set the field/tab name
$field_name = "title";
$tab_name = "publishing";
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "";
- $fieldSet[] = $this->_t(2) . "";
// at this point we know that we must add a hidden title field
// and make sure it does not get stored to the database
- $fieldSet[] = $this->_t(2) . "_t(3) . "name=" . '"' . $field_name . '"';
- $fieldSet[] = $this->_t(3)
+ $fieldSet[] = Indent::_(2) . "_t(3) . 'default="' . $component . ' '
+ $fieldSet[] = Indent::_(3) . 'default="' . $component . ' '
. $nameSingleCode . '"';
- $fieldSet[] = $this->_t(2) . "/>";
+ $fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
// setup needed field values for layout
@@ -916,11 +910,11 @@ class Fields extends Structure
// load the dynamic fields now
if (StringHelper::check($dynamicFields))
{
- $fieldSet[] = $this->_t(2) . "" . $dynamicFields;
}
// close fieldset
- $fieldSet[] = $this->_t(1) . " ";
+ $fieldSet[] = Indent::_(1) . "";
// check if metadata is added to this view
if (isset($this->metadataBuilder[$nameSingleCode])
&& StringHelper::check(
@@ -931,72 +925,72 @@ class Fields extends Structure
|| !isset($this->fieldsNames[$nameSingleCode]['rights'])
|| !isset($this->fieldsNames[$nameSingleCode]['author']))
{
- $fieldSet[] = PHP_EOL . $this->_t(1) . "";
- $fieldSet[] = $this->_t(1) . "';
- $fieldSet[] = $this->_t(2) . '_t(3)
+ $fieldSet[] = Indent::_(2) . '';
// robots
if (!isset($this->fieldsNames[$nameSingleCode]['robots']))
{
- $fieldSet[] = $this->_t(3) . "";
- $fieldSet[] = $this->_t(3) . '_t(4) . 'type="list"';
- $fieldSet[] = $this->_t(4)
+ $fieldSet[] = Indent::_(3) . '_t(4)
+ $fieldSet[] = Indent::_(4)
. 'description="JFIELD_METADATA_ROBOTS_DESC" >';
- $fieldSet[] = $this->_t(4)
+ $fieldSet[] = Indent::_(4)
. 'JGLOBAL_USE_GLOBAL ';
- $fieldSet[] = $this->_t(4)
+ $fieldSet[] = Indent::_(4)
. 'JGLOBAL_INDEX_FOLLOW ';
- $fieldSet[] = $this->_t(4)
+ $fieldSet[] = Indent::_(4)
. 'JGLOBAL_NOINDEX_FOLLOW ';
- $fieldSet[] = $this->_t(4)
+ $fieldSet[] = Indent::_(4)
. 'JGLOBAL_INDEX_NOFOLLOW ';
- $fieldSet[] = $this->_t(4)
+ $fieldSet[] = Indent::_(4)
. 'JGLOBAL_NOINDEX_NOFOLLOW ';
- $fieldSet[] = $this->_t(3) . ' ';
+ $fieldSet[] = Indent::_(3) . ' ';
// count the static field created
$this->fieldCount++;
}
// author
if (!isset($this->fieldsNames[$nameSingleCode]['author']))
{
- $fieldSet[] = $this->_t(3) . "";
- $fieldSet[] = $this->_t(3) . '_t(4) . 'type="text"';
- $fieldSet[] = $this->_t(4)
+ $fieldSet[] = Indent::_(3) . '_t(4) . 'size="20"';
- $fieldSet[] = $this->_t(3) . "/>";
+ $fieldSet[] = Indent::_(4) . 'size="20"';
+ $fieldSet[] = Indent::_(3) . "/>";
// count the static field created
$this->fieldCount++;
}
// rights
if (!isset($this->fieldsNames[$nameSingleCode]['rights']))
{
- $fieldSet[] = $this->_t(3) . "";
- $fieldSet[] = $this->_t(3)
+ $fieldSet[] = Indent::_(3)
. '_t(4)
+ $fieldSet[] = Indent::_(4)
. 'description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"';
- $fieldSet[] = $this->_t(4) . 'cols="30" rows="2"';
- $fieldSet[] = $this->_t(3) . "/>";
+ $fieldSet[] = Indent::_(4) . 'cols="30" rows="2"';
+ $fieldSet[] = Indent::_(3) . "/>";
// count the static field created
$this->fieldCount++;
}
- $fieldSet[] = $this->_t(2) . " ";
- $fieldSet[] = $this->_t(1) . " ";
+ $fieldSet[] = Indent::_(2) . "";
+ $fieldSet[] = Indent::_(1) . "";
}
}
@@ -1031,41 +1025,49 @@ class Fields extends Structure
$dynamicFieldsXML = array();
// set the custom table key
$dbkey = 'g';
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildFields
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildFields',
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$this->placeholders, &$langView,
&$langViews)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field)
{
$dynamicFieldsXML[] = $this->setDynamicField(
$field, $view, $view['settings']->type, $langView,
- $nameSingleCode, $nameListCode, $this->placeholders, $dbkey,
+ $nameSingleCode, $nameListCode, CFactory::_('Placeholder')->active, $dbkey,
true
);
}
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildFields
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildFields',
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
&$dbkey, &$view, &$component, &$nameSingleCode,
&$nameListCode, &$this->placeholders, &$langView,
&$langViews)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// set the default fields
$XML = new simpleXMLElement(' ');
$fieldSetXML = $XML->addChild('fieldset');
$fieldSetXML->addAttribute('name', 'details');
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__) . " Default Fields."
+ $fieldSetXML, Line::_(__Line__, __Class__) . " Default Fields."
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
- $this->setLine(__LINE__) . " Id Field. Type: Text (joomla)"
+ Line::_(__Line__, __Class__) . " Id Field. Type: Text (joomla)"
);
// if id is not set
if (!isset($this->fieldsNames[$nameSingleCode]['id']))
@@ -1099,7 +1101,7 @@ class Fields extends Structure
);
$attributes = array_merge($attributes, $readOnlyXML);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " Date Created Field. Type: Calendar (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1118,7 +1120,7 @@ class Fields extends Structure
);
$attributes = array_merge($attributes, $readOnlyXML);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " User Created Field. Type: User (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1136,7 +1138,7 @@ class Fields extends Structure
);
$attributes = array_merge($attributes, $readOnlyXML);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " Published Field. Type: List (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1168,7 +1170,7 @@ class Fields extends Structure
'filter' => 'user_utc'
);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " Date Modified Field. Type: Calendar (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1189,7 +1191,7 @@ class Fields extends Structure
'filter' => 'unset'
);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " User Modified Field. Type: User (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1214,7 +1216,7 @@ class Fields extends Structure
);
$attributes = array_merge($attributes, $readOnlyXML);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " Access Field. Type: Accesslevel (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1237,7 +1239,7 @@ class Fields extends Structure
);
$attributes = array_merge($attributes, $readOnlyXML);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " Ordering Field. Type: Numbers (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1260,7 +1262,7 @@ class Fields extends Structure
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
- $this->setLine(__LINE__) . " Version Field. Type: Text (joomla)"
+ Line::_(__Line__, __Class__) . " Version Field. Type: Text (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
@@ -1285,7 +1287,7 @@ class Fields extends Structure
'cols' => 30
);
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " Metakey Field. Type: Textarea (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1302,7 +1304,7 @@ class Fields extends Structure
$attributes['label'] = 'JFIELD_META_DESCRIPTION_LABEL';
$attributes['description'] = 'JFIELD_META_DESCRIPTION_DESC';
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__)
+ $fieldSetXML, Line::_(__Line__, __Class__)
. " Metadesc Field. Type: Textarea (joomla)"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1329,17 +1331,17 @@ class Fields extends Structure
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
- $this->setLine(__LINE__)
+ Line::_(__Line__, __Class__)
. " Was added due to Permissions JS needing a Title field"
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
- $this->setLine(__LINE__)
+ Line::_(__Line__, __Class__)
. " Let us know at gh-629 should this change"
);
ComponentbuilderHelper::xmlComment(
$fieldSetXML,
- $this->setLine(__LINE__)
+ Line::_(__Line__, __Class__)
. " https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235"
);
$fieldXML = $fieldSetXML->addChild('field');
@@ -1360,7 +1362,7 @@ class Fields extends Structure
if (count((array) $dynamicFieldsXML))
{
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__) . " Dynamic Fields."
+ $fieldSetXML, Line::_(__Line__, __Class__) . " Dynamic Fields."
);
foreach ($dynamicFieldsXML as $dynamicfield)
{
@@ -1378,7 +1380,7 @@ class Fields extends Structure
|| !isset($this->fieldsNames[$nameSingleCode]['rights']))
{
ComponentbuilderHelper::xmlComment(
- $fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields"
+ $fieldSetXML, Line::_(__Line__, __Class__) . " Metadata Fields"
);
$fieldsXML = $fieldSetXML->addChild('fields');
$fieldsXML->addAttribute('name', 'metadata');
@@ -1394,7 +1396,7 @@ class Fields extends Structure
if (!isset($this->fieldsNames[$nameSingleCode]['robots']))
{
ComponentbuilderHelper::xmlComment(
- $fieldsFieldSetXML, $this->setLine(__LINE__)
+ $fieldsFieldSetXML, Line::_(__Line__, __Class__)
. " Robots Field. Type: List (joomla)"
);
$robots = $fieldsFieldSetXML->addChild('field');
@@ -1427,7 +1429,7 @@ class Fields extends Structure
if (!isset($this->fieldsNames[$nameSingleCode]['author']))
{
ComponentbuilderHelper::xmlComment(
- $fieldsFieldSetXML, $this->setLine(__LINE__)
+ $fieldsFieldSetXML, Line::_(__Line__, __Class__)
. " Author Field. Type: Text (joomla)"
);
$author = $fieldsFieldSetXML->addChild('field');
@@ -1448,7 +1450,7 @@ class Fields extends Structure
if (!isset($this->fieldsNames[$nameSingleCode]['rights']))
{
ComponentbuilderHelper::xmlComment(
- $fieldsFieldSetXML, $this->setLine(__LINE__)
+ $fieldsFieldSetXML, Line::_(__Line__, __Class__)
. " Rights Field. Type: Textarea (joomla)"
);
$rights = $fieldsFieldSetXML->addChild('field');
@@ -1587,7 +1589,7 @@ class Fields extends Structure
&$nameSingleCode, &$nameListCode, &$placeholders, &$dbkey, $build
) {
// set default return
- if (Config::get('field_builder_type', 2) == 1)
+ if (CFactory::_('Config')->get('field_builder_type', 2) == 1)
{
// string manipulation
$dynamicField = '';
@@ -1832,7 +1834,7 @@ class Fields extends Structure
) {
// check the field builder type
$xmlField = '';
- if (Config::get('field_builder_type', 2) == 1)
+ if (CFactory::_('Config')->get('field_builder_type', 2) == 1)
{
// string manipulation
$xmlField = $this->setDynamicField(
@@ -1854,10 +1856,10 @@ class Fields extends Structure
$xmlField = dom_import_simplexml(
$newxmlField->fieldXML
);
- $xmlField = PHP_EOL . $this->_t(2) . "' . PHP_EOL
- . $this->_t(1) . $this->xmlPrettyPrint(
+ . Indent::_(1) . $this->xmlPrettyPrint(
$xmlField, 'field'
);
}
@@ -1892,7 +1894,7 @@ class Fields extends Structure
// count the dynamic fields created
$this->fieldCount++;
// check what type of field builder to use
- if (Config::get('field_builder_type', 2) == 1)
+ if (CFactory::_('Config')->get('field_builder_type', 2) == 1)
{
// build field set using string manipulation
return $this->stringSetField(
@@ -1938,19 +1940,19 @@ class Fields extends Structure
if ($setType === 'option')
{
// now add to the field set
- $field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1)
- . "";
- $field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1)
+ $field .= PHP_EOL . Indent::_(1) . $taber . Indent::_(1)
. " $value)
{
if ($property != 'option')
{
- $field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1)
+ $field .= PHP_EOL . Indent::_(2) . $taber . Indent::_(1)
. $property . '="' . $value . '"';
}
elseif ($property === 'option')
@@ -1982,13 +1984,13 @@ class Fields extends Structure
$valueKeyArray[0], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[0]
);
// now add group label
$groups_[$valueKeyArray[1]] = PHP_EOL
- . $this->_t(1) . $taber . $this->_t(2)
+ . Indent::_(1) . $taber . Indent::_(2)
. '';
// set order
$order_['group' . $valueKeyArray[1]]
@@ -2006,16 +2008,16 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['group'][$valueKeyArray[2]][]
- = PHP_EOL . $this->_t(1) . $taber
- . $this->_t(3) . '' . PHP_EOL
- . $this->_t(1) . $taber . $this->_t(4)
+ . Indent::_(1) . $taber . Indent::_(4)
. $langValue . ' ';
$optionArray[$valueKeyArray[0]]
= $langValue;
@@ -2030,16 +2032,16 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['option'][$valueKeyArray[0]]
- = PHP_EOL . $this->_t(1) . $taber
- . $this->_t(2) . '' . PHP_EOL
- . $this->_t(1) . $taber . $this->_t(3)
+ . Indent::_(1) . $taber . Indent::_(3)
. $langValue . ' ';
$optionArray[$valueKeyArray[0]]
= $langValue;
@@ -2056,15 +2058,15 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
$grouped_['option'][$option] = PHP_EOL
- . $this->_t(1) . $taber . $this->_t(2)
+ . Indent::_(1) . $taber . Indent::_(2)
. ''
- . PHP_EOL . $this->_t(1) . $taber
- . $this->_t(3) . $langValue . ' ';
+ . PHP_EOL . Indent::_(1) . $taber
+ . Indent::_(3) . $langValue . '';
$optionArray[$option] = $langValue;
// set order
$order_['option' . $option] = $option;
@@ -2096,8 +2098,8 @@ class Fields extends Structure
unset($groups_[$_id]);
unset($grouped_[$key_][$_id]);
// close the group
- $optionSet .= PHP_EOL . $this->_t(1) . $taber
- . $this->_t(2) . ' ';
+ $optionSet .= PHP_EOL . Indent::_(1) . $taber
+ . Indent::_(2) . '';
}
elseif (isset($grouped_[$key_][$_id])
&& StringHelper::check(
@@ -2123,14 +2125,14 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $t
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $t
);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(1)
- . $taber . $this->_t(2) . '' . PHP_EOL . $this->_t(1)
- . $taber . $this->_t(3) . $langValue
+ $optionSet .= PHP_EOL . Indent::_(1)
+ . $taber . Indent::_(2) . ' ' . PHP_EOL . Indent::_(1)
+ . $taber . Indent::_(3) . $langValue
. ' ';
$optionArray[$v] = $langValue;
}
@@ -2142,14 +2144,14 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(2)
- . $taber . $this->_t(1) . '' . PHP_EOL . $this->_t(2)
- . $taber . $this->_t(2) . $langValue
+ $optionSet .= PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(1) . ' ' . PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(2) . $langValue
. ' ';
$optionArray[$option] = $langValue;
}
@@ -2167,11 +2169,11 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent($this->lang, $langValue, $t);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langValue, $t);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(2) . $taber
- . $this->_t(1) . ''
- . PHP_EOL . $this->_t(2) . $taber . $this->_t(2)
+ $optionSet .= PHP_EOL . Indent::_(2) . $taber
+ . Indent::_(1) . ' '
+ . PHP_EOL . Indent::_(2) . $taber . Indent::_(2)
. $langValue . ' ';
$optionArray[$v] = $langValue;
}
@@ -2183,14 +2185,14 @@ class Fields extends Structure
$value, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $value
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $value
);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(2)
- . $taber . $this->_t(1) . '' . PHP_EOL . $this->_t(2)
- . $taber . $this->_t(2) . $langValue
+ $optionSet .= PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(1) . ' ' . PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(2) . $langValue
. ' ';
$optionArray[$value] = $langValue;
}
@@ -2201,54 +2203,54 @@ class Fields extends Structure
if (StringHelper::check($optionSet))
{
$field .= '>';
- $field .= PHP_EOL . $this->_t(3) . $taber . "";
+ $field .= PHP_EOL . Indent::_(3) . $taber . "";
$field .= $optionSet;
- $field .= PHP_EOL . $this->_t(2) . $taber . " ";
+ $field .= PHP_EOL . Indent::_(2) . $taber . "";
}
// if no options found and must have a list of options
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'list'))
{
$optionArray = false;
- $field .= PHP_EOL . $this->_t(2) . $taber . "/>";
- $field .= PHP_EOL . $this->_t(2) . $taber . ""
. PHP_EOL;
}
else
{
$optionArray = false;
- $field .= PHP_EOL . $this->_t(2) . $taber . "/>";
+ $field .= PHP_EOL . Indent::_(2) . $taber . "/>";
}
}
elseif ($setType === 'plain')
{
// now add to the field set
- $field .= PHP_EOL . $this->_t(2) . $taber . "";
- $field .= PHP_EOL . $this->_t(2) . $taber . " $value)
{
if ($property != 'option')
{
- $field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1)
+ $field .= PHP_EOL . Indent::_(2) . $taber . Indent::_(1)
. $property . '="' . $value . '"';
}
}
- $field .= PHP_EOL . $this->_t(2) . $taber . "/>";
+ $field .= PHP_EOL . Indent::_(2) . $taber . "/>";
}
elseif ($setType === 'spacer')
{
// now add to the field set
- $field .= PHP_EOL . $this->_t(2) . "";
- $field .= PHP_EOL . $this->_t(2) . " $value)
{
if ($property != 'option')
@@ -2264,25 +2266,25 @@ class Fields extends Structure
if ($typeName === 'repeatable')
{
// now add to the field set
- $field .= PHP_EOL . $this->_t(2) . "";
- $field .= PHP_EOL . $this->_t(2) . " $value)
{
if ($property != 'fields')
{
- $field .= PHP_EOL . $this->_t(3) . $property . '="'
+ $field .= PHP_EOL . Indent::_(3) . $property . '="'
. $value . '"';
}
}
$field .= ">";
- $field .= PHP_EOL . $this->_t(3) . '';
- $field .= PHP_EOL . $this->_t(4)
+ $field .= PHP_EOL . Indent::_(4)
. '';
if (strpos($fieldAttributes['fields'], ',') !== false)
@@ -2335,7 +2337,7 @@ class Fields extends Structure
$r_multiple = false;
$r_langLabel = '';
// add the tabs needed
- $r_taber = $this->_t(3);
+ $r_taber = Indent::_(3);
// get field values
$r_fieldValues = $this->setFieldAttributes(
$fieldData, $view, $r_name, $r_typeName,
@@ -2385,8 +2387,8 @@ class Fields extends Structure
$r_name, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $r_listLangName,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $r_listLangName,
StringHelper::safe(
$r_name, 'W'
)
@@ -2424,31 +2426,31 @@ class Fields extends Structure
}
}
}
- $field .= PHP_EOL . $this->_t(4) . " ";
- $field .= PHP_EOL . $this->_t(3) . " ";
- $field .= PHP_EOL . $this->_t(2) . " ";
+ $field .= PHP_EOL . Indent::_(4) . "";
+ $field .= PHP_EOL . Indent::_(3) . "";
+ $field .= PHP_EOL . Indent::_(2) . " ";
}
// set the subform fields (it is a repeatable without the modal)
elseif ($typeName === 'subform')
{
// now add to the field set
- $field .= PHP_EOL . $this->_t(2) . $taber . "";
- $field .= PHP_EOL . $this->_t(2) . $taber . " $value)
{
if ($property != 'fields')
{
- $field .= PHP_EOL . $this->_t(3) . $taber . $property
+ $field .= PHP_EOL . Indent::_(3) . $taber . $property
. '="' . $value . '"';
}
}
$field .= ">";
- $field .= PHP_EOL . $this->_t(3) . $taber
+ $field .= PHP_EOL . Indent::_(3) . $taber
. '";
- $field .= PHP_EOL . $this->_t(2) . $taber . " ";
+ $field .= PHP_EOL . Indent::_(3) . $taber . "";
+ $field .= PHP_EOL . Indent::_(2) . $taber . " ";
}
}
elseif ($setType === 'custom')
{
// now add to the field set
- $field .= PHP_EOL . $this->_t(2) . $taber . "";
- $field .= PHP_EOL . $this->_t(2) . $taber . " $value)
{
if ($property != 'option')
{
- $field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1)
+ $field .= PHP_EOL . Indent::_(2) . $taber . Indent::_(1)
. $property . '="' . $value . '"';
}
elseif ($property === 'option')
@@ -2666,13 +2668,13 @@ class Fields extends Structure
$valueKeyArray[0], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[0]
);
// now add group label
$groups_[$valueKeyArray[1]] = PHP_EOL
- . $this->_t(1) . $taber . $this->_t(2)
+ . Indent::_(1) . $taber . Indent::_(2)
. '';
// set order
$order_['group' . $valueKeyArray[1]]
@@ -2690,16 +2692,16 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['group'][$valueKeyArray[2]][]
- = PHP_EOL . $this->_t(1) . $taber
- . $this->_t(3) . '' . PHP_EOL
- . $this->_t(1) . $taber . $this->_t(4)
+ . Indent::_(1) . $taber . Indent::_(4)
. $langValue . ' ';
$optionArray[$valueKeyArray[0]]
= $langValue;
@@ -2714,16 +2716,16 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['option'][$valueKeyArray[0]]
- = PHP_EOL . $this->_t(1) . $taber
- . $this->_t(2) . '' . PHP_EOL
- . $this->_t(1) . $taber . $this->_t(3)
+ . Indent::_(1) . $taber . Indent::_(3)
. $langValue . ' ';
$optionArray[$valueKeyArray[0]]
= $langValue;
@@ -2740,15 +2742,15 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
$grouped_['option'][$option] = PHP_EOL
- . $this->_t(1) . $taber . $this->_t(2)
+ . Indent::_(1) . $taber . Indent::_(2)
. ''
- . PHP_EOL . $this->_t(1) . $taber
- . $this->_t(3) . $langValue . ' ';
+ . PHP_EOL . Indent::_(1) . $taber
+ . Indent::_(3) . $langValue . '';
$optionArray[$option] = $langValue;
// set order
$order_['option' . $option] = $option;
@@ -2780,8 +2782,8 @@ class Fields extends Structure
unset($groups_[$_id]);
unset($grouped_[$key_][$_id]);
// close the group
- $optionSet .= PHP_EOL . $this->_t(1) . $taber
- . $this->_t(2) . ' ';
+ $optionSet .= PHP_EOL . Indent::_(1) . $taber
+ . Indent::_(2) . '';
}
elseif (isset($grouped_[$key_][$_id])
&& StringHelper::check(
@@ -2807,14 +2809,14 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $t
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $t
);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(1)
- . $taber . $this->_t(2) . '' . PHP_EOL . $this->_t(1)
- . $taber . $this->_t(3) . $langValue
+ $optionSet .= PHP_EOL . Indent::_(1)
+ . $taber . Indent::_(2) . ' ' . PHP_EOL . Indent::_(1)
+ . $taber . Indent::_(3) . $langValue
. ' ';
$optionArray[$v] = $langValue;
}
@@ -2826,14 +2828,14 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(2)
- . $taber . $this->_t(1) . '' . PHP_EOL . $this->_t(2)
- . $taber . $this->_t(2) . $langValue
+ $optionSet .= PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(1) . ' ' . PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(2) . $langValue
. ' ';
$optionArray[$option] = $langValue;
}
@@ -2851,11 +2853,11 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent($this->lang, $langValue, $t);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langValue, $t);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(2) . $taber
- . $this->_t(1) . ''
- . PHP_EOL . $this->_t(2) . $taber . $this->_t(2)
+ $optionSet .= PHP_EOL . Indent::_(2) . $taber
+ . Indent::_(1) . ' '
+ . PHP_EOL . Indent::_(2) . $taber . Indent::_(2)
. $langValue . ' ';
$optionArray[$v] = $langValue;
}
@@ -2867,14 +2869,14 @@ class Fields extends Structure
$value, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $value
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $value
);
// now add to option set
- $optionSet .= PHP_EOL . $this->_t(2)
- . $taber . $this->_t(1) . '' . PHP_EOL . $this->_t(2)
- . $taber . $this->_t(2) . $langValue
+ $optionSet .= PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(1) . ' ' . PHP_EOL . Indent::_(2)
+ . $taber . Indent::_(2) . $langValue
. ' ';
$optionArray[$value] = $langValue;
}
@@ -2885,25 +2887,25 @@ class Fields extends Structure
if (StringHelper::check($optionSet))
{
$field .= '>';
- $field .= PHP_EOL . $this->_t(3) . $taber . "";
+ $field .= PHP_EOL . Indent::_(3) . $taber . "";
$field .= $optionSet;
- $field .= PHP_EOL . $this->_t(2) . $taber . " ";
+ $field .= PHP_EOL . Indent::_(2) . $taber . "";
}
// if no options found and must have a list of options
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'list'))
{
$optionArray = false;
- $field .= PHP_EOL . $this->_t(2) . $taber . "/>";
- $field .= PHP_EOL . $this->_t(2) . $taber . ""
. PHP_EOL;
}
else
{
$optionArray = false;
- $field .= PHP_EOL . $this->_t(2) . $taber . "/>";
+ $field .= PHP_EOL . Indent::_(2) . $taber . "/>";
}
// incase the field is in the config and has not been set
if ('config' === $nameSingleCode && 'configs' === $nameListCode
@@ -2955,7 +2957,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement(' ');
- $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name)
+ $field->comment = Line::_(__Line__, __Class__) . " " . ucfirst($name)
. " Field. Type: " . StringHelper::safe(
$typeName, 'F'
) . ". (joomla)";
@@ -2970,7 +2972,7 @@ class Fields extends Structure
{
ComponentbuilderHelper::xmlComment(
$field->fieldXML,
- $this->setLine(__LINE__) . " Option Set."
+ Line::_(__Line__, __Class__) . " Option Set."
);
if (strtolower($typeName) === 'groupedlist'
&& strpos(
@@ -2998,8 +3000,8 @@ class Fields extends Structure
$valueKeyArray[0], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[0]
);
// now add group label
@@ -3020,8 +3022,8 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
@@ -3041,8 +3043,8 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
@@ -3064,8 +3066,8 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
$grouped_['option'][$option]
@@ -3143,8 +3145,8 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $t
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $t
);
// now add to option set
$optionXML->addAttribute('value', $v);
@@ -3158,8 +3160,8 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
$optionXML->addAttribute('value', $option);
@@ -3181,7 +3183,7 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent($this->lang, $langValue, $t);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langValue, $t);
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
@@ -3194,8 +3196,8 @@ class Fields extends Structure
$value, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $value
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $value
);
// now add to option set
$optionXML->addAttribute('value', $value);
@@ -3210,7 +3212,7 @@ class Fields extends Structure
&& ComponentbuilderHelper::fieldCheck($typeName, 'list'))
{
ComponentbuilderHelper::xmlComment(
- $field->fieldXML, $this->setLine(__LINE__)
+ $field->fieldXML, Line::_(__Line__, __Class__)
. " No Manual Options Were Added In Field Settings."
);
}
@@ -3219,7 +3221,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement(' ');
- $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name)
+ $field->comment = Line::_(__Line__, __Class__) . " " . ucfirst($name)
. " Field. Type: " . StringHelper::safe(
$typeName, 'F'
) . ". (joomla)";
@@ -3236,7 +3238,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement(' ');
- $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name)
+ $field->comment = Line::_(__Line__, __Class__) . " " . ucfirst($name)
. " Field. Type: " . StringHelper::safe(
$typeName, 'F'
) . ". A None Database Field. (joomla)";
@@ -3256,7 +3258,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement(' ');
- $field->comment = $this->setLine(__LINE__) . " " . ucfirst(
+ $field->comment = Line::_(__Line__, __Class__) . " " . ucfirst(
$name
) . " Field. Type: " . StringHelper::safe(
$typeName, 'F'
@@ -3381,8 +3383,8 @@ class Fields extends Structure
$r_name, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $r_listLangName,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $r_listLangName,
StringHelper::safe(
$r_name, 'W'
)
@@ -3427,7 +3429,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement(' ');
- $field->comment = $this->setLine(__LINE__) . " " . ucfirst(
+ $field->comment = Line::_(__Line__, __Class__) . " " . ucfirst(
$name
) . " Field. Type: " . StringHelper::safe(
$typeName, 'F'
@@ -3594,8 +3596,8 @@ class Fields extends Structure
$r_name, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $r_listLangName,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $r_listLangName,
StringHelper::safe(
$r_name, 'W'
)
@@ -3641,7 +3643,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement(' ');
- $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name)
+ $field->comment = Line::_(__Line__, __Class__) . " " . ucfirst($name)
. " Field. Type: " . StringHelper::safe(
$typeName, 'F'
) . ". (custom)";
@@ -3655,7 +3657,7 @@ class Fields extends Structure
{
ComponentbuilderHelper::xmlComment(
$field->fieldXML,
- $this->setLine(__LINE__) . " Option Set."
+ Line::_(__Line__, __Class__) . " Option Set."
);
if (strtolower($typeName) === 'groupedlist'
&& strpos(
@@ -3683,8 +3685,8 @@ class Fields extends Structure
$valueKeyArray[0], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[0]
);
// now add group label
@@ -3705,8 +3707,8 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
@@ -3726,8 +3728,8 @@ class Fields extends Structure
$valueKeyArray[1], true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue,
$valueKeyArray[1]
);
// now add to option set
@@ -3749,8 +3751,8 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
$grouped_['option'][$option]
@@ -3828,8 +3830,8 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $t
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $t
);
// now add to option set
$optionXML->addAttribute('value', $v);
@@ -3843,8 +3845,8 @@ class Fields extends Structure
$option, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $option
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $option
);
// now add to option set
$optionXML->addAttribute('value', $option);
@@ -3866,7 +3868,7 @@ class Fields extends Structure
$t, true
);
// add to lang array
- $this->setLangContent($this->lang, $langValue, $t);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langValue, $t);
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
@@ -3879,8 +3881,8 @@ class Fields extends Structure
$value, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $langValue, $value
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langValue, $value
);
// now add to option set
$optionXML->addAttribute('value', $value);
@@ -4164,7 +4166,7 @@ class Fields extends Structure
elseif ($property['name'] === 'name')
{
// get the actual field name
- $xmlValue = $this->setPlaceholders($name, $placeholders);
+ $xmlValue = CFactory::_('Placeholder')->update($name, $placeholders);
}
elseif ($property['name'] === 'validate')
{
@@ -4184,7 +4186,7 @@ class Fields extends Structure
|| $property['name'] === 'formsource')
{
// get value & replace the placeholders
- $xmlValue = $this->setPlaceholders(
+ $xmlValue = CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, $property['name'] . '="',
'"'
@@ -4208,7 +4210,7 @@ class Fields extends Structure
);
// load the php for the custom field file
$fieldAttributes['custom'][$phpKey][$phpLine]
- = $this->setDynamicValues(
+ = CFactory::_('Customcode')->add(
ComponentbuilderHelper::openValidBase64(
GetHelper::between(
$field['settings']->xml,
@@ -4240,7 +4242,7 @@ class Fields extends Structure
// load the view name & replace the placeholders
$fieldAttributes['custom']['view']
= StringHelper::safe(
- $this->setPlaceholders(
+ CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'view="', '"'
), $placeholders
@@ -4252,7 +4254,7 @@ class Fields extends Structure
// load the views name & replace the placeholders
$fieldAttributes['custom']['views']
= StringHelper::safe(
- $this->setPlaceholders(
+ CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'views="', '"'
), $placeholders
@@ -4263,7 +4265,7 @@ class Fields extends Structure
{
// load the component name & replace the placeholders
$fieldAttributes['custom']['component']
- = $this->setPlaceholders(
+ = CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'component="', '"'
), $placeholders
@@ -4273,7 +4275,7 @@ class Fields extends Structure
{
// load the main table that is queried & replace the placeholders
$fieldAttributes['custom']['table']
- = $this->setPlaceholders(
+ = CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'table="', '"'
), $placeholders
@@ -4373,7 +4375,7 @@ class Fields extends Structure
else
{
// set the rest of the fields
- $xmlValue = (string) $this->setPlaceholders(
+ $xmlValue = (string) CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, $property['name'] . '="',
'"'
@@ -4399,7 +4401,7 @@ class Fields extends Structure
}
}
// replace placeholders
- $xmlValue = $this->setPlaceholders(
+ $xmlValue = CFactory::_('Placeholder')->update(
$xmlValue, $placeholders
);
// insure custom lables dont get messed up
@@ -4413,7 +4415,7 @@ class Fields extends Structure
$name . ' ' . $property['name'], true
);
// add to lang array
- $this->setLangContent($this->lang, $langValue, $xmlValue);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langValue, $xmlValue);
// use lang value
$xmlValue = $langValue;
}
@@ -4502,7 +4504,7 @@ class Fields extends Structure
)) !== $confirmation)
{
$fieldAttributes['custom'][$phpKey][$phpLine]
- = $this->setDynamicValues(
+ = CFactory::_('Customcode')->add(
ComponentbuilderHelper::openValidBase64($value)
);
}
@@ -4735,8 +4737,8 @@ class Fields extends Structure
// set field name
$listFieldName = StringHelper::safe($tempName, 'W');
// add to lang array
- $this->setLangContent(
- $this->lang, $listLangName, $listFieldName
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $listLangName, $listFieldName
);
}
else
@@ -4746,19 +4748,19 @@ class Fields extends Structure
{
$listLangName = $langLabel;
// get field label from the lang label
- if (isset($this->langContent[$this->lang][$langLabel]))
+ if (CFactory::_('Language')->exist(CFactory::_('Config')->lang_target, $langLabel))
{
$listFieldName
- = $this->langContent[$this->lang][$langLabel];
+ = CFactory::_('Language')->get(CFactory::_('Config')->lang_target, $langLabel);
}
else
{
// get it from the field xml string
- $listFieldName = (string) $this->setPlaceholders(
+ $listFieldName = (string) CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'label="',
'"'
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
}
// make sure there is no html in the list field name
@@ -4772,8 +4774,8 @@ class Fields extends Structure
// set field name
$listFieldName = StringHelper::safe($name, 'W');
// add to lang array
- $this->setLangContent(
- $this->lang, $listLangName, $listFieldName
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $listLangName, $listFieldName
);
}
}
@@ -4955,15 +4957,15 @@ class Fields extends Structure
$otherView = $nameSingleCode;
}
// get the xml extension name
- $_extension = $this->setPlaceholders(
+ $_extension = CFactory::_('Placeholder')->update(
GetHelper::between(
$field['settings']->xml, 'extension="', '"'
- ), $this->placeholders
+ ), CFactory::_('Placeholder')->active
);
// if they left out the extension for some reason
if (!StringHelper::check($_extension))
{
- $_extension = 'com_' . Config::get('component_code_name') . '.'
+ $_extension = 'com_' . CFactory::_('Config')->component_code_name . '.'
. $otherView;
}
// check the context (does our target match)
@@ -5169,7 +5171,7 @@ class Fields extends Structure
= $options;
}
// main lang filter prefix
- $lang_filter_ = Config::get('lang_prefix') . '_FILTER_';
+ $lang_filter_ = CFactory::_('Config')->lang_prefix . '_FILTER_';
// build the sort values
if ($dbSwitch && (isset($field['sort']) && $field['sort'] == 1)
&& ($listSwitch || $listJoin)
@@ -5191,8 +5193,8 @@ class Fields extends Structure
$filter_name_asc, 'U'
);
// and to translation
- $this->setLangContent(
- $this->lang, $filter_name_asc_lang, $filter_name_asc
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $filter_name_asc_lang, $filter_name_asc
);
// set the language strings for descending
$filter_name_desc = $listFieldName . ' descending';
@@ -5201,8 +5203,8 @@ class Fields extends Structure
$filter_name_desc, 'U'
);
// and to translation
- $this->setLangContent(
- $this->lang, $filter_name_desc_lang, $filter_name_desc
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $filter_name_desc_lang, $filter_name_desc
);
}
$this->sortBuilder[$nameListCode][] = array('type' => $typeName,
@@ -5251,8 +5253,8 @@ class Fields extends Structure
$filter_name_select, 'U'
);
// and to translation
- $this->setLangContent(
- $this->lang, $filter_name_select_lang, $filter_name_select
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $filter_name_select_lang, $filter_name_select
);
}
@@ -5330,52 +5332,42 @@ class Fields extends Structure
}
// set tab and break replacements
$tabBreak = array(
- '\t' => $this->_t(1),
+ '\t' => Indent::_(1),
'\n' => PHP_EOL
);
// set the [[[PLACEHOLDER]]] options
$replace = array(
- $this->bbb . 'JPREFIX' . $this->ddd => $jprefix,
- $this->bbb . 'TABLE'
- . $this->ddd => (isset($data['custom']['table']))
+ Placefix::_('JPREFIX') => $jprefix,
+ Placefix::_('TABLE') => (isset($data['custom']['table']))
? $data['custom']['table'] : '',
- $this->bbb . 'ID'
- . $this->ddd => (isset($data['custom']['id']))
+ Placefix::_('ID') => (isset($data['custom']['id']))
? $data['custom']['id'] : '',
- $this->bbb . 'TEXT'
- . $this->ddd => (isset($data['custom']['text']))
+ Placefix::_('TEXT') => (isset($data['custom']['text']))
? $data['custom']['text'] : '',
- $this->bbb . 'CODE_TEXT'
- . $this->ddd => (isset($data['code'], $data['custom']['text']))
+ Placefix::_('CODE_TEXT') => (isset($data['code'], $data['custom']['text']))
? $data['code'] . '_' . $data['custom']['text'] : '',
- $this->bbb . 'CODE' . $this->ddd => (isset($data['code']))
+ Placefix::_('CODE') => (isset($data['code']))
? $data['code'] : '',
- $this->bbb . 'view_type' . $this->ddd => $nameSingleCode
+ Placefix::_('view_type') => $nameSingleCode
. '_' . $data['type'],
- $this->bbb . 'type' . $this->ddd => (isset($data['type']))
+ Placefix::_('type') => (isset($data['type']))
? $data['type'] : '',
- $this->bbb . 'com_component'
- . $this->ddd => (isset($data['custom']['component'])
+ Placefix::_('com_component') => (isset($data['custom']['component'])
&& StringHelper::check(
$data['custom']['component']
)) ? StringHelper::safe(
$data['custom']['component']
- ) : 'com_' . Config::get('component_code_name'),
+ ) : 'com_' . CFactory::_('Config')->component_code_name,
// set the generic values
- $this->bbb . 'component'
- . $this->ddd => Config::get('component_code_name'),
- $this->bbb . 'Component'
- . $this->ddd => $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh],
- $this->bbb . 'view'
- . $this->ddd => (isset($data['custom']['view'])
+ Placefix::_('component') => CFactory::_('Config')->component_code_name,
+ Placefix::_('Component') => $this->fileContentStatic[Placefix::_h('Component')],
+ Placefix::_('view') => (isset($data['custom']['view'])
&& StringHelper::check(
$data['custom']['view']
)) ? StringHelper::safe(
$data['custom']['view']
) : $nameSingleCode,
- $this->bbb . 'views'
- . $this->ddd => (isset($data['custom']['views'])
+ Placefix::_('views') => (isset($data['custom']['views'])
&& StringHelper::check(
$data['custom']['views']
)) ? StringHelper::safe(
@@ -5387,8 +5379,8 @@ class Fields extends Structure
{
// update the key value
$replacekey = str_replace(
- array($this->bbb, $this->ddd),
- array($this->hhh, $this->hhh), $replacekey
+ array(Placefix::b(), Placefix::d()),
+ array(Placefix::h(), Placefix::h()), $replacekey
);
// now set the value
$replace[$replacekey] = $replacevalue;
@@ -5407,18 +5399,15 @@ class Fields extends Structure
// start loading the field type
$this->fileContentDynamic['customfield_' . $data['type']] = array();
// JPREFIX <<>>
- $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh
- . 'JPREFIX' . $this->hhh]
+ $this->fileContentDynamic['customfield_' . $data['type']][Placefix::_h('JPREFIX')]
= $jprefix;
// Type <<>>
- $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh
- . 'Type' . $this->hhh]
+ $this->fileContentDynamic['customfield_' . $data['type']][Placefix::_h('Type')]
= StringHelper::safe(
$data['custom']['type'], 'F'
);
// type <<>>
- $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh
- . 'type' . $this->hhh]
+ $this->fileContentDynamic['customfield_' . $data['type']][Placefix::_h('type')]
= StringHelper::safe($data['custom']['type']);
// is this a own custom field
if (isset($data['custom']['own_custom']))
@@ -5450,26 +5439,26 @@ class Fields extends Structure
// JFORM_TYPE_HEADER <<>>
$add_default_header = true;
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' . $this->hhh]
- = "//" . $this->setLine(
- __LINE__
+ . $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
+ = "//" . Line::_(
+ __LINE__,__CLASS__
) . " Import the " . $JFORM_extends
. " field type classes needed";
// JFORM_extens <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_extends' . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_extends')]
= $JFORM_extends;
// JFORM_EXTENDS <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_EXTENDS' . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_EXTENDS')]
= StringHelper::safe(
$data['custom']['extends'], 'F'
);
// JFORM_TYPE_PHP <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_PHP' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->_t(1) . "//" . $this->setLine(
- __LINE__
+ . $data['type']][Placefix::_h('JFORM_TYPE_PHP')]
+ = PHP_EOL . PHP_EOL . Indent::_(1) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " A " . $data['custom']['own_custom'] . " Field";
// load the other PHP options
foreach (ComponentbuilderHelper::$phpFieldArray as $x)
@@ -5486,7 +5475,7 @@ class Fields extends Structure
{
if (StringHelper::check($code))
{
- $phpBucket .= PHP_EOL . $this->setPlaceholders(
+ $phpBucket .= PHP_EOL . CFactory::_('Placeholder')->update(
$code, $tabBreak
);
}
@@ -5495,9 +5484,8 @@ class Fields extends Structure
if ('HEADER' === $x)
{
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
- . $this->hhh]
- .= PHP_EOL . $this->setPlaceholders(
+ . $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
+ .= PHP_EOL . CFactory::_('Placeholder')->update(
$phpBucket, $replace
);
// stop default headers from loading
@@ -5507,9 +5495,8 @@ class Fields extends Structure
{
// JFORM_TYPE_PHP <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_PHP'
- . $this->hhh]
- .= PHP_EOL . $this->setPlaceholders(
+ . $data['type']][Placefix::_h('JFORM_TYPE_PHP')]
+ .= PHP_EOL . CFactory::_('Placeholder')->update(
$phpBucket, $replace
);
}
@@ -5519,25 +5506,21 @@ class Fields extends Structure
if ($add_default_header)
{
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
- . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
.= PHP_EOL . "jimport('joomla.form.helper');";
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
- . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
.= PHP_EOL . "JFormHelper::loadFieldClass('"
. $JFORM_extends . "');";
}
// check the the JFormHelper::loadFieldClass(..) was set
elseif (strpos(
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
- . $this->hhh], 'JFormHelper::loadFieldClass('
+ . $data['type']][Placefix::_h('JFORM_TYPE_HEADER')], 'JFormHelper::loadFieldClass('
) === false)
{
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
- . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
.= PHP_EOL . "JFormHelper::loadFieldClass('"
. $JFORM_extends . "');";
}
@@ -5564,19 +5547,19 @@ class Fields extends Structure
{
if ($line == 1)
{
- $phpCode .= $this->setPlaceholders(
+ $phpCode .= CFactory::_('Placeholder')->update(
$code, $tabBreak
);
}
else
{
- $phpCode .= PHP_EOL . $this->_t(2)
- . $this->setPlaceholders($code, $tabBreak);
+ $phpCode .= PHP_EOL . Indent::_(2)
+ . CFactory::_('Placeholder')->update($code, $tabBreak);
}
}
}
// replace the placholders
- $phpCode = $this->setPlaceholders($phpCode, $replace);
+ $phpCode = CFactory::_('Placeholder')->update($phpCode, $replace);
}
// catch empty stuff
if (!StringHelper::check($phpCode))
@@ -5599,21 +5582,21 @@ class Fields extends Structure
{
if ($line == 1)
{
- $phpxCode .= $this->setPlaceholders(
+ $phpxCode .= CFactory::_('Placeholder')->update(
$code, $tabBreak
);
}
else
{
- $phpxCode .= PHP_EOL . $this->_t(2)
- . $this->setPlaceholders(
+ $phpxCode .= PHP_EOL . Indent::_(2)
+ . CFactory::_('Placeholder')->update(
$code, $tabBreak
);
}
}
}
// replace the placholders
- $phpxCode = $this->setPlaceholders($phpxCode, $replace);
+ $phpxCode = CFactory::_('Placeholder')->update($phpxCode, $replace);
}
// catch empty stuff
if (!StringHelper::check($phpxCode))
@@ -5623,39 +5606,36 @@ class Fields extends Structure
// temp holder for name
$tempName = $data['custom']['label'] . ' Group';
// set lang
- $groupLangName = Config::get('lang_prefix') . '_'
+ $groupLangName = CFactory::_('Config')->lang_prefix . '_'
. FieldHelper::safe(
$tempName, true
);
// add to lang array
- $this->setLangContent(
- $this->lang, $groupLangName,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $groupLangName,
StringHelper::safe($tempName, 'W')
);
// build the Group Control
$this->setGroupControl[$data['type']] = $groupLangName;
// JFORM_GETGROUPS_PHP <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_GETGROUPS_PHP'
- . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_GETGROUPS_PHP')]
= $phpCode;
// JFORM_GETEXCLUDED_PHP <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_GETEXCLUDED_PHP'
- . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_GETEXCLUDED_PHP')]
= $phpxCode;
}
else
{
// JFORM_GETOPTIONS_PHP <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'JFORM_GETOPTIONS_PHP'
- . $this->hhh]
+ . $data['type']][Placefix::_h('JFORM_GETOPTIONS_PHP')]
= $phpCode;
}
// type <<>>
$this->fileContentDynamic['customfield_'
- . $data['type']][$this->hhh . 'ADD_BUTTON' . $this->hhh]
+ . $data['type']][Placefix::_h('ADD_BUTTON')]
= $this->setAddButtonToListField($data['custom']);
}
}
@@ -5690,7 +5670,7 @@ class Fields extends Structure
);
// set tab and break replacements
$tabBreak = array(
- '\t' => $this->_t(1),
+ '\t' => Indent::_(1),
'\n' => PHP_EOL
);
// load the other PHP options
@@ -5708,7 +5688,7 @@ class Fields extends Structure
{
if (StringHelper::check($code))
{
- $phpBucket .= PHP_EOL . $this->setPlaceholders(
+ $phpBucket .= PHP_EOL . CFactory::_('Placeholder')->update(
$code, $tabBreak
);
}
@@ -5752,65 +5732,65 @@ class Fields extends Structure
$target, 'filter'
);
// the search language string
- $lang_search = Config::get('lang_prefix') . '_FILTER_SEARCH';
+ $lang_search = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH';
// and to translation
- $this->setLangContent(
- $this->lang, $lang_search, 'Search'
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang_search, 'Search'
. StringHelper::safe($nameListCode, 'w')
);
// the search description language string
- $lang_search_desc = Config::get('lang_prefix') . '_FILTER_SEARCH_'
+ $lang_search_desc = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH_'
. strtoupper($nameListCode);
// and to translation
- $this->setLangContent(
- $this->lang, $lang_search_desc, 'Search the '
+ 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 = array();
- $field_filter_sets[] = $this->_t(1) . '';
+ $field_filter_sets[] = Indent::_(1) . '';
// we first add the search
- $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="text"';
- $field_filter_sets[] = $this->_t(3) . 'name="search"';
- $field_filter_sets[] = $this->_t(3) . 'inputmode="search"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(2) . '_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'description="' . $lang_search_desc . '"';
- $field_filter_sets[] = $this->_t(3) . 'hint="JSEARCH_FILTER"';
- $field_filter_sets[] = $this->_t(2) . '/>';
+ $field_filter_sets[] = Indent::_(3) . 'hint="JSEARCH_FILTER"';
+ $field_filter_sets[] = Indent::_(2) . '/>';
// add the published filter if published is not set
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
{
// the published language string
- $lang_published = Config::get('lang_prefix') . '_FILTER_PUBLISHED';
+ $lang_published = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED';
// and to translation
- $this->setLangContent(
- $this->lang, $lang_published, 'Status'
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang_published, 'Status'
);
// the published description language string
- $lang_published_desc = Config::get('lang_prefix') . '_FILTER_PUBLISHED_'
+ $lang_published_desc = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED_'
. strtoupper($nameListCode);
// and to translation
- $this->setLangContent(
- $this->lang, $lang_published_desc, 'Status options for '
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang_published_desc, 'Status options for '
. StringHelper::safe($nameListCode, 'w')
);
- $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="status"';
- $field_filter_sets[] = $this->_t(3) . 'name="published"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(2) . '_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'description="' . $lang_published_desc . '"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'onchange="this.form.submit();"';
- $field_filter_sets[] = $this->_t(2) . '>';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(2) . '>';
+ $field_filter_sets[] = Indent::_(3)
. 'JOPTION_SELECT_PUBLISHED ';
- $field_filter_sets[] = $this->_t(2) . ' ';
+ $field_filter_sets[] = Indent::_(2) . ' ';
}
// add the category if found
if (isset($this->categoryBuilder[$nameListCode])
@@ -5821,24 +5801,24 @@ class Fields extends Structure
&& isset($this->categoryBuilder[$nameListCode]['filter'])
&& $this->categoryBuilder[$nameListCode]['filter'] >= 1)
{
- $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="category"';
- $field_filter_sets[] = $this->_t(3) . 'name="category_id"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(2) . 'categoryBuilder[$nameListCode]['name']
. '"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'description="JOPTION_FILTER_CATEGORY_DESC"';
- $field_filter_sets[] = $this->_t(3) . 'multiple="true"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3) . 'multiple="true"';
+ $field_filter_sets[] = Indent::_(3)
. 'class="multipleCategories"';
- $field_filter_sets[] = $this->_t(3) . 'extension="'
+ $field_filter_sets[] = Indent::_(3) . 'extension="'
. $this->categoryBuilder[$nameListCode]['extension'] . '"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'onchange="this.form.submit();"';
// TODO NOT SURE IF THIS SHOULD BE STATIC
- $field_filter_sets[] = $this->_t(3) . 'published="0,1,2"';
- $field_filter_sets[] = $this->_t(2) . '/>';
+ $field_filter_sets[] = Indent::_(3) . 'published="0,1,2"';
+ $field_filter_sets[] = Indent::_(2) . '/>';
}
// add the access filter if this view has access
// and if access manually is not set
@@ -5848,19 +5828,19 @@ class Fields extends Structure
)
&& !isset($this->fieldsNames[$nameSingleCode]['access']))
{
- $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="accesslevel"';
- $field_filter_sets[] = $this->_t(3) . 'name="access"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(2) . '_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'description="JFIELD_ACCESS_DESC"';
- $field_filter_sets[] = $this->_t(3) . 'multiple="true"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3) . 'multiple="true"';
+ $field_filter_sets[] = Indent::_(3)
. 'class="multipleAccessLevels"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'onchange="this.form.submit();"';
- $field_filter_sets[] = $this->_t(2) . '/>';
+ $field_filter_sets[] = Indent::_(2) . '/>';
}
// now add the dynamic fields
if (isset($this->filterBuilder[$nameListCode])
@@ -5872,14 +5852,14 @@ class Fields extends Structure
{
if ($filter['type'] != 'category')
{
- $field_filter_sets[] = $this->_t(2) . '_t(3) . 'type="'
+ $field_filter_sets[] = Indent::_(3) . 'type="'
. $filter['type'] . '"';
// set css classname of this field
$filter['class'] = ucfirst($filter['type']);
@@ -5887,38 +5867,38 @@ class Fields extends Structure
else
{
// we use the filter field type that was build
- $field_filter_sets[] = $this->_t(3) . 'type="'
+ $field_filter_sets[] = Indent::_(3) . 'type="'
. $filter['filter_type'] . '"';
// set css classname of this field
$filter['class'] = ucfirst($filter['filter_type']);
}
- $field_filter_sets[] = $this->_t(3) . 'name="'
+ $field_filter_sets[] = Indent::_(3) . 'name="'
. $filter['code'] . '"';
- $field_filter_sets[] = $this->_t(3) . 'label="'
+ $field_filter_sets[] = Indent::_(3) . 'label="'
. $filter['label'] . '"';
// if this is a multi field
if ($filter['multi'] == 2)
{
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'class="multiple'
. $filter['class'] . '"';
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'multiple="true"';
}
else
{
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'multiple="false"';
}
- $field_filter_sets[] = $this->_t(3)
+ $field_filter_sets[] = Indent::_(3)
. 'onchange="this.form.submit();"';
- $field_filter_sets[] = $this->_t(2) . '/>';
+ $field_filter_sets[] = Indent::_(2) . '/>';
}
}
}
- $field_filter_sets[] = $this->_t(2)
+ $field_filter_sets[] = Indent::_(2)
. ' ';
- $field_filter_sets[] = $this->_t(1) . ' ';
+ $field_filter_sets[] = Indent::_(1) . ' ';
// now update the file
return implode(PHP_EOL, $field_filter_sets);
@@ -5946,30 +5926,30 @@ class Fields extends Structure
$donelist = array('ordering' => true, 'id' => true);
// now build the XML
$list_sets = array();
- $list_sets[] = $this->_t(1) . '';
- $list_sets[] = $this->_t(2) . '_t(3) . 'name="fullordering"';
- $list_sets[] = $this->_t(3) . 'type="list"';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(1) . '';
+ $list_sets[] = Indent::_(2) . '_t(3)
+ $list_sets[] = Indent::_(3)
. 'description="COM_CONTENT_LIST_FULL_ORDERING_DESC"';
- $list_sets[] = $this->_t(3) . 'onchange="this.form.submit();"';
+ $list_sets[] = Indent::_(3) . 'onchange="this.form.submit();"';
// add dynamic ordering (Admin view)
$default_ordering = $this->getListViewDefaultOrdering(
$nameListCode
);
// set the default ordering
- $list_sets[] = $this->_t(3) . 'default="'
+ $list_sets[] = Indent::_(3) . 'default="'
. $default_ordering['name'] . ' '
. $default_ordering['direction'] . '"';
- $list_sets[] = $this->_t(3) . 'validate="options"';
- $list_sets[] = $this->_t(2) . '>';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3) . 'validate="options"';
+ $list_sets[] = Indent::_(2) . '>';
+ $list_sets[] = Indent::_(3)
. 'JGLOBAL_SORT_BY ';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. 'JGRID_HEADING_ORDERING_ASC ';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. 'JGRID_HEADING_ORDERING_DESC ';
// add the published filter if published is not set
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
@@ -5977,9 +5957,9 @@ class Fields extends Structure
// add to done list
$donelist['published'] = true;
// add to xml :)
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. 'JSTATUS_ASC ';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. 'JSTATUS_DESC ';
}
@@ -5995,10 +5975,10 @@ class Fields extends Structure
{
if ($filter['type'] === 'category')
{
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. ''
. $filter['lang_asc'] . ' ';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. ''
. $filter['lang_desc'] . ' ';
}
@@ -6006,21 +5986,21 @@ class Fields extends Structure
$filter['custom']
))
{
- $list_sets[] = $this->_t(3) . ''
. $filter['lang_asc'] . ' ';
- $list_sets[] = $this->_t(3) . ''
. $filter['lang_desc'] . ' ';
}
else
{
- $list_sets[] = $this->_t(3) . ''
. $filter['lang_asc'] . ' ';
- $list_sets[] = $this->_t(3) . ''
. $filter['lang_desc'] . ' ';
}
@@ -6030,23 +6010,23 @@ class Fields extends Structure
}
}
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. 'JGRID_HEADING_ID_ASC ';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(3)
. 'JGRID_HEADING_ID_DESC ';
- $list_sets[] = $this->_t(2) . ' ' . PHP_EOL;
+ $list_sets[] = Indent::_(2) . ' ' . PHP_EOL;
- $list_sets[] = $this->_t(2) . '_t(3) . 'name="limit"';
- $list_sets[] = $this->_t(3) . 'type="limitbox"';
- $list_sets[] = $this->_t(3) . 'label="COM_CONTENT_LIST_LIMIT"';
- $list_sets[] = $this->_t(3)
+ $list_sets[] = Indent::_(2) . '_t(3) . 'class="input-mini"';
- $list_sets[] = $this->_t(3) . 'default="25"';
- $list_sets[] = $this->_t(3) . 'onchange="this.form.submit();"';
- $list_sets[] = $this->_t(2) . '/>';
- $list_sets[] = $this->_t(1) . ' ';
+ $list_sets[] = Indent::_(3) . 'class="input-mini"';
+ $list_sets[] = Indent::_(3) . 'default="25"';
+ $list_sets[] = Indent::_(3) . 'onchange="this.form.submit();"';
+ $list_sets[] = Indent::_(2) . '/>';
+ $list_sets[] = Indent::_(1) . '';
return implode(PHP_EOL, $list_sets);
}
@@ -6082,29 +6062,25 @@ class Fields extends Structure
= array();
// JPREFIX <>>
$this->fileContentDynamic['customfilterfield_'
- . $filter['filter_type']][$this->hhh
- . 'JPREFIX' . $this->hhh]
+ . $filter['filter_type']][Placefix::_h('JPREFIX')]
= 'J';
// Type <<>>
$this->fileContentDynamic['customfilterfield_'
- . $filter['filter_type']][$this->hhh
- . 'Type' . $this->hhh]
+ . $filter['filter_type']][Placefix::_h('Type')]
= StringHelper::safe(
$filter['filter_type'], 'F'
);
// type <<>>
$this->fileContentDynamic['customfilterfield_'
- . $filter['filter_type']][$this->hhh
- . 'type' . $this->hhh]
+ . $filter['filter_type']][Placefix::_h('type')]
= StringHelper::safe($filter['filter_type']);
// JFORM_GETOPTIONS_PHP <<>>
$this->fileContentDynamic['customfilterfield_'
- . $filter['filter_type']][$this->hhh . 'JFORM_GETOPTIONS_PHP'
- . $this->hhh]
+ . $filter['filter_type']][Placefix::_h('JFORM_GETOPTIONS_PHP')]
= $getOptions;
// ADD_BUTTON <<>>
$this->fileContentDynamic['customfilterfield_'
- . $filter['filter_type']][$this->hhh . 'ADD_BUTTON' . $this->hhh]
+ . $filter['filter_type']][Placefix::_h('ADD_BUTTON')]
= '';
// now build the custom filter field type file
$target = array('admin' => 'customfilterfield');
@@ -6135,7 +6111,7 @@ class Fields extends Structure
&& StringHelper::check($fieldData['views']))
{
// set local component
- $local_component = "com_" . Config::get('component_code_name');
+ $local_component = "com_" . CFactory::_('Config')->component_code_name;
// check that the component value is set
if (!isset($fieldData['component'])
|| !StringHelper::check(
@@ -6153,13 +6129,13 @@ class Fields extends Structure
$fieldData['component'] = "com_" . $fieldData['component'];
}
// make sure the component is update if # # # or [ [ [ component placeholder is used
- if (strpos($fieldData['component'], $this->hhh) !== false
+ if (strpos($fieldData['component'], Placefix::h()) !== false
|| strpos(
- $fieldData['component'], $this->bbb
+ $fieldData['component'], Placefix::b()
) !== false) // should not be needed... but
{
- $fieldData['component'] = $this->setPlaceholders(
- $fieldData['component'], $this->placeholders
+ $fieldData['component'] = CFactory::_('Placeholder')->update(
+ $fieldData['component'], CFactory::_('Placeholder')->active
);
}
// get core permissions
@@ -6184,112 +6160,112 @@ class Fields extends Structure
}
// start building the add buttons/s
$addButton = array();
- $addButton[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $addButton[] = $this->_t(1) . " * Override to add new button";
- $addButton[] = $this->_t(1) . " *";
- $addButton[] = $this->_t(1)
+ $addButton[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $addButton[] = Indent::_(1) . " * Override to add new button";
+ $addButton[] = Indent::_(1) . " *";
+ $addButton[] = Indent::_(1)
. " * @return string The field input markup.";
- $addButton[] = $this->_t(1) . " *";
- $addButton[] = $this->_t(1) . " * @since 3.2";
- $addButton[] = $this->_t(1) . " */";
- $addButton[] = $this->_t(1) . "protected function getInput()";
- $addButton[] = $this->_t(1) . "{";
- $addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(1) . " *";
+ $addButton[] = Indent::_(1) . " * @since 3.2";
+ $addButton[] = Indent::_(1) . " */";
+ $addButton[] = Indent::_(1) . "protected function getInput()";
+ $addButton[] = Indent::_(1) . "{";
+ $addButton[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " see if we should add buttons";
- $addButton[] = $this->_t(2)
+ $addButton[] = Indent::_(2)
. "\$set_button = \$this->getAttribute('button');";
- $addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get html";
- $addButton[] = $this->_t(2) . "\$html = parent::getInput();";
- $addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(2) . "\$html = parent::getInput();";
+ $addButton[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " if true set button";
- $addButton[] = $this->_t(2) . "if (\$set_button === 'true')";
- $addButton[] = $this->_t(2) . "{";
- $addButton[] = $this->_t(3) . "\$button = array();";
- $addButton[] = $this->_t(3) . "\$script = array();";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(2) . "if (\$set_button === 'true')";
+ $addButton[] = Indent::_(2) . "{";
+ $addButton[] = Indent::_(3) . "\$button = array();";
+ $addButton[] = Indent::_(3) . "\$script = array();";
+ $addButton[] = Indent::_(3)
. "\$button_code_name = \$this->getAttribute('name');";
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the input from url";
- $addButton[] = $this->_t(3) . "\$app = JFactory::getApplication();";
- $addButton[] = $this->_t(3) . "\$jinput = \$app->input;";
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "\$app = JFactory::getApplication();";
+ $addButton[] = Indent::_(3) . "\$jinput = \$app->input;";
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the view name & id";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "\$values = \$jinput->getArray(array(";
- $addButton[] = $this->_t(4) . "'id' => 'int',";
- $addButton[] = $this->_t(4) . "'view' => 'word'";
- $addButton[] = $this->_t(3) . "));";
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(4) . "'id' => 'int',";
+ $addButton[] = Indent::_(4) . "'view' => 'word'";
+ $addButton[] = Indent::_(3) . "));";
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " check if new item";
- $addButton[] = $this->_t(3) . "\$ref = '';";
- $addButton[] = $this->_t(3) . "\$refJ = '';";
+ $addButton[] = Indent::_(3) . "\$ref = '';";
+ $addButton[] = Indent::_(3) . "\$refJ = '';";
if ($refLoad)
{
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "if (!is_null(\$values['id']) && strlen(\$values['view']))";
- $addButton[] = $this->_t(3) . "{";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "{";
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " only load referral if not new item.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$ref = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$refJ = '&ref=' . \$values['view'] . '&refid=' . \$values['id'];";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$_uri = (string) JUri::getInstance();";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " load return value.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$ref .= '&return=' . \$_return;";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$refJ .= '&return=' . \$_return;";
- $addButton[] = $this->_t(3) . "}";
+ $addButton[] = Indent::_(3) . "}";
}
else
{
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "if (!is_null(\$values['id']) && strlen(\$values['view']))";
- $addButton[] = $this->_t(3) . "{";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "{";
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " only load field details if not new item.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$ref = '&field=' . \$values['view'] . '&field_id=' . \$values['id'];";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$refJ = '&field=' . \$values['view'] . '&field_id=' . \$values['id'];";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$_uri = (string) JUri::getInstance();";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " load return value.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$ref = '&return=' . \$_return;";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$refJ = '&return=' . \$_return;";
- $addButton[] = $this->_t(3) . "}";
+ $addButton[] = Indent::_(3) . "}";
}
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get button label";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "\$button_label = trim(\$button_code_name);";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "\$button_label = preg_replace('/_+/', ' ', \$button_label);";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "\$button_label = preg_replace('/\s+/', ' ', \$button_label);";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "\$button_label = preg_replace(\"/[^A-Za-z ]/\", '', \$button_label);";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "\$button_label = ucfirst(strtolower(\$button_label));";
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get user object";
- $addButton[] = $this->_t(3) . "\$user = JFactory::getUser();";
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "\$user = JFactory::getUser();";
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions.
if ($coreLoad && isset($core['core.create'])
@@ -6302,30 +6278,30 @@ class Fields extends Structure
$this->permissionBuilder['global'][$core['core.create']]
))
{
- $addButton[] = $this->_t(3) . "if (\$user->authorise('"
+ $addButton[] = Indent::_(3) . "if (\$user->authorise('"
. $core['core.create'] . "', '" . $component
. "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "if (\$user->authorise('core.create', '" . $component
. "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
- $addButton[] = $this->_t(3) . "{";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "{";
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " build Create button";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$button[] = 'lang_prefix
. "_CREATE_NEW_S', \$button_label).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
- $addButton[] = $this->_t(5) . "href=\"index.php?option="
+ $addButton[] = Indent::_(5) . "href=\"index.php?option="
. $fieldData['component'] . "&view=" . $fieldData['view']
. "&layout=edit'.\$ref.'\" >";
- $addButton[] = $this->_t(5)
+ $addButton[] = Indent::_(5)
. " ';";
- $addButton[] = $this->_t(3) . "}";
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "}";
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " only add if user allowed to edit " . $fieldData['view'];
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit'])
@@ -6338,88 +6314,88 @@ class Fields extends Structure
$this->permissionBuilder['global'][$core['core.edit']]
))
{
- $addButton[] = $this->_t(3) . "if (\$user->authorise('"
+ $addButton[] = Indent::_(3) . "if (\$user->authorise('"
. $core['core.edit'] . "', '" . $component
. "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "if (\$user->authorise('core.edit', '" . $component
. "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
- $addButton[] = $this->_t(3) . "{";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "{";
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " build edit button";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$button[] = 'lang_prefix
. "_EDIT_S', \$button_label).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
- $addButton[] = $this->_t(5)
+ $addButton[] = Indent::_(5)
. " ';";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " build script";
- $addButton[] = $this->_t(4) . "\$script[] = \"";
- $addButton[] = $this->_t(5) . "jQuery(document).ready(function() {";
- $addButton[] = $this->_t(6)
+ $addButton[] = Indent::_(4) . "\$script[] = \"";
+ $addButton[] = Indent::_(5) . "jQuery(document).ready(function() {";
+ $addButton[] = Indent::_(6)
. "jQuery('#adminForm').on('change', '#jform_\".\$button_code_name.\"',function (e) {";
- $addButton[] = $this->_t(7) . "e.preventDefault();";
- $addButton[] = $this->_t(7)
+ $addButton[] = Indent::_(7) . "e.preventDefault();";
+ $addButton[] = Indent::_(7)
. "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();";
- $addButton[] = $this->_t(7)
+ $addButton[] = Indent::_(7)
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
- $addButton[] = $this->_t(6) . "});";
- $addButton[] = $this->_t(6)
+ $addButton[] = Indent::_(6) . "});";
+ $addButton[] = Indent::_(6)
. "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();";
- $addButton[] = $this->_t(6)
+ $addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
- $addButton[] = $this->_t(5) . "});";
- $addButton[] = $this->_t(5)
+ $addButton[] = Indent::_(5) . "});";
+ $addButton[] = Indent::_(5)
. "function \".\$button_code_name.\"Button(value) {";
- $addButton[] = $this->_t(6)
+ $addButton[] = Indent::_(6)
. "if (value > 0) {"; // TODO not ideal since value may not be an (int)
- $addButton[] = $this->_t(7) . "// hide the create button";
- $addButton[] = $this->_t(7)
+ $addButton[] = Indent::_(7) . "// hide the create button";
+ $addButton[] = Indent::_(7)
. "jQuery('#\".\$button_code_name.\"Create').hide();";
- $addButton[] = $this->_t(7) . "// show edit button";
- $addButton[] = $this->_t(7)
+ $addButton[] = Indent::_(7) . "// show edit button";
+ $addButton[] = Indent::_(7)
. "jQuery('#\".\$button_code_name.\"Edit').show();";
- $addButton[] = $this->_t(7) . "var url = 'index.php?option="
+ $addButton[] = Indent::_(7) . "var url = 'index.php?option="
. $fieldData['component'] . "&view=" . $fieldData['views']
. "&task=" . $fieldData['view']
. ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
- $addButton[] = $this->_t(7)
+ $addButton[] = Indent::_(7)
. "jQuery('#\".\$button_code_name.\"Edit').attr('href', url);";
- $addButton[] = $this->_t(6) . "} else {";
- $addButton[] = $this->_t(7) . "// show the create button";
- $addButton[] = $this->_t(7)
+ $addButton[] = Indent::_(6) . "} else {";
+ $addButton[] = Indent::_(7) . "// show the create button";
+ $addButton[] = Indent::_(7)
. "jQuery('#\".\$button_code_name.\"Create').show();";
- $addButton[] = $this->_t(7) . "// hide edit button";
- $addButton[] = $this->_t(7)
+ $addButton[] = Indent::_(7) . "// hide edit button";
+ $addButton[] = Indent::_(7)
. "jQuery('#\".\$button_code_name.\"Edit').hide();";
- $addButton[] = $this->_t(6) . "}";
- $addButton[] = $this->_t(5) . "}\";";
- $addButton[] = $this->_t(3) . "}";
- $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(6) . "}";
+ $addButton[] = Indent::_(5) . "}\";";
+ $addButton[] = Indent::_(3) . "}";
+ $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " check if button was created for " . $fieldData['view']
. " field.";
- $addButton[] = $this->_t(3)
+ $addButton[] = Indent::_(3)
. "if (is_array(\$button) && count(\$button) > 0)";
- $addButton[] = $this->_t(3) . "{";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(3) . "{";
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Load the needed script.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$document = JFactory::getDocument();";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "\$document->addScriptDeclaration(implode(' ',\$script));";
- $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " return the button attached to input field.";
- $addButton[] = $this->_t(4)
+ $addButton[] = Indent::_(4)
. "return '' .\$html . implode('',\$button).'
';";
- $addButton[] = $this->_t(3) . "}";
- $addButton[] = $this->_t(2) . "}";
- $addButton[] = $this->_t(2) . "return \$html;";
- $addButton[] = $this->_t(1) . "}";
+ $addButton[] = Indent::_(3) . "}";
+ $addButton[] = Indent::_(2) . "}";
+ $addButton[] = Indent::_(2) . "return \$html;";
+ $addButton[] = Indent::_(1) . "}";
return implode(PHP_EOL, $addButton);
}
@@ -6444,7 +6420,7 @@ class Fields extends Structure
$dom->getElementsByTagName($nodename)->item(0)
);
// make sure Tidy is enabled
- if (Config::get('tidy', false))
+ if (CFactory::_('Config')->get('tidy', false))
{
$tidy = new Tidy();
$tidy->parseString(
diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php
index 8c3f378ff..71e0592f4 100644
--- a/admin/helpers/compiler/e_Interpretation.php
+++ b/admin/helpers/compiler/e_Interpretation.php
@@ -21,7 +21,10 @@ use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\MathHelper;
-use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
+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;
/**
* Compiler class
@@ -29,6 +32,7 @@ use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
class Interpretation extends Fields
{
+
/**
* The global config Field Sets
*
@@ -246,10 +250,10 @@ class Interpretation extends Fields
/**
* Constructor
*/
- public function __construct($config = array())
+ public function __construct()
{
// first we run the parent constructor
- if (parent::__construct($config))
+ if (parent::__construct())
{
return true;
}
@@ -257,23 +261,6 @@ class Interpretation extends Fields
return false;
}
- /**
- * Set the line number in comments
- *
- * @param int $nr The line number
- *
- * @return string
- */
- private function setLine($nr)
- {
- if (Config::get('debug_line_nr', false))
- {
- return ' [Interpretation ' . $nr . ']';
- }
-
- return '';
- }
-
/**
* add email helper
*/
@@ -283,16 +270,14 @@ class Interpretation extends Fields
&& $this->componentData->add_email_helper)
{
// set email helper in place with component name
- $component = Config::get('component_code_name');
- $Component = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh];
+ $component = CFactory::_('Config')->component_code_name;
+ $Component = $this->fileContentStatic[Placefix::_h('Component')];
$target = array('admin' => 'emailer');
$done = $this->buildDynamique($target, 'emailer', $component);
if ($done)
{
// the text for the file BAKING
- $this->fileContentDynamic['emailer_' . $component][$this->hhh
- . 'BAKING' . $this->hhh]
+ $this->fileContentDynamic['emailer_' . $component][Placefix::_h('BAKING')]
= ''; // <<-- to insure it gets updated
// return the code need to load the abstract class
return PHP_EOL . "JLoader::register('" . $Component
@@ -313,25 +298,20 @@ class Interpretation extends Fields
&& $this->componentData->license_type == 3)
{
if (!isset(
- $this->fileContentStatic[$this->hhh . 'HELPER_SITE_LICENSE_LOCK'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_SITE_LICENSE_LOCK')]
))
{
$_WHMCS = '_' . StringHelper::safe(
$this->uniquekey(10), 'U'
);
// add it to the system
- $this->fileContentStatic[$this->hhh . 'HELPER_SITE_LICENSE_LOCK'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_SITE_LICENSE_LOCK')]
= $this->setHelperLicenseLock($_WHMCS, 'site');
- $this->fileContentStatic[$this->hhh . 'HELPER_LICENSE_LOCK'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_LICENSE_LOCK')]
= $this->setHelperLicenseLock($_WHMCS, 'admin');
- $this->fileContentStatic[$this->hhh . 'LICENSE_LOCKED_INT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('LICENSE_LOCKED_INT')]
= $this->setInitLicenseLock($_WHMCS);
- $this->fileContentStatic[$this->hhh . 'LICENSE_LOCKED_DEFINED'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('LICENSE_LOCKED_DEFINED')]
= PHP_EOL . PHP_EOL . 'defined(\'' . $_WHMCS
. '\') or die(JText:' . ':_(\'NIE_REG_NIE\'));';
}
@@ -339,17 +319,13 @@ class Interpretation extends Fields
else
{
// don't add it to the system
- $this->fileContentStatic[$this->hhh . 'HELPER_SITE_LICENSE_LOCK'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_SITE_LICENSE_LOCK')]
= '';
- $this->fileContentStatic[$this->hhh . 'HELPER_LICENSE_LOCK'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_LICENSE_LOCK')]
= '';
- $this->fileContentStatic[$this->hhh . 'LICENSE_LOCKED_INT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('LICENSE_LOCKED_INT')]
= '';
- $this->fileContentStatic[$this->hhh . 'LICENSE_LOCKED_DEFINED'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('LICENSE_LOCKED_DEFINED')]
= '';
}
}
@@ -366,8 +342,7 @@ class Interpretation extends Fields
&& $this->componentData->license_type == 3)
{
if (!isset(
- $this->fileContentDynamic[$view][$this->hhh . 'BOOLMETHOD'
- . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('BOOLMETHOD')]
))
{
$boolMethod = 'get' . StringHelper::safe(
@@ -377,31 +352,24 @@ class Interpretation extends Fields
$this->uniquekey(3), 'W'
);
// add it to the system
- $this->fileContentDynamic[$view][$this->hhh
- . 'LICENSE_LOCKED_SET_BOOL' . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('LICENSE_LOCKED_SET_BOOL')]
= $this->setBoolLicenseLock($boolMethod, $globalbool);
- $this->fileContentDynamic[$view][$this->hhh
- . 'LICENSE_LOCKED_CHECK' . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('LICENSE_LOCKED_CHECK')]
= $this->checkStatmentLicenseLocked($boolMethod);
- $this->fileContentDynamic[$view][$this->hhh
- . 'LICENSE_TABLE_LOCKED_CHECK' . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('LICENSE_TABLE_LOCKED_CHECK')]
= $this->checkStatmentLicenseLocked($boolMethod, '$table');
- $this->fileContentDynamic[$view][$this->hhh . 'BOOLMETHOD'
- . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('BOOLMETHOD')]
= $boolMethod;
}
}
else
{
// don't add it to the system
- $this->fileContentDynamic[$view][$this->hhh
- . 'LICENSE_LOCKED_SET_BOOL' . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('LICENSE_LOCKED_SET_BOOL')]
= '';
- $this->fileContentDynamic[$view][$this->hhh . 'LICENSE_LOCKED_CHECK'
- . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('LICENSE_LOCKED_CHECK')]
= '';
- $this->fileContentDynamic[$view][$this->hhh
- . 'LICENSE_TABLE_LOCKED_CHECK' . $this->hhh]
+ $this->fileContentDynamic[$view][Placefix::_h('LICENSE_TABLE_LOCKED_CHECK')]
= '';
}
}
@@ -416,15 +384,15 @@ class Interpretation extends Fields
*/
public function checkStatmentLicenseLocked($boolMethod, $thIIS = '$this')
{
- $statment[] = PHP_EOL . $this->_t(2) . "if (!" . $thIIS . "->"
+ $statment[] = PHP_EOL . Indent::_(2) . "if (!" . $thIIS . "->"
. $boolMethod . "())";
- $statment[] = $this->_t(2) . "{";
- $statment[] = $this->_t(3) . "\$app = JFactory::getApplication();";
- $statment[] = $this->_t(3) . "\$app->enqueueMessage(JText:"
+ $statment[] = Indent::_(2) . "{";
+ $statment[] = Indent::_(3) . "\$app = JFactory::getApplication();";
+ $statment[] = Indent::_(3) . "\$app->enqueueMessage(JText:"
. ":_('NIE_REG_NIE'), 'error');";
- $statment[] = $this->_t(3) . "\$app->redirect('index.php');";
- $statment[] = $this->_t(3) . "return false;";
- $statment[] = $this->_t(2) . "}";
+ $statment[] = Indent::_(3) . "\$app->redirect('index.php');";
+ $statment[] = Indent::_(3) . "return false;";
+ $statment[] = Indent::_(2) . "}";
// return the genuine mentod statement
return implode(PHP_EOL, $statment);
@@ -440,38 +408,38 @@ class Interpretation extends Fields
*/
public function setBoolLicenseLock($boolMethod, $globalbool)
{
- $bool[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $bool[] = $this->_t(1) . " * The private bool.";
- $bool[] = $this->_t(1) . " **/";
- $bool[] = $this->_t(1) . "private $" . $globalbool . ";";
- $bool[] = PHP_EOL . $this->_t(1) . "/**";
- $bool[] = $this->_t(1) . " * Check if this install has a license.";
- $bool[] = $this->_t(1) . " **/";
- $bool[] = $this->_t(1) . "public function " . $boolMethod . "()";
- $bool[] = $this->_t(1) . "{";
- $bool[] = $this->_t(2) . "if(!empty(\$this->" . $globalbool . "))";
- $bool[] = $this->_t(2) . "{";
- $bool[] = $this->_t(3) . "return \$this->" . $globalbool . ";";
- $bool[] = $this->_t(2) . "}";
- $bool[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $bool[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $bool[] = Indent::_(1) . " * The private bool.";
+ $bool[] = Indent::_(1) . " **/";
+ $bool[] = Indent::_(1) . "private $" . $globalbool . ";";
+ $bool[] = PHP_EOL . Indent::_(1) . "/**";
+ $bool[] = Indent::_(1) . " * Check if this install has a license.";
+ $bool[] = Indent::_(1) . " **/";
+ $bool[] = Indent::_(1) . "public function " . $boolMethod . "()";
+ $bool[] = Indent::_(1) . "{";
+ $bool[] = Indent::_(2) . "if(!empty(\$this->" . $globalbool . "))";
+ $bool[] = Indent::_(2) . "{";
+ $bool[] = Indent::_(3) . "return \$this->" . $globalbool . ";";
+ $bool[] = Indent::_(2) . "}";
+ $bool[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get the global params";
- $bool[] = $this->_t(2) . "\$params = JComponentHelper::getParams('com_"
- . Config::get('component_code_name') . "', true);";
- $bool[] = $this->_t(2)
+ $bool[] = Indent::_(2) . "\$params = JComponentHelper::getParams('com_"
+ . CFactory::_('Config')->component_code_name . "', true);";
+ $bool[] = Indent::_(2)
. "\$whmcs_key = \$params->get('whmcs_key', null);";
- $bool[] = $this->_t(2) . "if (\$whmcs_key)";
- $bool[] = $this->_t(2) . "{";
- $bool[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $bool[] = Indent::_(2) . "if (\$whmcs_key)";
+ $bool[] = Indent::_(2) . "{";
+ $bool[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " load the file";
- $bool[] = $this->_t(3)
+ $bool[] = Indent::_(3)
. "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_"
- . Config::get('component_code_name') . "');";
- $bool[] = $this->_t(3) . "\$the = new WHMCS(\$whmcs_key);";
- $bool[] = $this->_t(3) . "\$this->" . $globalbool . " = \$the->_is;";
- $bool[] = $this->_t(3) . "return \$this->" . $globalbool . ";";
- $bool[] = $this->_t(2) . "}";
- $bool[] = $this->_t(2) . "return false;";
- $bool[] = $this->_t(1) . "}";
+ . CFactory::_('Config')->component_code_name . "');";
+ $bool[] = Indent::_(3) . "\$the = new WHMCS(\$whmcs_key);";
+ $bool[] = Indent::_(3) . "\$this->" . $globalbool . " = \$the->_is;";
+ $bool[] = Indent::_(3) . "return \$this->" . $globalbool . ";";
+ $bool[] = Indent::_(2) . "}";
+ $bool[] = Indent::_(2) . "return false;";
+ $bool[] = Indent::_(1) . "}";
// return the genuine method statement
return implode(PHP_EOL, $bool);
@@ -487,30 +455,30 @@ class Interpretation extends Fields
*/
public function setHelperLicenseLock($_WHMCS, $target)
{
- $helper[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $helper[] = $this->_t(1) . " * Check if this install has a license.";
- $helper[] = $this->_t(1) . " **/";
- $helper[] = $this->_t(1) . "public static function isGenuine()";
- $helper[] = $this->_t(1) . "{";
- $helper[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $helper[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $helper[] = Indent::_(1) . " * Check if this install has a license.";
+ $helper[] = Indent::_(1) . " **/";
+ $helper[] = Indent::_(1) . "public static function isGenuine()";
+ $helper[] = Indent::_(1) . "{";
+ $helper[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get the global params";
- $helper[] = $this->_t(2)
+ $helper[] = Indent::_(2)
. "\$params = JComponentHelper::getParams('com_"
- . Config::get('component_code_name') . "', true);";
- $helper[] = $this->_t(2)
+ . CFactory::_('Config')->component_code_name . "', true);";
+ $helper[] = Indent::_(2)
. "\$whmcs_key = \$params->get('whmcs_key', null);";
- $helper[] = $this->_t(2) . "if (\$whmcs_key)";
- $helper[] = $this->_t(2) . "{";
- $helper[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $helper[] = Indent::_(2) . "if (\$whmcs_key)";
+ $helper[] = Indent::_(2) . "{";
+ $helper[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " load the file";
- $helper[] = $this->_t(3)
+ $helper[] = Indent::_(3)
. "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_"
- . Config::get('component_code_name') . "');";
- $helper[] = $this->_t(3) . "\$the = new WHMCS(\$whmcs_key);";
- $helper[] = $this->_t(3) . "return \$the->_is;";
- $helper[] = $this->_t(2) . "}";
- $helper[] = $this->_t(2) . "return false;";
- $helper[] = $this->_t(1) . "}";
+ . CFactory::_('Config')->component_code_name . "');";
+ $helper[] = Indent::_(3) . "\$the = new WHMCS(\$whmcs_key);";
+ $helper[] = Indent::_(3) . "return \$the->_is;";
+ $helper[] = Indent::_(2) . "}";
+ $helper[] = Indent::_(2) . "return false;";
+ $helper[] = Indent::_(1) . "}";
// return the genuine mentod statement
return implode(PHP_EOL, $helper);
@@ -527,13 +495,13 @@ class Interpretation extends Fields
{
$init[] = PHP_EOL . "if (!defined('" . $_WHMCS . "'))";
$init[] = "{";
- $init[] = $this->_t(1) . "\$allow = "
- . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]
+ $init[] = Indent::_(1) . "\$allow = "
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::isGenuine();";
- $init[] = $this->_t(1) . "if (\$allow)";
- $init[] = $this->_t(1) . "{";
- $init[] = $this->_t(2) . "define('" . $_WHMCS . "', 1);";
- $init[] = $this->_t(1) . "}";
+ $init[] = Indent::_(1) . "if (\$allow)";
+ $init[] = Indent::_(1) . "{";
+ $init[] = Indent::_(2) . "define('" . $_WHMCS . "', 1);";
+ $init[] = Indent::_(1) . "}";
$init[] = "}";
// return the initializing statement
@@ -575,252 +543,252 @@ class Interpretation extends Fields
$theKey = base64_encode(serialize($key));
// set the script
$encrypt[] = "/**";
- $encrypt[] = "* " . $this->setLine(__LINE__) . "WHMCS Class ";
+ $encrypt[] = "* " . Line::_(__Line__, __Class__) . "WHMCS Class ";
$encrypt[] = "**/";
$encrypt[] = "class WHMCS";
$encrypt[] = "{";
- $encrypt[] = $this->_t(1) . "public \$_key = false;";
- $encrypt[] = $this->_t(1) . "public \$_is = false;";
- $encrypt[] = PHP_EOL . $this->_t(1)
+ $encrypt[] = Indent::_(1) . "public \$_key = false;";
+ $encrypt[] = Indent::_(1) . "public \$_is = false;";
+ $encrypt[] = PHP_EOL . Indent::_(1)
. "public function __construct(\$Vk5smi0wjnjb)";
- $encrypt[] = $this->_t(1) . "{";
- $encrypt[] = $this->_t(2) . "// get the session";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(1) . "{";
+ $encrypt[] = Indent::_(2) . "// get the session";
+ $encrypt[] = Indent::_(2)
. "\$session = JFactory::getSession();";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2)
. "\$V2uekt2wcgwk = \$session->get(\$Vk5smi0wjnjb, null);";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2)
. "\$h4sgrGsqq = \$this->get(\$Vk5smi0wjnjb,\$V2uekt2wcgwk);";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2)
. "if (isset(\$h4sgrGsqq['nuut']) && \$h4sgrGsqq['nuut'] && (isset(\$h4sgrGsqq['status']) && 'Active' === \$h4sgrGsqq['status']) && isset(\$h4sgrGsqq['eiegrendel']) && strlen(\$h4sgrGsqq['eiegrendel']) > 300)";
- $encrypt[] = $this->_t(2) . "{";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(2) . "{";
+ $encrypt[] = Indent::_(3)
. "\$session->set(\$Vk5smi0wjnjb, \$h4sgrGsqq['eiegrendel']);";
- $encrypt[] = $this->_t(2) . "}";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2) . "}";
+ $encrypt[] = Indent::_(2)
. "if ((isset(\$h4sgrGsqq['status']) && 'Active' === \$h4sgrGsqq['status']) && isset(\$h4sgrGsqq['md5hash']) && strlen(\$h4sgrGsqq['md5hash']) == 32 && isset(\$h4sgrGsqq['customfields']) && strlen(\$h4sgrGsqq['customfields']) > 4)";
- $encrypt[] = $this->_t(2) . "{";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(2) . "{";
+ $encrypt[] = Indent::_(3)
. "\$this->_key = md5(\$h4sgrGsqq['customfields']);";
- $encrypt[] = $this->_t(2) . "}";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2) . "}";
+ $encrypt[] = Indent::_(2)
. "if ((isset(\$h4sgrGsqq['status']) && 'Active' === \$h4sgrGsqq['status']) && isset(\$h4sgrGsqq['md5hash']) && strlen(\$h4sgrGsqq['md5hash']) == 32 )";
- $encrypt[] = $this->_t(2) . "{";
- $encrypt[] = $this->_t(3) . "\$this->_is = true;";
- $encrypt[] = $this->_t(2) . "}";
- $encrypt[] = $this->_t(1) . "}";
- $encrypt[] = PHP_EOL . $this->_t(1)
+ $encrypt[] = Indent::_(2) . "{";
+ $encrypt[] = Indent::_(3) . "\$this->_is = true;";
+ $encrypt[] = Indent::_(2) . "}";
+ $encrypt[] = Indent::_(1) . "}";
+ $encrypt[] = PHP_EOL . Indent::_(1)
. "private function get(\$Vk5smi0wjnjb,\$V2uekt2wcgwk)";
- $encrypt[] = $this->_t(1) . "{";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(1) . "{";
+ $encrypt[] = Indent::_(2)
. "\$Viioj50xuqu2 = unserialize(base64_decode('" . $theKey
. "'));";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2)
. "\$Visqfrd1caus = time() . md5(mt_rand(1000000000, 9999999999) . \$Vk5smi0wjnjb);";
- $encrypt[] = $this->_t(2) . "\$Vo4tezfgcf3e = date(\"Ymd\");";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2) . "\$Vo4tezfgcf3e = date(\"Ymd\");";
+ $encrypt[] = Indent::_(2)
. "\$Vozblwvfym2f = \$_SERVER['SERVER_NAME'];";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2)
. "\$Vozblwvfym2fdie = isset(\$_SERVER['SERVER_ADDR']) ? \$_SERVER['SERVER_ADDR'] : \$_SERVER['LOCAL_ADDR'];";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2)
. "\$V343jp03dxco = dirname(__FILE__);";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(2)
. "\$Vc2rayehw4f0 = unserialize(base64_decode('czozNjoibW9kdWxlcy9zZXJ2ZXJzL2xpY2Vuc2luZy92ZXJpZnkucGhwIjs='));";
- $encrypt[] = $this->_t(2) . "\$Vlpolphukogz = false;";
- $encrypt[] = $this->_t(2) . "if (\$V2uekt2wcgwk) {";
- $encrypt[] = $this->_t(3) . "\$V2uekt2wcgwk = str_replace(\""
+ $encrypt[] = Indent::_(2) . "\$Vlpolphukogz = false;";
+ $encrypt[] = Indent::_(2) . "if (\$V2uekt2wcgwk) {";
+ $encrypt[] = Indent::_(3) . "\$V2uekt2wcgwk = str_replace(\""
. '".PHP_EOL."' . "\", '', \$V2uekt2wcgwk);";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(3)
. "\$Vm5cxjdc43g4 = substr(\$V2uekt2wcgwk, 0, strlen(\$V2uekt2wcgwk) - 32);";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(3)
. "\$Vbgx0efeu2sy = substr(\$V2uekt2wcgwk, strlen(\$V2uekt2wcgwk) - 32);";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(3)
. "if (\$Vbgx0efeu2sy == md5(\$Vm5cxjdc43g4 . \$Viioj50xuqu2['geheim'])) {";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vm5cxjdc43g4 = strrev(\$Vm5cxjdc43g4);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vbgx0efeu2sy = substr(\$Vm5cxjdc43g4, 0, 32);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vm5cxjdc43g4 = substr(\$Vm5cxjdc43g4, 32);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vm5cxjdc43g4 = base64_decode(\$Vm5cxjdc43g4);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vm5cxjdc43g4finding = unserialize(\$Vm5cxjdc43g4);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$V3qqz0p00fbq = \$Vm5cxjdc43g4finding['dan'];";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "if (\$Vbgx0efeu2sy == md5(\$V3qqz0p00fbq . \$Viioj50xuqu2['geheim'])) {";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$Vbfbwv2y4kre = date(\"Ymd\", mktime(0, 0, 0, date(\"m\"), date(\"d\") - \$Viioj50xuqu2['onthou'], date(\"Y\")));";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "if (\$V3qqz0p00fbq > \$Vbfbwv2y4kre) {";
- $encrypt[] = $this->_t(6) . "\$Vlpolphukogz = true;";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(6) . "\$Vlpolphukogz = true;";
+ $encrypt[] = Indent::_(6)
. "\$Vwasqoybpyed = \$Vm5cxjdc43g4finding;";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(6)
. "\$Vcixw3trerrt = explode(',', \$Vwasqoybpyed['validdomain']);";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(6)
. "if (!in_array(\$_SERVER['SERVER_NAME'], \$Vcixw3trerrt)) {";
- $encrypt[] = $this->_t(7) . "\$Vlpolphukogz = false;";
- $encrypt[] = $this->_t(7)
+ $encrypt[] = Indent::_(7) . "\$Vlpolphukogz = false;";
+ $encrypt[] = Indent::_(7)
. "\$Vm5cxjdc43g4finding['status'] = \"sleg\";";
- $encrypt[] = $this->_t(7) . "\$Vwasqoybpyed = array();";
- $encrypt[] = $this->_t(6) . "}";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(7) . "\$Vwasqoybpyed = array();";
+ $encrypt[] = Indent::_(6) . "}";
+ $encrypt[] = Indent::_(6)
. "\$Vkni3xyhkqzv = explode(',', \$Vwasqoybpyed['validip']);";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(6)
. "if (!in_array(\$Vozblwvfym2fdie, \$Vkni3xyhkqzv)) {";
- $encrypt[] = $this->_t(7) . "\$Vlpolphukogz = false;";
- $encrypt[] = $this->_t(7)
+ $encrypt[] = Indent::_(7) . "\$Vlpolphukogz = false;";
+ $encrypt[] = Indent::_(7)
. "\$Vm5cxjdc43g4finding['status'] = \"sleg\";";
- $encrypt[] = $this->_t(7) . "\$Vwasqoybpyed = array();";
- $encrypt[] = $this->_t(6) . "}";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(7) . "\$Vwasqoybpyed = array();";
+ $encrypt[] = Indent::_(6) . "}";
+ $encrypt[] = Indent::_(6)
. "\$Vckfvnepoaxj = explode(',', \$Vwasqoybpyed['validdirectory']);";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(6)
. "if (!in_array(\$V343jp03dxco, \$Vckfvnepoaxj)) {";
- $encrypt[] = $this->_t(7) . "\$Vlpolphukogz = false;";
- $encrypt[] = $this->_t(7)
+ $encrypt[] = Indent::_(7) . "\$Vlpolphukogz = false;";
+ $encrypt[] = Indent::_(7)
. "\$Vm5cxjdc43g4finding['status'] = \"sleg\";";
- $encrypt[] = $this->_t(7) . "\$Vwasqoybpyed = array();";
- $encrypt[] = $this->_t(6) . "}";
- $encrypt[] = $this->_t(5) . "}";
- $encrypt[] = $this->_t(4) . "}";
- $encrypt[] = $this->_t(3) . "}";
- $encrypt[] = $this->_t(2) . "}";
- $encrypt[] = $this->_t(2) . "if (!\$Vlpolphukogz) {";
- $encrypt[] = $this->_t(3) . "\$V1u0c4dl3ehp = array(";
- $encrypt[] = $this->_t(4) . "'licensekey' => \$Vk5smi0wjnjb,";
- $encrypt[] = $this->_t(4) . "'domain' => \$Vozblwvfym2f,";
- $encrypt[] = $this->_t(4) . "'ip' => \$Vozblwvfym2fdie,";
- $encrypt[] = $this->_t(4) . "'dir' => \$V343jp03dxco,";
- $encrypt[] = $this->_t(3) . ");";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(7) . "\$Vwasqoybpyed = array();";
+ $encrypt[] = Indent::_(6) . "}";
+ $encrypt[] = Indent::_(5) . "}";
+ $encrypt[] = Indent::_(4) . "}";
+ $encrypt[] = Indent::_(3) . "}";
+ $encrypt[] = Indent::_(2) . "}";
+ $encrypt[] = Indent::_(2) . "if (!\$Vlpolphukogz) {";
+ $encrypt[] = Indent::_(3) . "\$V1u0c4dl3ehp = array(";
+ $encrypt[] = Indent::_(4) . "'licensekey' => \$Vk5smi0wjnjb,";
+ $encrypt[] = Indent::_(4) . "'domain' => \$Vozblwvfym2f,";
+ $encrypt[] = Indent::_(4) . "'ip' => \$Vozblwvfym2fdie,";
+ $encrypt[] = Indent::_(4) . "'dir' => \$V343jp03dxco,";
+ $encrypt[] = Indent::_(3) . ");";
+ $encrypt[] = Indent::_(3)
. "if (\$Visqfrd1caus) \$V1u0c4dl3ehp['check_token'] = \$Visqfrd1caus;";
- $encrypt[] = $this->_t(3) . "\$Vdsjeyjmpq2o = '';";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(3) . "\$Vdsjeyjmpq2o = '';";
+ $encrypt[] = Indent::_(3)
. "foreach (\$V1u0c4dl3ehp AS \$V2sgyscukmgi=>\$V1u00zkzmb1d) {";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vdsjeyjmpq2o .= \$V2sgyscukmgi.'='.urlencode(\$V1u00zkzmb1d).'&';";
- $encrypt[] = $this->_t(3) . "}";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(3) . "}";
+ $encrypt[] = Indent::_(3)
. "if (function_exists('curl_exec')) {";
- $encrypt[] = $this->_t(4) . "\$Vdathuqgjyf0 = curl_init();";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4) . "\$Vdathuqgjyf0 = curl_init();";
+ $encrypt[] = Indent::_(4)
. "curl_setopt(\$Vdathuqgjyf0, CURLOPT_URL, \$Viioj50xuqu2['kasier'] . \$Vc2rayehw4f0);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "curl_setopt(\$Vdathuqgjyf0, CURLOPT_POST, 1);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "curl_setopt(\$Vdathuqgjyf0, CURLOPT_POSTFIELDS, \$Vdsjeyjmpq2o);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "curl_setopt(\$Vdathuqgjyf0, CURLOPT_TIMEOUT, 30);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "curl_setopt(\$Vdathuqgjyf0, CURLOPT_RETURNTRANSFER, 1);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vqojefyeohg5 = curl_exec(\$Vdathuqgjyf0);";
- $encrypt[] = $this->_t(4) . "curl_close(\$Vdathuqgjyf0);";
- $encrypt[] = $this->_t(3) . "} else {";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4) . "curl_close(\$Vdathuqgjyf0);";
+ $encrypt[] = Indent::_(3) . "} else {";
+ $encrypt[] = Indent::_(4)
. "\$Vrpmu4bvnmkp = fsockopen(\$Viioj50xuqu2['kasier'], 80, \$Vc0t5kmpwkwk, \$Va3g41fnofhu, 5);";
- $encrypt[] = $this->_t(4) . "if (\$Vrpmu4bvnmkp) {";
- $encrypt[] = $this->_t(5) . "\$Vznkm0a0me1y = \"\r" . PHP_EOL
+ $encrypt[] = Indent::_(4) . "if (\$Vrpmu4bvnmkp) {";
+ $encrypt[] = Indent::_(5) . "\$Vznkm0a0me1y = \"\r" . PHP_EOL
. "\";";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$V2sgyscukmgiop = \"POST \".\$Viioj50xuqu2['kasier'] . \$Vc2rayehw4f0 . \" HTTP/1.0\" . \$Vznkm0a0me1y;";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$V2sgyscukmgiop .= \"Host: \".\$Viioj50xuqu2['kasier'] . \$Vznkm0a0me1y;";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$V2sgyscukmgiop .= \"Content-type: application/x-www-form-urlencoded\" . \$Vznkm0a0me1y;";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$V2sgyscukmgiop .= \"Content-length: \".@strlen(\$Vdsjeyjmpq2o) . \$Vznkm0a0me1y;";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$V2sgyscukmgiop .= \"Connection: close\" . \$Vznkm0a0me1y . \$Vznkm0a0me1y;";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$V2sgyscukmgiop .= \$Vdsjeyjmpq2o;";
- $encrypt[] = $this->_t(5) . "\$Vqojefyeohg5 = '';";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5) . "\$Vqojefyeohg5 = '';";
+ $encrypt[] = Indent::_(5)
. "@stream_set_timeout(\$Vrpmu4bvnmkp, 20);";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "@fputs(\$Vrpmu4bvnmkp, \$V2sgyscukmgiop);";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$V2czq24pjexf = @socket_get_status(\$Vrpmu4bvnmkp);";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "while (!@feof(\$Vrpmu4bvnmkp)&&\$V2czq24pjexf) {";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(6)
. "\$Vqojefyeohg5 .= @fgets(\$Vrpmu4bvnmkp, 1024);";
- $encrypt[] = $this->_t(6)
+ $encrypt[] = Indent::_(6)
. "\$V2czq24pjexf = @socket_get_status(\$Vrpmu4bvnmkp);";
- $encrypt[] = $this->_t(5) . "}";
- $encrypt[] = $this->_t(5) . "@fclose (\$Vqojefyeohg5);";
- $encrypt[] = $this->_t(4) . "}";
- $encrypt[] = $this->_t(3) . "}";
- $encrypt[] = $this->_t(3) . "if (!\$Vqojefyeohg5) {";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(5) . "}";
+ $encrypt[] = Indent::_(5) . "@fclose (\$Vqojefyeohg5);";
+ $encrypt[] = Indent::_(4) . "}";
+ $encrypt[] = Indent::_(3) . "}";
+ $encrypt[] = Indent::_(3) . "if (!\$Vqojefyeohg5) {";
+ $encrypt[] = Indent::_(4)
. "\$Vbfbwv2y4kre = date(\"Ymd\", mktime(0, 0, 0, date(\"m\"), date(\"d\") - \$Viioj50xuqu2['onthou'], date(\"Y\")));";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "if (isset(\$V3qqz0p00fbq) && \$V3qqz0p00fbq > \$Vbfbwv2y4kre) {";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$Vwasqoybpyed = \$Vm5cxjdc43g4finding;";
- $encrypt[] = $this->_t(4) . "} else {";
- $encrypt[] = $this->_t(5) . "\$Vwasqoybpyed = array();";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(4) . "} else {";
+ $encrypt[] = Indent::_(5) . "\$Vwasqoybpyed = array();";
+ $encrypt[] = Indent::_(5)
. "\$Vwasqoybpyed['status'] = \"sleg\";";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$Vwasqoybpyed['description'] = \"Remote Check Failed\";";
- $encrypt[] = $this->_t(5) . "return \$Vwasqoybpyed;";
- $encrypt[] = $this->_t(4) . "}";
- $encrypt[] = $this->_t(3) . "} else {";
- $encrypt[] = $this->_t(4) . "preg_match_all('"
+ $encrypt[] = Indent::_(5) . "return \$Vwasqoybpyed;";
+ $encrypt[] = Indent::_(4) . "}";
+ $encrypt[] = Indent::_(3) . "} else {";
+ $encrypt[] = Indent::_(4) . "preg_match_all('"
. '/<(.*?)>([^<]+)<\/\\1>/i'
. "', \$Vqojefyeohg5, \$V1ot20wob03f);";
- $encrypt[] = $this->_t(4) . "\$Vwasqoybpyed = array();";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4) . "\$Vwasqoybpyed = array();";
+ $encrypt[] = Indent::_(4)
. "foreach (\$V1ot20wob03f[1] AS \$V2sgyscukmgi=>\$V1u00zkzmb1d) {";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$Vwasqoybpyed[\$V1u00zkzmb1d] = \$V1ot20wob03f[2][\$V2sgyscukmgi];";
- $encrypt[] = $this->_t(4) . "}";
- $encrypt[] = $this->_t(3) . "}";
- $encrypt[] = $this->_t(3) . "if (!is_array(\$Vwasqoybpyed)) {";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4) . "}";
+ $encrypt[] = Indent::_(3) . "}";
+ $encrypt[] = Indent::_(3) . "if (!is_array(\$Vwasqoybpyed)) {";
+ $encrypt[] = Indent::_(4)
. "die(\"Invalid License Server Response\");";
- $encrypt[] = $this->_t(3) . "}";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(3) . "}";
+ $encrypt[] = Indent::_(3)
. "if (isset(\$Vwasqoybpyed['md5hash']) && \$Vwasqoybpyed['md5hash']) {";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "if (\$Vwasqoybpyed['md5hash'] != md5(\$Viioj50xuqu2['geheim'] . \$Visqfrd1caus)) {";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$Vwasqoybpyed['status'] = \"sleg\";";
- $encrypt[] = $this->_t(5)
+ $encrypt[] = Indent::_(5)
. "\$Vwasqoybpyed['description'] = \"MD5 Checksum Verification Failed\";";
- $encrypt[] = $this->_t(5) . "return \$Vwasqoybpyed;";
- $encrypt[] = $this->_t(4) . "}";
- $encrypt[] = $this->_t(3) . "}";
- $encrypt[] = $this->_t(3)
+ $encrypt[] = Indent::_(5) . "return \$Vwasqoybpyed;";
+ $encrypt[] = Indent::_(4) . "}";
+ $encrypt[] = Indent::_(3) . "}";
+ $encrypt[] = Indent::_(3)
. "if (isset(\$Vwasqoybpyed['status']) && \$Vwasqoybpyed['status'] == \"Active\") {";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vwasqoybpyed['dan'] = \$Vo4tezfgcf3e;";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vqojefyeohg5ing = serialize(\$Vwasqoybpyed);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vqojefyeohg5ing = base64_encode(\$Vqojefyeohg5ing);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vqojefyeohg5ing = md5(\$Vo4tezfgcf3e . \$Viioj50xuqu2['geheim']) . \$Vqojefyeohg5ing;";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vqojefyeohg5ing = strrev(\$Vqojefyeohg5ing);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vqojefyeohg5ing = \$Vqojefyeohg5ing . md5(\$Vqojefyeohg5ing . \$Viioj50xuqu2['geheim']);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vqojefyeohg5ing = wordwrap(\$Vqojefyeohg5ing, 80, \""
. '".PHP_EOL."' . "\", true);";
- $encrypt[] = $this->_t(4)
+ $encrypt[] = Indent::_(4)
. "\$Vwasqoybpyed['eiegrendel'] = \$Vqojefyeohg5ing;";
- $encrypt[] = $this->_t(3) . "}";
- $encrypt[] = $this->_t(3) . "\$Vwasqoybpyed['nuut'] = true;";
- $encrypt[] = $this->_t(2) . "}";
- $encrypt[] = $this->_t(2)
+ $encrypt[] = Indent::_(3) . "}";
+ $encrypt[] = Indent::_(3) . "\$Vwasqoybpyed['nuut'] = true;";
+ $encrypt[] = Indent::_(2) . "}";
+ $encrypt[] = Indent::_(2)
. "unset(\$V1u0c4dl3ehp,\$Vqojefyeohg5,\$V1ot20wob03f,\$Viioj50xuqu2['kasier'],\$Viioj50xuqu2['geheim'],\$Vo4tezfgcf3e,\$Vozblwvfym2fdie,\$Viioj50xuqu2['onthou'],\$Vbgx0efeu2sy);";
- $encrypt[] = $this->_t(2) . "return \$Vwasqoybpyed;";
- $encrypt[] = $this->_t(1) . "}";
+ $encrypt[] = Indent::_(2) . "return \$Vwasqoybpyed;";
+ $encrypt[] = Indent::_(1) . "}";
$encrypt[] = "}";
// return the help methods
@@ -837,9 +805,9 @@ class Interpretation extends Fields
), 'Error'
);
- return "//" . $this->setLine(__LINE__)
+ return "//" . Line::_(__Line__, __Class__)
. " The WHMCS class could not be added to this component." . PHP_EOL
- . "//" . $this->setLine(__LINE__)
+ . "//" . Line::_(__Line__, __Class__)
. " Please note that you will need to enable the add-on in the Joomla Component area (Add WHMCS)->Yes.";
}
@@ -851,7 +819,7 @@ class Interpretation extends Fields
public function setGetCryptKey()
{
// WHMCS_ENCRYPT_FILE
- $this->fileContentStatic[$this->hhh . 'WHMCS_ENCRYPT_FILE' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('WHMCS_ENCRYPT_FILE')]
= '';
// check if encryption is ative
if ((isset($this->basicFieldModeling)
@@ -876,36 +844,34 @@ class Interpretation extends Fields
$target = array('admin' => 'whmcs');
$done = $this->buildDynamique($target, 'whmcs');
// the text for the file WHMCS_ENCRYPTION_BODY
- $this->fileContentDynamic['whmcs'][$this->hhh
- . 'WHMCS_ENCRYPTION_BODY' . $this->hhh]
+ $this->fileContentDynamic['whmcs'][Placefix::_h('WHMCS_ENCRYPTION_BODY')]
= $this->setWHMCSCryption();
// ENCRYPT_FILE
- $this->fileContentStatic[$this->hhh . 'WHMCS_ENCRYPT_FILE'
- . $this->hhh]
- = PHP_EOL . $this->_t(3) . "whmcs.php ";
+ $this->fileContentStatic[Placefix::_h('WHMCS_ENCRYPT_FILE')]
+ = PHP_EOL . Indent::_(3) . "whmcs.php ";
}
// get component name
- $component = Config::get('component_code_name');
+ $component = CFactory::_('Config')->component_code_name;
// set the getCryptKey function to the helper class
$function = array();
// start building the getCryptKey function/class method
- $function[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $function[] = $this->_t(1) . " * Get The Encryption Keys";
- $function[] = $this->_t(1) . " *";
- $function[] = $this->_t(1)
+ $function[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $function[] = Indent::_(1) . " * Get The Encryption Keys";
+ $function[] = Indent::_(1) . " *";
+ $function[] = Indent::_(1)
. " * @param string \$type The type of key";
- $function[] = $this->_t(1)
+ $function[] = Indent::_(1)
. " * @param string/bool \$default The return value if no key was found";
- $function[] = $this->_t(1) . " *";
- $function[] = $this->_t(1) . " * @return string On success";
- $function[] = $this->_t(1) . " *";
- $function[] = $this->_t(1) . " **/";
- $function[] = $this->_t(1)
+ $function[] = Indent::_(1) . " *";
+ $function[] = Indent::_(1) . " * @return string On success";
+ $function[] = Indent::_(1) . " *";
+ $function[] = Indent::_(1) . " **/";
+ $function[] = Indent::_(1)
. "public static function getCryptKey(\$type, \$default = false)";
- $function[] = $this->_t(1) . "{";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(1) . "{";
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get the global params";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$params = JComponentHelper::getParams('com_" . $component
. "', true);";
// add the basic option
@@ -914,18 +880,18 @@ class Interpretation extends Fields
$this->basicFieldModeling
))
{
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Basic Encryption Type";
- $function[] = $this->_t(2) . "if ('basic' === \$type)";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(2) . "if ('basic' === \$type)";
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3)
. "\$basic_key = \$params->get('basic_key', \$default);";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "if (self::checkString(\$basic_key))";
- $function[] = $this->_t(3) . "{";
- $function[] = $this->_t(4) . "return \$basic_key;";
- $function[] = $this->_t(3) . "}";
- $function[] = $this->_t(2) . "}";
+ $function[] = Indent::_(3) . "{";
+ $function[] = Indent::_(4) . "return \$basic_key;";
+ $function[] = Indent::_(3) . "}";
+ $function[] = Indent::_(2) . "}";
}
// add the medium option
if (isset($this->mediumFieldModeling)
@@ -933,166 +899,166 @@ class Interpretation extends Fields
$this->mediumFieldModeling
))
{
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Medium Encryption Type";
- $function[] = $this->_t(2) . "if ('medium' === \$type)";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "if ('medium' === \$type)";
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " check if medium key is already loaded.";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "if (self::checkString(self::\$mediumCryptKey))";
- $function[] = $this->_t(3) . "{";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(3) . "{";
+ $function[] = Indent::_(4)
. "return (self::\$mediumCryptKey !== 'none') ? trim(self::\$mediumCryptKey) : \$default;";
- $function[] = $this->_t(3) . "}";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "}";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the path to the medium encryption key.";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "\$medium_key_path = \$params->get('medium_key_path', null);";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "if (self::checkString(\$medium_key_path))";
- $function[] = $this->_t(3) . "{";
- $function[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "{";
+ $function[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " load the key from the file.";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(4)
. "if (self::getMediumCryptKey(\$medium_key_path))";
- $function[] = $this->_t(4) . "{";
- $function[] = $this->_t(5)
+ $function[] = Indent::_(4) . "{";
+ $function[] = Indent::_(5)
. "return trim(self::\$mediumCryptKey);";
- $function[] = $this->_t(4) . "}";
- $function[] = $this->_t(3) . "}";
- $function[] = $this->_t(2) . "}";
+ $function[] = Indent::_(4) . "}";
+ $function[] = Indent::_(3) . "}";
+ $function[] = Indent::_(2) . "}";
}
// add the whmcs option
if (isset($this->whmcsFieldModeling)
&& ArrayHelper::check($this->whmcsFieldModeling)
|| $this->componentData->add_license)
{
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " WHMCS Encryption Type";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "if ('whmcs' === \$type || 'advanced' === \$type)";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3)
. "\$key = \$params->get('whmcs_key', \$default);";
- $function[] = $this->_t(3) . "if (self::checkString(\$key))";
- $function[] = $this->_t(3) . "{";
- $function[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "if (self::checkString(\$key))";
+ $function[] = Indent::_(3) . "{";
+ $function[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " load the file";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(4)
. "JLoader::import( 'whmcs', JPATH_COMPONENT_ADMINISTRATOR);";
- $function[] = PHP_EOL . $this->_t(4)
+ $function[] = PHP_EOL . Indent::_(4)
. "\$the = new WHMCS(\$key);";
- $function[] = PHP_EOL . $this->_t(4) . "return \$the->_key;";
- $function[] = $this->_t(3) . "}";
- $function[] = $this->_t(2) . "}";
+ $function[] = PHP_EOL . Indent::_(4) . "return \$the->_key;";
+ $function[] = Indent::_(3) . "}";
+ $function[] = Indent::_(2) . "}";
}
// end the function
- $function[] = PHP_EOL . $this->_t(2) . "return \$default;";
- $function[] = $this->_t(1) . "}";
+ $function[] = PHP_EOL . Indent::_(2) . "return \$default;";
+ $function[] = Indent::_(1) . "}";
// set the getMediumCryptKey class/method
if (isset($this->mediumFieldModeling)
&& ArrayHelper::check(
$this->mediumFieldModeling
))
{
- $function[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $function[] = $this->_t(1) . " * The Medium Encryption Key";
- $function[] = $this->_t(1) . " *";
- $function[] = $this->_t(1) . " * @var string/bool";
- $function[] = $this->_t(1) . " **/";
- $function[] = $this->_t(1)
+ $function[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $function[] = Indent::_(1) . " * The Medium Encryption Key";
+ $function[] = Indent::_(1) . " *";
+ $function[] = Indent::_(1) . " * @var string/bool";
+ $function[] = Indent::_(1) . " **/";
+ $function[] = Indent::_(1)
. "protected static \$mediumCryptKey = false;";
- $function[] = PHP_EOL . $this->_t(1) . "/**";
- $function[] = $this->_t(1)
+ $function[] = PHP_EOL . Indent::_(1) . "/**";
+ $function[] = Indent::_(1)
. " * Get The Medium Encryption Key";
- $function[] = $this->_t(1) . " *";
- $function[] = $this->_t(1)
+ $function[] = Indent::_(1) . " *";
+ $function[] = Indent::_(1)
. " * @param string \$path The path to the medium crypt key folder";
- $function[] = $this->_t(1) . " *";
- $function[] = $this->_t(1)
+ $function[] = Indent::_(1) . " *";
+ $function[] = Indent::_(1)
. " * @return string On success";
- $function[] = $this->_t(1) . " *";
- $function[] = $this->_t(1) . " **/";
- $function[] = $this->_t(1)
+ $function[] = Indent::_(1) . " *";
+ $function[] = Indent::_(1) . " **/";
+ $function[] = Indent::_(1)
. "public static function getMediumCryptKey(\$path)";
- $function[] = $this->_t(1) . "{";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(1) . "{";
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Prep the path a little";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$path = '/'. trim(str_replace('//', '/', \$path), '/');";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check if folder exist";
- $function[] = $this->_t(2) . "if (!Folder::exists(\$path))";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "if (!Folder::exists(\$path))";
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Lock key.";
- $function[] = $this->_t(3) . "self::\$mediumCryptKey = 'none';";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "self::\$mediumCryptKey = 'none';";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set the error message.";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "JFactory::getApplication()->enqueueMessage(JText::_('"
- . $this->langPrefix
+ . CFactory::_('Config')->lang_prefix
. "_CONFIG_MEDIUM_KEY_PATH_ERROR'), 'Error');";
- $function[] = $this->_t(3) . "return false;";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "return false;";
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Create FileName and set file path";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$filePath = \$path.'/.'.md5('medium_crypt_key_file');";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check if we already have the file set";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "if ((self::\$mediumCryptKey = @file_get_contents(\$filePath)) !== FALSE)";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3) . "return true;";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3) . "return true;";
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Set the key for the first time";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "self::\$mediumCryptKey = self::randomkey(128);";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Open the key file";
- $function[] = $this->_t(2) . "\$fh = @fopen(\$filePath, 'w');";
- $function[] = $this->_t(2) . "if (!is_resource(\$fh))";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "\$fh = @fopen(\$filePath, 'w');";
+ $function[] = Indent::_(2) . "if (!is_resource(\$fh))";
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Lock key.";
- $function[] = $this->_t(3) . "self::\$mediumCryptKey = 'none';";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "self::\$mediumCryptKey = 'none';";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set the error message.";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "JFactory::getApplication()->enqueueMessage(JText::_('"
- . $this->langPrefix
+ . CFactory::_('Config')->lang_prefix
. "_CONFIG_MEDIUM_KEY_PATH_ERROR'), 'Error');";
- $function[] = $this->_t(3) . "return false;";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "return false;";
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Write to the key file";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "if (!fwrite(\$fh, self::\$mediumCryptKey))";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Close key file.";
- $function[] = $this->_t(3) . "fclose(\$fh);";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "fclose(\$fh);";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Lock key.";
- $function[] = $this->_t(3) . "self::\$mediumCryptKey = 'none';";
- $function[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "self::\$mediumCryptKey = 'none';";
+ $function[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set the error message.";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "JFactory::getApplication()->enqueueMessage(JText::_('"
- . $this->langPrefix
+ . CFactory::_('Config')->lang_prefix
. "_CONFIG_MEDIUM_KEY_PATH_ERROR'), 'Error');";
- $function[] = $this->_t(3) . "return false;";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(3) . "return false;";
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Close key file.";
- $function[] = $this->_t(2) . "fclose(\$fh);";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "fclose(\$fh);";
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Key is set.";
- $function[] = $this->_t(2) . "return true;";
- $function[] = $this->_t(1) . "}";
+ $function[] = Indent::_(2) . "return true;";
+ $function[] = Indent::_(1) . "}";
}
// return the help methods
@@ -1172,8 +1138,7 @@ class Interpretation extends Fields
$name = explode('.xml', $name)[0];
$target = array('admin' => $name);
$this->buildDynamique($target, 'update_server');
- $this->fileContentDynamic[$name][$this->hhh
- . 'UPDATE_SERVER_XML' . $this->hhh]
+ $this->fileContentDynamic[$name][Placefix::_h('UPDATE_SERVER_XML')]
= implode(PHP_EOL, $updateXML);
// set the Update server file name
@@ -1189,24 +1154,23 @@ class Interpretation extends Fields
{
// UPDATESERVER
$updateServer = array();
- $updateServer[] = PHP_EOL . $this->_t(1) . "";
- $updateServer[] = $this->_t(2)
+ $updateServer[] = PHP_EOL . Indent::_(1) . "";
+ $updateServer[] = Indent::_(2)
. '' . $this->componentData->update_server_url
+ . CFactory::_('Config')->component_code_name . '" name="'
+ . $this->fileContentStatic[Placefix::_h('Component_name')] . '">' . $this->componentData->update_server_url
. ' ';
- $updateServer[] = $this->_t(1) . ' ';
+ $updateServer[] = Indent::_(1) . ' ';
// return the array to string
$updateServer = implode(PHP_EOL, $updateServer);
// add update server details to component XML file
- $this->fileContentStatic[$this->hhh . 'UPDATESERVER' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('UPDATESERVER')]
= $updateServer;
}
else
{
// add update server details to component XML file
- $this->fileContentStatic[$this->hhh . 'UPDATESERVER' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('UPDATESERVER')]
= '';
}
// ensure to update Component version data
@@ -1221,14 +1185,14 @@ class Interpretation extends Fields
}
// update the joomla component table
$newJ = array();
- $newJ['id'] = (int) Config::get('component_id');
+ $newJ['id'] = (int) CFactory::_('Config')->component_id;
$newJ['component_version']
= $this->componentData->component_version;
// update the component with the new dynamic SQL
$modelJ = ComponentbuilderHelper::getModel('joomla_component');
$modelJ->save($newJ); // <-- to insure the history is also updated
// reset the watch here
- $this->getHistoryWatch('joomla_component', Config::get('component_id'));
+ $this->getHistoryWatch('joomla_component', CFactory::_('Config')->component_id);
// update the component update table
$newU = array();
@@ -1239,7 +1203,7 @@ class Interpretation extends Fields
}
else
{
- $newU['joomla_component'] = (int) Config::get('component_id');
+ $newU['joomla_component'] = (int) CFactory::_('Config')->component_id;
}
$newU['version_update'] = json_encode($buket);
// update the component with the new dynamic SQL
@@ -1297,7 +1261,7 @@ class Interpretation extends Fields
'.', '', $this->componentData->old_component_version
)
);
- $update_['url'] = $this->setPlaceholders(
+ $update_['url'] = CFactory::_('Placeholder')->update(
$this->lastupdateURL, $paceholders
);
}
@@ -1328,8 +1292,8 @@ class Interpretation extends Fields
// setup SQL
if (StringHelper::check($update['mysql']))
{
- $update['mysql'] = $this->setPlaceholders(
- $update['mysql'], $this->placeholders
+ $update['mysql'] = CFactory::_('Placeholder')->update(
+ $update['mysql'], CFactory::_('Placeholder')->active
);
}
// add dynamic SQL
@@ -1363,8 +1327,7 @@ class Interpretation extends Fields
$target = array('admin' => $name);
$this->buildDynamique($target, 'sql_update', $update['version']);
$this->fileContentDynamic[$name . '_'
- . $update['version']][$this->hhh . 'UPDATE_VERSION_MYSQL'
- . $this->hhh]
+ . $update['version']][Placefix::_h('UPDATE_VERSION_MYSQL')]
= $update['mysql'];
}
elseif (isset($update['url'])
@@ -1379,7 +1342,7 @@ class Interpretation extends Fields
&& $this->componentData->update_server_target != 3)
{
// we set the defaults
- $u_element = 'com_' . Config::get('component_code_name');
+ $u_element = 'com_' . CFactory::_('Config')->component_code_name;
$u_server_type = 'component';
$u_state = 'stable';
$u_target_version = '3.*';
@@ -1399,27 +1362,23 @@ class Interpretation extends Fields
? $update['update_client'] : $u_client;
}
// build update xml
- $updateXML[] = $this->_t(1) . "";
- $updateXML[] = $this->_t(2) . ""
- . $this->fileContentStatic[$this->hhh . 'Component_name'
- . $this->hhh] . " ";
- $updateXML[] = $this->_t(2) . ""
- . $this->fileContentStatic[$this->hhh . 'SHORT_DESCRIPTION'
- . $this->hhh] . " ";
- $updateXML[] = $this->_t(2) . "$u_element ";
- $updateXML[] = $this->_t(2) . "$u_server_type ";
+ $updateXML[] = Indent::_(1) . "";
+ $updateXML[] = Indent::_(2) . ""
+ . $this->fileContentStatic[Placefix::_h('Component_name')] . " ";
+ $updateXML[] = Indent::_(2) . ""
+ . $this->fileContentStatic[Placefix::_h('SHORT_DESCRIPTION')] . " ";
+ $updateXML[] = Indent::_(2) . "$u_element ";
+ $updateXML[] = Indent::_(2) . "$u_server_type ";
// check if we should add the target client value
if ($u_client)
{
- $updateXML[] = $this->_t(2) . "$u_client ";
+ $updateXML[] = Indent::_(2) . "$u_client ";
}
- $updateXML[] = $this->_t(2) . "" . $update['version']
+ $updateXML[] = Indent::_(2) . "" . $update['version']
. " ";
- $updateXML[] = $this->_t(2) . '' . $this->fileContentStatic[$this->hhh
- . 'AUTHORWEBSITE' . $this->hhh] . ' ';
- $updateXML[] = $this->_t(2) . "";
+ $updateXML[] = Indent::_(2) . '' . $this->fileContentStatic[Placefix::_h('AUTHORWEBSITE')] . ' ';
+ $updateXML[] = Indent::_(2) . "";
if (!isset($update['url'])
|| !StringHelper::check(
$update['url']
@@ -1427,22 +1386,21 @@ class Interpretation extends Fields
{
$update['url'] = 'http://domain.com/demo.zip';
}
- $updateXML[] = $this->_t(3)
+ $updateXML[] = Indent::_(3)
. '' . $update['url']
. ' ';
- $updateXML[] = $this->_t(2) . " ";
- $updateXML[] = $this->_t(2) . "";
- $updateXML[] = $this->_t(3) . "$u_state ";
- $updateXML[] = $this->_t(2) . " ";
- $updateXML[] = $this->_t(2) . ""
- . $this->fileContentStatic[$this->hhh . 'AUTHOR' . $this->hhh]
+ $updateXML[] = Indent::_(2) . " ";
+ $updateXML[] = Indent::_(2) . "";
+ $updateXML[] = Indent::_(3) . "$u_state ";
+ $updateXML[] = Indent::_(2) . " ";
+ $updateXML[] = Indent::_(2) . ""
+ . $this->fileContentStatic[Placefix::_h('AUTHOR')]
. " ";
- $updateXML[] = $this->_t(2) . ""
- . $this->fileContentStatic[$this->hhh . 'AUTHORWEBSITE'
- . $this->hhh] . " ";
- $updateXML[] = $this->_t(2)
+ $updateXML[] = Indent::_(2) . ""
+ . $this->fileContentStatic[Placefix::_h('AUTHORWEBSITE')] . " ";
+ $updateXML[] = Indent::_(2)
. ' ';
- $updateXML[] = $this->_t(1) . " ";
+ $updateXML[] = Indent::_(1) . " ";
}
}
@@ -1454,13 +1412,13 @@ class Interpretation extends Fields
public function noHelp()
{
$help = array();
- $help[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $help[] = $this->_t(1) . " * Can be used to build help urls.";
- $help[] = $this->_t(1) . " **/";
- $help[] = $this->_t(1) . "public static function getHelpUrl(\$view)";
- $help[] = $this->_t(1) . "{";
- $help[] = $this->_t(2) . "return false;";
- $help[] = $this->_t(1) . "}";
+ $help[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $help[] = Indent::_(1) . " * Can be used to build help urls.";
+ $help[] = Indent::_(1) . " **/";
+ $help[] = Indent::_(1) . "public static function getHelpUrl(\$view)";
+ $help[] = Indent::_(1) . "{";
+ $help[] = Indent::_(2) . "return false;";
+ $help[] = Indent::_(1) . "}";
// return the no help method
return implode(PHP_EOL, $help);
@@ -1479,14 +1437,13 @@ class Interpretation extends Fields
if ($admindone && $sitedone)
{
// HELP
- $this->fileContentStatic[$this->hhh . 'HELP' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELP')]
= $this->setHelp(1);
// HELP_SITE
- $this->fileContentStatic[$this->hhh . 'HELP_SITE' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELP_SITE')]
= $this->setHelp(2);
// to make sure the file is updated TODO
- $this->fileContentDynamic['help'][$this->hhh . 'BLABLA'
- . $this->hhh]
+ $this->fileContentDynamic['help'][Placefix::_h('BLABLA')]
= 'blabla';
return true;
@@ -1505,91 +1462,91 @@ class Interpretation extends Fields
$target = 'site_view';
}
$help = array();
- $help[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $help[] = $this->_t(1) . " * Load the Component Help URLs.";
- $help[] = $this->_t(1) . " **/";
- $help[] = $this->_t(1) . "public static function getHelpUrl(\$view)";
- $help[] = $this->_t(1) . "{";
- $help[] = $this->_t(2) . "\$user = JFactory::getUser();";
- $help[] = $this->_t(2) . "\$groups = \$user->get('groups');";
- $help[] = $this->_t(2) . "\$db = JFactory::getDbo();";
- $help[] = $this->_t(2) . "\$query = \$db->getQuery(true);";
- $help[] = $this->_t(2)
+ $help[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $help[] = Indent::_(1) . " * Load the Component Help URLs.";
+ $help[] = Indent::_(1) . " **/";
+ $help[] = Indent::_(1) . "public static function getHelpUrl(\$view)";
+ $help[] = Indent::_(1) . "{";
+ $help[] = Indent::_(2) . "\$user = JFactory::getUser();";
+ $help[] = Indent::_(2) . "\$groups = \$user->get('groups');";
+ $help[] = Indent::_(2) . "\$db = JFactory::getDbo();";
+ $help[] = Indent::_(2) . "\$query = \$db->getQuery(true);";
+ $help[] = Indent::_(2)
. "\$query->select(array('a.id','a.groups','a.target','a.type','a.article','a.url'));";
- $help[] = $this->_t(2) . "\$query->from('#__" . Config::get('component_code_name')
+ $help[] = Indent::_(2) . "\$query->from('#__" . CFactory::_('Config')->component_code_name
. "_help_document AS a');";
- $help[] = $this->_t(2) . "\$query->where('a." . $target
+ $help[] = Indent::_(2) . "\$query->where('a." . $target
. " = '.\$db->quote(\$view));";
- $help[] = $this->_t(2) . "\$query->where('a.location = "
+ $help[] = Indent::_(2) . "\$query->where('a.location = "
. (int) $location . "');";
- $help[] = $this->_t(2) . "\$query->where('a.published = 1');";
- $help[] = $this->_t(2) . "\$db->setQuery(\$query);";
- $help[] = $this->_t(2) . "\$db->execute();";
- $help[] = $this->_t(2) . "if(\$db->getNumRows())";
- $help[] = $this->_t(2) . "{";
- $help[] = $this->_t(3) . "\$helps = \$db->loadObjectList();";
- $help[] = $this->_t(3) . "if (self::checkArray(\$helps))";
- $help[] = $this->_t(3) . "{";
- $help[] = $this->_t(4) . "foreach (\$helps as \$nr => \$help)";
- $help[] = $this->_t(4) . "{";
- $help[] = $this->_t(5) . "if (\$help->target == 1)";
- $help[] = $this->_t(5) . "{";
- $help[] = $this->_t(6)
+ $help[] = Indent::_(2) . "\$query->where('a.published = 1');";
+ $help[] = Indent::_(2) . "\$db->setQuery(\$query);";
+ $help[] = Indent::_(2) . "\$db->execute();";
+ $help[] = Indent::_(2) . "if(\$db->getNumRows())";
+ $help[] = Indent::_(2) . "{";
+ $help[] = Indent::_(3) . "\$helps = \$db->loadObjectList();";
+ $help[] = Indent::_(3) . "if (self::checkArray(\$helps))";
+ $help[] = Indent::_(3) . "{";
+ $help[] = Indent::_(4) . "foreach (\$helps as \$nr => \$help)";
+ $help[] = Indent::_(4) . "{";
+ $help[] = Indent::_(5) . "if (\$help->target == 1)";
+ $help[] = Indent::_(5) . "{";
+ $help[] = Indent::_(6)
. "\$targetgroups = json_decode(\$help->groups, true);";
- $help[] = $this->_t(6)
+ $help[] = Indent::_(6)
. "if (!array_intersect(\$targetgroups, \$groups))";
- $help[] = $this->_t(6) . "{";
- $help[] = $this->_t(7) . "//" . $this->setLine(__LINE__)
+ $help[] = Indent::_(6) . "{";
+ $help[] = Indent::_(7) . "//" . Line::_(__Line__, __Class__)
. " if user not in those target groups then remove the item";
- $help[] = $this->_t(7) . "unset(\$helps[\$nr]);";
- $help[] = $this->_t(7) . "continue;";
- $help[] = $this->_t(6) . "}";
- $help[] = $this->_t(5) . "}";
- $help[] = $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $help[] = Indent::_(7) . "unset(\$helps[\$nr]);";
+ $help[] = Indent::_(7) . "continue;";
+ $help[] = Indent::_(6) . "}";
+ $help[] = Indent::_(5) . "}";
+ $help[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " set the return type";
- $help[] = $this->_t(5) . "switch (\$help->type)";
- $help[] = $this->_t(5) . "{";
- $help[] = $this->_t(6) . "//" . $this->setLine(__LINE__)
+ $help[] = Indent::_(5) . "switch (\$help->type)";
+ $help[] = Indent::_(5) . "{";
+ $help[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
. " set joomla article";
- $help[] = $this->_t(6) . "case 1:";
- $help[] = $this->_t(7)
+ $help[] = Indent::_(6) . "case 1:";
+ $help[] = Indent::_(7)
. "return self::loadArticleLink(\$help->article);";
- $help[] = $this->_t(7) . "break;";
- $help[] = $this->_t(6) . "//" . $this->setLine(__LINE__)
+ $help[] = Indent::_(7) . "break;";
+ $help[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
. " set help text";
- $help[] = $this->_t(6) . "case 2:";
- $help[] = $this->_t(7) . "return self::loadHelpTextLink(\$help->id);";
- $help[] = $this->_t(7) . "break;";
- $help[] = $this->_t(6) . "//" . $this->setLine(__LINE__) . " set Link";
- $help[] = $this->_t(6) . "case 3:";
- $help[] = $this->_t(7) . "return \$help->url;";
- $help[] = $this->_t(7) . "break;";
- $help[] = $this->_t(5) . "}";
- $help[] = $this->_t(4) . "}";
- $help[] = $this->_t(3) . "}";
- $help[] = $this->_t(2) . "}";
- $help[] = $this->_t(2) . "return false;";
- $help[] = $this->_t(1) . "}";
- $help[] = PHP_EOL . $this->_t(1) . "/**";
- $help[] = $this->_t(1) . " * Get the Article Link.";
- $help[] = $this->_t(1) . " **/";
- $help[] = $this->_t(1)
+ $help[] = Indent::_(6) . "case 2:";
+ $help[] = Indent::_(7) . "return self::loadHelpTextLink(\$help->id);";
+ $help[] = Indent::_(7) . "break;";
+ $help[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__) . " set Link";
+ $help[] = Indent::_(6) . "case 3:";
+ $help[] = Indent::_(7) . "return \$help->url;";
+ $help[] = Indent::_(7) . "break;";
+ $help[] = Indent::_(5) . "}";
+ $help[] = Indent::_(4) . "}";
+ $help[] = Indent::_(3) . "}";
+ $help[] = Indent::_(2) . "}";
+ $help[] = Indent::_(2) . "return false;";
+ $help[] = Indent::_(1) . "}";
+ $help[] = PHP_EOL . Indent::_(1) . "/**";
+ $help[] = Indent::_(1) . " * Get the Article Link.";
+ $help[] = Indent::_(1) . " **/";
+ $help[] = Indent::_(1)
. "protected static function loadArticleLink(\$id)";
- $help[] = $this->_t(1) . "{";
- $help[] = $this->_t(2)
+ $help[] = Indent::_(1) . "{";
+ $help[] = Indent::_(2)
. "return JURI::root().'index.php?option=com_content&view=article&id='.\$id.'&tmpl=component&layout=modal';";
- $help[] = $this->_t(1) . "}";
- $help[] = PHP_EOL . $this->_t(1) . "/**";
- $help[] = $this->_t(1) . " * Get the Help Text Link.";
- $help[] = $this->_t(1) . " **/";
- $help[] = $this->_t(1)
+ $help[] = Indent::_(1) . "}";
+ $help[] = PHP_EOL . Indent::_(1) . "/**";
+ $help[] = Indent::_(1) . " * Get the Help Text Link.";
+ $help[] = Indent::_(1) . " **/";
+ $help[] = Indent::_(1)
. "protected static function loadHelpTextLink(\$id)";
- $help[] = $this->_t(1) . "{";
- $help[] = $this->_t(2) . "\$token = JSession::getFormToken();";
- $help[] = $this->_t(2) . "return 'index.php?option=com_"
- . Config::get('component_code_name')
+ $help[] = Indent::_(1) . "{";
+ $help[] = Indent::_(2) . "\$token = JSession::getFormToken();";
+ $help[] = Indent::_(2) . "return 'index.php?option=com_"
+ . CFactory::_('Config')->component_code_name
. "&task=help.getText&id=' . (int) \$id . '&token=' . \$token;";
- $help[] = $this->_t(1) . "}";
+ $help[] = Indent::_(1) . "}";
// return the help methods
return implode(PHP_EOL, $help);
@@ -1600,286 +1557,285 @@ class Interpretation extends Fields
if ($this->addEximport)
{
// we use the company name set in the GUI
- $company_name = $this->fileContentStatic[$this->hhh . 'COMPANYNAME'
- . $this->hhh];
+ $company_name = $this->fileContentStatic[Placefix::_h('COMPANYNAME')];
// start building the xml function
$exel = array();
- $exel[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $exel[] = $this->_t(1) . "* Prepares the xml document";
- $exel[] = $this->_t(1) . "*/";
- $exel[] = $this->_t(1)
+ $exel[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $exel[] = Indent::_(1) . "* Prepares the xml document";
+ $exel[] = Indent::_(1) . "*/";
+ $exel[] = Indent::_(1)
. "public static function xls(\$rows, \$fileName = null, \$title = null, \$subjectTab = null, \$creator = '$company_name', \$description = null, \$category = null,\$keywords = null, \$modified = null)";
- $exel[] = $this->_t(1) . "{";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(1) . "{";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set the user";
- $exel[] = $this->_t(2) . "\$user = JFactory::getUser();";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "\$user = JFactory::getUser();";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set fileName if not set";
- $exel[] = $this->_t(2) . "if (!\$fileName)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(2) . "if (!\$fileName)";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3)
. "\$fileName = 'exported_'.JFactory::getDate()->format('jS_F_Y');";
- $exel[] = $this->_t(2) . "}";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set modified if not set";
- $exel[] = $this->_t(2) . "if (!\$modified)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3) . "\$modified = \$user->name;";
- $exel[] = $this->_t(2) . "}";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "if (!\$modified)";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3) . "\$modified = \$user->name;";
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set title if not set";
- $exel[] = $this->_t(2) . "if (!\$title)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3) . "\$title = 'Book1';";
- $exel[] = $this->_t(2) . "}";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "if (!\$title)";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3) . "\$title = 'Book1';";
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set tab name if not set";
- $exel[] = $this->_t(2) . "if (!\$subjectTab)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3) . "\$subjectTab = 'Sheet1';";
- $exel[] = $this->_t(2) . "}";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "if (!\$subjectTab)";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3) . "\$subjectTab = 'Sheet1';";
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " make sure we have the composer classes loaded";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "self::composerAutoload('phpspreadsheet');";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Create new Spreadsheet object";
- $exel[] = $this->_t(2) . "\$spreadsheet = new Spreadsheet();";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "\$spreadsheet = new Spreadsheet();";
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Set document properties";
- $exel[] = $this->_t(2) . "\$spreadsheet->getProperties()";
- $exel[] = $this->_t(3) . "->setCreator(\$creator)";
- $exel[] = $this->_t(3) . "->setCompany('$company_name')";
- $exel[] = $this->_t(3) . "->setLastModifiedBy(\$modified)";
- $exel[] = $this->_t(3) . "->setTitle(\$title)";
- $exel[] = $this->_t(3) . "->setSubject(\$subjectTab);";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "\$spreadsheet->getProperties()";
+ $exel[] = Indent::_(3) . "->setCreator(\$creator)";
+ $exel[] = Indent::_(3) . "->setCompany('$company_name')";
+ $exel[] = Indent::_(3) . "->setLastModifiedBy(\$modified)";
+ $exel[] = Indent::_(3) . "->setTitle(\$title)";
+ $exel[] = Indent::_(3) . "->setSubject(\$subjectTab);";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " The file type";
- $exel[] = $this->_t(2) . "\$file_type = 'Xls';";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "\$file_type = 'Xls';";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set description";
- $exel[] = $this->_t(2) . "if (\$description)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(2) . "if (\$description)";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3)
. "\$spreadsheet->getProperties()->setDescription(\$description);";
- $exel[] = $this->_t(2) . "}";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set keywords";
- $exel[] = $this->_t(2) . "if (\$keywords)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(2) . "if (\$keywords)";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3)
. "\$spreadsheet->getProperties()->setKeywords(\$keywords);";
- $exel[] = $this->_t(2) . "}";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set category";
- $exel[] = $this->_t(2) . "if (\$category)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(2) . "if (\$category)";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3)
. "\$spreadsheet->getProperties()->setCategory(\$category);";
- $exel[] = $this->_t(2) . "}";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Some styles";
- $exel[] = $this->_t(2) . "\$headerStyles = array(";
- $exel[] = $this->_t(3) . "'font' => array(";
- $exel[] = $this->_t(4) . "'bold' => true,";
- $exel[] = $this->_t(4) . "'color' => array('rgb' => '1171A3'),";
- $exel[] = $this->_t(4) . "'size' => 12,";
- $exel[] = $this->_t(4) . "'name' => 'Verdana'";
- $exel[] = $this->_t(2) . "));";
- $exel[] = $this->_t(2) . "\$sideStyles = array(";
- $exel[] = $this->_t(3) . "'font' => array(";
- $exel[] = $this->_t(4) . "'bold' => true,";
- $exel[] = $this->_t(4) . "'color' => array('rgb' => '444444'),";
- $exel[] = $this->_t(4) . "'size' => 11,";
- $exel[] = $this->_t(4) . "'name' => 'Verdana'";
- $exel[] = $this->_t(2) . "));";
- $exel[] = $this->_t(2) . "\$normalStyles = array(";
- $exel[] = $this->_t(3) . "'font' => array(";
- $exel[] = $this->_t(4) . "'color' => array('rgb' => '444444'),";
- $exel[] = $this->_t(4) . "'size' => 11,";
- $exel[] = $this->_t(4) . "'name' => 'Verdana'";
- $exel[] = $this->_t(2) . "));";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "\$headerStyles = array(";
+ $exel[] = Indent::_(3) . "'font' => array(";
+ $exel[] = Indent::_(4) . "'bold' => true,";
+ $exel[] = Indent::_(4) . "'color' => array('rgb' => '1171A3'),";
+ $exel[] = Indent::_(4) . "'size' => 12,";
+ $exel[] = Indent::_(4) . "'name' => 'Verdana'";
+ $exel[] = Indent::_(2) . "));";
+ $exel[] = Indent::_(2) . "\$sideStyles = array(";
+ $exel[] = Indent::_(3) . "'font' => array(";
+ $exel[] = Indent::_(4) . "'bold' => true,";
+ $exel[] = Indent::_(4) . "'color' => array('rgb' => '444444'),";
+ $exel[] = Indent::_(4) . "'size' => 11,";
+ $exel[] = Indent::_(4) . "'name' => 'Verdana'";
+ $exel[] = Indent::_(2) . "));";
+ $exel[] = Indent::_(2) . "\$normalStyles = array(";
+ $exel[] = Indent::_(3) . "'font' => array(";
+ $exel[] = Indent::_(4) . "'color' => array('rgb' => '444444'),";
+ $exel[] = Indent::_(4) . "'size' => 11,";
+ $exel[] = Indent::_(4) . "'name' => 'Verdana'";
+ $exel[] = Indent::_(2) . "));";
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Add some data";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "if ((\$size = self::checkArray(\$rows)) !== false)";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3) . "\$i = 1;";
- $exel[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3) . "\$i = 1;";
+ $exel[] = PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Based on data size we adapt the behaviour.";
- $exel[] = $this->_t(3) . "\$xls_mode = 1;";
- $exel[] = $this->_t(3) . "if (\$size > 3000)";
- $exel[] = $this->_t(3) . "{";
- $exel[] = $this->_t(4) . "\$xls_mode = 3;";
- $exel[] = $this->_t(4) . "\$file_type = 'Csv';";
- $exel[] = $this->_t(3) . "}";
- $exel[] = $this->_t(3) . "elseif (\$size > 2000)";
- $exel[] = $this->_t(3) . "{";
- $exel[] = $this->_t(4) . "\$xls_mode = 2;";
- $exel[] = $this->_t(3) . "}";
- $exel[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(3) . "\$xls_mode = 1;";
+ $exel[] = Indent::_(3) . "if (\$size > 3000)";
+ $exel[] = Indent::_(3) . "{";
+ $exel[] = Indent::_(4) . "\$xls_mode = 3;";
+ $exel[] = Indent::_(4) . "\$file_type = 'Csv';";
+ $exel[] = Indent::_(3) . "}";
+ $exel[] = Indent::_(3) . "elseif (\$size > 2000)";
+ $exel[] = Indent::_(3) . "{";
+ $exel[] = Indent::_(4) . "\$xls_mode = 2;";
+ $exel[] = Indent::_(3) . "}";
+ $exel[] = PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set active sheet and get it.";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(3)
. "\$active_sheet = \$spreadsheet->setActiveSheetIndex(0);";
- $exel[] = $this->_t(3) . "foreach (\$rows as \$array)";
- $exel[] = $this->_t(3) . "{";
- $exel[] = $this->_t(4) . "\$a = 'A';";
- $exel[] = $this->_t(4) . "foreach (\$array as \$value)";
- $exel[] = $this->_t(4) . "{";
- $exel[] = $this->_t(5)
+ $exel[] = Indent::_(3) . "foreach (\$rows as \$array)";
+ $exel[] = Indent::_(3) . "{";
+ $exel[] = Indent::_(4) . "\$a = 'A';";
+ $exel[] = Indent::_(4) . "foreach (\$array as \$value)";
+ $exel[] = Indent::_(4) . "{";
+ $exel[] = Indent::_(5)
. "\$active_sheet->setCellValue(\$a.\$i, \$value);";
- $exel[] = $this->_t(5) . "if (\$xls_mode != 3)";
- $exel[] = $this->_t(5) . "{";
- $exel[] = $this->_t(6) . "if (\$i == 1)";
- $exel[] = $this->_t(6) . "{";
- $exel[] = $this->_t(7)
+ $exel[] = Indent::_(5) . "if (\$xls_mode != 3)";
+ $exel[] = Indent::_(5) . "{";
+ $exel[] = Indent::_(6) . "if (\$i == 1)";
+ $exel[] = Indent::_(6) . "{";
+ $exel[] = Indent::_(7)
. "\$active_sheet->getColumnDimension(\$a)->setAutoSize(true);";
- $exel[] = $this->_t(7)
+ $exel[] = Indent::_(7)
. "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$headerStyles);";
- $exel[] = $this->_t(7)
+ $exel[] = Indent::_(7)
. "\$active_sheet->getStyle(\$a.\$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);";
- $exel[] = $this->_t(6) . "}";
- $exel[] = $this->_t(6) . "elseif (\$a === 'A')";
- $exel[] = $this->_t(6) . "{";
- $exel[] = $this->_t(7)
+ $exel[] = Indent::_(6) . "}";
+ $exel[] = Indent::_(6) . "elseif (\$a === 'A')";
+ $exel[] = Indent::_(6) . "{";
+ $exel[] = Indent::_(7)
. "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$sideStyles);";
- $exel[] = $this->_t(6) . "}";
- $exel[] = $this->_t(6) . "elseif (\$xls_mode == 1)";
- $exel[] = $this->_t(6) . "{";
- $exel[] = $this->_t(7)
+ $exel[] = Indent::_(6) . "}";
+ $exel[] = Indent::_(6) . "elseif (\$xls_mode == 1)";
+ $exel[] = Indent::_(6) . "{";
+ $exel[] = Indent::_(7)
. "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$normalStyles);";
- $exel[] = $this->_t(6) . "}";
- $exel[] = $this->_t(5) . "}";
- $exel[] = $this->_t(5) . "\$a++;";
- $exel[] = $this->_t(4) . "}";
- $exel[] = $this->_t(4) . "\$i++;";
- $exel[] = $this->_t(3) . "}";
- $exel[] = $this->_t(2) . "}";
- $exel[] = $this->_t(2) . "else";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3) . "return false;";
- $exel[] = $this->_t(2) . "}";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(6) . "}";
+ $exel[] = Indent::_(5) . "}";
+ $exel[] = Indent::_(5) . "\$a++;";
+ $exel[] = Indent::_(4) . "}";
+ $exel[] = Indent::_(4) . "\$i++;";
+ $exel[] = Indent::_(3) . "}";
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = Indent::_(2) . "else";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3) . "return false;";
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Rename worksheet";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "\$spreadsheet->getActiveSheet()->setTitle(\$subjectTab);";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Set active sheet index to the first sheet, so Excel opens this as the first sheet";
- $exel[] = $this->_t(2) . "\$spreadsheet->setActiveSheetIndex(0);";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "\$spreadsheet->setActiveSheetIndex(0);";
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Redirect output to a client's web browser (Excel5)";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "header('Content-Type: application/vnd.ms-excel');";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "header('Content-Disposition: attachment;filename=\"' . \$fileName . '.' . strtolower(\$file_type) .'\"');";
- $exel[] = $this->_t(2) . "header('Cache-Control: max-age=0');";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "header('Cache-Control: max-age=0');";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " If you're serving to IE 9, then the following may be needed";
- $exel[] = $this->_t(2) . "header('Cache-Control: max-age=1');";
- $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "header('Cache-Control: max-age=1');";
+ $exel[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " If you're serving to IE over SSL, then the following may be needed";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); //"
- . $this->setLine(__LINE__) . " Date in the past";
- $exel[] = $this->_t(2)
+ . Line::_(__Line__, __Class__) . " Date in the past";
+ $exel[] = Indent::_(2)
. "header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); //"
- . $this->setLine(__LINE__) . " always modified";
- $exel[] = $this->_t(2)
+ . Line::_(__Line__, __Class__) . " always modified";
+ $exel[] = Indent::_(2)
. "header ('Cache-Control: cache, must-revalidate'); //"
- . $this->setLine(__LINE__) . " HTTP/1.1";
- $exel[] = $this->_t(2) . "header ('Pragma: public'); //"
- . $this->setLine(__LINE__) . " HTTP/1.0";
- $exel[] = PHP_EOL . $this->_t(2)
+ . Line::_(__Line__, __Class__) . " HTTP/1.1";
+ $exel[] = Indent::_(2) . "header ('Pragma: public'); //"
+ . Line::_(__Line__, __Class__) . " HTTP/1.0";
+ $exel[] = PHP_EOL . Indent::_(2)
. "\$writer = IOFactory::createWriter(\$spreadsheet, \$file_type);";
- $exel[] = $this->_t(2) . "\$writer->save('php://output');";
- $exel[] = $this->_t(2) . "jexit();";
- $exel[] = $this->_t(1) . "}";
- $exel[] = PHP_EOL . $this->_t(1) . "/**";
- $exel[] = $this->_t(1) . "* Get CSV Headers";
- $exel[] = $this->_t(1) . "*/";
- $exel[] = $this->_t(1)
+ $exel[] = Indent::_(2) . "\$writer->save('php://output');";
+ $exel[] = Indent::_(2) . "jexit();";
+ $exel[] = Indent::_(1) . "}";
+ $exel[] = PHP_EOL . Indent::_(1) . "/**";
+ $exel[] = Indent::_(1) . "* Get CSV Headers";
+ $exel[] = Indent::_(1) . "*/";
+ $exel[] = Indent::_(1)
. "public static function getFileHeaders(\$dataType)";
- $exel[] = $this->_t(1) . "{";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(1) . "{";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " make sure we have the composer classes loaded";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "self::composerAutoload('phpspreadsheet');";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get session object";
- $exel[] = $this->_t(2) . "\$session = JFactory::getSession();";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2) . "\$session = JFactory::getSession();";
+ $exel[] = Indent::_(2)
. "\$package = \$session->get('package', null);";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "\$package = json_decode(\$package, true);";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set the headers";
- $exel[] = $this->_t(2) . "if(isset(\$package['dir']))";
- $exel[] = $this->_t(2) . "{";
- $exel[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "if(isset(\$package['dir']))";
+ $exel[] = Indent::_(2) . "{";
+ $exel[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " only load first three rows";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(3)
. "\$chunkFilter = new PhpOffice\PhpSpreadsheet\Reader\chunkReadFilter(2,1);";
- $exel[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " identify the file type";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(3)
. "\$inputFileType = IOFactory::identify(\$package['dir']);";
- $exel[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " create the reader for this file type";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(3)
. "\$excelReader = IOFactory::createReader(\$inputFileType);";
- $exel[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " load the limiting filter";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(3)
. "\$excelReader->setReadFilter(\$chunkFilter);";
- $exel[] = $this->_t(3) . "\$excelReader->setReadDataOnly(true);";
- $exel[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(3) . "\$excelReader->setReadDataOnly(true);";
+ $exel[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " load the rows (only first three)";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(3)
. "\$excelObj = \$excelReader->load(\$package['dir']);";
- $exel[] = $this->_t(3) . "\$headers = array();";
- $exel[] = $this->_t(3)
+ $exel[] = Indent::_(3) . "\$headers = array();";
+ $exel[] = Indent::_(3)
. "foreach (\$excelObj->getActiveSheet()->getRowIterator() as \$row)";
- $exel[] = $this->_t(3) . "{";
- $exel[] = $this->_t(4) . "if(\$row->getRowIndex() == 1)";
- $exel[] = $this->_t(4) . "{";
- $exel[] = $this->_t(5)
+ $exel[] = Indent::_(3) . "{";
+ $exel[] = Indent::_(4) . "if(\$row->getRowIndex() == 1)";
+ $exel[] = Indent::_(4) . "{";
+ $exel[] = Indent::_(5)
. "\$cellIterator = \$row->getCellIterator();";
- $exel[] = $this->_t(5)
+ $exel[] = Indent::_(5)
. "\$cellIterator->setIterateOnlyExistingCells(false);";
- $exel[] = $this->_t(5) . "foreach (\$cellIterator as \$cell)";
- $exel[] = $this->_t(5) . "{";
- $exel[] = $this->_t(6) . "if (!is_null(\$cell))";
- $exel[] = $this->_t(6) . "{";
- $exel[] = $this->_t(7)
+ $exel[] = Indent::_(5) . "foreach (\$cellIterator as \$cell)";
+ $exel[] = Indent::_(5) . "{";
+ $exel[] = Indent::_(6) . "if (!is_null(\$cell))";
+ $exel[] = Indent::_(6) . "{";
+ $exel[] = Indent::_(7)
. "\$headers[\$cell->getColumn()] = \$cell->getValue();";
- $exel[] = $this->_t(6) . "}";
- $exel[] = $this->_t(5) . "}";
- $exel[] = $this->_t(5) . "\$excelObj->disconnectWorksheets();";
- $exel[] = $this->_t(5) . "unset(\$excelObj);";
- $exel[] = $this->_t(5) . "break;";
- $exel[] = $this->_t(4) . "}";
- $exel[] = $this->_t(3) . "}";
- $exel[] = $this->_t(3) . "return \$headers;";
- $exel[] = $this->_t(2) . "}";
- $exel[] = $this->_t(2) . "return false;";
- $exel[] = $this->_t(1) . "}";
- $exel[] = PHP_EOL . $this->_t(1) . "/**";
- $exel[] = $this->_t(1)
+ $exel[] = Indent::_(6) . "}";
+ $exel[] = Indent::_(5) . "}";
+ $exel[] = Indent::_(5) . "\$excelObj->disconnectWorksheets();";
+ $exel[] = Indent::_(5) . "unset(\$excelObj);";
+ $exel[] = Indent::_(5) . "break;";
+ $exel[] = Indent::_(4) . "}";
+ $exel[] = Indent::_(3) . "}";
+ $exel[] = Indent::_(3) . "return \$headers;";
+ $exel[] = Indent::_(2) . "}";
+ $exel[] = Indent::_(2) . "return false;";
+ $exel[] = Indent::_(1) . "}";
+ $exel[] = PHP_EOL . Indent::_(1) . "/**";
+ $exel[] = Indent::_(1)
. "* Load the Composer Vendor phpspreadsheet";
- $exel[] = $this->_t(1) . "*/";
- $exel[] = $this->_t(1)
+ $exel[] = Indent::_(1) . "*/";
+ $exel[] = Indent::_(1)
. "protected static function composephpspreadsheet()";
- $exel[] = $this->_t(1) . "{";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(1) . "{";
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " load the autoloader for phpspreadsheet";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "require_once JPATH_SITE . '/libraries/phpspreadsheet/vendor/autoload.php';";
- $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $exel[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " do not load again";
- $exel[] = $this->_t(2)
+ $exel[] = Indent::_(2)
. "self::\$composer['phpspreadsheet'] = true;";
- $exel[] = PHP_EOL . $this->_t(2) . "return true;";
- $exel[] = $this->_t(1) . "}";
+ $exel[] = PHP_EOL . Indent::_(2) . "return true;";
+ $exel[] = Indent::_(1) . "}";
// return the help methods
return implode(PHP_EOL, $exel);
@@ -1893,320 +1849,320 @@ class Interpretation extends Fields
if ($add)
{
$method = array();
- $method[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $method[] = $this->_t(1) . " * Greate user and update given table";
- $method[] = $this->_t(1) . " *";
- $method[] = $this->_t(1)
+ $method[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $method[] = Indent::_(1) . " * Greate user and update given table";
+ $method[] = Indent::_(1) . " *";
+ $method[] = Indent::_(1)
. " * @param array \$credentials Array('name' => string, 'username' => string, 'email' => string, 'password' => string, 'password2' => string)";
- $method[] = $this->_t(1) . " * @param int \$autologin";
- $method[] = $this->_t(1)
+ $method[] = Indent::_(1) . " * @param int \$autologin";
+ $method[] = Indent::_(1)
. " * @param array \$params Array('useractivation' => int, 'sendpassword' => int, 'allowUserRegistration' => int)";
- $method[] = $this->_t(1)
+ $method[] = Indent::_(1)
. " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration; 2 = Custom Helper Method Called registerUser";
- $method[] = $this->_t(1) . " *";
- $method[] = $this->_t(1)
+ $method[] = Indent::_(1) . " *";
+ $method[] = Indent::_(1)
. " * @return int|Error User ID on success, or an error.";
- $method[] = $this->_t(1) . " */";
- $method[] = $this->_t(1)
+ $method[] = Indent::_(1) . " */";
+ $method[] = Indent::_(1)
. "public static function createUser(\$credentials, \$autologin = 0,";
- $method[] = $this->_t(2) . "\$params = array(";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "\$params = array(";
+ $method[] = Indent::_(3)
. "'useractivation' => 0, 'sendpassword' => 1";
- $method[] = $this->_t(2) . "), \$mode = 1";
- $method[] = $this->_t(1) . ")";
- $method[] = $this->_t(1) . "{";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "), \$mode = 1";
+ $method[] = Indent::_(1) . ")";
+ $method[] = Indent::_(1) . "{";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Override mode";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "if (\$mode == 2 && method_exists(__CLASS__, 'registerUser'))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Update params";
- $method[] = $this->_t(3) . "\$params['autologin'] = \$autologin;";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "\$params['autologin'] = \$autologin;";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Now Register User";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "return self::registerUser(\$credentials, \$params);";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "elseif (\$mode == 2)";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "elseif (\$mode == 2)";
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Fallback to Site Registrations";
- $method[] = $this->_t(3) . "\$mode = 1;";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "\$mode = 1;";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " load the user component language files if there is an error.";
- $method[] = $this->_t(2) . "\$lang = JFactory::getLanguage();";
- $method[] = $this->_t(2) . "\$extension = 'com_users';";
- $method[] = $this->_t(2) . "\$base_dir = JPATH_SITE;";
- $method[] = $this->_t(2) . "\$language_tag = '" . Config::get('lang_tag', 'en-GB')
+ $method[] = Indent::_(2) . "\$lang = JFactory::getLanguage();";
+ $method[] = Indent::_(2) . "\$extension = 'com_users';";
+ $method[] = Indent::_(2) . "\$base_dir = JPATH_SITE;";
+ $method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB')
. "';";
- $method[] = $this->_t(2) . "\$reload = true;";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2) . "\$reload = true;";
+ $method[] = Indent::_(2)
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Load the correct user model.";
- $method[] = $this->_t(2) . "if (\$mode == 1) //" . $this->setLine(
- __LINE__
+ $method[] = Indent::_(2) . "if (\$mode == 1) //" . Line::_(
+ __LINE__,__CLASS__
)
. " 1 = Site Registrations";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Load the user site-registration model";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$model = self::getModel('registration', \$base_dir . '/components/' . \$extension, 'Users');";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "else //" . Line::_(__Line__, __Class__)
. " 0 = Admin Registration";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Load the backend-user model";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/' . \$extension, 'Users');";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check if we have params/config";
- $method[] = $this->_t(2) . "if (self::checkArray(\$params))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "if (self::checkArray(\$params))";
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Make changes to user config";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "foreach (\$params as \$param => \$set)";
- $method[] = $this->_t(3) . "{";
- $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "{";
+ $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " If you know of a better path, let me know";
- $method[] = $this->_t(4)
+ $method[] = Indent::_(4)
. "\$params[\$param] = self::setParams(\$extension, \$param, \$set);";
- $method[] = $this->_t(3) . "}";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "}";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Set username to email if not set";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "if (!isset(\$credentials['username']) || !self::checkString(\$credentials['username']))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3)
. "\$credentials['username'] = \$credentials['email'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Lineup new user data array";
- $method[] = $this->_t(2) . "\$data = array(";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "\$data = array(";
+ $method[] = Indent::_(3)
. "'username' => \$credentials['username'],";
- $method[] = $this->_t(3) . "'name' => \$credentials['name'],";
- $method[] = $this->_t(3) . "'block' => 0 );";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "'name' => \$credentials['name'],";
+ $method[] = Indent::_(3) . "'block' => 0 );";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Added details based on mode";
- $method[] = $this->_t(2) . "if (\$mode == 1) //" . $this->setLine(
- __LINE__
+ $method[] = Indent::_(2) . "if (\$mode == 1) //" . Line::_(
+ __LINE__,__CLASS__
)
. " 1 = Site-registration mode";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3)
. "\$data['email1'] = \$credentials['email'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "else //" . Line::_(__Line__, __Class__)
. " 0 = Admin-registration mode";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3)
. "\$data['email'] = \$credentials['email'];";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$data['registerDate'] = JFactory::getDate()->toSql();";
- $method[] = $this->_t(2) . "}";
+ $method[] = Indent::_(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check if password was set";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "if (\$mode == 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !self::checkString(\$credentials['password']) || !self::checkString(\$credentials['password2'])))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set random password when empty password was submitted,";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " when using the 1 = site-registration mode";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$credentials['password'] = self::randomkey(8);";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$credentials['password2'] = \$credentials['password'];";
- $method[] = $this->_t(2) . "}";
+ $method[] = Indent::_(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Now Add password if set";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && self::checkString(\$credentials['password']) && self::checkString(\$credentials['password2']))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "if (\$mode == 1) //" . $this->setLine(
- __LINE__
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "if (\$mode == 1) //" . Line::_(
+ __LINE__,__CLASS__
)
. " 1 = Site-registration mode";
- $method[] = $this->_t(3) . "{";
- $method[] = $this->_t(4)
+ $method[] = Indent::_(3) . "{";
+ $method[] = Indent::_(4)
. "\$data['password1'] = \$credentials['password'];";
- $method[] = $this->_t(3) . "}";
- $method[] = $this->_t(3) . "else //" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "}";
+ $method[] = Indent::_(3) . "else //" . Line::_(__Line__, __Class__)
. " 0 = Admin-registration mode";
- $method[] = $this->_t(3) . "{";
- $method[] = $this->_t(4)
+ $method[] = Indent::_(3) . "{";
+ $method[] = Indent::_(4)
. "\$data['password'] = \$credentials['password'];";
- $method[] = $this->_t(3) . "}";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3) . "}";
+ $method[] = Indent::_(3)
. "\$data['password2'] = \$credentials['password2'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Load the group/s value if set, only for Admin Registration (\$mode == 0)";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "if (\$mode == 0 && isset(\$credentials['groups']) && self::checkArray(\$credentials['groups']))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3)
. "\$data['groups'] = \$credentials['groups'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Create the new user";
- $method[] = $this->_t(2) . "if (\$mode == 1) //" . $this->setLine(
- __LINE__
+ $method[] = Indent::_(2) . "if (\$mode == 1) //" . Line::_(
+ __LINE__,__CLASS__
)
. " 1 = Site-registration mode";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "\$userId = \$model->register(\$data);";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "\$userId = \$model->register(\$data);";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "else //" . Line::_(__Line__, __Class__)
. " 0 = Admin-registration mode";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "\$model->save(\$data);";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "\$model->save(\$data);";
+ $method[] = Indent::_(3)
. "\$userId = \$model->getState('user.id', 0);";
- $method[] = $this->_t(2) . "}";
+ $method[] = Indent::_(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check if we have params";
- $method[] = $this->_t(2) . "if (self::checkArray(\$params))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "if (self::checkArray(\$params))";
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Change user params/config back";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "foreach (\$params as \$param => \$set)";
- $method[] = $this->_t(3) . "{";
- $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "{";
+ $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " If you know of a better path, let me know";
- $method[] = $this->_t(4)
+ $method[] = Indent::_(4)
. "self::setParams(\$extension, \$param, \$set);";
- $method[] = $this->_t(3) . "}";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "}";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " if user is created";
- $method[] = $this->_t(2) . "if (\$userId > 0)";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "if (\$userId > 0)";
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Auto Login if Needed";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "if (\$autologin && isset(\$credentials['password']))";
- $method[] = $this->_t(3) . "{";
- $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "{";
+ $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Try to login";
- $method[] = $this->_t(4) . "try{";
- $method[] = $this->_t(5)
+ $method[] = Indent::_(4) . "try{";
+ $method[] = Indent::_(5)
. "JFactory::getApplication()->login(\$credentials);";
- $method[] = $this->_t(4) . "} catch (Exception \$exception){";
- $method[] = $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(4) . "} catch (Exception \$exception){";
+ $method[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " Do noting for now, may want to set redirect.";
- $method[] = $this->_t(4) . "}";
- $method[] = $this->_t(3) . "}";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(4) . "}";
+ $method[] = Indent::_(3) . "}";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Return ID";
- $method[] = $this->_t(3) . "return \$userId;";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "return \$model->getError();";
- $method[] = $this->_t(1) . "}";
+ $method[] = Indent::_(3) . "return \$userId;";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "return \$model->getError();";
+ $method[] = Indent::_(1) . "}";
- $method[] = PHP_EOL . $this->_t(1)
+ $method[] = PHP_EOL . Indent::_(1)
. "public static function setParams(\$component,\$target,\$value)";
- $method[] = $this->_t(1) . "{";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(1) . "{";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get the params and set the new values";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "\$params = JComponentHelper::getParams(\$component);";
- $method[] = $this->_t(2) . "\$was = \$params->get(\$target, null);";
- $method[] = $this->_t(2) . "if (\$was != \$value)";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "\$params->set(\$target, \$value);";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "\$was = \$params->get(\$target, null);";
+ $method[] = Indent::_(2) . "if (\$was != \$value)";
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "\$params->set(\$target, \$value);";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Get a new database query instance";
- $method[] = $this->_t(3) . "\$db = JFactory::getDBO();";
- $method[] = $this->_t(3) . "\$query = \$db->getQuery(true);";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "\$db = JFactory::getDBO();";
+ $method[] = Indent::_(3) . "\$query = \$db->getQuery(true);";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Build the query";
- $method[] = $this->_t(3) . "\$query->update('#__extensions AS a');";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3) . "\$query->update('#__extensions AS a');";
+ $method[] = Indent::_(3)
. "\$query->set('a.params = ' . \$db->quote((string)\$params));";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$query->where('a.element = ' . \$db->quote((string)\$component));";
- $method[] = $this->_t(3);
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3);
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Execute the query";
- $method[] = $this->_t(3) . "\$db->setQuery(\$query);";
- $method[] = $this->_t(3) . "\$db->execute();";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "return \$was;";
- $method[] = $this->_t(1) . "}";
+ $method[] = Indent::_(3) . "\$db->setQuery(\$query);";
+ $method[] = Indent::_(3) . "\$db->execute();";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "return \$was;";
+ $method[] = Indent::_(1) . "}";
- $method[] = PHP_EOL . $this->_t(1) . "/**";
- $method[] = $this->_t(1) . " * Update user values";
- $method[] = $this->_t(1) . " */";
- $method[] = $this->_t(1)
+ $method[] = PHP_EOL . Indent::_(1) . "/**";
+ $method[] = Indent::_(1) . " * Update user values";
+ $method[] = Indent::_(1) . " */";
+ $method[] = Indent::_(1)
. "public static function updateUser(\$new)";
- $method[] = $this->_t(1) . "{";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(1) . "{";
+ $method[] = Indent::_(2)
. "// load the user component language files if there is an error.";
- $method[] = $this->_t(2) . "\$lang = JFactory::getLanguage();";
- $method[] = $this->_t(2) . "\$extension = 'com_users';";
- $method[] = $this->_t(2) . "\$base_dir = JPATH_ADMINISTRATOR;";
- $method[] = $this->_t(2) . "\$language_tag = '" . Config::get('lang_tag', 'en-GB')
+ $method[] = Indent::_(2) . "\$lang = JFactory::getLanguage();";
+ $method[] = Indent::_(2) . "\$extension = 'com_users';";
+ $method[] = Indent::_(2) . "\$base_dir = JPATH_ADMINISTRATOR;";
+ $method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB')
. "';";
- $method[] = $this->_t(2) . "\$reload = true;";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2) . "\$reload = true;";
+ $method[] = Indent::_(2)
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
- $method[] = $this->_t(2) . "// load the user model";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2) . "// load the user model";
+ $method[] = Indent::_(2)
. "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');";
- $method[] = $this->_t(2) . "// Check if password was set";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2) . "// Check if password was set";
+ $method[] = Indent::_(2)
. "if (isset(\$new['password']) && isset(\$new['password2']) && self::checkString(\$new['password']) && self::checkString(\$new['password2']))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "// Use the users passwords";
- $method[] = $this->_t(3) . "\$password = \$new['password'];";
- $method[] = $this->_t(3) . "\$password2 = \$new['password2'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "// set username";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "// Use the users passwords";
+ $method[] = Indent::_(3) . "\$password = \$new['password'];";
+ $method[] = Indent::_(3) . "\$password2 = \$new['password2'];";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "// set username";
+ $method[] = Indent::_(2)
. "if (!isset(\$new['username']) || !self::checkString(\$new['username']))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3)
. "\$new['username'] = \$new['email'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "// lineup update user data";
- $method[] = $this->_t(2) . "\$data = array(";
- $method[] = $this->_t(3) . "'id' => \$new['id'],";
- $method[] = $this->_t(3) . "'username' => \$new['username'],";
- $method[] = $this->_t(3) . "'name' => \$new['name'],";
- $method[] = $this->_t(3) . "'email' => \$new['email'],";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "// lineup update user data";
+ $method[] = Indent::_(2) . "\$data = array(";
+ $method[] = Indent::_(3) . "'id' => \$new['id'],";
+ $method[] = Indent::_(3) . "'username' => \$new['username'],";
+ $method[] = Indent::_(3) . "'name' => \$new['name'],";
+ $method[] = Indent::_(3) . "'email' => \$new['email'],";
+ $method[] = Indent::_(3)
. "'password' => \$password, // First password field";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "'password2' => \$password2, // Confirm password field";
- $method[] = $this->_t(3) . "'block' => 0 );";
- $method[] = $this->_t(2) . "// set groups if found";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(3) . "'block' => 0 );";
+ $method[] = Indent::_(2) . "// set groups if found";
+ $method[] = Indent::_(2)
. "if (isset(\$new['groups']) && self::checkArray(\$new['groups']))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "\$data['groups'] = \$new['groups'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "// register the new user";
- $method[] = $this->_t(2) . "\$done = \$model->save(\$data);";
- $method[] = $this->_t(2) . "// if user is updated";
- $method[] = $this->_t(2) . "if (\$done)";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "return \$new['id'];";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "return \$model->getError();";
- $method[] = $this->_t(1) . "}";
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "\$data['groups'] = \$new['groups'];";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "// register the new user";
+ $method[] = Indent::_(2) . "\$done = \$model->save(\$data);";
+ $method[] = Indent::_(2) . "// if user is updated";
+ $method[] = Indent::_(2) . "if (\$done)";
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "return \$new['id'];";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "return \$model->getError();";
+ $method[] = Indent::_(1) . "}";
// return the help method
return implode(PHP_EOL, $method);
@@ -2225,31 +2181,31 @@ class Interpretation extends Fields
{
// set the lang
$lang = StringHelper::safe(
- 'com_' . Config::get('component_code_name') . '_menu_'
+ 'com_' . CFactory::_('Config')->component_code_name . '_menu_'
. $nameSingleCode,
'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_TITLE',
'Create ' . $view['settings']->name_single
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_OPTION',
'Create ' . $view['settings']->name_single
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_DESC',
$view['settings']->short_description
);
//start loading xml
$xml = '';
$xml .= PHP_EOL . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . '';
- $xml .= PHP_EOL . $this->_t(3) . '';
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(2) . '';
+ $xml .= PHP_EOL . Indent::_(3) . '';
+ $xml .= PHP_EOL . Indent::_(2) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '';
$xml .= PHP_EOL . ' ';
}
else
@@ -2275,42 +2231,42 @@ class Interpretation extends Fields
{
// set the lang
$lang = StringHelper::safe(
- 'com_' . Config::get('component_code_name') . '_menu_'
+ 'com_' . CFactory::_('Config')->component_code_name . '_menu_'
. $view['settings']->code, 'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_TITLE', $view['settings']->name
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_OPTION', $view['settings']->name
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_DESC', $view['settings']->description
);
//start loading xml
$xml = '';
$xml .= PHP_EOL . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . '';
- $xml .= PHP_EOL . $this->_t(3) . '';
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(2) . '';
+ $xml .= PHP_EOL . Indent::_(3) . '';
+ $xml .= PHP_EOL . Indent::_(2) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '';
if (isset($this->hasIdRequest[$view['settings']->code])
|| isset($this->hasCatIdRequest[$view['settings']->code]))
{
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . '_t(3)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2) . '_t(3)
+ . CFactory::_('Config')->component_code_name . '/models/rules"';
+ $xml .= PHP_EOL . Indent::_(3)
. 'addfieldpath="/administrator/components/com_'
- . Config::get('component_code_name') . '/models/fields">';
+ . CFactory::_('Config')->component_code_name . '/models/fields">';
if (isset($this->hasIdRequest[$view['settings']->code])
&& ArrayHelper::check(
$this->hasIdRequest[$view['settings']->code]
@@ -2321,7 +2277,7 @@ class Interpretation extends Fields
$requestFieldXML
)
{
- $xml .= PHP_EOL . $this->_t(3) . $requestFieldXML;
+ $xml .= PHP_EOL . Indent::_(3) . $requestFieldXML;
}
}
if (isset($this->hasCatIdRequest[$view['settings']->code])
@@ -2334,11 +2290,11 @@ class Interpretation extends Fields
$requestFieldXML
)
{
- $xml .= PHP_EOL . $this->_t(3) . $requestFieldXML;
+ $xml .= PHP_EOL . Indent::_(3) . $requestFieldXML;
}
}
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(2) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
if (isset($this->frontEndParams)
&& isset($this->frontEndParams[$view['settings']->name]))
@@ -2351,23 +2307,22 @@ class Interpretation extends Fields
// now load the fields
if (ArrayHelper::check($params))
{
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2)
. '_t(3)
+ . $this->fileContentStatic[Placefix::_h('COMPONENT')] . '"';
+ $xml .= PHP_EOL . Indent::_(3)
. 'addrulepath="/administrator/components/com_'
- . Config::get('component_code_name') . '/models/rules"';
- $xml .= PHP_EOL . $this->_t(3)
+ . CFactory::_('Config')->component_code_name . '/models/rules"';
+ $xml .= PHP_EOL . Indent::_(3)
. 'addfieldpath="/administrator/components/com_'
- . Config::get('component_code_name') . '/models/fields">';
- $xml .= implode($this->_t(3), $params);
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ . CFactory::_('Config')->component_code_name . '/models/fields">';
+ $xml .= implode(Indent::_(3), $params);
+ $xml .= PHP_EOL . Indent::_(2) . '';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
}
$xml .= PHP_EOL . ' ';
@@ -2408,9 +2363,9 @@ class Interpretation extends Fields
// we add the global option
$field = str_replace(
'Option Set. -->',
- $this->setLine(__LINE__) . ' Global & Option Set. -->'
- . PHP_EOL . $this->_t(3) . '' . PHP_EOL
- . $this->_t(4) . 'JGLOBAL_USE_GLOBAL ', $field
+ Line::_(__Line__, __Class__) . ' Global & Option Set. -->'
+ . PHP_EOL . Indent::_(3) . '' . PHP_EOL
+ . Indent::_(4) . 'JGLOBAL_USE_GLOBAL ', $field
);
// update the default to be global
$field = preg_replace(
@@ -2449,34 +2404,34 @@ class Interpretation extends Fields
{
// to insure that there be no double entries of a call
$checker = md5(serialize($the_get) . $code);
- if (!isset($this->customViewQueryChecker[$this->target])
- || !isset($checker, $this->customViewQueryChecker[$this->target][$checker]))
+ if (!isset($this->customViewQueryChecker[CFactory::_('Config')->build_target])
+ || !isset($checker, $this->customViewQueryChecker[CFactory::_('Config')->build_target][$checker]))
{
// load this unuiqe key
- $this->customViewQueryChecker[$this->target][$checker]
+ $this->customViewQueryChecker[CFactory::_('Config')->build_target][$checker]
= true;
if (isset($the_get['selection']['type'])
&& StringHelper::check(
$the_get['selection']['type']
))
{
- $getItem = PHP_EOL . PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "//" . $this->setLine(__LINE__)
+ $getItem = PHP_EOL . PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "//" . Line::_(__Line__, __Class__)
. " Get from " . $the_get['selection']['table']
. " as " . $the_get['as'];
// set the selection
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. $the_get['selection']['select'];
}
else
{
- $getItem = PHP_EOL . PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "//" . $this->setLine(__LINE__)
+ $getItem = PHP_EOL . PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "//" . Line::_(__Line__, __Class__)
. " Get data";
// set the selection
- $getItem .= PHP_EOL . $this->setPlaceholders(
+ $getItem .= PHP_EOL . CFactory::_('Placeholder')->update(
$the_get['selection']['select'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
}
// load the from selection
@@ -2495,7 +2450,7 @@ class Interpretation extends Fields
$the_get['selection']['type']
))))
{
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. '$query->from(' . $the_get['selection']['from']
. ');';
}
@@ -2508,7 +2463,7 @@ class Interpretation extends Fields
$the_get['selection']['type']
))
{
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$query->join('" . $the_get['type'];
$getItem .= "', (" . $the_get['selection']['from'];
$getItem .= ") . ' ON (' . \$db->quoteName('"
@@ -2525,19 +2480,19 @@ class Interpretation extends Fields
$the_get, $code
)) !== false)
{
- if (isset($this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']])
+ if (isset($this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']])
&& StringHelper::check(
- $this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]
+ $this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]
)
&& !in_array($check, $mainAsArray))
{
// load to other query
- if (!isset($this->otherQuery[$this->target][$default['code']][$this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]))
+ if (!isset($this->otherQuery[CFactory::_('Config')->build_target][$default['code']][$this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]))
{
- $this->otherQuery[$this->target][$default['code']][$this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
+ $this->otherQuery[CFactory::_('Config')->build_target][$default['code']][$this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
= '';
}
- $this->otherQuery[$this->target][$default['code']][$this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
+ $this->otherQuery[CFactory::_('Config')->build_target][$default['code']][$this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
.= $getItem;
}
else
@@ -2586,196 +2541,193 @@ class Interpretation extends Fields
{
case 4:
// COM_COMPONENTBUILDER_DYNAMIC_GET_USER_GROUPS
- $filter .= PHP_EOL . PHP_EOL . $this->_t(1)
- . $tab . $this->_t(1) . "//"
- . $this->setLine(__LINE__) . " filter "
+ $filter .= PHP_EOL . PHP_EOL . Indent::_(1)
+ . $tab . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__) . " filter "
. $as . " based on user groups";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1)
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1)
. "\$remove = (count(array_intersect((array) \$this->groups, (array) "
. $string . "->" . $field
. "))) ? false : true;";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "if (\$remove)";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "{";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "if (\$remove)";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "{";
if ($removeString == $string)
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Remove " . $string
. " if user not in groups";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . $string . " = null;";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "return false;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . $string . " = null;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "return false;";
}
else
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Unset " . $string
. " if user not in groups";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "unset("
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "unset("
. $removeString . ");";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "continue;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "continue;";
}
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "}";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "}";
break;
case 9:
// COM_COMPONENTBUILDER_DYNAMIC_GET_ARRAY_VALUE
- $filter .= PHP_EOL . PHP_EOL . $this->_t(1)
- . $tab . $this->_t(1) . "if ("
- . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ $filter .= PHP_EOL . PHP_EOL . Indent::_(1)
+ . $tab . Indent::_(1) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkArray(" . $string . "->"
. $field . "))";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "{";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "{";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " do your thing here";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "}";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "else";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "{";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "}";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "else";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "{";
if ($removeString == $string)
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Remove " . $string
. " if not array.";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . $string . " = null;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . $string . " = null;";
}
else
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Unset " . $string
. " if not array.";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "unset("
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "unset("
. $removeString . ");";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "continue;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "continue;";
}
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "}";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "}";
break;
case 10:
// COM_COMPONENTBUILDER_DYNAMIC_GET_REPEATABLE_VALUE
- $filter .= PHP_EOL . PHP_EOL . $this->_t(1)
- . $tab . $this->_t(1) . "//"
- . $this->setLine(__LINE__) . " filter "
+ $filter .= PHP_EOL . PHP_EOL . Indent::_(1)
+ . $tab . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__) . " filter "
. $as . " based on repeatable value";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "if ("
- . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkString(" . $string . "->"
. $field . "))";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "{";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "{";
- $filter .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "\$array = json_decode("
+ $filter .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "\$array = json_decode("
. $string . "->" . $field . ",true);";
- $filter .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "if ("
- . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ $filter .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkArray(\$array))";
- $filter .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "{";
+ $filter .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "{";
- $filter .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " do your thing here";
- $filter .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "}";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "else";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "{";
+ $filter .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "}";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "else";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "{";
if ($removeString == $string)
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Remove " . $string
. " if not array.";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . $string . " = null;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . $string . " = null;";
}
else
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Unset " . $string
. " if not array.";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "unset("
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "unset("
. $removeString . ");";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "continue;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "continue;";
}
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "}";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "}";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "}";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "else";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "{";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "}";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "else";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "{";
if ($removeString == $string)
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Remove " . $string
. " if not string.";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . $string . " = null;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . $string . " = null;";
}
else
{
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Unset " . $string
. " if not string.";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "unset("
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "unset("
. $removeString . ");";
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . "continue;";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . "continue;";
}
- $filter .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "}";
+ $filter .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "}";
break;
}
}
@@ -2816,23 +2768,22 @@ class Interpretation extends Fields
$decoder = '';
if ('json' === $decode)
{
- $if = PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "if (" . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh] . "Helper::checkJson("
+ $if = PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "if (" . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkJson("
. $string . "->" . $field . "))" . PHP_EOL
- . $this->_t(1) . $tab . $this->_t(1) . "{";
+ . Indent::_(1) . $tab . Indent::_(1) . "{";
// json_decode
$decoder = $string . "->" . $field . " = json_decode("
. $string . "->" . $field . ", true);";
}
elseif ('base64' === $decode)
{
- $if = PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $if = PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "if (!empty(" . $string . "->" . $field . ") && "
. $string . "->" . $field
. " === base64_encode(base64_decode(" . $string
- . "->" . $field . ")))" . PHP_EOL . $this->_t(1)
- . $tab . $this->_t(1) . "{";
+ . "->" . $field . ")))" . PHP_EOL . Indent::_(1)
+ . $tab . Indent::_(1) . "{";
// base64_decode
$decoder = $string . "->" . $field . " = base64_decode("
. $string . "->" . $field . ");";
@@ -2847,16 +2798,16 @@ class Interpretation extends Fields
{
if ('expert' !== $cryptionType)
{
- $if = PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "if (!empty(" . $string
+ $if = PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "if (!empty(" . $string
. "->" . $field . ") && \$"
. $cryptionType . "key && !is_numeric("
. $string . "->" . $field . ") && "
. $string . "->" . $field
. " === base64_encode(base64_decode("
. $string . "->" . $field . ", true)))"
- . PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "{";
+ . PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "{";
// set decryption
$decoder = $string . "->" . $field
. " = rtrim(\$" . $cryptionType
@@ -2871,11 +2822,11 @@ class Interpretation extends Fields
$_placeholder_for_field
= array('[[[field]]]' => $string
. "->" . $field);
- $fieldDecode .= $this->setPlaceholders(
- PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . implode(
- PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1),
+ $fieldDecode .= CFactory::_('Placeholder')->update(
+ PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . implode(
+ PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1),
$this->{$cryptionType
. 'FieldModeling'}[$array['admin_view']][$field]['get']
), $_placeholder_for_field
@@ -2890,19 +2841,19 @@ class Interpretation extends Fields
if (StringHelper::check($if))
{
// build decoder string
- $fieldDecode .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "//" . $this->setLine(__LINE__)
+ $fieldDecode .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "//" . Line::_(__Line__, __Class__)
. " Check if we can decode " . $field . $if
- . PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
- . "//" . $this->setLine(__LINE__) . " Decode "
+ . PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__) . " Decode "
. $field;
}
if (StringHelper::check($decoder))
{
// build decoder string
- $fieldDecode .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(2) . $decoder . PHP_EOL . $this->_t(1)
- . $tab . $this->_t(1) . "}";
+ $fieldDecode .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(2) . $decoder . PHP_EOL . Indent::_(1)
+ . $tab . Indent::_(1) . "}";
}
}
}
@@ -2918,11 +2869,10 @@ class Interpretation extends Fields
$fieldPrepare = '';
$runplugins = false;
// set component
- $Component = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh];
+ $Component = $this->fileContentStatic[Placefix::_h('Component')];
// set context
$context = (isset($get['context'])) ? $get['context'] : $code;
- $context = 'com_' . Config::get('component_code_name') . '.' . $context;
+ $context = 'com_' . CFactory::_('Config')->component_code_name . '.' . $context;
// load parms builder only once
$params = false;
foreach ($checker as $field => $array)
@@ -2941,21 +2891,21 @@ class Interpretation extends Fields
// build decoder string
if (!$runplugins)
{
- $runplugins = PHP_EOL . $tab . $this->_t(1) . "//"
- . $this->setLine(__LINE__)
+ $runplugins = PHP_EOL . $tab . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__)
. " Load the JEvent Dispatcher";
- $runplugins .= PHP_EOL . $tab . $this->_t(1)
+ $runplugins .= PHP_EOL . $tab . Indent::_(1)
. "JPluginHelper::importPlugin('content');";
- $runplugins .= PHP_EOL . $tab . $this->_t(1)
+ $runplugins .= PHP_EOL . $tab . Indent::_(1)
. '$this->_dispatcher = JFactory::getApplication();';
}
if (!$params)
{
- $fieldPrepare .= PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(
1
- ) . "//" . $this->setLine(__LINE__)
+ ) . "//" . Line::_(__Line__, __Class__)
. " Check if item has params, or pass whole item.";
- $fieldPrepare .= PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(
1
) . "\$params = (isset(" . $string . "->params) && "
. $Component . "Helper::checkJson(" . $string
@@ -2963,21 +2913,21 @@ class Interpretation extends Fields
. $string . ";";
$params = true;
}
- $fieldPrepare .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "//" . $this->setLine(__LINE__)
+ $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "//" . Line::_(__Line__, __Class__)
. " Make sure the content prepare plugins fire on "
. $field;
- $fieldPrepare .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$_" . $field . " = new stdClass();";
- $fieldPrepare .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$_" . $field . '->text =& ' . $string . '->' . $field
- . '; //' . $this->setLine(__LINE__)
+ . '; //' . Line::_(__Line__, __Class__)
. ' value must be in text';
- $fieldPrepare .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "//" . $this->setLine(__LINE__)
+ $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "//" . Line::_(__Line__, __Class__)
. " Since all values are now in text (Joomla Limitation), we also add the field name ("
. $field . ") to context";
- $fieldPrepare .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $fieldPrepare .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. '$this->_dispatcher->triggerEvent("onContentPrepare", array(\''
. $context . '.' . $field . '\', &$_' . $field
. ', &$params, 0));';
@@ -2986,8 +2936,7 @@ class Interpretation extends Fields
// load dispatcher
if ($runplugins)
{
- $this->JEventDispatcher = array($this->hhh . 'DISPATCHER'
- . $this->hhh => $runplugins);
+ $this->JEventDispatcher = array(Placefix::_h('DISPATCHER') => $runplugins);
}
// return content prepare fix
@@ -3015,13 +2964,12 @@ class Interpretation extends Fields
// only load for uikit version 2 (TODO) we may need to add another check here
if (2 == $this->uikit || 1 == $this->uikit)
{
- $fieldUikit .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "//" . $this->setLine(__LINE__) . " Checking if "
+ $fieldUikit .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "//" . Line::_(__Line__, __Class__) . " Checking if "
. $field . " has uikit components that must be loaded.";
- $fieldUikit .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $fieldUikit .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$this->uikitComp = "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::getUikitComp(" . $string . "->"
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::getUikitComp(" . $string . "->"
. $field . ",\$this->uikitComp);";
}
}
@@ -3047,37 +2995,34 @@ class Interpretation extends Fields
if ($this->checkJoint($default, $get, $asBucket))
{
// build custom join string
- $otherJoin = PHP_EOL . $this->_t(1) . $this->hhh . "TAB"
- . $this->hhh . $this->_t(1) . "//" . $this->setLine(
- __LINE__
- ) . " set " . $default['valueName'] . " to the "
- . $this->hhh . "STRING" . $this->hhh . " object.";
- $otherJoin .= PHP_EOL . $this->_t(1) . $this->hhh
- . "TAB" . $this->hhh . $this->_t(1) . $this->hhh
- . "STRING" . $this->hhh . "->"
+ $otherJoin = PHP_EOL . Indent::_(1) . Placefix::_h("TAB")
+ . Indent::_(1) . "//" . Line::_(__LINE__,__CLASS__)
+ . " set " . $default['valueName'] . " to the "
+ . Placefix::_h("STRING") . " object.";
+ $otherJoin .= PHP_EOL . Indent::_(1) . Placefix::_h("TAB")
+ . Indent::_(1) . Placefix::_h("STRING") . "->"
. $default['valueName'] . " = \$this->get"
- . $default['methodName'] . "(" . $this->hhh
- . "STRING" . $this->hhh . "->"
+ . $default['methodName'] . "(" . Placefix::_h("STRING") . "->"
. $this->getAsLookup[$get['key']][$get['on_field']]
. ");";
// load to other join
- if (!isset($this->otherJoin[$this->target][$default['code']][$this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]))
+ if (!isset($this->otherJoin[CFactory::_('Config')->build_target][$default['code']][$this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]))
{
- $this->otherJoin[$this->target][$default['code']][$this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
+ $this->otherJoin[CFactory::_('Config')->build_target][$default['code']][$this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
= '';
}
- $this->otherJoin[$this->target][$default['code']][$this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
+ $this->otherJoin[CFactory::_('Config')->build_target][$default['code']][$this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]][$default['valueName']]
.= $otherJoin;
}
else
{
// build custom join string
- $customJoin .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "//" . $this->setLine(__LINE__)
+ $customJoin .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "//" . Line::_(__Line__, __Class__)
. " set " . $default['valueName'] . " to the "
. $string . " object.";
- $customJoin .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . $string . "->"
+ $customJoin .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . $string . "->"
. $default['valueName'] . " = \$this->get"
. $default['methodName'] . "(" . $string . "->"
. $this->getAsLookup[$get['key']][$get['on_field']]
@@ -3104,9 +3049,9 @@ class Interpretation extends Fields
return false;
}
// default fallback
- elseif (isset($this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']])
+ elseif (isset($this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']])
&& StringHelper::check(
- $this->siteDynamicGet[$this->target][$default['code']][$default['as']][$default['join_field']]
+ $this->siteDynamicGet[CFactory::_('Config')->build_target][$default['code']][$default['as']][$default['join_field']]
))
{
return true;
@@ -3135,19 +3080,19 @@ class Interpretation extends Fields
{
case 1:
// COM_COMPONENTBUILDER_DYNAMIC_GET_ID
- $string = PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $string = PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$query->where('" . $ter['table_key'] . " "
. $ter['operator'] . " ' . (int) \$pk);";
break;
case 2:
// COM_COMPONENTBUILDER_DYNAMIC_GET_USER
- $string = PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $string = PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$query->where('" . $ter['table_key'] . " "
. $ter['operator'] . " ' . (int) \$this->userId);";
break;
case 3:
// COM_COMPONENTBUILDER_DYNAMIC_GET_ACCESS_LEVEL
- $string = PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $string = PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$query->where('" . $ter['table_key'] . " "
. $ter['operator']
. " (' . implode(',', \$this->levels) . ')');";
@@ -3160,12 +3105,12 @@ class Interpretation extends Fields
|| $ter['state_key'] === 'array')
{
// set needed fields to filter after query
- $this->siteFieldDecodeFilter[$this->target][$code][$ter['key']][$as][$field]
+ $this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$code][$ter['key']][$as][$field]
= $ter;
}
else
{
- $string = PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $string = PHP_EOL . Indent::_(1) . $tab . Indent::_(
1
) . "\$query->where('" . $ter['table_key'] . " "
. $ter['operator']
@@ -3174,20 +3119,20 @@ class Interpretation extends Fields
break;
case 5:
// COM_COMPONENTBUILDER_DYNAMIC_GET_CATEGORIES
- $string = PHP_EOL . $this->_t(2) . $tab . "//"
- . $this->setLine(__LINE__)
+ $string = PHP_EOL . Indent::_(2) . $tab . "//"
+ . Line::_(__Line__, __Class__)
. " (TODO) The dynamic category filter is not ready.";
break;
case 6:
// COM_COMPONENTBUILDER_DYNAMIC_GET_TAGS
- $string = PHP_EOL . $this->_t(2) . $tab . "//"
- . $this->setLine(__LINE__)
+ $string = PHP_EOL . Indent::_(2) . $tab . "//"
+ . Line::_(__Line__, __Class__)
. " (TODO) The dynamic tags filter is not ready.";
break;
case 7:
// COM_COMPONENTBUILDER_DYNAMIC_GET_DATE
- $string = PHP_EOL . $this->_t(2) . $tab . "//"
- . $this->setLine(__LINE__)
+ $string = PHP_EOL . Indent::_(2) . $tab . "//"
+ . Line::_(__Line__, __Class__)
. " (TODO) The dynamic date filter is not ready.";
break;
case 8:
@@ -3195,70 +3140,68 @@ class Interpretation extends Fields
if ($ter['operator'] === 'IN'
|| $ter['operator'] === 'NOT IN')
{
- $string = PHP_EOL . $this->_t(2) . $tab . "//"
- . $this->setLine(__LINE__) . " Check if "
+ $string = PHP_EOL . Indent::_(2) . $tab . "//"
+ . Line::_(__Line__, __Class__) . " Check if "
. $ter['state_key']
. " is an array with values.";
- $string .= PHP_EOL . $this->_t(2) . $tab
+ $string .= PHP_EOL . Indent::_(2) . $tab
. "\$array = " . $ter['state_key'] . ";";
- $string .= PHP_EOL . $this->_t(2) . $tab
+ $string .= PHP_EOL . Indent::_(2) . $tab
. "if (isset(\$array) && "
- . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkArray(\$array))";
- $string .= PHP_EOL . $this->_t(2) . $tab . "{";
- $string .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "\$query->where('"
+ $string .= PHP_EOL . Indent::_(2) . $tab . "{";
+ $string .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "\$query->where('"
. $ter['table_key'] . " " . $ter['operator']
. " (' . implode(',', \$array) . ')');";
- $string .= PHP_EOL . $this->_t(2) . $tab . "}";
+ $string .= PHP_EOL . Indent::_(2) . $tab . "}";
// check if empty is allowed
if (!isset($ter['empty']) || !$ter['empty'])
{
- $string .= PHP_EOL . $this->_t(2) . $tab
+ $string .= PHP_EOL . Indent::_(2) . $tab
. "else";
- $string .= PHP_EOL . $this->_t(2) . $tab . "{";
- $string .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "return false;";
- $string .= PHP_EOL . $this->_t(2) . $tab . "}";
+ $string .= PHP_EOL . Indent::_(2) . $tab . "{";
+ $string .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "return false;";
+ $string .= PHP_EOL . Indent::_(2) . $tab . "}";
}
}
else
{
- $string = PHP_EOL . $this->_t(2) . $tab . "//"
- . $this->setLine(__LINE__) . " Check if "
+ $string = PHP_EOL . Indent::_(2) . $tab . "//"
+ . Line::_(__Line__, __Class__) . " Check if "
. $ter['state_key']
. " is a string or numeric value.";
- $string .= PHP_EOL . $this->_t(2) . $tab
+ $string .= PHP_EOL . Indent::_(2) . $tab
. "\$checkValue = " . $ter['state_key'] . ";";
- $string .= PHP_EOL . $this->_t(2) . $tab
+ $string .= PHP_EOL . Indent::_(2) . $tab
. "if (isset(\$checkValue) && "
- . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkString(\$checkValue))";
- $string .= PHP_EOL . $this->_t(2) . $tab . "{";
- $string .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "\$query->where('"
+ $string .= PHP_EOL . Indent::_(2) . $tab . "{";
+ $string .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "\$query->where('"
. $ter['table_key'] . " " . $ter['operator']
. " ' . \$db->quote(\$checkValue));";
- $string .= PHP_EOL . $this->_t(2) . $tab . "}";
- $string .= PHP_EOL . $this->_t(2) . $tab
+ $string .= PHP_EOL . Indent::_(2) . $tab . "}";
+ $string .= PHP_EOL . Indent::_(2) . $tab
. "elseif (is_numeric(\$checkValue))";
- $string .= PHP_EOL . $this->_t(2) . $tab . "{";
- $string .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "\$query->where('"
+ $string .= PHP_EOL . Indent::_(2) . $tab . "{";
+ $string .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "\$query->where('"
. $ter['table_key'] . " " . $ter['operator']
. " ' . \$checkValue);";
- $string .= PHP_EOL . $this->_t(2) . $tab . "}";
+ $string .= PHP_EOL . Indent::_(2) . $tab . "}";
// check if empty is allowed
if (!isset($ter['empty']) || !$ter['empty'])
{
- $string .= PHP_EOL . $this->_t(2) . $tab
+ $string .= PHP_EOL . Indent::_(2) . $tab
. "else";
- $string .= PHP_EOL . $this->_t(2) . $tab . "{";
- $string .= PHP_EOL . $this->_t(2) . $tab
- . $this->_t(1) . "return false;";
- $string .= PHP_EOL . $this->_t(2) . $tab . "}";
+ $string .= PHP_EOL . Indent::_(2) . $tab . "{";
+ $string .= PHP_EOL . Indent::_(2) . $tab
+ . Indent::_(1) . "return false;";
+ $string .= PHP_EOL . Indent::_(2) . $tab . "}";
}
}
break;
@@ -3266,14 +3209,14 @@ class Interpretation extends Fields
// COM_COMPONENTBUILDER_DYNAMIC_GET_ARRAY_VALUE
$string = "";
// set needed fields to filter after query
- $this->siteFieldDecodeFilter[$this->target][$code][$ter['key']][$as][$field]
+ $this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$code][$ter['key']][$as][$field]
= $ter;
break;
case 10:
// COM_COMPONENTBUILDER_DYNAMIC_GET_REPEATABLE_VALUE
$string = "";
// set needed fields to filter after query
- $this->siteFieldDecodeFilter[$this->target][$code][$ter['key']][$as][$field]
+ $this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$code][$ter['key']][$as][$field]
= $ter;
break;
case 11:
@@ -3286,7 +3229,7 @@ class Interpretation extends Fields
);
$field = trim(str_replace(')', '', $field));
}
- $string = PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $string = PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$query->where('" . $ter['table_key'] . " "
. $ter['operator'] . " " . $ter['state_key']
. "');";
@@ -3297,16 +3240,16 @@ class Interpretation extends Fields
{
// sort where
if ($as === 'a'
- || (isset($this->siteMainGet[$this->target][$code][$as])
+ || (isset($this->siteMainGet[CFactory::_('Config')->build_target][$code][$as])
&& StringHelper::check(
- $this->siteMainGet[$this->target][$code][$as]
+ $this->siteMainGet[CFactory::_('Config')->build_target][$code][$as]
)))
{
$filters .= $string;
}
elseif ($as !== 'a')
{
- $this->otherFilter[$this->target][$code][$as][$field]
+ $this->otherFilter[CFactory::_('Config')->build_target][$code][$as][$field]
= $string;
}
}
@@ -3330,18 +3273,18 @@ class Interpretation extends Fields
$string = "\$query->group('" . $gr['table_key'] . "');";
// sort where
if ($as === 'a'
- || (isset($this->siteMainGet[$this->target][$code][$as])
+ || (isset($this->siteMainGet[CFactory::_('Config')->build_target][$code][$as])
&& StringHelper::check(
- $this->siteMainGet[$this->target][$code][$as]
+ $this->siteMainGet[CFactory::_('Config')->build_target][$code][$as]
)))
{
- $grouping .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $grouping .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. $string;
}
else
{
- $this->otherGroup[$this->target][$code][$as][$field]
- = PHP_EOL . $this->_t(2) . $string;
+ $this->otherGroup[CFactory::_('Config')->build_target][$code][$as][$field]
+ = PHP_EOL . Indent::_(2) . $string;
}
}
}
@@ -3373,18 +3316,18 @@ class Interpretation extends Fields
}
// sort where
if ($as === 'a'
- || (isset($this->siteMainGet[$this->target][$code][$as])
+ || (isset($this->siteMainGet[CFactory::_('Config')->build_target][$code][$as])
&& StringHelper::check(
- $this->siteMainGet[$this->target][$code][$as]
+ $this->siteMainGet[CFactory::_('Config')->build_target][$code][$as]
)))
{
- $ordering .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $ordering .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. $string;
}
else
{
- $this->otherOrder[$this->target][$code][$as][$field]
- = PHP_EOL . $this->_t(2) . $string;
+ $this->otherOrder[CFactory::_('Config')->build_target][$code][$as][$field]
+ = PHP_EOL . Indent::_(2) . $string;
}
}
}
@@ -3452,51 +3395,50 @@ class Interpretation extends Fields
|| $whe['operator'] === 'NOT IN')
{
$string = "if (isset(" . $whe['value_key'] . ") && "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray("
. $whe['value_key'] . "))";
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(1)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(1)
. "{";
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(2)
- . "//" . $this->setLine(__LINE__) . " Get where "
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__) . " Get where "
. $whe['table_key'] . " is " . $whe['value_key'];
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(2)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(2)
. "\$query->where('" . $whe['table_key'] . " "
. $whe['operator'] . $value;
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(1)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(1)
. "}";
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(1)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(1)
. "else";
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(1)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(1)
. "{";
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(2)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(2)
. "return false;";
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(1)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(1)
. "}";
}
else
{
- $string = "//" . $this->setLine(__LINE__)
+ $string = "//" . Line::_(__Line__, __Class__)
. " Get where " . $whe['table_key'] . " is "
. $whe['value_key'];
- $string .= PHP_EOL . $this->_t(1) . $tabe . $this->_t(1)
+ $string .= PHP_EOL . Indent::_(1) . $tabe . Indent::_(1)
. "\$query->where('" . $whe['table_key'] . " "
. $whe['operator'] . $value;
}
// sort where
if ($as === 'a'
- || (isset($this->siteMainGet[$this->target][$code][$as])
+ || (isset($this->siteMainGet[CFactory::_('Config')->build_target][$code][$as])
&& StringHelper::check(
- $this->siteMainGet[$this->target][$code][$as]
+ $this->siteMainGet[CFactory::_('Config')->build_target][$code][$as]
)))
{
- $wheres .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $wheres .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. $string;
}
elseif ($as !== 'a')
{
- $this->otherWhere[$this->target][$code][$as][$field]
- = PHP_EOL . $this->_t(2) . $string;
+ $this->otherWhere[CFactory::_('Config')->build_target][$code][$as][$field]
+ = PHP_EOL . Indent::_(2) . $string;
}
}
}
@@ -3533,10 +3475,10 @@ class Interpretation extends Fields
// only add if the filter is set
if (StringHelper::check($value))
{
- $globals .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "//" . $this->setLine(__LINE__)
+ $globals .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "//" . Line::_(__Line__, __Class__)
. " set the global " . $glo['name'] . " value."
- . PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ . PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. $value;
}
}
@@ -3585,54 +3527,51 @@ class Interpretation extends Fields
}
// check that the default and the redirect page is not the same
if (isset(
- $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')]
)
- && $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW'
- . $this->hhh] != $view['settings']->code)
+ && $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')] != $view['settings']->code)
{
- $redirectMessage = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $redirectMessage = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " redirect away to the default view if no access allowed.";
$redirectString = "JRoute::_('index.php?option=com_"
- . Config::get('component_code_name') . "&view="
- . $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW'
- . $this->hhh] . "')";
+ . CFactory::_('Config')->component_code_name . "&view="
+ . $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')] . "')";
}
else
{
- $redirectMessage = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $redirectMessage = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " redirect away to the home page if no access allowed.";
$redirectString = 'JURI::root()';
}
- $accessCheck[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $accessCheck[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " check if this user has permission to access item";
- $accessCheck[] = $this->_t(2) . "if (!" . $userString
+ $accessCheck[] = Indent::_(2) . "if (!" . $userString
. "->authorise('site." . $view['settings']->code
- . ".access', 'com_" . Config::get('component_code_name') . "'))";
- $accessCheck[] = $this->_t(2) . "{";
- $accessCheck[] = $this->_t(3)
+ . ".access', 'com_" . CFactory::_('Config')->component_code_name . "'))";
+ $accessCheck[] = Indent::_(2) . "{";
+ $accessCheck[] = Indent::_(3)
. "\$app = JFactory::getApplication();";
// set lang
- $langKeyWord = $this->langPrefix . '_'
+ $langKeyWord = CFactory::_('Config')->lang_prefix . '_'
. StringHelper::safe(
'Not authorised to view ' . $view['settings']->code . '!',
'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'site', $langKeyWord,
'Not authorised to view ' . $view['settings']->code . '!'
);
- $accessCheck[] = $this->_t(3) . "\$app->enqueueMessage(JText:"
+ $accessCheck[] = Indent::_(3) . "\$app->enqueueMessage(JText:"
. ":_('" . $langKeyWord . "'), 'error');";
$accessCheck[] = $redirectMessage;
- $accessCheck[] = $this->_t(3) . "\$app->redirect(" . $redirectString
+ $accessCheck[] = Indent::_(3) . "\$app->redirect(" . $redirectString
. ");";
- $accessCheck[] = $this->_t(3) . "return false;";
- $accessCheck[] = $this->_t(2) . "}";
+ $accessCheck[] = Indent::_(3) . "return false;";
+ $accessCheck[] = Indent::_(2) . "}";
// return the access check
return implode(PHP_EOL, $accessCheck);
@@ -3670,18 +3609,18 @@ class Interpretation extends Fields
$get->php_before_getitem
))
{
- $getItem .= $this->setPlaceholders(
- $get->php_before_getitem, $this->placeholders
+ $getItem .= CFactory::_('Placeholder')->update(
+ $get->php_before_getitem, CFactory::_('Placeholder')->active
);
}
// start loadin the get Item
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//"
- . $this->setLine(__LINE__) . " Get a db connection.";
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__) . " Get a db connection.";
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$db = JFactory::getDbo();";
- $getItem .= PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Create a new query object.";
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $getItem .= PHP_EOL . PHP_EOL . $tab . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Create a new query object.";
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$query = \$db->getQuery(true);";
// set main get query
$getItem .= $this->setCustomViewQuery($get->main_get, $code, $tab);
@@ -3708,106 +3647,103 @@ class Interpretation extends Fields
$getItem .= $this->setCustomViewGroup($get->group, $code, $tab);
}
// db set query data placeholder
- $getItem .= $this->hhh . "DB_SET_QUERY_DATA" . $this->hhh;
+ $getItem .= Placefix::_h("DB_SET_QUERY_DATA") ;
// set after item php
if (isset($get->add_php_after_getitem)
&& $get->add_php_after_getitem == 1
&& isset($get->php_after_getitem)
&& StringHelper::check($get->php_after_getitem))
{
- $getItem .= $this->setPlaceholders(
- $get->php_after_getitem, $this->placeholders
+ $getItem .= CFactory::_('Placeholder')->update(
+ $get->php_after_getitem, CFactory::_('Placeholder')->active
);
}
// check the getItem string to see if we should still add set query to data
if (strpos($getItem, '$data =') === false)
{
// get ready to get query
- $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] =
- PHP_EOL . PHP_EOL . $tab . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $setQuery[Placefix::_h("DB_SET_QUERY_DATA")] =
+ PHP_EOL . PHP_EOL . $tab . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Reset the query using our newly populated query object.";
- $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .=
- PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $setQuery[Placefix::_h("DB_SET_QUERY_DATA")] .=
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$db->setQuery(\$query);";
- $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .=
- PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//"
- . $this->setLine(__LINE__)
+ $setQuery[Placefix::_h("DB_SET_QUERY_DATA")] .=
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__)
. " Load the results as a stdClass object.";
- $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] .=
- PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $setQuery[Placefix::_h("DB_SET_QUERY_DATA")] .=
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$data = \$db->loadObject();";
// add the db set query to data
}
else
{
// remove our placeholder
- $setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] = '';
+ $setQuery[Placefix::_h("DB_SET_QUERY_DATA")] = '';
}
// add the db set query to data
$getItem = str_replace(
array_keys($setQuery),
array_values($setQuery), $getItem
);
- $getItem .= PHP_EOL . PHP_EOL . $tab . $this->_t(2)
+ $getItem .= PHP_EOL . PHP_EOL . $tab . Indent::_(2)
. "if (empty(\$data))";
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "{";
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{";
if ($type === 'main')
{
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "\$app = JFactory::getApplication();";
- $langKeyWoord = $this->langPrefix . '_'
+ $langKeyWoord = CFactory::_('Config')->lang_prefix . '_'
. StringHelper::safe(
'Not found or access denied', 'U'
);
- $this->setLangContent(
- $this->lang, $langKeyWoord, 'Not found, or access denied.'
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langKeyWoord, 'Not found, or access denied.'
);
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " If no data is found redirect to default page and show warning.";
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "\$app->enqueueMessage(JText:" . ":_('" . $langKeyWoord
. "'), 'warning');";
- if ('site' === $this->target)
+ if ('site' === CFactory::_('Config')->build_target)
{
// check that the default and the redirect page is not the same
if (isset(
- $this->fileContentStatic[$this->hhh
- . 'SITE_DEFAULT_VIEW' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')]
)
- && $this->fileContentStatic[$this->hhh
- . 'SITE_DEFAULT_VIEW' . $this->hhh] != $code)
+ && $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')] != $code)
{
$redirectString = "JRoute::_('index.php?option=com_"
- . Config::get('component_code_name') . "&view="
- . $this->fileContentStatic[$this->hhh
- . 'SITE_DEFAULT_VIEW' . $this->hhh] . "')";
+ . CFactory::_('Config')->component_code_name . "&view="
+ . $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')] . "')";
}
else
{
$redirectString = 'JURI::root()';
}
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "\$app->redirect(" . $redirectString . ");";
}
else
{
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "\$app->redirect('index.php?option=com_"
- . Config::get('component_code_name') . "');";
+ . CFactory::_('Config')->component_code_name . "');";
}
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "return false;";
}
else
{
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "return false;";
}
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "}";
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "}";
// dispatcher placeholder
- $getItem .= $this->hhh . "DISPATCHER" . $this->hhh;
+ $getItem .= Placefix::_h("DISPATCHER") ;
if (ArrayHelper::check($get->main_get))
{
$asBucket = array();
@@ -3831,10 +3767,10 @@ class Interpretation extends Fields
}
}
- if (isset($this->siteFieldDecodeFilter[$this->target][$code][$main_get['key']][$main_get['as']]))
+ if (isset($this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$code][$main_get['key']][$main_get['as']]))
{
$decodeFilter
- = $this->siteFieldDecodeFilter[$this->target][$code][$main_get['key']][$main_get['as']];
+ = $this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$code][$main_get['key']][$main_get['as']];
if (ArrayHelper::check(
$decodeFilter
))
@@ -3883,8 +3819,7 @@ class Interpretation extends Fields
}
}
// set the scripts
- $Component = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh];
+ $Component = $this->fileContentStatic[Placefix::_h('Component')];
$script = '';
foreach ($this->cryptionTypes as $cryptionType)
{
@@ -3893,16 +3828,16 @@ class Interpretation extends Fields
{
if ('expert' !== $cryptionType)
{
- $script .= PHP_EOL . PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "//" . $this->setLine(__LINE__)
+ $script .= PHP_EOL . PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "//" . Line::_(__Line__, __Class__)
. " Get the " . $cryptionType . " encryption.";
- $script .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$" . $cryptionType . "key = " . $Component
. "Helper::getCryptKey('" . $cryptionType . "');";
- $script .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "//" . $this->setLine(__LINE__)
+ $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "//" . Line::_(__Line__, __Class__)
. " Get the encryption object.";
- $script .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$" . $cryptionType . " = new FOFEncryptAes(\$"
. $cryptionType . "key);";
}
@@ -3920,8 +3855,8 @@ class Interpretation extends Fields
. 'FieldModelInitiator'}[$code]['get'] as $block
)
{
- $script .= PHP_EOL . $this->_t(1) . implode(
- PHP_EOL . $this->_t(1), $block
+ $script .= PHP_EOL . Indent::_(1) . implode(
+ PHP_EOL . Indent::_(1), $block
);
}
}
@@ -3940,38 +3875,38 @@ class Interpretation extends Fields
if ($get->addcalculation == 1)
{
$get->php_calculation = (array) explode(
- PHP_EOL, $this->setPlaceholders(
- $get->php_calculation, $this->placeholders
+ PHP_EOL, CFactory::_('Placeholder')->update(
+ $get->php_calculation, CFactory::_('Placeholder')->active
)
);
- $getItem .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . implode(
- PHP_EOL . $this->_t(1) . $tab . $this->_t(1),
+ $getItem .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . implode(
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(1),
$get->php_calculation
);
}
if ($type === 'custom')
{
// return the object
- $getItem .= PHP_EOL . PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $getItem .= PHP_EOL . PHP_EOL . Indent::_(1) . $tab . Indent::_(
1
- ) . "//" . $this->setLine(__LINE__)
+ ) . "//" . Line::_(__Line__, __Class__)
. " return data object.";
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "return \$data;";
}
else
{
// set the object
- $getItem .= PHP_EOL . PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $getItem .= PHP_EOL . PHP_EOL . Indent::_(1) . $tab . Indent::_(
1
- ) . "//" . $this->setLine(__LINE__)
+ ) . "//" . Line::_(__Line__, __Class__)
. " set data object to item.";
- $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$this->_item[\$pk] = \$data;";
}
// only update if dispacher placholder is found
- if (strpos($getItem, $this->hhh . 'DISPATCHER' . $this->hhh)
+ if (strpos($getItem, Placefix::_h('DISPATCHER'))
!== false)
{
// check if the dispather should be added
@@ -3980,8 +3915,7 @@ class Interpretation extends Fields
$this->JEventDispatcher
))
{
- $this->JEventDispatcher = array($this->hhh . 'DISPATCHER'
- . $this->hhh => '');
+ $this->JEventDispatcher = array(Placefix::_h('DISPATCHER') => '');
}
$getItem = str_replace(
array_keys($this->JEventDispatcher),
@@ -3992,8 +3926,8 @@ class Interpretation extends Fields
return $getItem;
}
- return PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//"
- . $this->setLine(__LINE__) . "add your custom code here.";
+ return PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__) . "add your custom code here.";
}
public function setCustomViewCustomMethods($main_view, $code)
@@ -4033,23 +3967,23 @@ class Interpretation extends Fields
if ($view->gettype == 3)
{
// SITE_GET_ITEM <<>>
- $main .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $main .= PHP_EOL . PHP_EOL . Indent::_(2)
. "if (!isset(\$this->initSet) || !\$this->initSet)";
- $main .= PHP_EOL . $this->_t(2) . "{";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(2) . "{";
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->user = JFactory::getUser();";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->userId = \$this->user->get('id');";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->guest = \$this->user->get('guest');";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->groups = \$this->user->get('groups');";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->authorisedGroups = \$this->user->getAuthorisedGroups();";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->levels = \$this->user->getAuthorisedViewLevels();";
- $main .= PHP_EOL . $this->_t(3) . "\$this->initSet = true;";
- $main .= PHP_EOL . $this->_t(2) . "}";
+ $main .= PHP_EOL . Indent::_(3) . "\$this->initSet = true;";
+ $main .= PHP_EOL . Indent::_(2) . "}";
$main .= $this->setCustomViewGetItem(
$view, $view->code, '', 'custom'
);
@@ -4058,28 +3992,28 @@ class Interpretation extends Fields
}
elseif ($view->gettype == 4)
{
- $main .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $main .= PHP_EOL . PHP_EOL . Indent::_(2)
. "if (!isset(\$this->initSet) || !\$this->initSet)";
- $main .= PHP_EOL . $this->_t(2) . "{";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(2) . "{";
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->user = JFactory::getUser();";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->userId = \$this->user->get('id');";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->guest = \$this->user->get('guest');";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->groups = \$this->user->get('groups');";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->authorisedGroups = \$this->user->getAuthorisedGroups();";
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. "\$this->levels = \$this->user->getAuthorisedViewLevels();";
- $main .= PHP_EOL . $this->_t(3) . "\$this->initSet = true;";
- $main .= PHP_EOL . $this->_t(2) . "}";
- $main .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Get the global params";
- $main .= PHP_EOL . $this->_t(2)
+ $main .= PHP_EOL . Indent::_(3) . "\$this->initSet = true;";
+ $main .= PHP_EOL . Indent::_(2) . "}";
+ $main .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Get the global params";
+ $main .= PHP_EOL . Indent::_(2)
. "\$globalParams = JComponentHelper::getParams('com_"
- . Config::get('component_code_name') . "', true);";
+ . CFactory::_('Config')->component_code_name . "', true);";
// set php before listquery
if (isset($view->add_php_getlistquery)
&& $view->add_php_getlistquery == 1
@@ -4088,8 +4022,8 @@ class Interpretation extends Fields
$view->php_getlistquery
))
{
- $main .= $this->setPlaceholders(
- $view->php_getlistquery, $this->placeholders
+ $main .= CFactory::_('Placeholder')->update(
+ $view->php_getlistquery, CFactory::_('Placeholder')->active
);
}
// SITE_GET_LIST_QUERY <<>>
@@ -4104,17 +4038,17 @@ class Interpretation extends Fields
$view->php_before_getitems
))
{
- $main .= $this->setPlaceholders(
- $view->php_before_getitems, $this->placeholders
+ $main .= CFactory::_('Placeholder')->update(
+ $view->php_before_getitems, CFactory::_('Placeholder')->active
);
}
// load the object list
- $main .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $main .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Reset the query using our newly populated query object.";
- $main .= PHP_EOL . $this->_t(2)
+ $main .= PHP_EOL . Indent::_(2)
. "\$db->setQuery(\$query);";
- $main .= PHP_EOL . $this->_t(2)
+ $main .= PHP_EOL . Indent::_(2)
. "\$items = \$db->loadObjectList();";
// set after items php
if (isset($view->add_php_after_getitems)
@@ -4124,21 +4058,21 @@ class Interpretation extends Fields
$view->php_after_getitems
))
{
- $main .= $this->setPlaceholders(
- $view->php_after_getitems, $this->placeholders
+ $main .= CFactory::_('Placeholder')->update(
+ $view->php_after_getitems, CFactory::_('Placeholder')->active
);
}
- $main .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $main .= PHP_EOL . PHP_EOL . Indent::_(2)
. "if (empty(\$items))";
- $main .= PHP_EOL . $this->_t(2) . "{";
- $main .= PHP_EOL . $this->_t(3) . "return false;";
- $main .= PHP_EOL . $this->_t(2) . "}";
+ $main .= PHP_EOL . Indent::_(2) . "{";
+ $main .= PHP_EOL . Indent::_(3) . "return false;";
+ $main .= PHP_EOL . Indent::_(2) . "}";
// SITE_GET_ITEMS <<>>
$main .= $this->setCustomViewGetItems($view, $view->code);
- $main .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $main .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " return items";
- $main .= PHP_EOL . $this->_t(2) . "return \$items;";
+ $main .= PHP_EOL . Indent::_(2) . "return \$items;";
$type
= 'mixed An array of objects on success, false on failure.';
}
@@ -4169,115 +4103,115 @@ class Interpretation extends Fields
{
// build uikit get method
$ukit = array();
- $ukit[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $ukit[] = $this->_t(1) . " * UIKIT Component Classes";
- $ukit[] = $this->_t(1) . " **/";
- $ukit[] = $this->_t(1) . "public static \$uk_components = array(";
- $ukit[] = $this->_t(3) . "'data-uk-grid' => array(";
- $ukit[] = $this->_t(4) . "'grid' ),";
- $ukit[] = $this->_t(3) . "'uk-accordion' => array(";
- $ukit[] = $this->_t(4) . "'accordion' ),";
- $ukit[] = $this->_t(3) . "'uk-autocomplete' => array(";
- $ukit[] = $this->_t(4) . "'autocomplete' ),";
- $ukit[] = $this->_t(3) . "'data-uk-datepicker' => array(";
- $ukit[] = $this->_t(4) . "'datepicker' ),";
- $ukit[] = $this->_t(3) . "'uk-form-password' => array(";
- $ukit[] = $this->_t(4) . "'form-password' ),";
- $ukit[] = $this->_t(3) . "'uk-form-select' => array(";
- $ukit[] = $this->_t(4) . "'form-select' ),";
- $ukit[] = $this->_t(3) . "'data-uk-htmleditor' => array(";
- $ukit[] = $this->_t(4) . "'htmleditor' ),";
- $ukit[] = $this->_t(3) . "'data-uk-lightbox' => array(";
- $ukit[] = $this->_t(4) . "'lightbox' ),";
- $ukit[] = $this->_t(3) . "'uk-nestable' => array(";
- $ukit[] = $this->_t(4) . "'nestable' ),";
- $ukit[] = $this->_t(3) . "'UIkit.notify' => array(";
- $ukit[] = $this->_t(4) . "'notify' ),";
- $ukit[] = $this->_t(3) . "'data-uk-parallax' => array(";
- $ukit[] = $this->_t(4) . "'parallax' ),";
- $ukit[] = $this->_t(3) . "'uk-search' => array(";
- $ukit[] = $this->_t(4) . "'search' ),";
- $ukit[] = $this->_t(3) . "'uk-slider' => array(";
- $ukit[] = $this->_t(4) . "'slider' ),";
- $ukit[] = $this->_t(3) . "'uk-slideset' => array(";
- $ukit[] = $this->_t(4) . "'slideset' ),";
- $ukit[] = $this->_t(3) . "'uk-slideshow' => array(";
- $ukit[] = $this->_t(4) . "'slideshow',";
- $ukit[] = $this->_t(4) . "'slideshow-fx' ),";
- $ukit[] = $this->_t(3) . "'uk-sortable' => array(";
- $ukit[] = $this->_t(4) . "'sortable' ),";
- $ukit[] = $this->_t(3) . "'data-uk-sticky' => array(";
- $ukit[] = $this->_t(4) . "'sticky' ),";
- $ukit[] = $this->_t(3) . "'data-uk-timepicker' => array(";
- $ukit[] = $this->_t(4) . "'timepicker' ),";
- $ukit[] = $this->_t(3) . "'data-uk-tooltip' => array(";
- $ukit[] = $this->_t(4) . "'tooltip' ),";
- $ukit[] = $this->_t(3) . "'uk-placeholder' => array(";
- $ukit[] = $this->_t(4) . "'placeholder' ),";
- $ukit[] = $this->_t(3) . "'uk-dotnav' => array(";
- $ukit[] = $this->_t(4) . "'dotnav' ),";
- $ukit[] = $this->_t(3) . "'uk-slidenav' => array(";
- $ukit[] = $this->_t(4) . "'slidenav' ),";
- $ukit[] = $this->_t(3) . "'uk-form' => array(";
- $ukit[] = $this->_t(4) . "'form-advanced' ),";
- $ukit[] = $this->_t(3) . "'uk-progress' => array(";
- $ukit[] = $this->_t(4) . "'progress' ),";
- $ukit[] = $this->_t(3) . "'upload-drop' => array(";
- $ukit[] = $this->_t(4) . "'upload', 'form-file' )";
- $ukit[] = $this->_t(3) . ");";
- $ukit[] = PHP_EOL . $this->_t(1) . "/**";
- $ukit[] = $this->_t(1) . " * Add UIKIT Components";
- $ukit[] = $this->_t(1) . " **/";
- $ukit[] = $this->_t(1) . "public static \$uikit = false;";
+ $ukit[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $ukit[] = Indent::_(1) . " * UIKIT Component Classes";
+ $ukit[] = Indent::_(1) . " **/";
+ $ukit[] = Indent::_(1) . "public static \$uk_components = array(";
+ $ukit[] = Indent::_(3) . "'data-uk-grid' => array(";
+ $ukit[] = Indent::_(4) . "'grid' ),";
+ $ukit[] = Indent::_(3) . "'uk-accordion' => array(";
+ $ukit[] = Indent::_(4) . "'accordion' ),";
+ $ukit[] = Indent::_(3) . "'uk-autocomplete' => array(";
+ $ukit[] = Indent::_(4) . "'autocomplete' ),";
+ $ukit[] = Indent::_(3) . "'data-uk-datepicker' => array(";
+ $ukit[] = Indent::_(4) . "'datepicker' ),";
+ $ukit[] = Indent::_(3) . "'uk-form-password' => array(";
+ $ukit[] = Indent::_(4) . "'form-password' ),";
+ $ukit[] = Indent::_(3) . "'uk-form-select' => array(";
+ $ukit[] = Indent::_(4) . "'form-select' ),";
+ $ukit[] = Indent::_(3) . "'data-uk-htmleditor' => array(";
+ $ukit[] = Indent::_(4) . "'htmleditor' ),";
+ $ukit[] = Indent::_(3) . "'data-uk-lightbox' => array(";
+ $ukit[] = Indent::_(4) . "'lightbox' ),";
+ $ukit[] = Indent::_(3) . "'uk-nestable' => array(";
+ $ukit[] = Indent::_(4) . "'nestable' ),";
+ $ukit[] = Indent::_(3) . "'UIkit.notify' => array(";
+ $ukit[] = Indent::_(4) . "'notify' ),";
+ $ukit[] = Indent::_(3) . "'data-uk-parallax' => array(";
+ $ukit[] = Indent::_(4) . "'parallax' ),";
+ $ukit[] = Indent::_(3) . "'uk-search' => array(";
+ $ukit[] = Indent::_(4) . "'search' ),";
+ $ukit[] = Indent::_(3) . "'uk-slider' => array(";
+ $ukit[] = Indent::_(4) . "'slider' ),";
+ $ukit[] = Indent::_(3) . "'uk-slideset' => array(";
+ $ukit[] = Indent::_(4) . "'slideset' ),";
+ $ukit[] = Indent::_(3) . "'uk-slideshow' => array(";
+ $ukit[] = Indent::_(4) . "'slideshow',";
+ $ukit[] = Indent::_(4) . "'slideshow-fx' ),";
+ $ukit[] = Indent::_(3) . "'uk-sortable' => array(";
+ $ukit[] = Indent::_(4) . "'sortable' ),";
+ $ukit[] = Indent::_(3) . "'data-uk-sticky' => array(";
+ $ukit[] = Indent::_(4) . "'sticky' ),";
+ $ukit[] = Indent::_(3) . "'data-uk-timepicker' => array(";
+ $ukit[] = Indent::_(4) . "'timepicker' ),";
+ $ukit[] = Indent::_(3) . "'data-uk-tooltip' => array(";
+ $ukit[] = Indent::_(4) . "'tooltip' ),";
+ $ukit[] = Indent::_(3) . "'uk-placeholder' => array(";
+ $ukit[] = Indent::_(4) . "'placeholder' ),";
+ $ukit[] = Indent::_(3) . "'uk-dotnav' => array(";
+ $ukit[] = Indent::_(4) . "'dotnav' ),";
+ $ukit[] = Indent::_(3) . "'uk-slidenav' => array(";
+ $ukit[] = Indent::_(4) . "'slidenav' ),";
+ $ukit[] = Indent::_(3) . "'uk-form' => array(";
+ $ukit[] = Indent::_(4) . "'form-advanced' ),";
+ $ukit[] = Indent::_(3) . "'uk-progress' => array(";
+ $ukit[] = Indent::_(4) . "'progress' ),";
+ $ukit[] = Indent::_(3) . "'upload-drop' => array(";
+ $ukit[] = Indent::_(4) . "'upload', 'form-file' )";
+ $ukit[] = Indent::_(3) . ");";
+ $ukit[] = PHP_EOL . Indent::_(1) . "/**";
+ $ukit[] = Indent::_(1) . " * Add UIKIT Components";
+ $ukit[] = Indent::_(1) . " **/";
+ $ukit[] = Indent::_(1) . "public static \$uikit = false;";
$ukit[] = "";
- $ukit[] = $this->_t(1) . "/**";
- $ukit[] = $this->_t(1) . " * Get UIKIT Components";
- $ukit[] = $this->_t(1) . " **/";
- $ukit[] = $this->_t(1)
+ $ukit[] = Indent::_(1) . "/**";
+ $ukit[] = Indent::_(1) . " * Get UIKIT Components";
+ $ukit[] = Indent::_(1) . " **/";
+ $ukit[] = Indent::_(1)
. "public static function getUikitComp(\$content,\$classes = array())";
- $ukit[] = $this->_t(1) . "{";
- $ukit[] = $this->_t(2)
+ $ukit[] = Indent::_(1) . "{";
+ $ukit[] = Indent::_(2)
. "if (strpos(\$content,'class=\"uk-') !== false)";
- $ukit[] = $this->_t(2) . "{";
- $ukit[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " reset";
- $ukit[] = $this->_t(3) . "\$temp = array();";
- $ukit[] = $this->_t(3)
+ $ukit[] = Indent::_(2) . "{";
+ $ukit[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " reset";
+ $ukit[] = Indent::_(3) . "\$temp = array();";
+ $ukit[] = Indent::_(3)
. "foreach (self::\$uk_components as \$looking => \$add)";
- $ukit[] = $this->_t(3) . "{";
- $ukit[] = $this->_t(4)
+ $ukit[] = Indent::_(3) . "{";
+ $ukit[] = Indent::_(4)
. "if (strpos(\$content,\$looking) !== false)";
- $ukit[] = $this->_t(4) . "{";
- $ukit[] = $this->_t(5) . "\$temp[] = \$looking;";
- $ukit[] = $this->_t(4) . "}";
- $ukit[] = $this->_t(3) . "}";
- $ukit[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $ukit[] = Indent::_(4) . "{";
+ $ukit[] = Indent::_(5) . "\$temp[] = \$looking;";
+ $ukit[] = Indent::_(4) . "}";
+ $ukit[] = Indent::_(3) . "}";
+ $ukit[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " make sure uikit is loaded to config";
- $ukit[] = $this->_t(3)
+ $ukit[] = Indent::_(3)
. "if (strpos(\$content,'class=\"uk-') !== false)";
- $ukit[] = $this->_t(3) . "{";
- $ukit[] = $this->_t(4) . "self::\$uikit = true;";
- $ukit[] = $this->_t(3) . "}";
- $ukit[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $ukit[] = Indent::_(3) . "{";
+ $ukit[] = Indent::_(4) . "self::\$uikit = true;";
+ $ukit[] = Indent::_(3) . "}";
+ $ukit[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " sorter";
- $ukit[] = $this->_t(3) . "if (self::checkArray(\$temp))";
- $ukit[] = $this->_t(3) . "{";
- $ukit[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $ukit[] = Indent::_(3) . "if (self::checkArray(\$temp))";
+ $ukit[] = Indent::_(3) . "{";
+ $ukit[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " merger";
- $ukit[] = $this->_t(4) . "if (self::checkArray(\$classes))";
- $ukit[] = $this->_t(4) . "{";
- $ukit[] = $this->_t(5)
+ $ukit[] = Indent::_(4) . "if (self::checkArray(\$classes))";
+ $ukit[] = Indent::_(4) . "{";
+ $ukit[] = Indent::_(5)
. "\$newTemp = array_merge(\$temp,\$classes);";
- $ukit[] = $this->_t(5) . "\$temp = array_unique(\$newTemp);";
- $ukit[] = $this->_t(4) . "}";
- $ukit[] = $this->_t(4) . "return \$temp;";
- $ukit[] = $this->_t(3) . "}";
- $ukit[] = $this->_t(2) . "}";
- $ukit[] = $this->_t(2) . "if (self::checkArray(\$classes))";
- $ukit[] = $this->_t(2) . "{";
- $ukit[] = $this->_t(3) . "return \$classes;";
- $ukit[] = $this->_t(2) . "}";
- $ukit[] = $this->_t(2) . "return false;";
- $ukit[] = $this->_t(1) . "}";
+ $ukit[] = Indent::_(5) . "\$temp = array_unique(\$newTemp);";
+ $ukit[] = Indent::_(4) . "}";
+ $ukit[] = Indent::_(4) . "return \$temp;";
+ $ukit[] = Indent::_(3) . "}";
+ $ukit[] = Indent::_(2) . "}";
+ $ukit[] = Indent::_(2) . "if (self::checkArray(\$classes))";
+ $ukit[] = Indent::_(2) . "{";
+ $ukit[] = Indent::_(3) . "return \$classes;";
+ $ukit[] = Indent::_(2) . "}";
+ $ukit[] = Indent::_(2) . "return false;";
+ $ukit[] = Indent::_(1) . "}";
// return the help methods
return implode(PHP_EOL, $ukit);
@@ -4293,26 +4227,25 @@ class Interpretation extends Fields
if (2 == $this->uikit || 1 == $this->uikit)
{
// build uikit get method
- $method .= PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $method .= PHP_EOL . $this->_t(1)
+ $method .= PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $method .= PHP_EOL . Indent::_(1)
. " * Get the uikit needed components";
- $method .= PHP_EOL . $this->_t(1) . " *";
- $method .= PHP_EOL . $this->_t(1)
+ $method .= PHP_EOL . Indent::_(1) . " *";
+ $method .= PHP_EOL . Indent::_(1)
. " * @return mixed An array of objects on success.";
- $method .= PHP_EOL . $this->_t(1) . " *";
- $method .= PHP_EOL . $this->_t(1) . " */";
- $method .= PHP_EOL . $this->_t(1)
+ $method .= PHP_EOL . Indent::_(1) . " *";
+ $method .= PHP_EOL . Indent::_(1) . " */";
+ $method .= PHP_EOL . Indent::_(1)
. "public function getUikitComp()";
- $method .= PHP_EOL . $this->_t(1) . "{";
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . Indent::_(1) . "{";
+ $method .= PHP_EOL . Indent::_(2)
. "if (isset(\$this->uikitComp) && "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$this->uikitComp))";
- $method .= PHP_EOL . $this->_t(2) . "{";
- $method .= PHP_EOL . $this->_t(3) . "return \$this->uikitComp;";
- $method .= PHP_EOL . $this->_t(2) . "}";
- $method .= PHP_EOL . $this->_t(2) . "return false;";
- $method .= PHP_EOL . $this->_t(1) . "}";
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$this->uikitComp))";
+ $method .= PHP_EOL . Indent::_(2) . "{";
+ $method .= PHP_EOL . Indent::_(3) . "return \$this->uikitComp;";
+ $method .= PHP_EOL . Indent::_(2) . "}";
+ $method .= PHP_EOL . Indent::_(2) . "return false;";
+ $method .= PHP_EOL . Indent::_(1) . "}";
}
return $method;
@@ -4324,16 +4257,16 @@ class Interpretation extends Fields
if (StringHelper::check($body))
{
// build custom method
- $method .= PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $method .= PHP_EOL . $this->_t(1) . " * Custom Method";
- $method .= PHP_EOL . $this->_t(1) . " *";
- $method .= PHP_EOL . $this->_t(1) . " * @return " . $type;
- $method .= PHP_EOL . $this->_t(1) . " *";
- $method .= PHP_EOL . $this->_t(1) . " */";
- $method .= PHP_EOL . $this->_t(1) . "public function " . $nAme
+ $method .= PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $method .= PHP_EOL . Indent::_(1) . " * Custom Method";
+ $method .= PHP_EOL . Indent::_(1) . " *";
+ $method .= PHP_EOL . Indent::_(1) . " * @return " . $type;
+ $method .= PHP_EOL . Indent::_(1) . " *";
+ $method .= PHP_EOL . Indent::_(1) . " */";
+ $method .= PHP_EOL . Indent::_(1) . "public function " . $nAme
. "()";
- $method .= PHP_EOL . $this->_t(1) . "{" . $body;
- $method .= PHP_EOL . $this->_t(1) . "}";
+ $method .= PHP_EOL . Indent::_(1) . "{" . $body;
+ $method .= PHP_EOL . Indent::_(1) . "}";
}
return $method;
@@ -4362,87 +4295,84 @@ class Interpretation extends Fields
)) !== false)
{
// build custom method
- $methods .= PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $methods .= PHP_EOL . $this->_t(1)
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $methods .= PHP_EOL . Indent::_(1)
. " * Method to get an array of " . $default['name']
. " Objects.";
- $methods .= PHP_EOL . $this->_t(1) . " *";
- $methods .= PHP_EOL . $this->_t(1)
+ $methods .= PHP_EOL . Indent::_(1) . " *";
+ $methods .= PHP_EOL . Indent::_(1)
. " * @return mixed An array of "
. $default['name']
. " Objects on success, false on failure.";
- $methods .= PHP_EOL . $this->_t(1) . " *";
- $methods .= PHP_EOL . $this->_t(1) . " */";
- $methods .= PHP_EOL . $this->_t(1)
+ $methods .= PHP_EOL . Indent::_(1) . " *";
+ $methods .= PHP_EOL . Indent::_(1) . " */";
+ $methods .= PHP_EOL . Indent::_(1)
. "public function get" . $default['methodName']
. "(\$" . $default['on_field'] . ")";
- $methods .= PHP_EOL . $this->_t(1) . "{" . $this->hhh
- . "CRYPT" . $this->hhh;
- $methods .= PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $methods .= PHP_EOL . Indent::_(1) . "{" . Placefix::_h("CRYPT") ;
+ $methods .= PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Get a db connection.";
- $methods .= PHP_EOL . $this->_t(2)
+ $methods .= PHP_EOL . Indent::_(2)
. "\$db = JFactory::getDbo();";
- $methods .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Create a new query object.";
- $methods .= PHP_EOL . $this->_t(2)
+ $methods .= PHP_EOL . Indent::_(2)
. "\$query = \$db->getQuery(true);";
- $methods .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Get from "
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Get from "
. $get['selection']['table'] . " as "
. $default['as'];
- $methods .= PHP_EOL . $this->_t(2)
+ $methods .= PHP_EOL . Indent::_(2)
. $get['selection']['select'];
- $methods .= PHP_EOL . $this->_t(2) . '$query->from('
+ $methods .= PHP_EOL . Indent::_(2) . '$query->from('
. $get['selection']['from'] . ');';
// set the string
if ($get['operator'] === 'IN'
|| $get['operator'] === 'NOT IN')
{
- $methods .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Check if \$"
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Check if \$"
. $default['on_field']
. " is an array with values.";
- $methods .= PHP_EOL . $this->_t(2) . "\$array = ("
- . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ $methods .= PHP_EOL . Indent::_(2) . "\$array = ("
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkJson(\$"
. $default['on_field']
. ", true)) ? json_decode(\$"
. $default['on_field'] . ",true) : \$"
. $default['on_field'] . ";";
- $methods .= PHP_EOL . $this->_t(2)
+ $methods .= PHP_EOL . Indent::_(2)
. "if (isset(\$array) && "
- . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkArray(\$array, true))";
- $methods .= PHP_EOL . $this->_t(2) . "{";
- $methods .= PHP_EOL . $this->_t(3)
+ $methods .= PHP_EOL . Indent::_(2) . "{";
+ $methods .= PHP_EOL . Indent::_(3)
. "\$query->where('" . $get['join_field'] . " "
. $get['operator']
. " (' . implode(',', \$array) . ')');";
- $methods .= PHP_EOL . $this->_t(2) . "}";
- $methods .= PHP_EOL . $this->_t(2) . "else";
- $methods .= PHP_EOL . $this->_t(2) . "{";
- $methods .= PHP_EOL . $this->_t(3)
+ $methods .= PHP_EOL . Indent::_(2) . "}";
+ $methods .= PHP_EOL . Indent::_(2) . "else";
+ $methods .= PHP_EOL . Indent::_(2) . "{";
+ $methods .= PHP_EOL . Indent::_(3)
. "return false;";
- $methods .= PHP_EOL . $this->_t(2) . "}";
+ $methods .= PHP_EOL . Indent::_(2) . "}";
}
else
{
- $methods .= PHP_EOL . $this->_t(2)
+ $methods .= PHP_EOL . Indent::_(2)
. "\$query->where('" . $get['join_field'] . " "
. $get['operator'] . " ' . \$db->quote(\$"
. $default['on_field'] . "));";
}
// check if other queries should be loaded
$queryChecker
- = (isset($this->otherQuery[$this->target][$default['code']][$default['as']])
+ = (isset($this->otherQuery[CFactory::_('Config')->build_target][$default['code']][$default['as']])
&& ArrayHelper::check(
- $this->otherQuery[$this->target][$default['code']][$default['as']]
+ $this->otherQuery[CFactory::_('Config')->build_target][$default['code']][$default['as']]
))
- ? $this->otherQuery[$this->target][$default['code']][$default['as']]
+ ? $this->otherQuery[CFactory::_('Config')->build_target][$default['code']][$default['as']]
: '';
if (ArrayHelper::check($queryChecker))
{
@@ -4452,13 +4382,13 @@ class Interpretation extends Fields
}
}
// add any other filter that was set
- if (isset($this->otherFilter[$this->target][$default['code']][$default['as']])
+ if (isset($this->otherFilter[CFactory::_('Config')->build_target][$default['code']][$default['as']])
&& ArrayHelper::check(
- $this->otherFilter[$this->target][$default['code']][$default['as']]
+ $this->otherFilter[CFactory::_('Config')->build_target][$default['code']][$default['as']]
))
{
foreach (
- $this->otherFilter[$this->target][$default['code']][$default['as']]
+ $this->otherFilter[CFactory::_('Config')->build_target][$default['code']][$default['as']]
as $field => $string
)
{
@@ -4466,13 +4396,13 @@ class Interpretation extends Fields
}
}
// add any other where that was set
- if (isset($this->otherWhere[$this->target][$default['code']][$default['as']])
+ if (isset($this->otherWhere[CFactory::_('Config')->build_target][$default['code']][$default['as']])
&& ArrayHelper::check(
- $this->otherWhere[$this->target][$default['code']][$default['as']]
+ $this->otherWhere[CFactory::_('Config')->build_target][$default['code']][$default['as']]
))
{
foreach (
- $this->otherWhere[$this->target][$default['code']][$default['as']]
+ $this->otherWhere[CFactory::_('Config')->build_target][$default['code']][$default['as']]
as $field => $string
)
{
@@ -4480,13 +4410,13 @@ class Interpretation extends Fields
}
}
// add any other order that was set
- if (isset($this->otherOrder[$this->target][$default['code']][$default['as']])
+ if (isset($this->otherOrder[CFactory::_('Config')->build_target][$default['code']][$default['as']])
&& ArrayHelper::check(
- $this->otherOrder[$this->target][$default['code']][$default['as']]
+ $this->otherOrder[CFactory::_('Config')->build_target][$default['code']][$default['as']]
))
{
foreach (
- $this->otherOrder[$this->target][$default['code']][$default['as']]
+ $this->otherOrder[CFactory::_('Config')->build_target][$default['code']][$default['as']]
as $field => $string
)
{
@@ -4494,33 +4424,33 @@ class Interpretation extends Fields
}
}
// add any other grouping that was set
- if (isset($this->otherGroup[$this->target][$default['code']][$default['as']])
+ if (isset($this->otherGroup[CFactory::_('Config')->build_target][$default['code']][$default['as']])
&& ArrayHelper::check(
- $this->otherGroup[$this->target][$default['code']][$default['as']]
+ $this->otherGroup[CFactory::_('Config')->build_target][$default['code']][$default['as']]
))
{
foreach (
- $this->otherGroup[$this->target][$default['code']][$default['as']]
+ $this->otherGroup[CFactory::_('Config')->build_target][$default['code']][$default['as']]
as $field => $string
)
{
$methods .= $string;
}
}
- $methods .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Reset the query using our newly populated query object.";
- $methods .= PHP_EOL . $this->_t(2)
+ $methods .= PHP_EOL . Indent::_(2)
. "\$db->setQuery(\$query);";
- $methods .= PHP_EOL . $this->_t(2) . "\$db->execute();";
- $methods .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $methods .= PHP_EOL . Indent::_(2) . "\$db->execute();";
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " check if there was data returned";
- $methods .= PHP_EOL . $this->_t(2)
+ $methods .= PHP_EOL . Indent::_(2)
. "if (\$db->getNumRows())";
- $methods .= PHP_EOL . $this->_t(2) . "{";
+ $methods .= PHP_EOL . Indent::_(2) . "{";
// set dispatcher placeholder
- $methods .= $this->hhh . "DISPATCHER" . $this->hhh;
+ $methods .= Placefix::_h("DISPATCHER") ;
// set decoding of needed fields
if (isset($this->siteFieldData['decode'][$default['code']][$get['key']][$default['as']]))
{
@@ -4528,10 +4458,10 @@ class Interpretation extends Fields
= $this->siteFieldData['decode'][$default['code']][$get['key']][$default['as']];
}
// also filter fields if needed
- if (isset($this->siteFieldDecodeFilter[$this->target][$default['code']][$get['key']][$default['as']]))
+ if (isset($this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$default['code']][$get['key']][$default['as']]))
{
$decodeFilter
- = $this->siteFieldDecodeFilter[$this->target][$default['code']][$get['key']][$default['as']];
+ = $this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$default['code']][$get['key']][$default['as']];
}
// set uikit checkers on needed fields
if (isset($this->siteFieldData['uikit'][$default['code']][$get['key']][$default['as']]))
@@ -4546,16 +4476,14 @@ class Interpretation extends Fields
= $this->siteFieldData['textareas'][$default['code']][$get['key']][$default['as']];
}
// set joined values
- $placeholders = array($this->hhh . 'TAB'
- . $this->hhh => $this->_t(2),
- $this->hhh . 'STRING'
- . $this->hhh => '$item');
+ $placeholders = array(Placefix::_h('TAB') => Indent::_(2),
+ Placefix::_h('STRING') => '$item');
$joinedChecker
- = (isset($this->otherJoin[$this->target][$default['code']][$default['as']])
+ = (isset($this->otherJoin[CFactory::_('Config')->build_target][$default['code']][$default['as']])
&& ArrayHelper::check(
- $this->otherJoin[$this->target][$default['code']][$default['as']]
+ $this->otherJoin[CFactory::_('Config')->build_target][$default['code']][$default['as']]
))
- ? $this->otherJoin[$this->target][$default['code']][$default['as']]
+ ? $this->otherJoin[CFactory::_('Config')->build_target][$default['code']][$default['as']]
: '';
if ((isset($decodeChecker)
&& ArrayHelper::check(
@@ -4586,7 +4514,7 @@ class Interpretation extends Fields
// also filter fields if needed
$decoder = $this->setCustomViewFieldDecode(
$get, $decodeChecker, '$item',
- $default['code'], $this->_t(2)
+ $default['code'], Indent::_(2)
);
}
$decoder_filter = '';
@@ -4598,7 +4526,7 @@ class Interpretation extends Fields
$decoder_filter
= $this->setCustomViewFieldDecodeFilter(
$get, $decodeFilter, '$item', '$items[$nr]',
- $default['code'], $this->_t(2)
+ $default['code'], Indent::_(2)
);
}
$contentprepare = '';
@@ -4610,7 +4538,7 @@ class Interpretation extends Fields
$contentprepare
= $this->setCustomViewFieldonContentPrepareChecker(
$get, $contentprepareChecker, '$item',
- $default['code'], $this->_t(2)
+ $default['code'], Indent::_(2)
);
}
$uikit = '';
@@ -4621,7 +4549,7 @@ class Interpretation extends Fields
{
$uikit = $this->setCustomViewFieldUikitChecker(
$get, $uikitChecker, '$item',
- $default['code'], $this->_t(2)
+ $default['code'], Indent::_(2)
);
}
$joine = '';
@@ -4631,7 +4559,7 @@ class Interpretation extends Fields
{
foreach ($joinedChecker as $joinedString)
{
- $joine .= $this->setPlaceholders(
+ $joine .= CFactory::_('Placeholder')->update(
$joinedString, $placeholders
);
}
@@ -4646,14 +4574,14 @@ class Interpretation extends Fields
)
|| StringHelper::check($joine))
{
- $methods .= PHP_EOL . $this->_t(3)
+ $methods .= PHP_EOL . Indent::_(3)
. "\$items = \$db->loadObjectList();";
- $methods .= PHP_EOL . PHP_EOL . $this->_t(3)
- . "//" . $this->setLine(__LINE__)
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(3)
+ . "//" . Line::_(__Line__, __Class__)
. " Convert the parameter fields into objects.";
- $methods .= PHP_EOL . $this->_t(3)
+ $methods .= PHP_EOL . Indent::_(3)
. "foreach (\$items as \$nr => &\$item)";
- $methods .= PHP_EOL . $this->_t(3) . "{";
+ $methods .= PHP_EOL . Indent::_(3) . "{";
if (StringHelper::check(
$decoder
))
@@ -4680,28 +4608,27 @@ class Interpretation extends Fields
{
$methods .= $joine;
}
- $methods .= PHP_EOL . $this->_t(3) . "}";
- $methods .= PHP_EOL . $this->_t(3)
+ $methods .= PHP_EOL . Indent::_(3) . "}";
+ $methods .= PHP_EOL . Indent::_(3)
. "return \$items;";
}
else
{
- $methods .= PHP_EOL . $this->_t(3)
+ $methods .= PHP_EOL . Indent::_(3)
. "return \$db->loadObjectList();";
}
}
else
{
- $methods .= PHP_EOL . $this->_t(3)
+ $methods .= PHP_EOL . Indent::_(3)
. "return \$db->loadObjectList();";
}
- $methods .= PHP_EOL . $this->_t(2) . "}";
- $methods .= PHP_EOL . $this->_t(2) . "return false;";
- $methods .= PHP_EOL . $this->_t(1) . "}";
+ $methods .= PHP_EOL . Indent::_(2) . "}";
+ $methods .= PHP_EOL . Indent::_(2) . "return false;";
+ $methods .= PHP_EOL . Indent::_(1) . "}";
// set the script if it was found
- $Component = $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh];
+ $Component = $this->fileContentStatic[Placefix::_h('Component')];
$script = '';
foreach ($this->cryptionTypes as $cryptionType)
{
@@ -4710,17 +4637,17 @@ class Interpretation extends Fields
{
if ('expert' !== $cryptionType)
{
- $script .= PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Get the "
+ $script .= PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Get the "
. $cryptionType . " encryption.";
- $script .= PHP_EOL . $this->_t(2) . "\$"
+ $script .= PHP_EOL . Indent::_(2) . "\$"
. $cryptionType . "key = " . $Component
. "Helper::getCryptKey('"
. $cryptionType . "');";
- $script .= PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $script .= PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Get the encryption object.";
- $script .= PHP_EOL . $this->_t(2) . "\$"
+ $script .= PHP_EOL . Indent::_(2) . "\$"
. $cryptionType
. " = new FOFEncryptAes(\$"
. $cryptionType . "key);" . PHP_EOL;
@@ -4740,16 +4667,16 @@ class Interpretation extends Fields
as $block
)
{
- $script .= PHP_EOL . $this->_t(2)
+ $script .= PHP_EOL . Indent::_(2)
. implode(
- PHP_EOL . $this->_t(2), $block
+ PHP_EOL . Indent::_(2), $block
);
}
}
}
}
$methods = str_replace(
- $this->hhh . 'CRYPT' . $this->hhh, $script, $methods
+ Placefix::_h('CRYPT'), $script, $methods
);
}
}
@@ -4757,20 +4684,19 @@ class Interpretation extends Fields
if (StringHelper::check($methods))
{
$methods = str_replace(
- $this->hhh . 'CRYPT' . $this->hhh, '', $methods
+ Placefix::_h('CRYPT'), '', $methods
);
}
}
}
// only update if dispacher placholder is found
- if (strpos($methods, $this->hhh . 'DISPATCHER' . $this->hhh) !== false)
+ if (strpos($methods, Placefix::_h('DISPATCHER')) !== false)
{
// check if the dispather should be added
if (!isset($this->JEventDispatcher)
|| !ArrayHelper::check($this->JEventDispatcher))
{
- $this->JEventDispatcher = array($this->hhh . 'DISPATCHER'
- . $this->hhh => '');
+ $this->JEventDispatcher = array(Placefix::_h('DISPATCHER') => '');
}
$methods = str_replace(
array_keys($this->JEventDispatcher),
@@ -4834,34 +4760,34 @@ class Interpretation extends Fields
{
if ($get->pagination == 1)
{
- $getItem = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $getItem = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Get a db connection.";
}
else
{
- $getItem = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $getItem = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " Make sure all records load, since no pagination allowed.";
- $getItem .= PHP_EOL . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(2)
. "\$this->setState('list.limit', 0);";
- $getItem .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $getItem .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Get a db connection.";
}
- $getItem .= PHP_EOL . $this->_t(2) . "\$db = JFactory::getDbo();";
- $getItem .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Create a new query object.";
- $getItem .= PHP_EOL . $this->_t(2)
+ $getItem .= PHP_EOL . Indent::_(2) . "\$db = JFactory::getDbo();";
+ $getItem .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Create a new query object.";
+ $getItem .= PHP_EOL . Indent::_(2)
. "\$query = \$db->getQuery(true);";
// set main get query
$getItem .= $this->setCustomViewQuery($get->main_get, $code);
// check if there is any custom script
$getItem .= $this->getCustomScriptBuilder(
- $this->target . '_php_getlistquery', $code, '',
- PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ CFactory::_('Config')->build_target . '_php_getlistquery', $code, '',
+ PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filtering.", true
);
// setup filters
@@ -4887,15 +4813,15 @@ class Interpretation extends Fields
if ($return)
{
// return the query object
- $getItem .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " return the query object"
- . PHP_EOL . $this->_t(2) . "return \$query;";
+ $getItem .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " return the query object"
+ . PHP_EOL . Indent::_(2) . "return \$query;";
}
return $getItem;
}
- return PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ return PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. "add your custom code here.";
}
@@ -4914,24 +4840,23 @@ class Interpretation extends Fields
$this->siteDecrypt[$cryptionType][$code] = false;
}
// set the component name
- $Component = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh];
+ $Component = $this->fileContentStatic[Placefix::_h('Component')];
// start load the get item
if (ObjectHelper::check($get))
{
- $getItem .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $getItem .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Insure all item fields are adapted where needed.";
- $getItem .= PHP_EOL . $this->_t(2) . "if (" . $Component
+ $getItem .= PHP_EOL . Indent::_(2) . "if (" . $Component
. "Helper::checkArray(\$items))";
- $getItem .= PHP_EOL . $this->_t(2) . "{";
- $getItem .= $this->hhh . "DISPATCHER" . $this->hhh;
- $getItem .= PHP_EOL . $this->_t(3)
+ $getItem .= PHP_EOL . Indent::_(2) . "{";
+ $getItem .= Placefix::_h("DISPATCHER") ;
+ $getItem .= PHP_EOL . Indent::_(3)
. "foreach (\$items as \$nr => &\$item)";
- $getItem .= PHP_EOL . $this->_t(3) . "{";
- $getItem .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $getItem .= PHP_EOL . Indent::_(3) . "{";
+ $getItem .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Always create a slug for sef URL's";
- $getItem .= PHP_EOL . $this->_t(4)
+ $getItem .= PHP_EOL . Indent::_(4)
. "\$item->slug = (isset(\$item->alias) && isset(\$item->id)) ? \$item->id.':'.\$item->alias : \$item->id;";
if (isset($get->main_get)
&& ArrayHelper::check(
@@ -4950,20 +4875,20 @@ class Interpretation extends Fields
// set decoding of needed fields
$getItem .= $this->setCustomViewFieldDecode(
$main_get, $decodeChecker, "\$item", $code,
- $this->_t(2)
+ Indent::_(2)
);
}
}
// also filter fields if needed
- if (isset($this->siteFieldDecodeFilter[$this->target][$code][$main_get['key']][$main_get['as']]))
+ if (isset($this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$code][$main_get['key']][$main_get['as']]))
{
$decodeFilter
- = $this->siteFieldDecodeFilter[$this->target][$code][$main_get['key']][$main_get['as']];
+ = $this->siteFieldDecodeFilter[CFactory::_('Config')->build_target][$code][$main_get['key']][$main_get['as']];
if (ArrayHelper::check($decodeFilter))
{
$getItem .= $this->setCustomViewFieldDecodeFilter(
$main_get, $decodeFilter, "\$item",
- '$items[$nr]', $code, $this->_t(2)
+ '$items[$nr]', $code, Indent::_(2)
);
}
}
@@ -4978,7 +4903,7 @@ class Interpretation extends Fields
// set contentprepare checkers on needed fields
$getItem .= $this->setCustomViewFieldonContentPrepareChecker(
$main_get, $contentprepareChecker, "\$item",
- $code, $this->_t(2)
+ $code, Indent::_(2)
);
}
}
@@ -4991,7 +4916,7 @@ class Interpretation extends Fields
// set uikit checkers on needed fields
$getItem .= $this->setCustomViewFieldUikitChecker(
$main_get, $uikitChecker, "\$item", $code,
- $this->_t(2)
+ Indent::_(2)
);
}
}
@@ -4999,7 +4924,7 @@ class Interpretation extends Fields
}
}
// only update if dispacher placholder is found
- if (strpos($getItem, $this->hhh . 'DISPATCHER' . $this->hhh)
+ if (strpos($getItem, Placefix::_h('DISPATCHER'))
!== false)
{
// check if the dispather should be added
@@ -5008,8 +4933,7 @@ class Interpretation extends Fields
$this->JEventDispatcher
))
{
- $this->JEventDispatcher = array($this->hhh . 'DISPATCHER'
- . $this->hhh => '');
+ $this->JEventDispatcher = array(Placefix::_h('DISPATCHER') => '');
}
$getItem = str_replace(
array_keys($this->JEventDispatcher),
@@ -5018,11 +4942,11 @@ class Interpretation extends Fields
}
// setup Globals
$getItem .= $this->setCustomViewGlobals(
- $get->global, '$item', $asBucket, $this->_t(2)
+ $get->global, '$item', $asBucket, Indent::_(2)
);
// setup the custom gets that returns multipal values
$getItem .= $this->setCustomViewCustomJoin(
- $get->custom_get, "\$item", $code, $asBucket, $this->_t(2)
+ $get->custom_get, "\$item", $code, $asBucket, Indent::_(2)
);
// set calculations
if ($get->addcalculation == 1)
@@ -5032,16 +4956,16 @@ class Interpretation extends Fields
);
if (ArrayHelper::check($get->php_calculation))
{
- $_tmp = PHP_EOL . $this->_t(4) . implode(
- PHP_EOL . $this->_t(4), $get->php_calculation
+ $_tmp = PHP_EOL . Indent::_(4) . implode(
+ PHP_EOL . Indent::_(4), $get->php_calculation
);
- $getItem .= $this->setPlaceholders(
- $_tmp, $this->placeholders
+ $getItem .= CFactory::_('Placeholder')->update(
+ $_tmp, CFactory::_('Placeholder')->active
);
}
}
- $getItem .= PHP_EOL . $this->_t(3) . "}";
- $getItem .= PHP_EOL . $this->_t(2) . "}";
+ $getItem .= PHP_EOL . Indent::_(3) . "}";
+ $getItem .= PHP_EOL . Indent::_(2) . "}";
// remove empty foreach
if (strlen($getItem) <= 100)
{
@@ -5057,16 +4981,16 @@ class Interpretation extends Fields
{
if ('expert' !== $cryptionType)
{
- $script .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Get the " . $cryptionType
+ $script .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Get the " . $cryptionType
. " encryption.";
- $script .= PHP_EOL . $this->_t(2) . "\$" . $cryptionType
+ $script .= PHP_EOL . Indent::_(2) . "\$" . $cryptionType
. "key = " . $Component . "Helper::getCryptKey('"
. $cryptionType . "');";
- $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $script .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Get the encryption object.";
- $script .= PHP_EOL . $this->_t(2) . "\$" . $cryptionType
+ $script .= PHP_EOL . Indent::_(2) . "\$" . $cryptionType
. " = new FOFEncryptAes(\$" . $cryptionType . "key);";
}
elseif (isset(
@@ -5082,8 +5006,8 @@ class Interpretation extends Fields
. 'FieldModelInitiator'}[$code]['get'] as $block
)
{
- $script .= PHP_EOL . $this->_t(2) . implode(
- PHP_EOL . $this->_t(2), $block
+ $script .= PHP_EOL . Indent::_(2) . implode(
+ PHP_EOL . Indent::_(2), $block
);
}
}
@@ -5108,30 +5032,30 @@ class Interpretation extends Fields
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 2)
{
- $script .= PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(
- __LINE__
+ $script .= PHP_EOL . Indent::_(2) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Load the filter form from xml.";
- $script .= PHP_EOL . $this->_t(2) . "\$this->filterForm "
+ $script .= PHP_EOL . Indent::_(2) . "\$this->filterForm "
. "= \$this->get('FilterForm');";
- $script .= PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(
- __LINE__
+ $script .= PHP_EOL . Indent::_(2) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Load the active filters.";
- $script .= PHP_EOL . $this->_t(2) . "\$this->activeFilters "
+ $script .= PHP_EOL . Indent::_(2) . "\$this->activeFilters "
. "= \$this->get('ActiveFilters');";
}
// get the default ordering values
$default_ordering = $this->getListViewDefaultOrdering($nameListCode);
// now add the default ordering
- $script .= PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(
- __LINE__
+ $script .= PHP_EOL . Indent::_(2) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Add the list ordering clause.";
- $script .= PHP_EOL . $this->_t(2)
+ $script .= PHP_EOL . Indent::_(2)
. "\$this->listOrder = \$this->escape(\$this->state->get('list.ordering', '"
. $default_ordering['name'] . "'));";
- $script .= PHP_EOL . $this->_t(2)
+ $script .= PHP_EOL . Indent::_(2)
. "\$this->listDirn = \$this->escape(\$this->state->get('list.direction', '"
. $default_ordering['direction'] . "'));";
@@ -5152,33 +5076,33 @@ class Interpretation extends Fields
))
{
// load the dispatcher
- $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Initialise dispatcher.";
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . Indent::_(2)
. "\$dispatcher = JEventDispatcher::getInstance();";
}
if ($view['settings']->main_get->gettype == 1)
{
// for single views
- $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Initialise variables.";
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . Indent::_(2)
. "\$this->item = \$this->get('Item');";
}
elseif ($view['settings']->main_get->gettype == 2)
{
// for list views
- $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Initialise variables.";
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . Indent::_(2)
. "\$this->items = \$this->get('Items');";
// only add if pagination is requered
if ($view['settings']->main_get->pagination == 1)
{
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . Indent::_(2)
. "\$this->pagination = \$this->get('Pagination');";
}
}
@@ -5193,7 +5117,7 @@ class Interpretation extends Fields
$custom_get_name = str_replace(
'get', '', $custom_get->getcustom
);
- $method .= PHP_EOL . $this->_t(2) . "\$this->"
+ $method .= PHP_EOL . Indent::_(2) . "\$this->"
. StringHelper::safe($custom_get_name)
. " = \$this->get('" . $custom_get_name . "');";
}
@@ -5208,79 +5132,77 @@ class Interpretation extends Fields
$view['settings']->php_jview_display
))
{
- $_tmp = PHP_EOL . $this->_t(2) . implode(
- PHP_EOL . $this->_t(2),
+ $_tmp = PHP_EOL . Indent::_(2) . implode(
+ PHP_EOL . Indent::_(2),
$view['settings']->php_jview_display
);
- $method .= $this->setPlaceholders(
- $_tmp, $this->placeholders
+ $method .= CFactory::_('Placeholder')->update(
+ $_tmp, CFactory::_('Placeholder')->active
);
}
}
- if ('site' === $this->target)
+ if ('site' === CFactory::_('Config')->build_target)
{
- $method .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Set the toolbar";
- $method .= PHP_EOL . $this->_t(2) . "\$this->addToolBar();";
- $method .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " set the document";
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Set the toolbar";
+ $method .= PHP_EOL . Indent::_(2) . "\$this->addToolBar();";
+ $method .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " set the document";
+ $method .= PHP_EOL . Indent::_(2)
. "\$this->_prepareDocument();";
}
- elseif ('custom_admin' === $this->target)
+ elseif ('custom_admin' === CFactory::_('Config')->build_target)
{
- $method .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $method .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " We don't need toolbar in the modal window.";
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . Indent::_(2)
. "if (\$this->getLayout() !== 'modal')";
- $method .= PHP_EOL . $this->_t(2) . "{";
- $method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . Indent::_(2) . "{";
+ $method .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " add the tool bar";
- $method .= PHP_EOL . $this->_t(3) . "\$this->addToolBar();";
- $method .= PHP_EOL . $this->_t(2) . "}";
- $method .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " set the document";
- $method .= PHP_EOL . $this->_t(2) . "\$this->setDocument();";
+ $method .= PHP_EOL . Indent::_(3) . "\$this->addToolBar();";
+ $method .= PHP_EOL . Indent::_(2) . "}";
+ $method .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " set the document";
+ $method .= PHP_EOL . Indent::_(2) . "\$this->setDocument();";
}
- $method .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Check for errors.";
- $method .= PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . Indent::_(2)
. "if (count(\$errors = \$this->get('Errors')))";
- $method .= PHP_EOL . $this->_t(2) . "{";
- $method .= PHP_EOL . $this->_t(3)
+ $method .= PHP_EOL . Indent::_(2) . "{";
+ $method .= PHP_EOL . Indent::_(3)
. "throw new Exception(implode(PHP_EOL, \$errors), 500);";
- $method .= PHP_EOL . $this->_t(2) . "}";
+ $method .= PHP_EOL . Indent::_(2) . "}";
// add events if needed
if ($view['settings']->main_get->gettype == 1
&& ArrayHelper::check(
$view['settings']->main_get->plugin_events
))
{
- $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Process the content plugins.";
- $method .= PHP_EOL . $this->_t(2) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkObject(\$this->item))";
- $method .= PHP_EOL . $this->_t(2) . "{";
- $method .= PHP_EOL . $this->_t(3)
+ $method .= PHP_EOL . Indent::_(2) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkObject(\$this->item))";
+ $method .= PHP_EOL . Indent::_(2) . "{";
+ $method .= PHP_EOL . Indent::_(3)
. "JPluginHelper::importPlugin('content');";
- $method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Setup Event Object.";
- $method .= PHP_EOL . $this->_t(3)
+ $method .= PHP_EOL . Indent::_(3)
. "\$this->item->event = new stdClass;";
- $method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $method .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Check if item has params, or pass global params";
- $method .= PHP_EOL . $this->_t(3)
+ $method .= PHP_EOL . Indent::_(3)
. "\$params = (isset(\$this->item->params) && "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkJson(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;";
// load the defaults
foreach (
@@ -5291,28 +5213,28 @@ class Interpretation extends Fields
if ('onContentPrepare' === $plugin_event)
{
// TODO the onContentPrepare already gets triggered on the fields of its relation
- // $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " onContentPrepare Event Trigger.";
- // $method .= PHP_EOL . $this->_t(2) . "\$dispatcher->trigger('onContentPrepare', array ('com_" . Config::get('component_code_name') . ".article', &\$this->item, &\$this->params, 0));";
+ // $method .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " onContentPrepare Event Trigger.";
+ // $method .= PHP_EOL . Indent::_(2) . "\$dispatcher->trigger('onContentPrepare', array ('com_" . CFactory::_('Config')->component_code_name . ".article', &\$this->item, &\$this->params, 0));";
}
else
{
- $method .= PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " " . $plugin_event
+ $method .= PHP_EOL . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " " . $plugin_event
. " Event Trigger.";
- $method .= PHP_EOL . $this->_t(3)
+ $method .= PHP_EOL . Indent::_(3)
. "\$results = \$dispatcher->trigger('"
. $plugin_event . "', array('com_"
- . Config::get('component_code_name') . "."
+ . CFactory::_('Config')->component_code_name . "."
. $view['settings']->context
. "', &\$this->item, &\$params, 0));";
- $method .= PHP_EOL . $this->_t(3)
+ $method .= PHP_EOL . Indent::_(3)
. '$this->item->event->' . $plugin_event
. ' = trim(implode("\n", $results));';
}
}
- $method .= PHP_EOL . $this->_t(2) . "}";
+ $method .= PHP_EOL . Indent::_(2) . "}";
}
- $method .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $method .= PHP_EOL . PHP_EOL . Indent::_(2)
. "parent::display(\$tpl);";
}
@@ -5322,190 +5244,186 @@ class Interpretation extends Fields
public function setPrepareDocument(&$view)
{
// fix just incase we missed it somewhere
- $tmp = $this->lang;
- if ('site' === $this->target)
+ $tmp = CFactory::_('Config')->lang_target;
+ if ('site' === CFactory::_('Config')->build_target)
{
- $this->lang = 'site';
+ CFactory::_('Config')->lang_target = 'site';
}
else
{
- $this->lang = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
}
// ensure correct target is set
- $TARGET = StringHelper::safe($this->target, 'U');
+ $TARGET = StringHelper::safe(CFactory::_('Config')->build_target, 'U');
// set libraries $TARGET.'_LIBRARIES_LOADER
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_LIBRARIES_LOADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_LIBRARIES_LOADER' )]
= $this->setLibrariesLoader($view);
// set uikit $TARGET.'_UIKIT_LOADER
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_UIKIT_LOADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_UIKIT_LOADER' )]
= $this->setUikitLoader($view);
// set Google Charts $TARGET.'_GOOGLECHART_LOADER
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_GOOGLECHART_LOADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_GOOGLECHART_LOADER' )]
= $this->setGoogleChartLoader($view);
// set Footable FOOTABLE_LOADER
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_FOOTABLE_LOADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_FOOTABLE_LOADER' )]
= $this->setFootableScriptsLoader($view);
// set metadata DOCUMENT_METADATA
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_DOCUMENT_METADATA' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_DOCUMENT_METADATA' )]
= $this->setDocumentMetadata($view);
// set custom php scripting DOCUMENT_CUSTOM_PHP
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_DOCUMENT_CUSTOM_PHP' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_DOCUMENT_CUSTOM_PHP' )]
= $this->setDocumentCustomPHP($view);
// set custom css DOCUMENT_CUSTOM_CSS
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_DOCUMENT_CUSTOM_CSS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_DOCUMENT_CUSTOM_CSS' )]
= $this->setDocumentCustomCSS($view);
// set custom javascript DOCUMENT_CUSTOM_JS
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_DOCUMENT_CUSTOM_JS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_DOCUMENT_CUSTOM_JS' )]
= $this->setDocumentCustomJS($view);
// set custom css file VIEWCSS
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_VIEWCSS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_VIEWCSS' )]
= $this->setCustomCSS($view);
// incase no buttons are found
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_JAVASCRIPT_FOR_BUTTONS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_JAVASCRIPT_FOR_BUTTONS')]
= '';
// set the custom buttons CUSTOM_BUTTONS
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_CUSTOM_BUTTONS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS' )]
= $this->setCustomButtons($view);
// see if we should add get modules to the view.html
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_GET_MODULE' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_GET_MODULE' )]
= $this->setGetModules($view, $TARGET);
// set a JavaScript file if needed
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_LIBRARIES_LOADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_LIBRARIES_LOADER' )]
.= $this->setJavaScriptFile($view, $TARGET);
// fix just incase we missed it somewhere
- $this->lang = $tmp;
+ CFactory::_('Config')->lang_target = $tmp;
}
public function setGetModules($view, $TARGET)
{
- if (isset($this->getModule[$this->target][$view['settings']->code])
- && $this->getModule[$this->target][$view['settings']->code])
+ if (isset($this->getModule[CFactory::_('Config')->build_target][$view['settings']->code])
+ && $this->getModule[CFactory::_('Config')->build_target][$view['settings']->code])
{
$addModule = array();
- $addModule[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $addModule[] = $this->_t(1)
+ $addModule[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $addModule[] = Indent::_(1)
. " * Get the modules published in a position";
- $addModule[] = $this->_t(1) . " */";
- $addModule[] = $this->_t(1)
+ $addModule[] = Indent::_(1) . " */";
+ $addModule[] = Indent::_(1)
. "public function getModules(\$position, \$seperator = '', \$class = '')";
- $addModule[] = $this->_t(1) . "{";
- $addModule[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $addModule[] = Indent::_(1) . "{";
+ $addModule[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set default";
- $addModule[] = $this->_t(2) . "\$found = false;";
- $addModule[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $addModule[] = Indent::_(2) . "\$found = false;";
+ $addModule[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if we aleady have these modules loaded";
- $addModule[] = $this->_t(2)
+ $addModule[] = Indent::_(2)
. "if (isset(\$this->setModules[\$position]))";
- $addModule[] = $this->_t(2) . "{";
- $addModule[] = $this->_t(3) . "\$found = true;";
- $addModule[] = $this->_t(2) . "}";
- $addModule[] = $this->_t(2) . "else";
- $addModule[] = $this->_t(2) . "{";
- $addModule[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addModule[] = Indent::_(2) . "{";
+ $addModule[] = Indent::_(3) . "\$found = true;";
+ $addModule[] = Indent::_(2) . "}";
+ $addModule[] = Indent::_(2) . "else";
+ $addModule[] = Indent::_(2) . "{";
+ $addModule[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " this is where you want to load your module position";
- $addModule[] = $this->_t(3)
+ $addModule[] = Indent::_(3)
. "\$modules = JModuleHelper::getModules(\$position);";
- $addModule[] = $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ $addModule[] = Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkArray(\$modules, true))";
- $addModule[] = $this->_t(3) . "{";
- $addModule[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $addModule[] = Indent::_(3) . "{";
+ $addModule[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " set the place holder";
- $addModule[] = $this->_t(4)
+ $addModule[] = Indent::_(4)
. "\$this->setModules[\$position] = array();";
- $addModule[] = $this->_t(4) . "foreach(\$modules as \$module)";
- $addModule[] = $this->_t(4) . "{";
- $addModule[] = $this->_t(5)
+ $addModule[] = Indent::_(4) . "foreach(\$modules as \$module)";
+ $addModule[] = Indent::_(4) . "{";
+ $addModule[] = Indent::_(5)
. "\$this->setModules[\$position][] = JModuleHelper::renderModule(\$module);";
- $addModule[] = $this->_t(4) . "}";
- $addModule[] = $this->_t(4) . "\$found = true;";
- $addModule[] = $this->_t(3) . "}";
- $addModule[] = $this->_t(2) . "}";
- $addModule[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $addModule[] = Indent::_(4) . "}";
+ $addModule[] = Indent::_(4) . "\$found = true;";
+ $addModule[] = Indent::_(3) . "}";
+ $addModule[] = Indent::_(2) . "}";
+ $addModule[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if modules were found";
- $addModule[] = $this->_t(2)
+ $addModule[] = Indent::_(2)
. "if (\$found && isset(\$this->setModules[\$position]) && "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkArray(\$this->setModules[\$position]))";
- $addModule[] = $this->_t(2) . "{";
- $addModule[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addModule[] = Indent::_(2) . "{";
+ $addModule[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " set class";
- $addModule[] = $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkString(\$class))";
- $addModule[] = $this->_t(3) . "{";
- $addModule[] = $this->_t(4)
+ $addModule[] = Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkString(\$class))";
+ $addModule[] = Indent::_(3) . "{";
+ $addModule[] = Indent::_(4)
. "\$class = ' class=\"'.\$class.'\" ';";
- $addModule[] = $this->_t(3) . "}";
- $addModule[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $addModule[] = Indent::_(3) . "}";
+ $addModule[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " set seperating return values";
- $addModule[] = $this->_t(3) . "switch(\$seperator)";
- $addModule[] = $this->_t(3) . "{";
- $addModule[] = $this->_t(4) . "case 'none':";
- $addModule[] = $this->_t(5)
+ $addModule[] = Indent::_(3) . "switch(\$seperator)";
+ $addModule[] = Indent::_(3) . "{";
+ $addModule[] = Indent::_(4) . "case 'none':";
+ $addModule[] = Indent::_(5)
. "return implode('', \$this->setModules[\$position]);";
- $addModule[] = $this->_t(5) . "break;";
- $addModule[] = $this->_t(4) . "case 'div':";
- $addModule[] = $this->_t(5)
+ $addModule[] = Indent::_(5) . "break;";
+ $addModule[] = Indent::_(4) . "case 'div':";
+ $addModule[] = Indent::_(5)
. "return ''.implode('
', \$this->setModules[\$position]).'
';";
- $addModule[] = $this->_t(5) . "break;";
- $addModule[] = $this->_t(4) . "case 'list':";
- $addModule[] = $this->_t(5)
+ $addModule[] = Indent::_(5) . "break;";
+ $addModule[] = Indent::_(4) . "case 'list':";
+ $addModule[] = Indent::_(5)
. "return ''.implode(' ', \$this->setModules[\$position]).' ';";
- $addModule[] = $this->_t(5) . "break;";
- $addModule[] = $this->_t(4) . "case 'array':";
- $addModule[] = $this->_t(4) . "case 'Array':";
- $addModule[] = $this->_t(5)
+ $addModule[] = Indent::_(5) . "break;";
+ $addModule[] = Indent::_(4) . "case 'array':";
+ $addModule[] = Indent::_(4) . "case 'Array':";
+ $addModule[] = Indent::_(5)
. "return \$this->setModules[\$position];";
- $addModule[] = $this->_t(5) . "break;";
- $addModule[] = $this->_t(4) . "default:";
- $addModule[] = $this->_t(5)
+ $addModule[] = Indent::_(5) . "break;";
+ $addModule[] = Indent::_(4) . "default:";
+ $addModule[] = Indent::_(5)
. "return implode(' ', \$this->setModules[\$position]);";
- $addModule[] = $this->_t(5) . "break;";
- $addModule[] = $this->_t(4);
- $addModule[] = $this->_t(3) . "}";
- $addModule[] = $this->_t(2) . "}";
- $addModule[] = $this->_t(2) . "return false;";
- $addModule[] = $this->_t(1) . "}";
+ $addModule[] = Indent::_(5) . "break;";
+ $addModule[] = Indent::_(4);
+ $addModule[] = Indent::_(3) . "}";
+ $addModule[] = Indent::_(2) . "}";
+ $addModule[] = Indent::_(2) . "return false;";
+ $addModule[] = Indent::_(1) . "}";
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . $TARGET . '_GET_MODULE_JIMPORT' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_GET_MODULE_JIMPORT')]
= PHP_EOL . "jimport('joomla.application.module.helper');";
return implode(PHP_EOL, $addModule);
}
- $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET
- . '_GET_MODULE_JIMPORT' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h($TARGET
+ . '_GET_MODULE_JIMPORT')]
= '';
return '';
@@ -5522,11 +5440,11 @@ class Interpretation extends Fields
$view['settings']->php_document
))
{
- $_tmp = PHP_EOL . $this->_t(2) . implode(
- PHP_EOL . $this->_t(2), $view['settings']->php_document
+ $_tmp = PHP_EOL . Indent::_(2) . implode(
+ PHP_EOL . Indent::_(2), $view['settings']->php_document
);
- return $this->setPlaceholders($_tmp, $this->placeholders);
+ return CFactory::_('Placeholder')->update($_tmp, CFactory::_('Placeholder')->active);
}
}
@@ -5538,7 +5456,7 @@ class Interpretation extends Fields
// do not validate selection
$validateSelection = 'false';
// ensure correct target is set
- $TARGET = StringHelper::safe($this->target, 'U');
+ $TARGET = StringHelper::safe(CFactory::_('Config')->build_target, 'U');
if (1 == $type || 2 == $type)
{
if (1 == $type)
@@ -5550,11 +5468,11 @@ class Interpretation extends Fields
$viewCodeName = $view['settings']->name_single_code;
}
// set the custom buttons CUSTOM_BUTTONS_CONTROLLER
- $this->fileContentDynamic[$viewCodeName][$this->hhh . $TARGET
- . '_CUSTOM_BUTTONS_CONTROLLER' . $this->hhh] = '';
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_CONTROLLER' )] = '';
// set the custom buttons CUSTOM_BUTTONS_METHOD
- $this->fileContentDynamic[$viewCodeName][$this->hhh . $TARGET
- . '_CUSTOM_BUTTONS_METHOD' . $this->hhh] = '';
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_METHOD' )] = '';
}
elseif (3 == $type)
{
@@ -5562,12 +5480,12 @@ class Interpretation extends Fields
$viewCodeName = $view['settings']->name_single_code;
$viewsCodeName = $view['settings']->name_list_code;
// set the custom buttons CUSTOM_BUTTONS_CONTROLLER_LIST
- $this->fileContentDynamic[$viewsCodeName][$this->hhh . $TARGET
- . '_CUSTOM_BUTTONS_CONTROLLER_LIST' . $this->hhh]
+ $this->fileContentDynamic[$viewsCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_CONTROLLER_LIST' )]
= '';
// set the custom buttons CUSTOM_BUTTONS_METHOD_LIST
- $this->fileContentDynamic[$viewsCodeName][$this->hhh . $TARGET
- . '_CUSTOM_BUTTONS_METHOD_LIST' . $this->hhh]
+ $this->fileContentDynamic[$viewsCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_METHOD_LIST' )]
= '';
// validate selection
$validateSelection = 'true';
@@ -5575,48 +5493,40 @@ class Interpretation extends Fields
// reset buttons
$buttons = array();
// if site add buttons to view
- if ($this->target === 'site')
+ if (CFactory::_('Config')->build_target === 'site')
{
// set the custom buttons SITE_TOP_BUTTON
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . 'SITE_TOP_BUTTON'
- . $this->hhh]
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h('SITE_TOP_BUTTON')]
= '';
// set the custom buttons SITE_BOTTOM_BUTTON
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . 'SITE_BOTTOM_BUTTON' . $this->hhh]
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h('SITE_BOTTOM_BUTTON')]
= '';
// load into place
switch ($view['settings']->button_position)
{
case 1:
// set buttons to top right of the view
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . 'SITE_TOP_BUTTON' . $this->hhh]
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h('SITE_TOP_BUTTON')]
= '';
break;
case 2:
// set buttons to top left of the view
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . 'SITE_TOP_BUTTON' . $this->hhh]
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h('SITE_TOP_BUTTON')]
= 'toolbar->render(); ?>';
break;
case 3:
// set buttons to buttom right of the view
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . 'SITE_BOTTOM_BUTTON' . $this->hhh]
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h('SITE_BOTTOM_BUTTON')]
= '';
break;
case 4:
// set buttons to buttom left of the view
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . 'SITE_BOTTOM_BUTTON' . $this->hhh]
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h('SITE_BOTTOM_BUTTON')]
= 'toolbar->render(); ?>';
break;
case 5:
// set buttons to buttom left of the view
- $this->placeholders[$this->bbb . 'SITE_TOOLBAR'
- . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SITE_TOOLBAR')]
= 'toolbar->render(); ?>';
break;
}
@@ -5629,13 +5539,12 @@ class Interpretation extends Fields
|| ($this->dynamicDashboardType === 'custom_admin_views'
&& $this->dynamicDashboard !== $viewCodeName))
{
- $buttons[] = $tab . $this->_t(2)
- . "//" . $this->setLine(__LINE__) . " add cpanel button";
- $buttons[] = $tab . $this->_t(2)
+ $buttons[] = $tab . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__) . " add cpanel button";
+ $buttons[] = $tab . Indent::_(2)
. "JToolBarHelper::custom('" . $viewCodeName . "."
. "dashboard', 'grid-2', '', 'COM_"
- . $this->fileContentStatic[$this->hhh
- . 'COMPONENT' . $this->hhh]
+ . $this->fileContentStatic[Placefix::_h('COMPONENT')]
. "_DASH', false);";
}
}
@@ -5653,50 +5562,50 @@ class Interpretation extends Fields
foreach ($view['settings']->custom_buttons as $custom_button)
{
// Load to lang
- $keyLang = $this->langPrefix . '_'
+ $keyLang = CFactory::_('Config')->lang_prefix . '_'
. StringHelper::safe(
$custom_button['name'], 'U'
);
$keyCode = StringHelper::safe(
$custom_button['name']
);
- $this->setLangContent(
- $this->lang, $keyLang, $custom_button['name']
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $keyLang, $custom_button['name']
);
// load the button
if (3 !== $type
&& ($custom_button['target'] != 2
- || $this->target === 'site'))
+ || CFactory::_('Config')->build_target === 'site'))
{
// add cpanel button TODO does not work well on site with permissions
if ($custom_button['target'] == 2
- || $this->target === 'site')
+ || CFactory::_('Config')->build_target === 'site')
{
- $buttons[] = $this->_t(1) . $tab . $this->_t(1)
+ $buttons[] = Indent::_(1) . $tab . Indent::_(1)
. "if (\$this->user->authorise('"
. $viewCodeName
. "." . $keyCode . "', 'com_"
- . Config::get('component_code_name') . "'))";
+ . CFactory::_('Config')->component_code_name . "'))";
}
else
{
- $buttons[] = $this->_t(1) . $tab . $this->_t(1)
+ $buttons[] = Indent::_(1) . $tab . Indent::_(1)
. "if (\$this->canDo->get('" . $viewCodeName
. "."
. $keyCode . "'))";
}
- $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "{";
- $buttons[] = $this->_t(1) . $tab . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " add "
+ $buttons[] = Indent::_(1) . $tab . Indent::_(1) . "{";
+ $buttons[] = Indent::_(1) . $tab . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " add "
. $custom_button['name'] . " button.";
- $buttons[] = $this->_t(1) . $tab . $this->_t(2)
+ $buttons[] = Indent::_(1) . $tab . Indent::_(2)
. "JToolBarHelper::custom('" . $viewCodeName . "."
. $custom_button['method'] . "', '"
. $custom_button['icomoon'] . " custom-button-"
. strtolower($custom_button['method']) . "', '', '"
. $keyLang
. "', false);";
- $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "}";
+ $buttons[] = Indent::_(1) . $tab . Indent::_(1) . "}";
}
// load the list button
elseif (3 == $type && $custom_button['target'] != 1)
@@ -5711,26 +5620,26 @@ class Interpretation extends Fields
= array();
}
$this->onlyFunctionButton[$viewsCodeName][]
- = $this->_t(
+ = Indent::_(
1
) . $tab . "if (\$this->user->authorise('"
. $viewCodeName . "." . $keyCode . "', 'com_"
- . Config::get('component_code_name') . "'))";
+ . CFactory::_('Config')->component_code_name . "'))";
$this->onlyFunctionButton[$viewsCodeName][]
- = $this->_t(
+ = Indent::_(
1
) . $tab . "{";
$this->onlyFunctionButton[$viewsCodeName][]
- = $this->_t(
+ = Indent::_(
1
- ) . $tab . $this->_t(1) . "//" . $this->setLine(
- __LINE__
+ ) . $tab . Indent::_(1) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " add " . $custom_button['name']
. " button.";
$this->onlyFunctionButton[$viewsCodeName][]
- = $this->_t(
+ = Indent::_(
1
- ) . $tab . $this->_t(1)
+ ) . $tab . Indent::_(1)
. "JToolBarHelper::custom('" . $viewsCodeName
. "."
. $custom_button['method'] . "', '"
@@ -5739,23 +5648,23 @@ class Interpretation extends Fields
. "', '', '"
. $keyLang . "', false);";
$this->onlyFunctionButton[$viewsCodeName][]
- = $this->_t(
+ = Indent::_(
1
) . $tab . "}";
}
else
{
- $buttons[] = $this->_t(1) . $tab . $this->_t(1)
+ $buttons[] = Indent::_(1) . $tab . Indent::_(1)
. "if (\$this->user->authorise('"
. $viewCodeName
. "." . $keyCode . "', 'com_"
- . Config::get('component_code_name') . "'))";
- $buttons[] = $this->_t(1) . $tab . $this->_t(1)
+ . CFactory::_('Config')->component_code_name . "'))";
+ $buttons[] = Indent::_(1) . $tab . Indent::_(1)
. "{";
- $buttons[] = $this->_t(1) . $tab . $this->_t(2)
- . "//" . $this->setLine(__LINE__) . " add "
+ $buttons[] = Indent::_(1) . $tab . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__) . " add "
. $custom_button['name'] . " button.";
- $buttons[] = $this->_t(1) . $tab . $this->_t(2)
+ $buttons[] = Indent::_(1) . $tab . Indent::_(2)
. "JToolBarHelper::custom('" . $viewsCodeName
. "."
. $custom_button['method'] . "', '"
@@ -5764,7 +5673,7 @@ class Interpretation extends Fields
. "', '', '"
. $keyLang . "', '" . $validateSelection
. "');";
- $buttons[] = $this->_t(1) . $tab . $this->_t(1)
+ $buttons[] = Indent::_(1) . $tab . Indent::_(1)
. "}";
}
}
@@ -5781,12 +5690,11 @@ class Interpretation extends Fields
&& $view['settings']->php_controller_list != '//')
{
// set the custom buttons CUSTOM_BUTTONS_CONTROLLER
- $this->fileContentDynamic[$viewsCodeName][$this->hhh
- . $TARGET
- . '_CUSTOM_BUTTONS_CONTROLLER_LIST' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $this->fileContentDynamic[$viewsCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_CONTROLLER_LIST')]
+ = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
$view['settings']->php_controller_list,
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
}
// load the model
@@ -5797,12 +5705,11 @@ class Interpretation extends Fields
&& $view['settings']->php_model_list != '//')
{
// set the custom buttons CUSTOM_BUTTONS_METHOD
- $this->fileContentDynamic[$viewsCodeName][$this->hhh
- . $TARGET
- . '_CUSTOM_BUTTONS_METHOD_LIST' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $this->fileContentDynamic[$viewsCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_METHOD_LIST')]
+ = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
$view['settings']->php_model_list,
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
}
}
@@ -5815,18 +5722,17 @@ class Interpretation extends Fields
&& $view['settings']->php_controller != '//')
{
// set the custom buttons CUSTOM_BUTTONS_CONTROLLER
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . $TARGET
- . '_CUSTOM_BUTTONS_CONTROLLER' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_CONTROLLER')]
+ = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
$view['settings']->php_controller,
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
- if ('site' === $this->target)
+ if ('site' === CFactory::_('Config')->build_target)
{
// add the controller for this view
// build the file
- $target = array($this->target => $viewCodeName);
+ $target = array(CFactory::_('Config')->build_target => $viewCodeName);
$this->buildDynamique($target, 'custom_form');
// GET_FORM_CUSTOM
}
@@ -5838,10 +5744,9 @@ class Interpretation extends Fields
&& $view['settings']->php_model != '//')
{
// set the custom buttons CUSTOM_BUTTONS_METHOD
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . $TARGET
- . '_CUSTOM_BUTTONS_METHOD' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h($TARGET
+ . '_CUSTOM_BUTTONS_METHOD')]
+ = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
$view['settings']->php_model, $this->placeholders
);
}
@@ -5868,8 +5773,8 @@ class Interpretation extends Fields
) === false))
{
// set the custom get form method JAVASCRIPT_FOR_BUTTONS
- $this->fileContentDynamic[$viewCodeName][$this->hhh
- . $TARGET . '_JAVASCRIPT_FOR_BUTTONS' . $this->hhh]
+ $this->fileContentDynamic[$viewCodeName][Placefix::_h($TARGET
+ . '_JAVASCRIPT_FOR_BUTTONS')]
= $this->setJavaScriptForButtons();
}
// insure the form is added (only if no form exist)
@@ -5878,7 +5783,7 @@ class Interpretation extends Fields
$view['settings']->default, '";
// Trigger Event: jcb_ce_onSetDefaultViewsBodyBottom
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onSetDefaultViewsBodyBottom',
array(&$this,
&$body,
@@ -12439,39 +12318,39 @@ class Interpretation extends Fields
// set id lang
$idLangName = $langView . '_ID';
// add to lang array
- $this->setLangContent($this->lang, $statusLangName, 'Status');
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $statusLangName, 'Status');
// add to lang array
- $this->setLangContent($this->lang, $idLangName, 'Id');
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $idLangName, 'Id');
// set default
$head = '';
- $head .= PHP_EOL . $this->_t(1)
+ $head .= PHP_EOL . Indent::_(1)
. "canEdit&& \$this->canState): ?>";
if (!isset($this->fieldsNames[$nameSingleCode]['ordering']))
{
- $head .= PHP_EOL . $this->_t(2)
+ $head .= PHP_EOL . Indent::_(2)
. '';
- $head .= PHP_EOL . $this->_t(3)
+ $head .= PHP_EOL . Indent::_(3)
. "listDirn, \$this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'"
. $jhtml_sort_icon_2 . "); ?>";
- $head .= PHP_EOL . $this->_t(2) . " ";
+ $head .= PHP_EOL . Indent::_(2) . "";
}
- $head .= PHP_EOL . $this->_t(2)
+ $head .= PHP_EOL . Indent::_(2)
. '';
- $head .= PHP_EOL . $this->_t(3)
+ $head .= PHP_EOL . Indent::_(3)
. "";
- $head .= PHP_EOL . $this->_t(2) . " ";
- $head .= PHP_EOL . $this->_t(1) . "";
- $head .= PHP_EOL . $this->_t(2)
+ $head .= PHP_EOL . Indent::_(2) . "";
+ $head .= PHP_EOL . Indent::_(1) . "";
+ $head .= PHP_EOL . Indent::_(2)
. '';
- $head .= PHP_EOL . $this->_t(3) . "▾";
- $head .= PHP_EOL . $this->_t(2) . " ";
- $head .= PHP_EOL . $this->_t(2)
+ $head .= PHP_EOL . Indent::_(3) . "▾";
+ $head .= PHP_EOL . Indent::_(2) . "";
+ $head .= PHP_EOL . Indent::_(2)
. '';
- $head .= PHP_EOL . $this->_t(3) . "■";
- $head .= PHP_EOL . $this->_t(2) . " ";
- $head .= PHP_EOL . $this->_t(1) . "";
+ $head .= PHP_EOL . Indent::_(3) . "■";
+ $head .= PHP_EOL . Indent::_(2) . "";
+ $head .= PHP_EOL . Indent::_(1) . "";
// set footer Column number
$this->listColnrBuilder[$nameListCode] = 4;
// build the dynamic fields
@@ -12532,42 +12411,42 @@ class Interpretation extends Fields
$title = "";
}
- $head .= PHP_EOL . $this->_t(1) . '';
- $head .= PHP_EOL . $this->_t(3) . $title;
- $head .= PHP_EOL . $this->_t(1) . " ";
+ $head .= PHP_EOL . Indent::_(3) . $title;
+ $head .= PHP_EOL . Indent::_(1) . "";
$this->listColnrBuilder[$nameListCode]++;
}
}
// set default
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
{
- $head .= PHP_EOL . $this->_t(1)
+ $head .= PHP_EOL . Indent::_(1)
. "canState): ?>";
- $head .= PHP_EOL . $this->_t(2)
+ $head .= PHP_EOL . Indent::_(2)
. '';
- $head .= PHP_EOL . $this->_t(3)
+ $head .= PHP_EOL . Indent::_(3)
. "listDirn, \$this->listOrder); ?>";
- $head .= PHP_EOL . $this->_t(2) . " ";
- $head .= PHP_EOL . $this->_t(1) . "";
- $head .= PHP_EOL . $this->_t(2)
+ $head .= PHP_EOL . Indent::_(2) . "";
+ $head .= PHP_EOL . Indent::_(1) . "";
+ $head .= PHP_EOL . Indent::_(2)
. '';
- $head .= PHP_EOL . $this->_t(3) . "";
- $head .= PHP_EOL . $this->_t(2) . " ";
- $head .= PHP_EOL . $this->_t(1) . "";
+ $head .= PHP_EOL . Indent::_(2) . "";
+ $head .= PHP_EOL . Indent::_(1) . "";
}
if (!isset($this->fieldsNames[$nameSingleCode]['id']))
{
- $head .= PHP_EOL . $this->_t(1)
+ $head .= PHP_EOL . Indent::_(1)
. '';
- $head .= PHP_EOL . $this->_t(3)
+ $head .= PHP_EOL . Indent::_(3)
. "listDirn, \$this->listOrder); ?>";
- $head .= PHP_EOL . $this->_t(1) . " ";
+ $head .= PHP_EOL . Indent::_(1) . "";
}
$head .= PHP_EOL . " ";
@@ -12620,23 +12499,23 @@ class Interpretation extends Fields
foreach ($fields as $field)
{
// add each field
- $fieldArray[] = PHP_EOL . $this->_t(4) . "'" . $field
+ $fieldArray[] = PHP_EOL . Indent::_(4) . "'" . $field
. "'";
}
// add the alignemnt key
- $alignmentArray[] = PHP_EOL . $this->_t(3) . "'"
+ $alignmentArray[] = PHP_EOL . Indent::_(3) . "'"
. $this->alignmentOptions[$alignment] . "' => array("
- . implode(',', $fieldArray) . PHP_EOL . $this->_t(3)
+ . implode(',', $fieldArray) . PHP_EOL . Indent::_(3)
. ")";
}
// add the layout key
- $layoutArray[] = PHP_EOL . $this->_t(2) . "'"
+ $layoutArray[] = PHP_EOL . Indent::_(2) . "'"
. StringHelper::safe($layout)
. "' => array(" . implode(',', $alignmentArray) . PHP_EOL
- . $this->_t(2) . ")";
+ . Indent::_(2) . ")";
}
- return 'array(' . implode(',', $layoutArray) . PHP_EOL . $this->_t(
+ return 'array(' . implode(',', $layoutArray) . PHP_EOL . Indent::_(
1
) . ")";
}
@@ -12699,7 +12578,7 @@ class Interpretation extends Fields
$body = PHP_EOL . '";
+ $body .= PHP_EOL . Indent::_(1) . "";
}
$body .= PHP_EOL . "";
// check if left has been set
@@ -12971,7 +12850,7 @@ class Interpretation extends Fields
/// set the values to use in search latter
$searchTabs[$tabCodeName] = $tabNr;
// add to lang array
- $this->setLangContent($this->lang, $tabLangName, $tabName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $tabLangName, $tabName);
// check if linked view belongs to this tab
$buildLayout = true;
$linkedViewId = '';
@@ -13009,7 +12888,7 @@ class Interpretation extends Fields
}
else
{
- $items .= "," . PHP_EOL . $this->_t(1) . "'" . $name
+ $items .= "," . PHP_EOL . Indent::_(1) . "'" . $name
. "'";
}
$itemCounter++;
@@ -13061,7 +12940,7 @@ class Interpretation extends Fields
'layouttitle'
);
// load to header
- $header .= PHP_EOL . $this->_t(1)
+ $header .= PHP_EOL . Indent::_(1)
. "";
@@ -13087,7 +12966,7 @@ class Interpretation extends Fields
'layoutitems'
);
// load the body
- $leftside .= PHP_EOL . $this->_t(1)
+ $leftside .= PHP_EOL . Indent::_(1)
. "";
@@ -13100,7 +12979,7 @@ class Interpretation extends Fields
'layoutitems'
);
// load the body
- $rightside .= PHP_EOL . $this->_t(1)
+ $rightside .= PHP_EOL . Indent::_(1)
. "";
@@ -13182,9 +13061,9 @@ class Interpretation extends Fields
{
case 1: // left
case 2: // right
- $main .= PHP_EOL . $this->_t(3) . '';
- $main .= PHP_EOL . $this->_t(4) . $string;
- $main .= PHP_EOL . $this->_t(3) . '
';
+ $main .= PHP_EOL . Indent::_(3) . '';
+ $main .= PHP_EOL . Indent::_(4) . $string;
+ $main .= PHP_EOL . Indent::_(3) . '
';
break;
}
}
@@ -13194,20 +13073,20 @@ class Interpretation extends Fields
{
case 1: // left
case 2: // right
- $main .= PHP_EOL . $this->_t(3)
+ $main .= PHP_EOL . Indent::_(3)
. '';
- $main .= PHP_EOL . $this->_t(4) . $string;
- $main .= PHP_EOL . $this->_t(3) . '
';
+ $main .= PHP_EOL . Indent::_(4) . $string;
+ $main .= PHP_EOL . Indent::_(3) . '';
break;
}
}
switch ($position)
{
case 3: // fullwidth
- $mainbottom .= PHP_EOL . $this->_t(3)
+ $mainbottom .= PHP_EOL . Indent::_(3)
. '';
- $mainbottom .= PHP_EOL . $this->_t(4) . $string;
- $mainbottom .= PHP_EOL . $this->_t(3) . '
';
+ $mainbottom .= PHP_EOL . Indent::_(4) . $string;
+ $mainbottom .= PHP_EOL . Indent::_(3) . '';
break;
}
}
@@ -13230,7 +13109,7 @@ class Interpretation extends Fields
// set default publishing tab lang
$tabLangName = $langView . '_PUBLISHING';
// add to lang array
- $this->setLangContent($this->lang, $tabLangName, 'Publishing');
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $tabLangName, 'Publishing');
// the default publishing items
$items = array('left' => array(), 'right' => array());
// Setup the default (custom) fields
@@ -13318,7 +13197,7 @@ class Interpretation extends Fields
if (ArrayHelper::check($items['left']))
{
$items_one .= "'" . implode(
- "'," . PHP_EOL . $this->_t(1) . "'", $items['left']
+ "'," . PHP_EOL . Indent::_(1) . "'", $items['left']
) . "'";
}
if (ArrayHelper::check($items['right']))
@@ -13326,9 +13205,9 @@ class Interpretation extends Fields
// there is already fields just add these
if (strlen($items_one) > 3)
{
- $items_one .= "," . PHP_EOL . $this->_t(1) . "'"
+ $items_one .= "," . PHP_EOL . Indent::_(1) . "'"
. implode(
- "'," . PHP_EOL . $this->_t(1) . "'",
+ "'," . PHP_EOL . Indent::_(1) . "'",
$items['right']
) . "'";
}
@@ -13336,7 +13215,7 @@ class Interpretation extends Fields
else
{
$items_one .= "'" . implode(
- "'," . PHP_EOL . $this->_t(1) . "'",
+ "'," . PHP_EOL . Indent::_(1) . "'",
$items['right']
) . "'";
}
@@ -13385,7 +13264,7 @@ class Interpretation extends Fields
{
// load all items
$items_one = "'" . implode(
- "'," . PHP_EOL . $this->_t(1) . "'", $items['left']
+ "'," . PHP_EOL . Indent::_(1) . "'", $items['left']
) . "'";
// set the publishing layout
$this->setLayout(
@@ -13399,7 +13278,7 @@ class Interpretation extends Fields
{
// load all items
$items_two = "'" . implode(
- "'," . PHP_EOL . $this->_t(1) . "'", $items['right']
+ "'," . PHP_EOL . Indent::_(1) . "'", $items['right']
) . "'";
// set the publishing layout
$this->setLayout(
@@ -13498,38 +13377,38 @@ class Interpretation extends Fields
// add the AND values to OR
$publishingPerOR[] = '(' . implode(' && ', $publishingPerAND) . ')';
// now build the complete showhide behaviour for the publishing area
- $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . "";
// set the default publishing tab
- $tabs .= PHP_EOL . $this->_t(1)
+ $tabs .= PHP_EOL . Indent::_(1)
. "";
- $tabs .= PHP_EOL . $this->_t(2)
+ $tabs .= PHP_EOL . Indent::_(2)
. '";
}
if ($items_two)
{
- $tabs .= PHP_EOL . $this->_t(3) . '';
- $tabs .= PHP_EOL . $this->_t(4)
+ $tabs .= PHP_EOL . Indent::_(4)
. "";
- $tabs .= PHP_EOL . $this->_t(3) . "
";
+ $tabs .= PHP_EOL . Indent::_(3) . "";
}
- $tabs .= PHP_EOL . $this->_t(2) . "";
- $tabs .= PHP_EOL . $this->_t(1)
+ $tabs .= PHP_EOL . Indent::_(2) . "";
+ $tabs .= PHP_EOL . Indent::_(1)
. "";
- $tabs .= PHP_EOL . $this->_t(1) . "";
+ $tabs .= PHP_EOL . Indent::_(1) . "";
// check if custom tab must be added
if (($_customTabHTML = $this->addCustomTabs(
15, $nameSingleCode, 2
@@ -13549,34 +13428,34 @@ class Interpretation extends Fields
// set permissions tab code name
$tabCodeName = 'permissions';
// add to lang array
- $this->setLangContent($this->lang, $tabLangName, 'Permissions');
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $tabLangName, 'Permissions');
// set the permissions tab
- $tabs .= PHP_EOL . PHP_EOL . $this->_t(1)
+ $tabs .= PHP_EOL . PHP_EOL . Indent::_(1)
. "canDo->get('core.admin')) : ?>";
- $tabs .= PHP_EOL . $this->_t(1)
+ $tabs .= PHP_EOL . Indent::_(1)
. "";
- $tabs .= PHP_EOL . $this->_t(2)
+ $tabs .= PHP_EOL . Indent::_(2)
. '";
+ $tabs .= PHP_EOL . Indent::_(2) . "";
+ $tabs .= PHP_EOL . Indent::_(1)
. "";
- $tabs .= PHP_EOL . $this->_t(1) . "";
+ $tabs .= PHP_EOL . Indent::_(1) . "";
}
return $tabs;
@@ -13624,34 +13503,34 @@ class Interpretation extends Fields
{
// set view name
$fadein[] = "";
$fadein[] = "componentCodeName
. "_loader\" style=\"display: none;\">";
@@ -13677,7 +13556,7 @@ class Interpretation extends Fields
$target = array('admin' => $nameSingleCode);
$this->buildDynamique($target, $type, $layoutName);
// add to front if needed
- if ($this->lang === 'both')
+ if (CFactory::_('Config')->lang_target === 'both')
{
$target = array('site' => $nameSingleCode);
$this->buildDynamique($target, $type, $layoutName);
@@ -13686,14 +13565,14 @@ class Interpretation extends Fields
{
// LAYOUTITEMS <<
>>
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutName][$this->hhh . 'LAYOUTITEMS' . $this->hhh]
+ . $layoutName][Placefix::_h('LAYOUTITEMS')]
= $items;
}
else
{
// LAYOUTITEMS <<>>
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutName][$this->hhh . 'bogus' . $this->hhh]
+ . $layoutName][Placefix::_h('bogus')]
= 'boom';
}
}
@@ -13715,7 +13594,7 @@ class Interpretation extends Fields
$target = array('admin' => $nameSingleCode);
$this->buildDynamique($target, 'layoutoverride', $layoutName);
// add to front if needed
- if ($this->lang === 'both')
+ if (CFactory::_('Config')->lang_target === 'both')
{
$target = array('site' => $nameSingleCode);
$this->buildDynamique($target, 'layoutoverride', $layoutName);
@@ -13727,37 +13606,33 @@ class Interpretation extends Fields
}
// set placeholder
$placeholder = $this->placeholders;
- $placeholder[$this->hhh . 'LAYOUTITEMS' . $this->hhh] = $items;
+ $placeholder[Placefix::_h('LAYOUTITEMS')] = $items;
// OVERRIDE_LAYOUT_CODE <<>>
$php_view = (array) explode(PHP_EOL, $data['php_view']);
if (ArrayHelper::check($php_view))
{
$php_view = PHP_EOL . PHP_EOL . implode(PHP_EOL, $php_view);
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutName][$this->hhh
- . 'OVERRIDE_LAYOUT_CODE' . $this->hhh]
- = $this->setPlaceholders(
+ . $layoutName][Placefix::_h('OVERRIDE_LAYOUT_CODE')]
+ = CFactory::_('Placeholder')->update(
$php_view, $placeholder
);
}
else
{
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutName][$this->hhh
- . 'OVERRIDE_LAYOUT_CODE' . $this->hhh]
+ . $layoutName][Placefix::_h('OVERRIDE_LAYOUT_CODE')]
= '';
}
// OVERRIDE_LAYOUT_BODY <<>>
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutName][$this->hhh
- . 'OVERRIDE_LAYOUT_BODY' . $this->hhh]
- = PHP_EOL . $this->setPlaceholders(
+ . $layoutName][Placefix::_h('OVERRIDE_LAYOUT_BODY')]
+ = PHP_EOL . CFactory::_('Placeholder')->update(
$data['html'], $placeholder
);
// OVERRIDE_LAYOUT_HEADER <<>>
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutName][$this->hhh
- . 'OVERRIDE_LAYOUT_HEADER' . $this->hhh]
+ . $layoutName][Placefix::_h('OVERRIDE_LAYOUT_HEADER')]
= (($header = $this->setFileHeader(
'override.layout',
$layoutName, false)
@@ -13784,10 +13659,10 @@ class Interpretation extends Fields
array($this->componentCodeName . $nameSingleCode . $layoutName)
))
{
- $data = $this->layoutData[$this->target][$this->componentCodeName
+ $data = $this->layoutData[CFactory::_('Config')->build_target][$this->componentCodeName
. $nameSingleCode . $layoutName];
// remove since we will add the layout now
- if ($this->lang === 'both')
+ if (CFactory::_('Config')->lang_target === 'both')
{
unset(
$this->layoutData['admin'][$this->componentCodeName
@@ -13801,7 +13676,7 @@ class Interpretation extends Fields
else
{
unset(
- $this->layoutData[$this->target][$this->componentCodeName
+ $this->layoutData[CFactory::_('Config')->build_target][$this->componentCodeName
. $nameSingleCode . $layoutName]
);
}
@@ -13814,10 +13689,10 @@ class Interpretation extends Fields
array($this->componentCodeName . $layoutName)
))
{
- $data = $this->layoutData[$this->target][$this->componentCodeName
+ $data = $this->layoutData[CFactory::_('Config')->build_target][$this->componentCodeName
. $layoutName];
// remove since we will add the layout now
- if ($this->lang === 'both')
+ if (CFactory::_('Config')->lang_target === 'both')
{
unset(
$this->layoutData['admin'][$this->componentCodeName
@@ -13831,7 +13706,7 @@ class Interpretation extends Fields
else
{
unset(
- $this->layoutData[$this->target][$this->componentCodeName
+ $this->layoutData[CFactory::_('Config')->build_target][$this->componentCodeName
. $layoutName]
);
}
@@ -13844,10 +13719,10 @@ class Interpretation extends Fields
array($nameSingleCode . $layoutName)
))
{
- $data = $this->layoutData[$this->target][$nameSingleCode
+ $data = $this->layoutData[CFactory::_('Config')->build_target][$nameSingleCode
. $layoutName];
// remove since we will add the layout now
- if ($this->lang === 'both')
+ if (CFactory::_('Config')->lang_target === 'both')
{
unset(
$this->layoutData['admin'][$nameSingleCode . $layoutName]
@@ -13856,7 +13731,7 @@ class Interpretation extends Fields
}
else
{
- unset($this->layoutData[$this->target][$layoutName]);
+ unset($this->layoutData[CFactory::_('Config')->build_target][$layoutName]);
}
return $data;
@@ -13867,16 +13742,16 @@ class Interpretation extends Fields
array($layoutName)
))
{
- $data = $this->layoutData[$this->target][$layoutName];
+ $data = $this->layoutData[CFactory::_('Config')->build_target][$layoutName];
// remove since we will add the layout now
- if ($this->lang === 'both')
+ if (CFactory::_('Config')->lang_target === 'both')
{
unset($this->layoutData['admin'][$layoutName]);
unset($this->layoutData['site'][$layoutName]);
}
else
{
- unset($this->layoutData[$this->target][$layoutName]);
+ unset($this->layoutData[CFactory::_('Config')->build_target][$layoutName]);
}
return $data;
@@ -13924,47 +13799,46 @@ class Interpretation extends Fields
$functionName = StringHelper::safe($codeName, 'F');
// LAYOUTITEMSTABLE <<>>
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh]
+ . $layoutCodeName][Placefix::_h('LAYOUTITEMSTABLE')]
= $head . $body;
// LAYOUTITEMSHEADER <<>>
- $headerscript = '//' . $this->setLine(__LINE__)
+ $headerscript = '//' . Line::_(__Line__, __Class__)
. ' set the edit URL';
$headerscript .= PHP_EOL . '$edit = "index.php?option=com_'
. $this->componentCodeName . '&view=' . $name_list_code
. '&task='
. $name_single_code . '.edit";';
- $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__)
+ $headerscript .= PHP_EOL . '//' . Line::_(__Line__, __Class__)
. ' set a return value';
$headerscript .= PHP_EOL
. '$return = ($id) ? "index.php?option=com_'
. $this->componentCodeName . '&view=' . $nameSingleCode
. '&layout=edit&id=" . $id : "";';
- $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__)
+ $headerscript .= PHP_EOL . '//' . Line::_(__Line__, __Class__)
. ' check for a return value';
$headerscript .= PHP_EOL
. '$jinput = JFactory::getApplication()->input;';
$headerscript .= PHP_EOL
. "if (\$_return = \$jinput->get('return', null, 'base64'))";
$headerscript .= PHP_EOL . '{';
- $headerscript .= PHP_EOL . $this->_t(1)
+ $headerscript .= PHP_EOL . Indent::_(1)
. '$return .= "&return=" . $_return;';
$headerscript .= PHP_EOL . '}';
- $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__)
+ $headerscript .= PHP_EOL . '//' . Line::_(__Line__, __Class__)
. ' check if return value was set';
$headerscript .= PHP_EOL . 'if ('
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper::checkString($return))';
+ . $this->fileContentStatic[Placefix::_h('Component')] . 'Helper::checkString($return))';
$headerscript .= PHP_EOL . '{';
- $headerscript .= PHP_EOL . $this->_t(1) . '//' . $this->setLine(
- __LINE__
+ $headerscript .= PHP_EOL . Indent::_(1) . '//' . Line::_(
+ __LINE__,__CLASS__
) . ' set the referral values';
- $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref='
+ $headerscript .= PHP_EOL . Indent::_(1) . '$ref = ($id) ? "&ref='
. $nameSingleCode
. '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));';
$headerscript .= PHP_EOL . '}';
$headerscript .= PHP_EOL . 'else';
$headerscript .= PHP_EOL . '{';
- $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref='
+ $headerscript .= PHP_EOL . Indent::_(1) . '$ref = ($id) ? "&ref='
. $nameSingleCode . '&refid=" . $id : "";';
$headerscript .= PHP_EOL . '}';
if ($addNewButon > 0)
@@ -13972,7 +13846,7 @@ class Interpretation extends Fields
// add the link for new
if ($addNewButon == 1 || $addNewButon == 2)
{
- $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__)
+ $headerscript .= PHP_EOL . '//' . Line::_(__Line__, __Class__)
. ' set the create new URL';
$headerscript .= PHP_EOL . '$new = "index.php?option=com_'
. $this->componentCodeName . '&view=' . $name_list_code
@@ -13982,7 +13856,7 @@ class Interpretation extends Fields
// and the link for close and new
if ($addNewButon == 2 || $addNewButon == 3)
{
- $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__)
+ $headerscript .= PHP_EOL . '//' . Line::_(__Line__, __Class__)
. ' set the create new and close URL';
$headerscript .= PHP_EOL
. '$close_new = "index.php?option=com_'
@@ -13990,28 +13864,25 @@ class Interpretation extends Fields
. '&task='
. $name_single_code . '.edit";';
}
- $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__)
+ $headerscript .= PHP_EOL . '//' . Line::_(__Line__, __Class__)
. ' load the action object';
$headerscript .= PHP_EOL . '$can = '
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper::getActions(' . "'"
+ . $this->fileContentStatic[Placefix::_h('Component')] . 'Helper::getActions(' . "'"
. $name_single_code . "'"
. ');';
}
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh]
+ . $layoutCodeName][Placefix::_h('LAYOUTITEMSHEADER')]
= $headerscript;
// LINKEDVIEWITEMS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWITEMS' . $this->hhh]
- .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
- ) . " Get Linked view data" . PHP_EOL . $this->_t(2)
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWITEMS')]
+ .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
+ ) . " Get Linked view data" . PHP_EOL . Indent::_(2)
. "\$this->" . $codeName . " = \$this->get('" . $functionName
. "');";
// LINKEDVIEWTABLESCRIPTS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWTABLESCRIPTS')]
= $this->setFootableScripts();
if (strpos($parentKey, '-R>') !== false
|| strpos($parentKey, '-A>') !== false)
@@ -14053,9 +13924,8 @@ class Interpretation extends Fields
= StringHelper::safe(
$_key . $this->uniquekey(4)
);
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWGLOBAL' . $this->hhh]
- .= PHP_EOL . $this->_t(2) . "\$this->"
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWGLOBAL')]
+ .= PHP_EOL . Indent::_(2) . "\$this->"
. $globalKey[$parent_key] . " = \$item->" . $parent_key
. ";";
}
@@ -14066,14 +13936,12 @@ class Interpretation extends Fields
$globalKey = StringHelper::safe(
$_key . $this->uniquekey(4)
);
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWGLOBAL' . $this->hhh]
- .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWGLOBAL')]
+ .= PHP_EOL . Indent::_(2) . "\$this->" . $globalKey
. " = \$item->" . $parent_key . ";";
}
// LINKEDVIEWMETHODS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWMETHODS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWMETHODS')]
.= $this->setListQueryLinked(
$name_single_code, $name_list_code, $functionName, $key, $_key,
$parentKey,
@@ -14083,10 +13951,10 @@ class Interpretation extends Fields
else
{
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh]
+ . $layoutCodeName][Placefix::_h('LAYOUTITEMSTABLE')]
= 'oops! error.....';
$this->fileContentDynamic[$nameSingleCode . '_'
- . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh]
+ . $layoutCodeName][Placefix::_h('LAYOUTITEMSHEADER')]
= '';
}
}
@@ -14101,62 +13969,62 @@ class Interpretation extends Fields
if (!isset($this->footableVersion)
|| 2 == $this->footableVersion) // loading version 2
{
- $foo = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $foo = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Add the CSS for Footable.";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "JHtml::_('stylesheet', 'media/com_"
. $this->componentCodeName
. "/footable-v2/css/footable.core.min.css', ['version' => 'auto']);";
- $foo .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $foo .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Use the Metro Style";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "if (!isset(\$this->fooTableStyle) || 0 == \$this->fooTableStyle)";
- $foo .= PHP_EOL . $this->_t(2) . "{";
- $foo .= PHP_EOL . $this->_t(3)
+ $foo .= PHP_EOL . Indent::_(2) . "{";
+ $foo .= PHP_EOL . Indent::_(3)
. "JHtml::_('stylesheet', 'media/com_"
. $this->componentCodeName
. "/footable-v2/css/footable.metro.min.css', ['version' => 'auto']);";
- $foo .= PHP_EOL . $this->_t(2) . "}";
- $foo .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $foo .= PHP_EOL . Indent::_(2) . "}";
+ $foo .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Use the Legacy Style.";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "elseif (isset(\$this->fooTableStyle) && 1 == \$this->fooTableStyle)";
- $foo .= PHP_EOL . $this->_t(2) . "{";
- $foo .= PHP_EOL . $this->_t(3)
+ $foo .= PHP_EOL . Indent::_(2) . "{";
+ $foo .= PHP_EOL . Indent::_(3)
. "JHtml::_('stylesheet', 'media/com_"
. $this->componentCodeName
. "/footable-v2/css/footable.standalone.min.css', ['version' => 'auto']);";
- $foo .= PHP_EOL . $this->_t(2) . "}";
- $foo .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $foo .= PHP_EOL . Indent::_(2) . "}";
+ $foo .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Add the JavaScript for Footable";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "JHtml::_('script', 'media/com_"
. $this->componentCodeName . "/footable-v2/js/footable.js', ['version' => 'auto']);";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "JHtml::_('script', 'media/com_"
. $this->componentCodeName
. "/footable-v2/js/footable.sort.js', ['version' => 'auto']);";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "JHtml::_('script', 'media/com_"
. $this->componentCodeName
. "/footable-v2/js/footable.filter.js', ['version' => 'auto']);";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "JHtml::_('script', 'media/com_"
. $this->componentCodeName
. "/footable-v2/js/footable.paginate.js', ['version' => 'auto']);";
if ($init)
{
- $foo .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . PHP_EOL . Indent::_(2)
. '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('
. "'.footable'" . ').footable(); }); jQuery('
. "'.nav-tabs'" . ').on(' . "'click'" . ', ' . "'li'"
. ', function() { setTimeout(tableFix, 10); }); }); function tableFix() { jQuery('
. "'.footable'" . ').trigger(' . "'footable_resize'"
. '); }";';
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "\$this->document->addScriptDeclaration(\$footable);"
. PHP_EOL;
}
@@ -14164,27 +14032,27 @@ class Interpretation extends Fields
elseif (3 == $this->footableVersion) // loading version 3
{
- $foo = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $foo = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Add the CSS for Footable";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "\$this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "JHtml::_('stylesheet', 'media/com_"
. $this->componentCodeName
. "/footable-v3/css/footable.standalone.min.css', ['version' => 'auto']);";
- $foo .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $foo .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Add the JavaScript for Footable (adding all functions)";
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "JHtml::_('script', 'media/com_"
. $this->componentCodeName
. "/footable-v3/js/footable.min.js', ['version' => 'auto']);";
if ($init)
{
- $foo .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . PHP_EOL . Indent::_(2)
. '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('
. "'.footable'" . ').footable();});});";';
- $foo .= PHP_EOL . $this->_t(2)
+ $foo .= PHP_EOL . Indent::_(2)
. "\$this->document->addScriptDeclaration(\$footable);"
. PHP_EOL;
}
@@ -14212,8 +14080,7 @@ class Interpretation extends Fields
))
{
// component helper name
- $Helper = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper';
+ $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
// make sure the custom links are only added once
$firstTimeBeingAdded = true;
// setup correct core target
@@ -14228,16 +14095,16 @@ class Interpretation extends Fields
// add the default
$body = PHP_EOL . "";
$body .= PHP_EOL . " \$item): ?>";
- $body .= PHP_EOL . $this->_t(1) . "_t(2)
+ $body .= PHP_EOL . Indent::_(1) . "authorise('core.manage', 'com_checkin') || \$item->checked_out == \$user->id || \$item->checked_out == 0;";
- $body .= PHP_EOL . $this->_t(2)
+ $body .= PHP_EOL . Indent::_(2)
. "\$userChkOut = JFactory::getUser(\$item->checked_out);";
- $body .= PHP_EOL . $this->_t(2) . "\$canDo = " . $Helper
+ $body .= PHP_EOL . Indent::_(2) . "\$canDo = " . $Helper
. "::getActions('" . $nameSingleCode . "',\$item,'"
. $nameListCode . "');";
- $body .= PHP_EOL . $this->_t(1) . "?>";
- $body .= PHP_EOL . $this->_t(1) . '';
+ $body .= PHP_EOL . Indent::_(1) . "?>";
+ $body .= PHP_EOL . Indent::_(1) . ' ';
// check if this view has fields that should not be escaped
$doNotEscape = false;
if (isset($this->doNotEscape[$nameListCode]))
@@ -14272,10 +14139,10 @@ class Interpretation extends Fields
$firstTimeBeingAdded = false;
}
// add row to body
- $body .= PHP_EOL . $this->_t(2) . "";
+ $body .= PHP_EOL . Indent::_(2) . " ";
$body .= $itemRow;
$body .= $customAdminViewButtons;
- $body .= PHP_EOL . $this->_t(2) . " ";
+ $body .= PHP_EOL . Indent::_(2) . "";
// increment counter
$counter++;
}
@@ -14288,95 +14155,95 @@ class Interpretation extends Fields
{
$counter++;
// add the defaults
- $body .= PHP_EOL . $this->_t(2)
+ $body .= PHP_EOL . Indent::_(2)
. "published == 1): ?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4)
+ $body .= PHP_EOL . Indent::_(4)
. 'langPrefix . "_PUBLISHED'"
. '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_PUBLISHED'" . '); ?>';
- $body .= PHP_EOL . $this->_t(4) . ' ';
- $body .= PHP_EOL . $this->_t(3) . ' ';
+ $body .= PHP_EOL . Indent::_(4) . '';
+ $body .= PHP_EOL . Indent::_(3) . '';
- $body .= PHP_EOL . $this->_t(2)
+ $body .= PHP_EOL . Indent::_(2)
. "published == 0): ?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4)
+ $body .= PHP_EOL . Indent::_(4)
. 'langPrefix . "_INACTIVE'"
. '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_INACTIVE'" . '); ?>';
- $body .= PHP_EOL . $this->_t(4) . ' ';
- $body .= PHP_EOL . $this->_t(3) . ' ';
+ $body .= PHP_EOL . Indent::_(4) . '';
+ $body .= PHP_EOL . Indent::_(3) . '';
- $body .= PHP_EOL . $this->_t(2)
+ $body .= PHP_EOL . Indent::_(2)
. "published == 2): ?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4)
+ $body .= PHP_EOL . Indent::_(4)
. 'langPrefix . "_ARCHIVED'"
. '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_ARCHIVED'" . '); ?>';
- $body .= PHP_EOL . $this->_t(4) . ' ';
- $body .= PHP_EOL . $this->_t(3) . ' ';
+ $body .= PHP_EOL . Indent::_(4) . '';
+ $body .= PHP_EOL . Indent::_(3) . '';
- $body .= PHP_EOL . $this->_t(2)
+ $body .= PHP_EOL . Indent::_(2)
. "published == -2): ?>";
- $body .= PHP_EOL . $this->_t(3) . '';
- $body .= PHP_EOL . $this->_t(4)
+ $body .= PHP_EOL . Indent::_(4)
. 'langPrefix . "_TRASHED'"
. '); ?>">';
- $body .= PHP_EOL . $this->_t(5) . 'langPrefix . "_TRASHED'" . '); ?>';
- $body .= PHP_EOL . $this->_t(4) . ' ';
- $body .= PHP_EOL . $this->_t(3) . ' ';
- $body .= PHP_EOL . $this->_t(2) . '';
+ $body .= PHP_EOL . Indent::_(4) . '';
+ $body .= PHP_EOL . Indent::_(3) . '';
+ $body .= PHP_EOL . Indent::_(2) . '';
}
// add the defaults
if (!isset($this->fieldsNames[$nameSingleCode]['id']))
{
$counter++;
- $body .= PHP_EOL . $this->_t(2)
+ $body .= PHP_EOL . Indent::_(2)
. '';
- $body .= PHP_EOL . $this->_t(3) . "id; ?>";
- $body .= PHP_EOL . $this->_t(2) . " ";
+ $body .= PHP_EOL . Indent::_(3) . "id; ?>";
+ $body .= PHP_EOL . Indent::_(2) . "";
}
- $body .= PHP_EOL . $this->_t(1) . " ";
+ $body .= PHP_EOL . Indent::_(1) . "";
$body .= PHP_EOL . "";
$body .= PHP_EOL . " ";
if (2 == $this->footableVersion)
{
$body .= PHP_EOL . '';
- $body .= PHP_EOL . $this->_t(1) . '';
- $body .= PHP_EOL . $this->_t(2) . '';
- $body .= PHP_EOL . $this->_t(3)
+ $body .= PHP_EOL . Indent::_(3)
. '';
- $body .= PHP_EOL . $this->_t(2) . ' ';
- $body .= PHP_EOL . $this->_t(1) . ' ';
+ $body .= PHP_EOL . Indent::_(2) . '';
+ $body .= PHP_EOL . Indent::_(1) . '';
$body .= PHP_EOL . ' ';
}
$body .= PHP_EOL . '';
$body .= PHP_EOL . '';
- $body .= PHP_EOL . $this->_t(1)
+ $body .= PHP_EOL . Indent::_(1)
. '';
- $body .= PHP_EOL . $this->_t(2) . '';
- $body .= PHP_EOL . $this->_t(1) . '
';
+ $body .= PHP_EOL . Indent::_(1) . ' ';
$body .= PHP_EOL . '';
// return the build
@@ -14406,8 +14273,7 @@ class Interpretation extends Fields
))
{
// component helper name
- $Helper = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper';
+ $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
$head = '';
// only add new button if set
if ($addNewButon > 0)
@@ -14444,13 +14310,13 @@ class Interpretation extends Fields
$tabB = "";
if ($addNewButon == 2)
{
- $head .= PHP_EOL . $this->_t(1) . '';
- $tabB = $this->_t(1);
+ $head .= PHP_EOL . Indent::_(1) . '
';
+ $tabB = Indent::_(1);
}
// add the new buttons
if ($addNewButon == 1 || $addNewButon == 2)
{
- $head .= PHP_EOL . $tabB . $this->_t(1)
+ $head .= PHP_EOL . $tabB . Indent::_(1)
. '
langPrefix . "_NEW'"
. '); ?>';
@@ -14458,7 +14324,7 @@ class Interpretation extends Fields
// add the close and new button
if ($addNewButon == 2 || $addNewButon == 3)
{
- $head .= PHP_EOL . $tabB . $this->_t(1)
+ $head .= PHP_EOL . $tabB . Indent::_(1)
. '
_t(1) . '';
+ $head .= PHP_EOL . Indent::_(1) . '
';
}
else
{
@@ -14503,10 +14369,10 @@ class Interpretation extends Fields
// make sure only first link is used as togeler
$firstLink = true;
// add to lang array
- $this->setLangContent($this->lang, $statusLangName, 'Status');
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $statusLangName, 'Status');
// add to lang array
- $this->setLangContent($this->lang, $idLangName, 'Id');
- $head .= PHP_EOL . $this->_t(1) . "";
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $idLangName, 'Id');
+ $head .= PHP_EOL . Indent::_(1) . " ";
// set controller for data hiding options
$controller = 1;
// build the dynamic fields
@@ -14546,11 +14412,11 @@ class Interpretation extends Fields
? ' data-toggle="true"' : '';
$firstLink = false;
}
- $head .= PHP_EOL . $this->_t(2) . "";
- $head .= PHP_EOL . $this->_t(3) . "";
- $head .= PHP_EOL . $this->_t(2) . " ";
+ $head .= PHP_EOL . Indent::_(2) . "";
$controller++;
}
}
@@ -14560,11 +14426,11 @@ class Interpretation extends Fields
// add the defaults
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
{
- $head .= PHP_EOL . $this->_t(2) . '';
- $head .= PHP_EOL . $this->_t(3) . "";
- $head .= PHP_EOL . $this->_t(2) . " ";
+ $head .= PHP_EOL . Indent::_(2) . "";
}
// add the defaults
@@ -14573,15 +14439,15 @@ class Interpretation extends Fields
$data_type = (2 == $this->footableVersion)
? 'data-type="numeric"'
: 'data-type="number"';
- $head .= PHP_EOL . $this->_t(2) . '';
- $head .= PHP_EOL . $this->_t(3) . "";
- $head .= PHP_EOL . $this->_t(2) . " ";
+ $head .= PHP_EOL . Indent::_(2) . "";
}
- $head .= PHP_EOL . $this->_t(1) . " ";
+ $head .= PHP_EOL . Indent::_(1) . "";
$head .= PHP_EOL . "";
return $head;
@@ -14619,44 +14485,44 @@ class Interpretation extends Fields
{
$addCategory = false;
}
- $query = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $query .= PHP_EOL . $this->_t(1) . " * Method to get list data.";
- $query .= PHP_EOL . $this->_t(1) . " *";
- $query .= PHP_EOL . $this->_t(1)
+ $query = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $query .= PHP_EOL . Indent::_(1) . " * Method to get list data.";
+ $query .= PHP_EOL . Indent::_(1) . " *";
+ $query .= PHP_EOL . Indent::_(1)
. " * @return mixed An array of data items on success, false on failure.";
- $query .= PHP_EOL . $this->_t(1) . " */";
- $query .= PHP_EOL . $this->_t(1) . "public function get" . $functionName
+ $query .= PHP_EOL . Indent::_(1) . " */";
+ $query .= PHP_EOL . Indent::_(1) . "public function get" . $functionName
. "()";
- $query .= PHP_EOL . $this->_t(1) . "{";
+ $query .= PHP_EOL . Indent::_(1) . "{";
// setup the query
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get the user object.";
- $query .= PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();";
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(2) . "\$user = JFactory::getUser();";
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Create a new query object.";
- $query .= PHP_EOL . $this->_t(2) . "\$db = JFactory::getDBO();";
- $query .= PHP_EOL . $this->_t(2) . "\$query = \$db->getQuery(true);";
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(2) . "\$db = JFactory::getDBO();";
+ $query .= PHP_EOL . Indent::_(2) . "\$query = \$db->getQuery(true);";
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Select some fields";
- $query .= PHP_EOL . $this->_t(2) . "\$query->select('a.*');";
+ $query .= PHP_EOL . Indent::_(2) . "\$query->select('a.*');";
// add the category
if ($addCategory)
{
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->select(\$db->quoteName('c.title','category_title'));";
}
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " From the " . $this->componentCodeName . "_"
. $nameSingleCode
. " table";
- $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__"
+ $query .= PHP_EOL . Indent::_(2) . "\$query->from(\$db->quoteName('#__"
. $this->componentCodeName . "_" . $nameSingleCode . "', 'a'));";
// add the category
if ($addCategory)
{
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->join('LEFT', \$db->quoteName('#__categories', 'c') . ' ON (' . \$db->quoteName('a."
. $categoryCodeName
. "') . ' = ' . \$db->quoteName('c.id') . ')');";
@@ -14678,28 +14544,28 @@ class Interpretation extends Fields
&& strpos($parentKey, '-A>') === false
&& strpos($parentKey, '-OR>') === false)
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filter by " . $globalKey . " global.";
- $query .= PHP_EOL . $this->_t(2) . "\$" . $globalKey . " = \$this->"
+ $query .= PHP_EOL . Indent::_(2) . "\$" . $globalKey . " = \$this->"
. $globalKey . ";";
- $query .= PHP_EOL . $this->_t(2) . "if (is_numeric(\$" . $globalKey
+ $query .= PHP_EOL . Indent::_(2) . "if (is_numeric(\$" . $globalKey
. " ))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "\$query->where('a." . $key
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "\$query->where('a." . $key
. " = ' . (int) \$" . $globalKey . " );";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "elseif (is_string(\$"
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "elseif (is_string(\$"
. $globalKey . "))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "\$query->where('a." . $key
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "\$query->where('a." . $key
. " = ' . \$db->quote(\$" . $globalKey . "));";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "else";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "\$query->where('a." . $key
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "else";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "\$query->where('a." . $key
. " = -5');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
elseif (strpos($parentKey, '-OR>') !== false
|| strpos($key, '-OR>') !== false)
@@ -14730,30 +14596,30 @@ class Interpretation extends Fields
$ORquery['s'][] = "a." . $ORkey . " = ' . \$db->quote(\$"
. $_globalKey . ")";
}
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Filter by " . $_globalKey
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Filter by " . $_globalKey
. " global.";
- $query .= PHP_EOL . $this->_t(2) . "\$" . $_globalKey
+ $query .= PHP_EOL . Indent::_(2) . "\$" . $_globalKey
. " = \$this->" . $_globalKey . ";";
- $query .= PHP_EOL . $this->_t(2) . "if (is_numeric(\$"
+ $query .= PHP_EOL . Indent::_(2) . "if (is_numeric(\$"
. $_globalKey . " ))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "\$query->where('" . implode(
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "\$query->where('" . implode(
" . ' OR ", $ORquery['i']
) . ", ' OR');";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "elseif (is_string(\$"
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "elseif (is_string(\$"
. $_globalKey . "))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "\$query->where('" . implode(
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "\$query->where('" . implode(
" . ' OR ", $ORquery['s']
) . ", ' OR');";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "else";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "\$query->where('a." . $ORkey
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "else";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "\$query->where('a." . $ORkey
. " = -5');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
}
if (isset($this->accessBuilder[$nameSingleCode])
@@ -14761,58 +14627,57 @@ class Interpretation extends Fields
$this->accessBuilder[$nameSingleCode]
))
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Join over the asset groups.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->select('ag.title AS access_level');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');";
// check if the access field was over ridden
if (!isset($this->fieldsNames[$nameSingleCode]['access']))
{
// component helper name
- $Helper = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper';
+ $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
// load the access filter query code
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " Filter by access level.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$_access = \$this->getState('filter.access');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "if (\$_access && is_numeric(\$_access))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a.access = ' . (int) \$_access);";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "elseif ("
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "elseif ("
. $Helper . "::checkArray(\$_access))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__)
. " Secure the array for the query";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$_access = ArrayHelper::toInteger(\$_access);";
- $query .= PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " Filter by the Access Array.";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " Filter by the Access Array.";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a.access IN (' . implode(',', \$_access) . ')');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
// TODO the following will fight against the above access filter
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Implement View Level Access";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "if (!\$user->authorise('core.options', 'com_"
. $this->componentCodeName . "'))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$groups = implode(',', \$user->getAuthorisedViewLevels());";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a.access IN (' . \$groups . ')');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
// add dynamic ordering (Linked view)
if (isset($this->viewsDefaultOrdering[$nameListCode])
@@ -14831,11 +14696,11 @@ class Interpretation extends Fields
)) !== false)
{
// default ordering is by publish and ordering
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Order the results by ordering";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->order('"
. $order_field_name . " " . $order_field['direction']
. "');";
@@ -14845,33 +14710,33 @@ class Interpretation extends Fields
else
{
// default ordering is by publish and ordering
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Order the results by ordering";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->order('a.published ASC');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->order('a.ordering ASC');";
}
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Load the items";
- $query .= PHP_EOL . $this->_t(2) . "\$db->setQuery(\$query);";
- $query .= PHP_EOL . $this->_t(2) . "\$db->execute();";
- $query .= PHP_EOL . $this->_t(2) . "if (\$db->getNumRows())";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "\$items = \$db->loadObjectList();";
+ $query .= PHP_EOL . Indent::_(2) . "\$db->setQuery(\$query);";
+ $query .= PHP_EOL . Indent::_(2) . "\$db->execute();";
+ $query .= PHP_EOL . Indent::_(2) . "if (\$db->getNumRows())";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "\$items = \$db->loadObjectList();";
// add the fixing strings method
$query .= $this->setGetItemsMethodStringFix(
$nameSingleCode, $nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh],
- $this->_t(1)
+ $this->fileContentStatic[Placefix::_h('Component')],
+ Indent::_(1)
);
// add translations
$query .= $this->setSelectionTranslationFix(
$nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh],
- $this->_t(1)
+ $this->fileContentStatic[Placefix::_h('Component')],
+ Indent::_(1)
);
// filter by child repetable field values
if (StringHelper::check($globalKey) && $key
@@ -14881,44 +14746,41 @@ class Interpretation extends Fields
&& strpos($key, '-A>') === false)
{
list($field, $target) = explode('-R>', $key);
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filter by " . $globalKey . " in this Repetable Field";
- $query .= PHP_EOL . $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$items) && isset(\$this->"
+ $query .= PHP_EOL . Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$items) && isset(\$this->"
. $globalKey . "))";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "foreach (\$items as \$nr => &\$item)";
- $query .= PHP_EOL . $this->_t(4) . "{";
- $query .= PHP_EOL . $this->_t(5) . "if (isset(\$item->" . $field
- . ") && " . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkJson(\$item->" . $field . "))";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6)
+ $query .= PHP_EOL . Indent::_(4) . "{";
+ $query .= PHP_EOL . Indent::_(5) . "if (isset(\$item->" . $field
+ . ") && " . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkJson(\$item->" . $field . "))";
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6)
. "\$tmpArray = json_decode(\$item->" . $field . ",true);";
- $query .= PHP_EOL . $this->_t(6) . "if (!isset(\$tmpArray['"
- . $target . "']) || !" . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh] . "Helper::checkArray(\$tmpArray['"
+ $query .= PHP_EOL . Indent::_(6) . "if (!isset(\$tmpArray['"
+ . $target . "']) || !" . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$tmpArray['"
. $target . "']) || !in_array(\$this->" . $globalKey
. ", \$tmpArray['" . $target . "']))";
- $query .= PHP_EOL . $this->_t(6) . "{";
- $query .= PHP_EOL . $this->_t(7) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(7) . "continue;";
- $query .= PHP_EOL . $this->_t(6) . "}";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(5) . "else";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(6) . "continue;";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(4) . "}";
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(3) . "else";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4) . "return false;";
- $query .= PHP_EOL . $this->_t(3) . "}";
+ $query .= PHP_EOL . Indent::_(6) . "{";
+ $query .= PHP_EOL . Indent::_(7) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(7) . "continue;";
+ $query .= PHP_EOL . Indent::_(6) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "else";
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(6) . "continue;";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(4) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "else";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4) . "return false;";
+ $query .= PHP_EOL . Indent::_(3) . "}";
}
// filter by child array field values
if (StringHelper::check($globalKey) && $key
@@ -14927,71 +14789,66 @@ class Interpretation extends Fields
) === false
&& strpos($key, '-A>') !== false)
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filter by " . $globalKey . " Array Field";
- $query .= PHP_EOL . $this->_t(3) . "\$" . $globalKey . " = \$this->"
+ $query .= PHP_EOL . Indent::_(3) . "\$" . $globalKey . " = \$this->"
. $globalKey . ";";
- $query .= PHP_EOL . $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$items) && \$" . $globalKey
+ $query .= PHP_EOL . Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$items) && \$" . $globalKey
. ")";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "foreach (\$items as \$nr => &\$item)";
- $query .= PHP_EOL . $this->_t(4) . "{";
+ $query .= PHP_EOL . Indent::_(4) . "{";
list($bin, $target) = explode('-A>', $key);
if (StringHelper::check($target))
{
- $query .= PHP_EOL . $this->_t(5) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkJson(\$item->" . $target
+ $query .= PHP_EOL . Indent::_(5) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkJson(\$item->" . $target
. "))";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "\$item->" . $target
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "\$item->" . $target
. " = json_decode(\$item->" . $target . ", true);";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(5) . "elseif (!isset(\$item->"
- . $target . ") || !" . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh] . "Helper::checkArray(\$item->"
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "elseif (!isset(\$item->"
+ . $target . ") || !" . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$item->"
. $target . "))";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(6) . "continue;";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(5) . "if (!in_array(\$"
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(6) . "continue;";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "if (!in_array(\$"
. $globalKey . ",\$item->" . $target . "))";
}
else
{
- $query .= PHP_EOL . $this->_t(5) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkJson(\$item->" . $_key . "))";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "\$item->" . $_key
+ $query .= PHP_EOL . Indent::_(5) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkJson(\$item->" . $_key . "))";
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "\$item->" . $_key
. " = json_decode(\$item->" . $_key . ", true);";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(5) . "elseif (!isset(\$item->"
- . $_key . ") || !" . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh] . "Helper::checkArray(\$item->"
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "elseif (!isset(\$item->"
+ . $_key . ") || !" . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$item->"
. $_key . "))";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(6) . "continue;";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(5) . "if (!in_array(\$"
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(6) . "continue;";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "if (!in_array(\$"
. $globalKey . ",\$item->" . $_key . "))";
}
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(6) . "continue;";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(4) . "}";
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(3) . "else";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4) . "return false;";
- $query .= PHP_EOL . $this->_t(3) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(6) . "continue;";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(4) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "else";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4) . "return false;";
+ $query .= PHP_EOL . Indent::_(3) . "}";
}
// filter by parent repetable field values
if (StringHelper::check($globalKey) && $key
@@ -15001,45 +14858,42 @@ class Interpretation extends Fields
&& strpos($parentKey, '-A>') === false)
{
list($bin, $target) = explode('-R>', $parentKey);
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filter by " . $_key . " Repetable Field";
- $query .= PHP_EOL . $this->_t(3) . "\$" . $globalKey
+ $query .= PHP_EOL . Indent::_(3) . "\$" . $globalKey
. " = json_decode(\$this->" . $globalKey . ",true);";
- $query .= PHP_EOL . $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$items) && isset(\$"
- . $globalKey . ") && " . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh] . "Helper::checkArray(\$"
+ $query .= PHP_EOL . Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$items) && isset(\$"
+ . $globalKey . ") && " . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$"
. $globalKey . "))";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "foreach (\$items as \$nr => &\$item)";
- $query .= PHP_EOL . $this->_t(4) . "{";
- $query .= PHP_EOL . $this->_t(5) . "if (\$item->" . $_key
+ $query .= PHP_EOL . Indent::_(4) . "{";
+ $query .= PHP_EOL . Indent::_(5) . "if (\$item->" . $_key
. " && isset(\$" . $globalKey . "['" . $target . "']) && "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$" . $globalKey . "['"
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$" . $globalKey . "['"
. $target . "']))";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "if (!in_array(\$item->" . $_key
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "if (!in_array(\$item->" . $_key
. ",\$" . $globalKey . "['" . $target . "']))";
- $query .= PHP_EOL . $this->_t(6) . "{";
- $query .= PHP_EOL . $this->_t(7) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(7) . "continue;";
- $query .= PHP_EOL . $this->_t(6) . "}";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(5) . "else";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(6) . "continue;";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(4) . "}";
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(3) . "else";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4) . "return false;";
- $query .= PHP_EOL . $this->_t(3) . "}";
+ $query .= PHP_EOL . Indent::_(6) . "{";
+ $query .= PHP_EOL . Indent::_(7) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(7) . "continue;";
+ $query .= PHP_EOL . Indent::_(6) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "else";
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(6) . "continue;";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(4) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "else";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4) . "return false;";
+ $query .= PHP_EOL . Indent::_(3) . "}";
}
// filter by parent array field values
if (StringHelper::check($globalKey) && $key
@@ -15048,69 +14902,66 @@ class Interpretation extends Fields
) === false
&& strpos($parentKey, '-A>') !== false)
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filter by " . $globalKey . " Array Field";
- $query .= PHP_EOL . $this->_t(3) . "\$" . $globalKey . " = \$this->"
+ $query .= PHP_EOL . Indent::_(3) . "\$" . $globalKey . " = \$this->"
. $globalKey . ";";
- $query .= PHP_EOL . $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$items) && "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$" . $globalKey . "))";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$items) && "
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$" . $globalKey . "))";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "foreach (\$items as \$nr => &\$item)";
- $query .= PHP_EOL . $this->_t(4) . "{";
+ $query .= PHP_EOL . Indent::_(4) . "{";
list($bin, $target) = explode('-A>', $parentKey);
if (StringHelper::check($target))
{
- $query .= PHP_EOL . $this->_t(5) . "if (\$item->" . $_key
- . " && " . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$" . $globalKey . "['"
+ $query .= PHP_EOL . Indent::_(5) . "if (\$item->" . $_key
+ . " && " . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$" . $globalKey . "['"
. $target . "']))";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "if (!in_array(\$item->"
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "if (!in_array(\$item->"
. $_key . ",\$" . $globalKey . "['" . $target . "']))";
}
else
{
- $query .= PHP_EOL . $this->_t(5) . "if (\$item->" . $_key . ")";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "if (!in_array(\$item->"
+ $query .= PHP_EOL . Indent::_(5) . "if (\$item->" . $_key . ")";
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "if (!in_array(\$item->"
. $_key . ",\$" . $globalKey . "))";
}
- $query .= PHP_EOL . $this->_t(6) . "{";
- $query .= PHP_EOL . $this->_t(7) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(7) . "continue;";
- $query .= PHP_EOL . $this->_t(6) . "}";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(5) . "else";
- $query .= PHP_EOL . $this->_t(5) . "{";
- $query .= PHP_EOL . $this->_t(6) . "unset(\$items[\$nr]);";
- $query .= PHP_EOL . $this->_t(6) . "continue;";
- $query .= PHP_EOL . $this->_t(5) . "}";
- $query .= PHP_EOL . $this->_t(4) . "}";
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(3) . "else";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4) . "return false;";
- $query .= PHP_EOL . $this->_t(3) . "}";
+ $query .= PHP_EOL . Indent::_(6) . "{";
+ $query .= PHP_EOL . Indent::_(7) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(7) . "continue;";
+ $query .= PHP_EOL . Indent::_(6) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(5) . "else";
+ $query .= PHP_EOL . Indent::_(5) . "{";
+ $query .= PHP_EOL . Indent::_(6) . "unset(\$items[\$nr]);";
+ $query .= PHP_EOL . Indent::_(6) . "continue;";
+ $query .= PHP_EOL . Indent::_(5) . "}";
+ $query .= PHP_EOL . Indent::_(4) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "else";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4) . "return false;";
+ $query .= PHP_EOL . Indent::_(3) . "}";
}
// add custom php to getitems method after all
$query .= $this->getCustomScriptBuilder(
'php_getitems_after_all', $nameSingleCode,
- PHP_EOL . PHP_EOL . $this->_t(1)
+ PHP_EOL . PHP_EOL . Indent::_(1)
);
- $query .= PHP_EOL . $this->_t(3) . "return \$items;";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "return false;";
- $query .= PHP_EOL . $this->_t(1) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "return \$items;";
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "return false;";
+ $query .= PHP_EOL . Indent::_(1) . "}";
// SELECTIONTRANSLATIONFIXFUNC<<>>
$query .= $this->setSelectionTranslationFixFunc(
$nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('Component')]
);
// fixe mothod name clash
@@ -15143,24 +14994,24 @@ class Interpretation extends Fields
{
// Load to lang
$keyLang = $this->langPrefix . '_' . $custom_button['NAME'];
- $this->setLangContent(
- $this->lang, $keyLang, StringHelper::safe(
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $keyLang, StringHelper::safe(
$custom_button['name'], 'Ww'
)
);
// add cpanel button
- $buttons[] = $this->_t(2) . "if (\$this->canDo->get('"
+ $buttons[] = Indent::_(2) . "if (\$this->canDo->get('"
. $custom_button['link'] . ".access'))";
- $buttons[] = $this->_t(2) . "{";
- $buttons[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $buttons[] = Indent::_(2) . "{";
+ $buttons[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " add " . $custom_button['name'] . " button.";
- $buttons[] = $this->_t(3) . "JToolBarHelper::custom('"
+ $buttons[] = Indent::_(3) . "JToolBarHelper::custom('"
. $nameListCode . ".redirectTo"
. StringHelper::safe(
$custom_button['link'], 'F'
) . "', '" . $custom_button['icon'] . "', '', '" . $keyLang
. "', true);";
- $buttons[] = $this->_t(2) . "}";
+ $buttons[] = Indent::_(2) . "}";
}
if (ArrayHelper::check($buttons))
{
@@ -15191,59 +15042,59 @@ class Interpretation extends Fields
)
{
// add the custom redirect method
- $method[] = PHP_EOL . PHP_EOL . $this->_t(1)
+ $method[] = PHP_EOL . PHP_EOL . Indent::_(1)
. "public function redirectTo"
. StringHelper::safe(
$custom_button['link'], 'F'
) . "()";
- $method[] = $this->_t(1) . "{";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(1) . "{";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check for request forgeries";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "JSession::checkToken() or die(JText:"
. ":_('JINVALID_TOKEN'));";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if export is allowed for this user.";
- $method[] = $this->_t(2) . "\$user = JFactory::getUser();";
- $method[] = $this->_t(2) . "if (\$user->authorise('"
+ $method[] = Indent::_(2) . "\$user = JFactory::getUser();";
+ $method[] = Indent::_(2) . "if (\$user->authorise('"
. $custom_button['link'] . ".access', 'com_"
. $this->componentCodeName . "'))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Get the input";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$input = JFactory::getApplication()->input;";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$pks = \$input->post->get('cid', array(), 'array');";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Sanitize the input";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$pks = ArrayHelper::toInteger(\$pks);";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " convert to string";
- $method[] = $this->_t(3) . "\$ids = implode('_', \$pks);";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3) . "\$ids = implode('_', \$pks);";
+ $method[] = Indent::_(3)
. "\$this->setRedirect(JRoute::_('index.php?option=com_"
. $this->componentCodeName . "&view="
. $custom_button['link'] . "&cid='.\$ids, false));";
- $method[] = $this->_t(3) . "return;";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "return;";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Redirect to the list screen with error.";
- $method[] = $this->_t(2) . "\$message = JText:" . ":_('"
+ $method[] = Indent::_(2) . "\$message = JText:" . ":_('"
. $this->langPrefix . "_ACCESS_TO_" . $custom_button['NAME']
. "_FAILED');";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "\$this->setRedirect(JRoute::_('index.php?option=com_"
. $this->componentCodeName . "&view=" . $nameListCode
. "', false), \$message, 'error');";
- $method[] = $this->_t(2) . "return;";
- $method[] = $this->_t(1) . "}";
+ $method[] = Indent::_(2) . "return;";
+ $method[] = Indent::_(1) . "}";
// add to lang array
$lankey = $this->langPrefix . "_ACCESS_TO_"
. $custom_button['NAME'] . "_FAILED";
- $this->setLangContent(
- $this->lang, $lankey,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lankey,
'Access to ' . $custom_button['link'] . ' was denied.'
);
}
@@ -15279,109 +15130,107 @@ class Interpretation extends Fields
&& $this->eximportView[$nameListCode])
|| !$isExport)
{
- $query = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $query .= PHP_EOL . $this->_t(1) . " * " . $config['docDesc'];
- $query .= PHP_EOL . $this->_t(1) . " *";
- $query .= PHP_EOL . $this->_t(1)
+ $query = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $query .= PHP_EOL . Indent::_(1) . " * " . $config['docDesc'];
+ $query .= PHP_EOL . Indent::_(1) . " *";
+ $query .= PHP_EOL . Indent::_(1)
. " * @param array \$pks The ids of the items to get";
- $query .= PHP_EOL . $this->_t(1)
+ $query .= PHP_EOL . Indent::_(1)
. " * @param JUser \$user The user making the request";
- $query .= PHP_EOL . $this->_t(1) . " *";
- $query .= PHP_EOL . $this->_t(1)
+ $query .= PHP_EOL . Indent::_(1) . " *";
+ $query .= PHP_EOL . Indent::_(1)
. " * @return mixed An array of data items on success, false on failure.";
- $query .= PHP_EOL . $this->_t(1) . " */";
- $query .= PHP_EOL . $this->_t(1) . "public function "
+ $query .= PHP_EOL . Indent::_(1) . " */";
+ $query .= PHP_EOL . Indent::_(1) . "public function "
. $config['functionName'] . "(\$pks, \$user = null)";
- $query .= PHP_EOL . $this->_t(1) . "{";
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(1) . "{";
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " setup the query";
- $query .= PHP_EOL . $this->_t(2) . "if ((\$pks_size = "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ $query .= PHP_EOL . Indent::_(2) . "if ((\$pks_size = "
+ . $this->fileContentStatic[Placefix::_h('Component')]
. "Helper::checkArray(\$pks)) !== false || 'bulk' === \$pks)";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set a value to know this is " . $config['type']
. " method. (USE IN CUSTOM CODE TO ALTER OUTCOME)";
- $query .= PHP_EOL . $this->_t(3) . "\$_" . $config['type']
+ $query .= PHP_EOL . Indent::_(3) . "\$_" . $config['type']
. " = true;";
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Get the user object if not set.";
- $query .= PHP_EOL . $this->_t(3) . "if (!isset(\$user) || !"
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkObject(\$user))";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4) . "\$user = JFactory::getUser();";
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(3) . "if (!isset(\$user) || !"
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkObject(\$user))";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4) . "\$user = JFactory::getUser();";
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Create a new query object.";
- $query .= PHP_EOL . $this->_t(3) . "\$db = JFactory::getDBO();";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3) . "\$db = JFactory::getDBO();";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query = \$db->getQuery(true);";
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Select some fields";
- $query .= PHP_EOL . $this->_t(3) . "\$query->select('a.*');";
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(3) . "\$query->select('a.*');";
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " From the " . $this->componentCodeName . "_"
. $nameSingleCode . " table";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->from(\$db->quoteName('#__"
. $this->componentCodeName . "_" . $nameSingleCode
. "', 'a'));";
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The bulk export path";
- $query .= PHP_EOL . $this->_t(3) . "if ('bulk' === \$pks)";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3) . "if ('bulk' === \$pks)";
+ $query .= PHP_EOL . Indent::_(3)
. "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(4)
. "\$query->where('a.id > 0');";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "}";
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " A large array of ID's will not work out well";
- $query .= PHP_EOL . $this->_t(3) . "elseif (\$pks_size > 500)";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3) . "elseif (\$pks_size > 500)";
+ $query .= PHP_EOL . Indent::_(3)
. "{";
- $query .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Use lowest ID";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(4)
. "\$query->where('a.id >= ' . (int) min(\$pks));";
- $query .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Use highest ID";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(4)
. "\$query->where('a.id <= ' . (int) max(\$pks));";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "}";
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The normal default path";
- $query .= PHP_EOL . $this->_t(3) . "else";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3) . "else";
+ $query .= PHP_EOL . Indent::_(3)
. "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(4)
. "\$query->where('a.id IN (' . implode(',',\$pks) . ')');";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "}";
// add custom filtering php
$query .= $this->getCustomScriptBuilder(
'php_getlistquery', $nameSingleCode,
- PHP_EOL . PHP_EOL . $this->_t(1)
+ PHP_EOL . PHP_EOL . Indent::_(1)
);
// first check if we export of text only is avalable
if ($this->exportTextOnly)
{
// add switch
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Get global switch to activate text only export";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$export_text_only = JComponentHelper::getParams('com_"
. $this->componentCodeName
. "')->get('export_text_only', 0);";
// first check if we have custom queries
$custom_query = $this->setCustomQuery(
- $nameListCode, $nameSingleCode, $this->_t(2), true
+ $nameListCode, $nameSingleCode, Indent::_(2), true
);
}
// if values were returned add the area
@@ -15390,14 +15239,14 @@ class Interpretation extends Fields
$custom_query
))
{
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Add these queries only if text only is required";
- $query .= PHP_EOL . $this->_t(3) . "if (\$export_text_only)";
- $query .= PHP_EOL . $this->_t(3) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "if (\$export_text_only)";
+ $query .= PHP_EOL . Indent::_(3) . "{";
// add the custom fields query
$query .= $custom_query;
- $query .= PHP_EOL . $this->_t(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
}
// add access levels if the view has access set
if (isset($this->accessBuilder[$nameSingleCode])
@@ -15405,18 +15254,18 @@ class Interpretation extends Fields
$this->accessBuilder[$nameSingleCode]
))
{
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Implement View Level Access";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "if (!\$user->authorise('core.options', 'com_"
. $this->componentCodeName . "'))";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "\$groups = implode(',', \$user->getAuthorisedViewLevels());";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(4)
. "\$query->where('a.access IN (' . \$groups . ')');";
- $query .= PHP_EOL . $this->_t(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
}
// add dynamic ordering (Exported data)
if (isset($this->viewsDefaultOrdering[$nameListCode])
@@ -15432,11 +15281,11 @@ class Interpretation extends Fields
$nameListCode, $order_field['field']
)) !== false)
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Order the results by ordering";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->order('"
. $order_field_name . " "
. $order_field['direction'] . "');";
@@ -15445,68 +15294,67 @@ class Interpretation extends Fields
}
else
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Order the results by ordering";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->order('a.ordering ASC');";
}
- $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Load the items";
- $query .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query);";
- $query .= PHP_EOL . $this->_t(3) . "\$db->execute();";
- $query .= PHP_EOL . $this->_t(3) . "if (\$db->getNumRows())";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "\$db->setQuery(\$query);";
+ $query .= PHP_EOL . Indent::_(3) . "\$db->execute();";
+ $query .= PHP_EOL . Indent::_(3) . "if (\$db->getNumRows())";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "\$items = \$db->loadObjectList();";
// set the string fixing code
$query .= $this->setGetItemsMethodStringFix(
$nameSingleCode, $nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh],
- $this->_t(2), $isExport, true
+ $this->fileContentStatic[Placefix::_h('Component')],
+ Indent::_(2), $isExport, true
);
// first check if we export of text only is avalable
if ($this->exportTextOnly)
{
$query_translations = $this->setSelectionTranslationFix(
$nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh], $this->_t(3)
+ $this->fileContentStatic[Placefix::_h('Component')], Indent::_(3)
);
}
// add translations
if (isset($query_translations)
&& StringHelper::check($query_translations))
{
- $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Add these translation only if text only is required";
- $query .= PHP_EOL . $this->_t(3) . "if (\$export_text_only)";
- $query .= PHP_EOL . $this->_t(3) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "if (\$export_text_only)";
+ $query .= PHP_EOL . Indent::_(3) . "{";
$query .= $query_translations;
- $query .= PHP_EOL . $this->_t(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
}
// add custom php to getItems method after all
$query .= $this->getCustomScriptBuilder(
'php_getitems_after_all', $nameSingleCode,
- PHP_EOL . PHP_EOL . $this->_t(2)
+ PHP_EOL . PHP_EOL . Indent::_(2)
);
// in privacy export we must return array of arrays
if ('privacy' === $config['type'])
{
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(4)
. "return json_decode(json_encode(\$items), true);";
}
else
{
- $query .= PHP_EOL . $this->_t(4) . "return \$items;";
+ $query .= PHP_EOL . Indent::_(4) . "return \$items;";
}
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "return false;";
- $query .= PHP_EOL . $this->_t(1) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "return false;";
+ $query .= PHP_EOL . Indent::_(1) . "}";
// get the header script
if ($isExport)
{
@@ -15517,7 +15365,7 @@ class Interpretation extends Fields
'php_import_headers', 'import_' . $nameListCode,
PHP_EOL . PHP_EOL, null, true,
// set a default script for those with no custom script
- PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
$header, $this->placeholders
)
);
@@ -15538,150 +15386,147 @@ class Interpretation extends Fields
$method = array();
// add the export method
- $method[] = PHP_EOL . PHP_EOL . $this->_t(1)
+ $method[] = PHP_EOL . PHP_EOL . Indent::_(1)
. "public function exportData()";
- $method[] = $this->_t(1) . "{";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(1) . "{";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check for request forgeries";
- $method[] = $this->_t(2) . "JSession::checkToken() or die(JText:"
+ $method[] = Indent::_(2) . "JSession::checkToken() or die(JText:"
. ":_('JINVALID_TOKEN'));";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if export is allowed for this user.";
- $method[] = $this->_t(2) . "\$user = JFactory::getUser();";
- $method[] = $this->_t(2) . "if (\$user->authorise('"
+ $method[] = Indent::_(2) . "\$user = JFactory::getUser();";
+ $method[] = Indent::_(2) . "if (\$user->authorise('"
. $nameSingleCode . ".export', 'com_"
. $this->componentCodeName
. "') && \$user->authorise('core.export', 'com_"
. $this->componentCodeName . "'))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Get the input";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$input = JFactory::getApplication()->input;";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$pks = \$input->post->get('cid', array(), 'array');";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Sanitize the input";
- $method[] = $this->_t(3) . "\$pks = ArrayHelper::toInteger(\$pks);";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "\$pks = ArrayHelper::toInteger(\$pks);";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Get the model";
- $method[] = $this->_t(3) . "\$model = \$this->getModel('"
+ $method[] = Indent::_(3) . "\$model = \$this->getModel('"
. StringHelper::safe($nameListCode, 'F')
. "');";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the data to export";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$data = \$model->getExportData(\$pks);";
- $method[] = $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkArray(\$data))";
- $method[] = $this->_t(3) . "{";
- $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkArray(\$data))";
+ $method[] = Indent::_(3) . "{";
+ $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " now set the data to the spreadsheet";
- $method[] = $this->_t(4) . "\$date = JFactory::getDate();";
- $method[] = $this->_t(4) . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh] . "Helper::xls(\$data,'"
+ $method[] = Indent::_(4) . "\$date = JFactory::getDate();";
+ $method[] = Indent::_(4) . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::xls(\$data,'"
. StringHelper::safe($nameListCode, 'F')
. "_'.\$date->format('jS_F_Y'),'"
. StringHelper::safe($nameListCode, 'Ww')
. " exported ('.\$date->format('jS F, Y').')','"
. StringHelper::safe($nameListCode, 'w')
. "');";
- $method[] = $this->_t(3) . "}";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "}";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Redirect to the list screen with error.";
- $method[] = $this->_t(2) . "\$message = JText:" . ":_('"
+ $method[] = Indent::_(2) . "\$message = JText:" . ":_('"
. $this->langPrefix . "_EXPORT_FAILED');";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "\$this->setRedirect(JRoute::_('index.php?option=com_"
. $this->componentCodeName . "&view=" . $nameListCode
. "', false), \$message, 'error');";
- $method[] = $this->_t(2) . "return;";
- $method[] = $this->_t(1) . "}";
+ $method[] = Indent::_(2) . "return;";
+ $method[] = Indent::_(1) . "}";
// add the import method
- $method[] = PHP_EOL . PHP_EOL . $this->_t(1)
+ $method[] = PHP_EOL . PHP_EOL . Indent::_(1)
. "public function importData()";
- $method[] = $this->_t(1) . "{";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(1) . "{";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check for request forgeries";
- $method[] = $this->_t(2) . "JSession::checkToken() or die(JText:"
+ $method[] = Indent::_(2) . "JSession::checkToken() or die(JText:"
. ":_('JINVALID_TOKEN'));";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if import is allowed for this user.";
- $method[] = $this->_t(2) . "\$user = JFactory::getUser();";
- $method[] = $this->_t(2) . "if (\$user->authorise('"
+ $method[] = Indent::_(2) . "\$user = JFactory::getUser();";
+ $method[] = Indent::_(2) . "if (\$user->authorise('"
. $nameSingleCode . ".import', 'com_"
. $this->componentCodeName
. "') && \$user->authorise('core.import', 'com_"
. $this->componentCodeName . "'))";
- $method[] = $this->_t(2) . "{";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(2) . "{";
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Get the import model";
- $method[] = $this->_t(3) . "\$model = \$this->getModel('"
+ $method[] = Indent::_(3) . "\$model = \$this->getModel('"
. StringHelper::safe($nameListCode, 'F')
. "');";
- $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the headers to import";
- $method[] = $this->_t(3)
+ $method[] = Indent::_(3)
. "\$headers = \$model->getExImPortHeaders();";
- $method[] = $this->_t(3) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkObject(\$headers))";
- $method[] = $this->_t(3) . "{";
- $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(3) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkObject(\$headers))";
+ $method[] = Indent::_(3) . "{";
+ $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Load headers to session.";
- $method[] = $this->_t(4) . "\$session = JFactory::getSession();";
- $method[] = $this->_t(4) . "\$headers = json_encode(\$headers);";
- $method[] = $this->_t(4) . "\$session->set('" . $nameSingleCode
+ $method[] = Indent::_(4) . "\$session = JFactory::getSession();";
+ $method[] = Indent::_(4) . "\$headers = json_encode(\$headers);";
+ $method[] = Indent::_(4) . "\$session->set('" . $nameSingleCode
. "_VDM_IMPORTHEADERS', \$headers);";
- $method[] = $this->_t(4) . "\$session->set('backto_VDM_IMPORT', '"
+ $method[] = Indent::_(4) . "\$session->set('backto_VDM_IMPORT', '"
. $nameListCode . "');";
- $method[] = $this->_t(4)
+ $method[] = Indent::_(4)
. "\$session->set('dataType_VDM_IMPORTINTO', '"
. $nameSingleCode . "');";
- $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Redirect to import view.";
// add to lang array
$selectImportFileNote = $this->langPrefix
. "_IMPORT_SELECT_FILE_FOR_"
. StringHelper::safe($nameListCode, 'U');
- $this->setLangContent(
- $this->lang, $selectImportFileNote,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $selectImportFileNote,
'Select the file to import data to ' . $nameListCode . '.'
);
- $method[] = $this->_t(4) . "\$message = JText:" . ":_('"
+ $method[] = Indent::_(4) . "\$message = JText:" . ":_('"
. $selectImportFileNote . "');";
// if this view has custom script it must have as custom import (model, veiw, controller)
if (isset($this->importCustomScripts[$nameListCode])
&& $this->importCustomScripts[$nameListCode])
{
- $method[] = $this->_t(4)
+ $method[] = Indent::_(4)
. "\$this->setRedirect(JRoute::_('index.php?option=com_"
. $this->componentCodeName . "&view=import_"
. $nameListCode . "', false), \$message);";
}
else
{
- $method[] = $this->_t(4)
+ $method[] = Indent::_(4)
. "\$this->setRedirect(JRoute::_('index.php?option=com_"
. $this->componentCodeName
. "&view=import', false), \$message);";
}
- $method[] = $this->_t(4) . "return;";
- $method[] = $this->_t(3) . "}";
- $method[] = $this->_t(2) . "}";
- $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $method[] = Indent::_(4) . "return;";
+ $method[] = Indent::_(3) . "}";
+ $method[] = Indent::_(2) . "}";
+ $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Redirect to the list screen with error.";
- $method[] = $this->_t(2) . "\$message = JText:" . ":_('"
+ $method[] = Indent::_(2) . "\$message = JText:" . ":_('"
. $this->langPrefix . "_IMPORT_FAILED');";
- $method[] = $this->_t(2)
+ $method[] = Indent::_(2)
. "\$this->setRedirect(JRoute::_('index.php?option=com_"
. $this->componentCodeName . "&view=" . $nameListCode
. "', false), \$message, 'error');";
- $method[] = $this->_t(2) . "return;";
- $method[] = $this->_t(1) . "}";
+ $method[] = Indent::_(2) . "return;";
+ $method[] = Indent::_(1) . "}";
return implode(PHP_EOL, $method);
}
@@ -15699,16 +15544,16 @@ class Interpretation extends Fields
$langExport = $this->langPrefix . '_'
. StringHelper::safe('Export Data', 'U');
// add to lang array
- $this->setLangContent($this->lang, $langExport, 'Export Data');
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langExport, 'Export Data');
$button = array();
- $button[] = PHP_EOL . PHP_EOL . $this->_t(3)
+ $button[] = PHP_EOL . PHP_EOL . Indent::_(3)
. "if (\$this->canDo->get('core.export') && \$this->canDo->get('"
. $nameSingleCode . ".export'))";
- $button[] = $this->_t(3) . "{";
- $button[] = $this->_t(4) . "JToolBarHelper::custom('"
+ $button[] = Indent::_(3) . "{";
+ $button[] = Indent::_(4) . "JToolBarHelper::custom('"
. $nameListCode . ".exportData', 'download', '', '"
. $langExport . "', true);";
- $button[] = $this->_t(3) . "}";
+ $button[] = Indent::_(3) . "}";
return implode(PHP_EOL, $button);
}
@@ -15726,17 +15571,17 @@ class Interpretation extends Fields
$langImport = $this->langPrefix . '_'
. StringHelper::safe('Import Data', 'U');
// add to lang array
- $this->setLangContent($this->lang, $langImport, 'Import Data');
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langImport, 'Import Data');
$button = array();
- $button[] = PHP_EOL . PHP_EOL . $this->_t(2)
+ $button[] = PHP_EOL . PHP_EOL . Indent::_(2)
. "if (\$this->canDo->get('core.import') && \$this->canDo->get('"
. $nameSingleCode . ".import'))";
- $button[] = $this->_t(2) . "{";
- $button[] = $this->_t(3) . "JToolBarHelper::custom('"
+ $button[] = Indent::_(2) . "{";
+ $button[] = Indent::_(3) . "JToolBarHelper::custom('"
. $nameListCode . ".importData', 'upload', '', '"
. $langImport
. "', false);";
- $button[] = $this->_t(2) . "}";
+ $button[] = Indent::_(2) . "}";
return implode(PHP_EOL, $button);
}
@@ -15751,46 +15596,40 @@ class Interpretation extends Fields
$this->buildDynamique($target, 'customimport');
// load the custom script to the files
// IMPORT_EXT_METHOD <<>>
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'IMPORT_EXT_METHOD' . $this->hhh]
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('IMPORT_EXT_METHOD')]
= $this->getCustomScriptBuilder(
'php_import_ext', 'import_' . $nameListCode, PHP_EOL, null,
true
);
// IMPORT_DISPLAY_METHOD_CUSTOM <<>>
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'IMPORT_DISPLAY_METHOD_CUSTOM' . $this->hhh]
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('IMPORT_DISPLAY_METHOD_CUSTOM')]
= $this->getCustomScriptBuilder(
'php_import_display', 'import_' . $nameListCode, PHP_EOL,
null,
true
);
// IMPORT_SETDATA_METHOD <<>>
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'IMPORT_SETDATA_METHOD' . $this->hhh]
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('IMPORT_SETDATA_METHOD')]
= $this->getCustomScriptBuilder(
'php_import_setdata', 'import_' . $nameListCode, PHP_EOL,
null,
true
);
// IMPORT_METHOD_CUSTOM <<>>
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'IMPORT_METHOD_CUSTOM' . $this->hhh]
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('IMPORT_METHOD_CUSTOM')]
= $this->getCustomScriptBuilder(
'php_import', 'import_' . $nameListCode, PHP_EOL, null,
true
);
// IMPORT_SAVE_METHOD <<>>
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'IMPORT_SAVE_METHOD' . $this->hhh]
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('IMPORT_SAVE_METHOD')]
= $this->getCustomScriptBuilder(
'php_import_save', 'import_' . $nameListCode, PHP_EOL,
null,
true
);
// IMPORT_DEFAULT_VIEW_CUSTOM <<>>
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'IMPORT_DEFAULT_VIEW_CUSTOM' . $this->hhh]
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('IMPORT_DEFAULT_VIEW_CUSTOM')]
= $this->getCustomScriptBuilder(
'html_import_view', 'import_' . $nameListCode, PHP_EOL,
null,
@@ -15798,30 +15637,18 @@ class Interpretation extends Fields
);
// insure we have the view placeholders setup
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'VIEW' . $this->hhh]
- = 'IMPORT_' . $this->placeholders[$this->hhh . 'VIEWS'
- . $this->hhh];
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'View' . $this->hhh]
- = 'Import_' . $this->placeholders[$this->hhh . 'views'
- . $this->hhh];
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'view' . $this->hhh]
- = 'import_' . $this->placeholders[$this->hhh . 'views'
- . $this->hhh];
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'VIEWS' . $this->hhh]
- = 'IMPORT_' . $this->placeholders[$this->hhh . 'VIEWS'
- . $this->hhh];
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'Views' . $this->hhh]
- = 'Import_' . $this->placeholders[$this->hhh . 'views'
- . $this->hhh];
- $this->fileContentDynamic['import_' . $nameListCode][$this->hhh
- . 'views' . $this->hhh]
- = 'import_' . $this->placeholders[$this->hhh . 'views'
- . $this->hhh];
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('VIEW')]
+ = 'IMPORT_' . CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')];
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('View')]
+ = 'Import_' . CFactory::_('Placeholder')->active[Placefix::_h('views')];
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('view')]
+ = 'import_' . CFactory::_('Placeholder')->active[Placefix::_h('views')];
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('VIEWS')]
+ = 'IMPORT_' . CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')];
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('Views')]
+ = 'Import_' . CFactory::_('Placeholder')->active[Placefix::_h('views')];
+ $this->fileContentDynamic['import_' . $nameListCode][Placefix::_h('views')]
+ = 'import_' . CFactory::_('Placeholder')->active[Placefix::_h('views')];
}
public function setListQuery(&$nameSingleCode, &$nameListCode)
@@ -15843,31 +15670,31 @@ class Interpretation extends Fields
$addCategoryFilter = 0;
}
// setup the query
- $query = "//" . $this->setLine(__LINE__) . " Get the user object.";
- $query .= PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();";
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $query = "//" . Line::_(__Line__, __Class__) . " Get the user object.";
+ $query .= PHP_EOL . Indent::_(2) . "\$user = JFactory::getUser();";
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Create a new query object.";
- $query .= PHP_EOL . $this->_t(2) . "\$db = JFactory::getDBO();";
- $query .= PHP_EOL . $this->_t(2) . "\$query = \$db->getQuery(true);";
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(2) . "\$db = JFactory::getDBO();";
+ $query .= PHP_EOL . Indent::_(2) . "\$query = \$db->getQuery(true);";
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Select some fields";
- $query .= PHP_EOL . $this->_t(2) . "\$query->select('a.*');";
+ $query .= PHP_EOL . Indent::_(2) . "\$query->select('a.*');";
// add the category
if ($addCategory)
{
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->select(\$db->quoteName('c.title','category_title'));";
}
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " From the " . $this->componentCodeName . "_item table";
- $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__"
+ $query .= PHP_EOL . Indent::_(2) . "\$query->from(\$db->quoteName('#__"
. $this->componentCodeName . "_" . $nameSingleCode . "', 'a'));";
// add the category
if ($addCategory)
{
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->join('LEFT', \$db->quoteName('#__categories', 'c') . ' ON (' . \$db->quoteName('a."
. $categoryCodeName
. "') . ' = ' . \$db->quoteName('c.id') . ')');";
@@ -15878,78 +15705,77 @@ class Interpretation extends Fields
);
// add the custom fields query
$query .= $this->setCustomQuery($nameListCode, $nameSingleCode);
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filter by published state";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$published = \$this->getState('filter.published');";
- $query .= PHP_EOL . $this->_t(2) . "if (is_numeric(\$published))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "if (is_numeric(\$published))";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a.published = ' . (int) \$published);";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "elseif (\$published === '')";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "elseif (\$published === '')";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('(a.published = 0 OR a.published = 1)');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
if (isset($this->accessBuilder[$nameSingleCode])
&& StringHelper::check(
$this->accessBuilder[$nameSingleCode]
))
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Join over the asset groups.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->select('ag.title AS access_level');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');";
// check if the access field was over ridden
if (!isset($this->fieldsNames[$nameSingleCode]['access']))
{
// component helper name
- $Helper = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper';
+ $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
// load the access filter query code
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " Filter by access level.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$_access = \$this->getState('filter.access');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "if (\$_access && is_numeric(\$_access))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a.access = ' . (int) \$_access);";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2) . "elseif ("
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "elseif ("
. $Helper . "::checkArray(\$_access))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__)
. " Secure the array for the query";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$_access = ArrayHelper::toInteger(\$_access);";
- $query .= PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " Filter by the Access Array.";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " Filter by the Access Array.";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a.access IN (' . implode(',', \$_access) . ')');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
// TODO the following will fight against the above access filter
- $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $query .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Implement View Level Access";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "if (!\$user->authorise('core.options', 'com_"
. $this->componentCodeName . "'))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$groups = implode(',', \$user->getAuthorisedViewLevels());";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a.access IN (' . \$groups . ')');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
// set the search query
$query .= $this->setSearchQuery($nameListCode);
@@ -15958,38 +15784,38 @@ class Interpretation extends Fields
// add the category
if ($addCategory && $addCategoryFilter >= 1)
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Filter by a single or group of categories.";
- $query .= PHP_EOL . $this->_t(2) . "\$baselevel = 1;";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2) . "\$baselevel = 1;";
+ $query .= PHP_EOL . Indent::_(2)
. "\$categoryId = \$this->getState('filter.category_id');";
$query .= PHP_EOL;
- $query .= PHP_EOL . $this->_t(2) . "if (is_numeric(\$categoryId))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "if (is_numeric(\$categoryId))";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$cat_tbl = JTable::getInstance('Category', 'JTable');";
- $query .= PHP_EOL . $this->_t(3) . "\$cat_tbl->load(\$categoryId);";
- $query .= PHP_EOL . $this->_t(3) . "\$rgt = \$cat_tbl->rgt;";
- $query .= PHP_EOL . $this->_t(3) . "\$lft = \$cat_tbl->lft;";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3) . "\$cat_tbl->load(\$categoryId);";
+ $query .= PHP_EOL . Indent::_(3) . "\$rgt = \$cat_tbl->rgt;";
+ $query .= PHP_EOL . Indent::_(3) . "\$lft = \$cat_tbl->lft;";
+ $query .= PHP_EOL . Indent::_(3)
. "\$baselevel = (int) \$cat_tbl->level;";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('c.lft >= ' . (int) \$lft)";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(4)
. "->where('c.rgt <= ' . (int) \$rgt);";
- $query .= PHP_EOL . $this->_t(2) . "}";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2) . "}";
+ $query .= PHP_EOL . Indent::_(2)
. "elseif (is_array(\$categoryId))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$categoryId = ArrayHelper::toInteger(\$categoryId);";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$categoryId = implode(',', \$categoryId);";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->where('a." . $categoryCodeName
. " IN (' . \$categoryId . ')');";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
$query .= PHP_EOL;
}
// setup values for the view ordering
@@ -16013,30 +15839,30 @@ class Interpretation extends Fields
{
// just the first field is based on state
$order_first = false;
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Add the list ordering clause.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$orderCol = \$this->state->get('list.ordering', '"
. $order_field_name . "');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$orderDirn = \$this->state->get('list.direction', '"
. $order_field['direction'] . "');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "if (\$orderCol != '')";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->order(\$db->escape(\$orderCol . ' ' . \$orderDirn));";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
else
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Add a permanent list ordering.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$query->order(\$db->escape('"
. $order_field_name . " "
. $order_field['direction'] . "'));";
@@ -16046,21 +15872,21 @@ class Interpretation extends Fields
}
else
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Add the list ordering clause.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$orderCol = \$this->state->get('list.ordering', 'a.id');";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$orderDirn = \$this->state->get('list.direction', 'desc');";
- $query .= PHP_EOL . $this->_t(2) . "if (\$orderCol != '')";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "if (\$orderCol != '')";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "\$query->order(\$db->escape(\$orderCol . ' ' . \$orderDirn));";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
}
$query .= PHP_EOL;
- $query .= PHP_EOL . $this->_t(2) . "return \$query;";
+ $query .= PHP_EOL . Indent::_(2) . "return \$query;";
return $query;
}
@@ -16100,26 +15926,26 @@ class Interpretation extends Fields
}
$search .= ")'";
// now setup query
- $query = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $query = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Filter by search.";
- $query .= PHP_EOL . $this->_t(2)
+ $query .= PHP_EOL . Indent::_(2)
. "\$search = \$this->getState('filter.search');";
- $query .= PHP_EOL . $this->_t(2) . "if (!empty(\$search))";
- $query .= PHP_EOL . $this->_t(2) . "{";
- $query .= PHP_EOL . $this->_t(3)
+ $query .= PHP_EOL . Indent::_(2) . "if (!empty(\$search))";
+ $query .= PHP_EOL . Indent::_(2) . "{";
+ $query .= PHP_EOL . Indent::_(3)
. "if (stripos(\$search, 'id:') === 0)";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "\$query->where('a.id = ' . (int) substr(\$search, 3));";
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(3) . "else";
- $query .= PHP_EOL . $this->_t(3) . "{";
- $query .= PHP_EOL . $this->_t(4)
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "else";
+ $query .= PHP_EOL . Indent::_(3) . "{";
+ $query .= PHP_EOL . Indent::_(4)
. "\$search = \$db->quote('%' . \$db->escape(\$search) . '%');";
- $query .= PHP_EOL . $this->_t(4) . "\$query->where(" . $search
+ $query .= PHP_EOL . Indent::_(4) . "\$query->where(" . $search
. ");";
- $query .= PHP_EOL . $this->_t(3) . "}";
- $query .= PHP_EOL . $this->_t(2) . "}";
+ $query .= PHP_EOL . Indent::_(3) . "}";
+ $query .= PHP_EOL . Indent::_(2) . "}";
$query .= PHP_EOL;
return $query;
@@ -16161,8 +15987,8 @@ class Interpretation extends Fields
)
&& $filter['method'] == 0))
{
- $query .= PHP_EOL . PHP_EOL . $this->_t(2) . $tab . "//"
- . $this->setLine(__LINE__) . " From the "
+ $query .= PHP_EOL . PHP_EOL . Indent::_(2) . $tab . "//"
+ . Line::_(__Line__, __Class__) . " From the "
. StringHelper::safe(
StringHelper::safe(
$filter['custom']['table'], 'w'
@@ -16175,7 +16001,7 @@ class Interpretation extends Fields
// we want to at times just have the words and not the ids as well
if ($just_text)
{
- $query .= PHP_EOL . $this->_t(2) . $tab
+ $query .= PHP_EOL . Indent::_(2) . $tab
. "\$query->select(\$db->quoteName(['"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
@@ -16185,7 +16011,7 @@ class Interpretation extends Fields
}
else
{
- $query .= PHP_EOL . $this->_t(2) . $tab
+ $query .= PHP_EOL . Indent::_(2) . $tab
. "\$query->select(\$db->quoteName(['"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
@@ -16199,7 +16025,7 @@ class Interpretation extends Fields
// we want to at times just have the words and not the ids as well
if ($just_text)
{
- $query .= PHP_EOL . $this->_t(2) . $tab
+ $query .= PHP_EOL . Indent::_(2) . $tab
. "\$query->select(\$db->quoteName('"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
@@ -16207,7 +16033,7 @@ class Interpretation extends Fields
}
else
{
- $query .= PHP_EOL . $this->_t(2) . $tab
+ $query .= PHP_EOL . Indent::_(2) . $tab
. "\$query->select(\$db->quoteName('"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','"
@@ -16215,7 +16041,7 @@ class Interpretation extends Fields
. "'));";
}
}
- $query .= PHP_EOL . $this->_t(2) . $tab
+ $query .= PHP_EOL . Indent::_(2) . $tab
. "\$query->join('LEFT', \$db->quoteName('"
. $filter['custom']['table'] . "', '"
. $filter['custom']['db']
@@ -16250,8 +16076,7 @@ class Interpretation extends Fields
))
{
// component helper name
- $Helper = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper';
+ $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
// start building the filter query
$filterQuery = "";
foreach ($this->filterBuilder[$nameListCode] as $filter)
@@ -16259,8 +16084,8 @@ class Interpretation extends Fields
// only add for none category fields
if ($filter['type'] != 'category')
{
- $filterQuery .= PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Filter by "
+ $filterQuery .= PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Filter by "
. ucwords($filter['code']) . ".";
// we only add multi filter option if new filter type
// and we have multi filter set for this field (2 = topbar)
@@ -16300,34 +16125,34 @@ class Interpretation extends Fields
*/
protected function setSingleFilterQuery($filter, $Helper, $a = "a")
{
- $filterQuery = PHP_EOL . $this->_t(2) . "\$_"
+ $filterQuery = PHP_EOL . Indent::_(2) . "\$_"
. $filter['code'] . " = \$this->getState('filter."
. $filter['code'] . "');";
- $filterQuery .= PHP_EOL . $this->_t(2) . "if (is_numeric(\$_"
+ $filterQuery .= PHP_EOL . Indent::_(2) . "if (is_numeric(\$_"
. $filter['code'] . "))";
- $filterQuery .= PHP_EOL . $this->_t(2) . "{";
- $filterQuery .= PHP_EOL . $this->_t(3) . "if (is_float(\$_"
+ $filterQuery .= PHP_EOL . Indent::_(2) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "if (is_float(\$_"
. $filter['code'] . "))";
- $filterQuery .= PHP_EOL . $this->_t(3) . "{";
- $filterQuery .= PHP_EOL . $this->_t(4)
+ $filterQuery .= PHP_EOL . Indent::_(3) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(4)
. "\$query->where('" . $a . "." . $filter['code']
. " = ' . (float) \$_" . $filter['code'] . ");";
- $filterQuery .= PHP_EOL . $this->_t(3) . "}";
- $filterQuery .= PHP_EOL . $this->_t(3) . "else";
- $filterQuery .= PHP_EOL . $this->_t(3) . "{";
- $filterQuery .= PHP_EOL . $this->_t(4)
+ $filterQuery .= PHP_EOL . Indent::_(3) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "else";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(4)
. "\$query->where('" . $a . "." . $filter['code']
. " = ' . (int) \$_" . $filter['code'] . ");";
- $filterQuery .= PHP_EOL . $this->_t(3) . "}";
- $filterQuery .= PHP_EOL . $this->_t(2) . "}";
- $filterQuery .= PHP_EOL . $this->_t(2) . "elseif ("
+ $filterQuery .= PHP_EOL . Indent::_(3) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "elseif ("
. $Helper . "::checkString(\$_" . $filter['code'] . "))";
- $filterQuery .= PHP_EOL . $this->_t(2) . "{";
- $filterQuery .= PHP_EOL . $this->_t(3)
+ $filterQuery .= PHP_EOL . Indent::_(2) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(3)
. "\$query->where('" . $a . "." . $filter['code']
. " = ' . \$db->quote(\$db->escape(\$_" . $filter['code']
. ")));";
- $filterQuery .= PHP_EOL . $this->_t(2) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "}";
return $filterQuery;
}
@@ -16344,71 +16169,71 @@ class Interpretation extends Fields
*/
protected function setMultiFilterQuery($filter, $Helper, $a = "a")
{
- $filterQuery = PHP_EOL . $this->_t(2) . "\$_"
+ $filterQuery = PHP_EOL . Indent::_(2) . "\$_"
. $filter['code'] . " = \$this->getState('filter."
. $filter['code'] . "');";
- $filterQuery .= PHP_EOL . $this->_t(2) . "if (is_numeric(\$_"
+ $filterQuery .= PHP_EOL . Indent::_(2) . "if (is_numeric(\$_"
. $filter['code'] . "))";
- $filterQuery .= PHP_EOL . $this->_t(2) . "{";
- $filterQuery .= PHP_EOL . $this->_t(3) . "if (is_float(\$_"
+ $filterQuery .= PHP_EOL . Indent::_(2) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "if (is_float(\$_"
. $filter['code'] . "))";
- $filterQuery .= PHP_EOL . $this->_t(3) . "{";
- $filterQuery .= PHP_EOL . $this->_t(4)
+ $filterQuery .= PHP_EOL . Indent::_(3) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(4)
. "\$query->where('" . $a . "." . $filter['code']
. " = ' . (float) \$_" . $filter['code'] . ");";
- $filterQuery .= PHP_EOL . $this->_t(3) . "}";
- $filterQuery .= PHP_EOL . $this->_t(3) . "else";
- $filterQuery .= PHP_EOL . $this->_t(3) . "{";
- $filterQuery .= PHP_EOL . $this->_t(4)
+ $filterQuery .= PHP_EOL . Indent::_(3) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "else";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(4)
. "\$query->where('" . $a . "." . $filter['code']
. " = ' . (int) \$_" . $filter['code'] . ");";
- $filterQuery .= PHP_EOL . $this->_t(3) . "}";
- $filterQuery .= PHP_EOL . $this->_t(2) . "}";
- $filterQuery .= PHP_EOL . $this->_t(2) . "elseif ("
+ $filterQuery .= PHP_EOL . Indent::_(3) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "elseif ("
. $Helper . "::checkString(\$_" . $filter['code'] . "))";
- $filterQuery .= PHP_EOL . $this->_t(2) . "{";
- $filterQuery .= PHP_EOL . $this->_t(3)
+ $filterQuery .= PHP_EOL . Indent::_(2) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(3)
. "\$query->where('" . $a . "." . $filter['code']
. " = ' . \$db->quote(\$db->escape(\$_" . $filter['code']
. ")));";
- $filterQuery .= PHP_EOL . $this->_t(2) . "}";
- $filterQuery .= PHP_EOL . $this->_t(2) . "elseif ("
+ $filterQuery .= PHP_EOL . Indent::_(2) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "elseif ("
. $Helper . "::checkArray(\$_" . $filter['code'] . "))";
- $filterQuery .= PHP_EOL . $this->_t(2) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "{";
- $filterQuery .= PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " Secure the array for the query";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " Secure the array for the query";
- $filterQuery .= PHP_EOL . $this->_t(3) . "\$_" . $filter['code']
+ $filterQuery .= PHP_EOL . Indent::_(3) . "\$_" . $filter['code']
. " = array_map( function (\$val) use(&\$db) {";
- $filterQuery .= PHP_EOL . $this->_t(4) . "if (is_numeric(\$val))";
- $filterQuery .= PHP_EOL . $this->_t(4) . "{";
- $filterQuery .= PHP_EOL . $this->_t(5) . "if (is_float(\$val))";
- $filterQuery .= PHP_EOL . $this->_t(5) . "{";
- $filterQuery .= PHP_EOL . $this->_t(6) . "return (float) \$val;";
- $filterQuery .= PHP_EOL . $this->_t(5) . "}";
- $filterQuery .= PHP_EOL . $this->_t(5) . "else";
- $filterQuery .= PHP_EOL . $this->_t(5) . "{";
- $filterQuery .= PHP_EOL . $this->_t(6) . "return (int) \$val;";
- $filterQuery .= PHP_EOL . $this->_t(5) . "}";
- $filterQuery .= PHP_EOL . $this->_t(4) . "}";
- $filterQuery .= PHP_EOL . $this->_t(4) . "elseif ("
+ $filterQuery .= PHP_EOL . Indent::_(4) . "if (is_numeric(\$val))";
+ $filterQuery .= PHP_EOL . Indent::_(4) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(5) . "if (is_float(\$val))";
+ $filterQuery .= PHP_EOL . Indent::_(5) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(6) . "return (float) \$val;";
+ $filterQuery .= PHP_EOL . Indent::_(5) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(5) . "else";
+ $filterQuery .= PHP_EOL . Indent::_(5) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(6) . "return (int) \$val;";
+ $filterQuery .= PHP_EOL . Indent::_(5) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(4) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(4) . "elseif ("
. $Helper . "::checkString(\$val))";
- $filterQuery .= PHP_EOL . $this->_t(4) . "{";
- $filterQuery .= PHP_EOL . $this->_t(5)
+ $filterQuery .= PHP_EOL . Indent::_(4) . "{";
+ $filterQuery .= PHP_EOL . Indent::_(5)
. "return \$db->quote(\$db->escape(\$val));";
- $filterQuery .= PHP_EOL . $this->_t(4) . "}";
- $filterQuery .= PHP_EOL . $this->_t(3) . "}, \$_"
+ $filterQuery .= PHP_EOL . Indent::_(4) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(3) . "}, \$_"
. $filter['code'] . ");";
- $filterQuery .= PHP_EOL . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " Filter by the "
+ $filterQuery .= PHP_EOL . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " Filter by the "
. ucwords($filter['code']) . " Array.";
- $filterQuery .= PHP_EOL . $this->_t(3)
+ $filterQuery .= PHP_EOL . Indent::_(3)
. "\$query->where('" . $a . "." . $filter['code']
. " IN (' . implode(',', \$_" . $filter['code'] . ") . ')');";
- $filterQuery .= PHP_EOL . $this->_t(2) . "}";
+ $filterQuery .= PHP_EOL . Indent::_(2) . "}";
return $filterQuery;
}
@@ -16580,7 +16405,7 @@ class Interpretation extends Fields
if (ArrayHelper::check($functions))
{
// now build the initial script
- $initial .= "//" . $this->setLine(__LINE__) . " Initial Script"
+ $initial .= "//" . Line::_(__Line__, __Class__) . " Initial Script"
. PHP_EOL . "jQuery(document).ready(function()";
$initial .= PHP_EOL . "{";
foreach ($functions as $function => $matchKeys)
@@ -16628,8 +16453,8 @@ class Interpretation extends Fields
$name = $name . '_id';
}
- $listener .= PHP_EOL . "//" . $this->setLine(
- __LINE__
+ $listener .= PHP_EOL . "//" . Line::_(
+ __LINE__,__CLASS__
) . " #jform_" . $name . " listeners for "
. $l_matchKey . " function";
$listener .= PHP_EOL . "jQuery('#jform_" . $name
@@ -16641,7 +16466,7 @@ class Interpretation extends Fields
. "jQuery('#adminForm').on('change', '#jform_"
. $name . "',function (e)";
$listener .= PHP_EOL . "{";
- $listener .= PHP_EOL . $this->_t(1)
+ $listener .= PHP_EOL . Indent::_(1)
. "e.preventDefault();";
$listener .= $funcCall['code'];
$listener .= PHP_EOL . "});" . PHP_EOL;
@@ -16651,9 +16476,9 @@ class Interpretation extends Fields
if (StringHelper::check($modal))
{
$listener .= PHP_EOL . "window.SqueezeBox.initialize({";
- $listener .= PHP_EOL . $this->_t(1) . "onClose:function(){";
+ $listener .= PHP_EOL . Indent::_(1) . "onClose:function(){";
$listener .= $modal;
- $listener .= PHP_EOL . $this->_t(1) . "}";
+ $listener .= PHP_EOL . Indent::_(1) . "}";
$listener .= PHP_EOL . "});" . PHP_EOL;
}
@@ -16673,7 +16498,7 @@ class Interpretation extends Fields
{
$addArray = true;
}
- $func .= PHP_EOL . "//" . $this->setLine(__LINE__)
+ $func .= PHP_EOL . "//" . Line::_(__Line__, __Class__)
. " the " . $f_function . " function";
$func .= PHP_EOL . "function " . $f_function . "(";
$fucounter = 0;
@@ -16699,52 +16524,52 @@ class Interpretation extends Fields
foreach ($f_matchKeys as $a_matchKey)
{
$name = $matchNames[$a_matchKey];
- $func .= PHP_EOL . $this->_t(1) . "if (isSet("
+ $func .= PHP_EOL . Indent::_(1) . "if (isSet("
. $a_matchKey . ") && " . $a_matchKey
. ".constructor !== Array)" . PHP_EOL
- . $this->_t(1) . "{" . PHP_EOL . $this->_t(2)
+ . Indent::_(1) . "{" . PHP_EOL . Indent::_(2)
. "var temp_" . $f_function . " = "
- . $a_matchKey . ";" . PHP_EOL . $this->_t(2)
+ . $a_matchKey . ";" . PHP_EOL . Indent::_(2)
. "var " . $a_matchKey . " = [];" . PHP_EOL
- . $this->_t(2) . $a_matchKey . ".push(temp_"
- . $f_function . ");" . PHP_EOL . $this->_t(1)
+ . Indent::_(2) . $a_matchKey . ".push(temp_"
+ . $f_function . ");" . PHP_EOL . Indent::_(1)
. "}";
- $func .= PHP_EOL . $this->_t(1) . "else if (!isSet("
- . $a_matchKey . "))" . PHP_EOL . $this->_t(1)
+ $func .= PHP_EOL . Indent::_(1) . "else if (!isSet("
+ . $a_matchKey . "))" . PHP_EOL . Indent::_(1)
. "{";
- $func .= PHP_EOL . $this->_t(2) . "var "
+ $func .= PHP_EOL . Indent::_(2) . "var "
. $a_matchKey . " = [];";
- $func .= PHP_EOL . $this->_t(1) . "}";
- $func .= PHP_EOL . $this->_t(1) . "var " . $name
+ $func .= PHP_EOL . Indent::_(1) . "}";
+ $func .= PHP_EOL . Indent::_(1) . "var " . $name
. " = " . $a_matchKey . ".some(" . $a_matchKey
. "_SomeFunc);" . PHP_EOL;
// setup the map function
- $map .= PHP_EOL . "//" . $this->setLine(__LINE__)
+ $map .= PHP_EOL . "//" . Line::_(__Line__, __Class__)
. " the " . $f_function . " Some function";
$map .= PHP_EOL . "function " . $a_matchKey
. "_SomeFunc(" . $a_matchKey . ")";
$map .= PHP_EOL . "{";
- $map .= PHP_EOL . $this->_t(1) . "//"
- . $this->setLine(__LINE__)
+ $map .= PHP_EOL . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__)
. " set the function logic";
- $map .= PHP_EOL . $this->_t(1) . "if (";
+ $map .= PHP_EOL . Indent::_(1) . "if (";
$if = $ifValue[$a_matchKey];
if (StringHelper::check($if))
{
$map .= $if;
}
$map .= ")";
- $map .= PHP_EOL . $this->_t(1) . "{";
- $map .= PHP_EOL . $this->_t(2) . "return true;";
- $map .= PHP_EOL . $this->_t(1) . "}" . PHP_EOL
- . $this->_t(1) . "return false;";
+ $map .= PHP_EOL . Indent::_(1) . "{";
+ $map .= PHP_EOL . Indent::_(2) . "return true;";
+ $map .= PHP_EOL . Indent::_(1) . "}" . PHP_EOL
+ . Indent::_(1) . "return false;";
$map .= PHP_EOL . "}" . PHP_EOL;
}
- $func .= PHP_EOL . PHP_EOL . $this->_t(1) . "//"
- . $this->setLine(__LINE__)
+ $func .= PHP_EOL . PHP_EOL . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__)
. " set this function logic";
- $func .= PHP_EOL . $this->_t(1) . "if (";
+ $func .= PHP_EOL . Indent::_(1) . "if (";
// set if counter
$aifcounter = 0;
foreach ($f_matchKeys as $af_matchKey)
@@ -16760,14 +16585,14 @@ class Interpretation extends Fields
}
$aifcounter++;
}
- $func .= ")" . PHP_EOL . $this->_t(1) . "{";
+ $func .= ")" . PHP_EOL . Indent::_(1) . "{";
}
else
{
- $func .= PHP_EOL . $this->_t(1) . "//" . $this->setLine(
- __LINE__
+ $func .= PHP_EOL . Indent::_(1) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " set the function logic";
- $func .= PHP_EOL . $this->_t(1) . "if (";
+ $func .= PHP_EOL . Indent::_(1) . "if (";
// set if counter
$ifcounter = 0;
foreach ($f_matchKeys as $f_matchKey)
@@ -16786,7 +16611,7 @@ class Interpretation extends Fields
$ifcounter++;
}
}
- $func .= ")" . PHP_EOL . $this->_t(1) . "{";
+ $func .= ")" . PHP_EOL . Indent::_(1) . "{";
}
// get the controles
$controls = $targetControls[$f_matchKeys[0]];
@@ -16808,8 +16633,8 @@ class Interpretation extends Fields
// check if this is a toggle switch
if ($toggleSwitch[$f_matchKeys[0]])
{
- $func .= PHP_EOL . $this->_t(1) . "}" . PHP_EOL
- . $this->_t(1) . "else" . PHP_EOL . $this->_t(1)
+ $func .= PHP_EOL . Indent::_(1) . "}" . PHP_EOL
+ . Indent::_(1) . "else" . PHP_EOL . Indent::_(1)
. "{";
// load the default behavior
foreach ($controls as $target => $action)
@@ -16823,7 +16648,7 @@ class Interpretation extends Fields
}
}
}
- $func .= PHP_EOL . $this->_t(1) . "}" . PHP_EOL . "}"
+ $func .= PHP_EOL . Indent::_(1) . "}" . PHP_EOL . "}"
. PHP_EOL . $map;
}
// add the needed validation to file
@@ -16835,69 +16660,69 @@ class Interpretation extends Fields
$validation .= PHP_EOL . "// update fields required";
$validation .= PHP_EOL
. "function updateFieldRequired(name, status) {";
- $validation .= PHP_EOL . $this->_t(1)
+ $validation .= PHP_EOL . Indent::_(1)
. "// check if not_required exist";
- $validation .= PHP_EOL . $this->_t(1)
+ $validation .= PHP_EOL . Indent::_(1)
. "if (jQuery('#jform_not_required').length > 0) {";
- $validation .= PHP_EOL . $this->_t(2)
+ $validation .= PHP_EOL . Indent::_(2)
. "var not_required = jQuery('#jform_not_required').val().split(\",\");";
- $validation .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $validation .= PHP_EOL . PHP_EOL . Indent::_(2)
. "if(status == 1)";
- $validation .= PHP_EOL . $this->_t(2) . "{";
- $validation .= PHP_EOL . $this->_t(3)
+ $validation .= PHP_EOL . Indent::_(2) . "{";
+ $validation .= PHP_EOL . Indent::_(3)
. "not_required.push(name);";
- $validation .= PHP_EOL . $this->_t(2) . "}";
- $validation .= PHP_EOL . $this->_t(2) . "else";
- $validation .= PHP_EOL . $this->_t(2) . "{";
- $validation .= PHP_EOL . $this->_t(3)
+ $validation .= PHP_EOL . Indent::_(2) . "}";
+ $validation .= PHP_EOL . Indent::_(2) . "else";
+ $validation .= PHP_EOL . Indent::_(2) . "{";
+ $validation .= PHP_EOL . Indent::_(3)
. "not_required = removeFieldFromNotRequired(not_required, name);";
- $validation .= PHP_EOL . $this->_t(2) . "}";
- $validation .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $validation .= PHP_EOL . Indent::_(2) . "}";
+ $validation .= PHP_EOL . PHP_EOL . Indent::_(2)
. "jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());";
- $validation .= PHP_EOL . $this->_t(1) . "}";
+ $validation .= PHP_EOL . Indent::_(1) . "}";
$validation .= PHP_EOL . "}" . PHP_EOL;
$validation .= PHP_EOL
. "// remove field from not_required";
$validation .= PHP_EOL
. "function removeFieldFromNotRequired(array, what) {";
- $validation .= PHP_EOL . $this->_t(1)
+ $validation .= PHP_EOL . Indent::_(1)
. "return array.filter(function(element){";
- $validation .= PHP_EOL . $this->_t(2)
+ $validation .= PHP_EOL . Indent::_(2)
. "return element !== what;";
- $validation .= PHP_EOL . $this->_t(1) . "});";
+ $validation .= PHP_EOL . Indent::_(1) . "});";
$validation .= PHP_EOL . "}" . PHP_EOL;
$validation .= PHP_EOL . "// fix not required array";
$validation .= PHP_EOL
. "function fixNotRequiredArray(array) {";
- $validation .= PHP_EOL . $this->_t(1) . "var seen = {};";
- $validation .= PHP_EOL . $this->_t(1)
+ $validation .= PHP_EOL . Indent::_(1) . "var seen = {};";
+ $validation .= PHP_EOL . Indent::_(1)
. "return removeEmptyFromNotRequiredArray(array).filter(function(item) {";
- $validation .= PHP_EOL . $this->_t(2)
+ $validation .= PHP_EOL . Indent::_(2)
. "return seen.hasOwnProperty(item) ? false : (seen[item] = true);";
- $validation .= PHP_EOL . $this->_t(1) . "});";
+ $validation .= PHP_EOL . Indent::_(1) . "});";
$validation .= PHP_EOL . "}" . PHP_EOL;
$validation .= PHP_EOL
. "// remove empty from not_required array";
$validation .= PHP_EOL
. "function removeEmptyFromNotRequiredArray(array) {";
- $validation .= PHP_EOL . $this->_t(1)
+ $validation .= PHP_EOL . Indent::_(1)
. "return array.filter(function (el) {";
- $validation .= PHP_EOL . $this->_t(2)
+ $validation .= PHP_EOL . Indent::_(2)
. "// remove ( 一_一) as well - lol";
- $validation .= PHP_EOL . $this->_t(2)
+ $validation .= PHP_EOL . Indent::_(2)
. "return (el.length > 0 && '一_一' !== el);";
- $validation .= PHP_EOL . $this->_t(1) . "});";
+ $validation .= PHP_EOL . Indent::_(1) . "});";
$validation .= PHP_EOL . "}" . PHP_EOL;
}
// set the isSet function
$isSet = PHP_EOL . "// the isSet function";
$isSet .= PHP_EOL . "function isSet(val)";
$isSet .= PHP_EOL . "{";
- $isSet .= PHP_EOL . $this->_t(1)
+ $isSet .= PHP_EOL . Indent::_(1)
. "if ((val != undefined) && (val != null) && 0 !== val.length){";
- $isSet .= PHP_EOL . $this->_t(2) . "return true;";
- $isSet .= PHP_EOL . $this->_t(1) . "}";
- $isSet .= PHP_EOL . $this->_t(1) . "return false;";
+ $isSet .= PHP_EOL . Indent::_(2) . "return true;";
+ $isSet .= PHP_EOL . Indent::_(1) . "}";
+ $isSet .= PHP_EOL . Indent::_(1) . "return false;";
$isSet .= PHP_EOL . "}";
}
// load to this buket
@@ -16918,7 +16743,7 @@ class Interpretation extends Fields
$this->customScriptBuilder['view_footer'][$nameSingleCode]
))
{
- $customFooterScript = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $customFooterScript = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
$this->customScriptBuilder['view_footer'][$nameSingleCode],
$this->placeholders
);
@@ -16946,34 +16771,29 @@ class Interpretation extends Fields
$_created = $this->getCreatedDate($viewArray);
$_modified = $this->getLastModifiedDate($viewArray);
// add file to view
- $_target = array($this->target => $nameListCode);
- $_config = array($this->hhh . 'CREATIONDATE'
- . $this->hhh => $_created,
- $this->hhh . 'BUILDDATE'
- . $this->hhh => $_modified,
- $this->hhh . 'VERSION'
- . $this->hhh => $viewArray['settings']->version);
+ $_target = array(CFactory::_('Config')->build_target => $nameListCode);
+ $_config = array(Placefix::_h('CREATIONDATE') => $_created,
+ Placefix::_h('BUILDDATE') => $_modified,
+ Placefix::_h('VERSION') => $viewArray['settings']->version);
$this->buildDynamique($_target, 'javascript_file', false, $_config);
// set path
$_path = '/administrator/components/com_' . $this->componentCodeName
. '/assets/js/' . $nameListCode . '.js';
// load the file to the list view
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_ADD_JAVASCRIPT_FILE' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
- ) . " Add List View JavaScript File" . PHP_EOL . $this->_t(2)
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_ADD_JAVASCRIPT_FILE')]
+ = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
+ ) . " Add List View JavaScript File" . PHP_EOL . Indent::_(2)
. $this->setIncludeLibScript($_path);
}
else
{
$list_fileScript = '';
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_ADD_JAVASCRIPT_FILE' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_ADD_JAVASCRIPT_FILE')]
= '';
}
// minfy the script
- if (Config::get('minify', 0) && isset($list_fileScript)
+ if (CFactory::_('Config')->get('minify', 0) && isset($list_fileScript)
&& StringHelper::check($list_fileScript))
{
// minify the fielScript javscript
@@ -16982,7 +16802,7 @@ class Interpretation extends Fields
$list_fileScript = $minifier->minify();
}
// minfy the script
- if (Config::get('minify', 0) && isset($fileScript)
+ if (CFactory::_('Config')->get('minify', 0) && isset($fileScript)
&& StringHelper::check($fileScript))
{
// minify the fielScript javscript
@@ -16991,7 +16811,7 @@ class Interpretation extends Fields
$fileScript = $minifier->minify();
}
// minfy the script
- if (Config::get('minify', 0) && isset($footerScript)
+ if (CFactory::_('Config')->get('minify', 0) && isset($footerScript)
&& StringHelper::check($footerScript))
{
// minify the footerScript javscript
@@ -17062,13 +16882,13 @@ class Interpretation extends Fields
$value = $getValue[$matchKey];
if ($value['isArray'])
{
- $initial .= PHP_EOL . $this->_t(1) . $value['get'];
+ $initial .= PHP_EOL . Indent::_(1) . $value['get'];
$funcsets[] = $matchKey;
$array = true;
}
else
{
- $initial .= PHP_EOL . $this->_t(1) . $value['get'];
+ $initial .= PHP_EOL . Indent::_(1) . $value['get'];
$funcsets[] = $matchKey;
}
}
@@ -17076,7 +16896,7 @@ class Interpretation extends Fields
// make sure that the function is loaded only once
if (ArrayHelper::check($funcsets))
{
- $initial .= PHP_EOL . $this->_t(1) . $function . "(";
+ $initial .= PHP_EOL . Indent::_(1) . $function . "(";
$initial .= implode(',', $funcsets);
$initial .= ");" . PHP_EOL;
}
@@ -17230,13 +17050,13 @@ class Interpretation extends Fields
$targetType = "#jform_";
}
// set the target behavior
- $bucket[$target['name']]['behavior'] = PHP_EOL . $this->_t(
+ $bucket[$target['name']]['behavior'] = PHP_EOL . Indent::_(
2
) . "jQuery('" . $targetType . $target['name']
. $targetTypeSufix . "').closest('.control-group')."
. $targetBehavior . "();";
// set the target default
- $bucket[$target['name']]['default'] = PHP_EOL . $this->_t(2)
+ $bucket[$target['name']]['default'] = PHP_EOL . Indent::_(2)
. "jQuery('" . $targetType . $target['name']
. $targetTypeSufix . "').closest('.control-group')."
. $targetDefault . "();";
@@ -17246,112 +17066,112 @@ class Interpretation extends Fields
if ($toggleSwitch)
{
$hide = PHP_EOL
- . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " remove required attribute from "
. $target['name'] . " field";
$hide .= PHP_EOL
- . $this->_t(2) . "if (!jform_" . $unique
+ . Indent::_(2) . "if (!jform_" . $unique
. "_required)";
$hide .= PHP_EOL
- . $this->_t(2) . "{";
+ . Indent::_(2) . "{";
$hide .= PHP_EOL
- . $this->_t(3) . "updateFieldRequired('"
+ . Indent::_(3) . "updateFieldRequired('"
. $target['name'] . "',1);";
$hide .= PHP_EOL
- . $this->_t(3) . "jQuery('#jform_"
+ . Indent::_(3) . "jQuery('#jform_"
. $target['name']
. "').removeAttr('required');";
$hide .= PHP_EOL
- . $this->_t(3) . "jQuery('#jform_"
+ . Indent::_(3) . "jQuery('#jform_"
. $target['name']
. "').removeAttr('aria-required');";
$hide .= PHP_EOL
- . $this->_t(3) . "jQuery('#jform_"
+ . Indent::_(3) . "jQuery('#jform_"
. $target['name']
. "').removeClass('required');";
$hide .= PHP_EOL
- . $this->_t(3) . "jform_" . $unique
+ . Indent::_(3) . "jform_" . $unique
. "_required = true;";
$hide .= PHP_EOL
- . $this->_t(2) . "}";
+ . Indent::_(2) . "}";
$bucket[$target['name']]['hide'] = $hide;
// the show required function
$show = PHP_EOL
- . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " add required attribute to "
. $target['name'] . " field";
$show .= PHP_EOL
- . $this->_t(2) . "if (jform_" . $unique
+ . Indent::_(2) . "if (jform_" . $unique
. "_required)";
$show .= PHP_EOL
- . $this->_t(2) . "{";
+ . Indent::_(2) . "{";
$show .= PHP_EOL
- . $this->_t(3) . "updateFieldRequired('"
+ . Indent::_(3) . "updateFieldRequired('"
. $target['name'] . "',0);";
$show .= PHP_EOL
- . $this->_t(3) . "jQuery('#jform_"
+ . Indent::_(3) . "jQuery('#jform_"
. $target['name']
. "').prop('required','required');";
$show .= PHP_EOL
- . $this->_t(3) . "jQuery('#jform_"
+ . Indent::_(3) . "jQuery('#jform_"
. $target['name']
. "').attr('aria-required',true);";
$show .= PHP_EOL
- . $this->_t(3) . "jQuery('#jform_"
+ . Indent::_(3) . "jQuery('#jform_"
. $target['name'] . "').addClass('required');";
$show .= PHP_EOL
- . $this->_t(3) . "jform_" . $unique
+ . Indent::_(3) . "jform_" . $unique
. "_required = false;";
$show .= PHP_EOL
- . $this->_t(2) . "}";
+ . Indent::_(2) . "}";
$bucket[$target['name']]['show'] = $show;
}
else
{
$hide = PHP_EOL
- . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " remove required attribute from "
. $target['name'] . " field";
$hide .= PHP_EOL
- . $this->_t(2) . "updateFieldRequired('"
+ . Indent::_(2) . "updateFieldRequired('"
. $target['name'] . "',1);";
$hide .= PHP_EOL
- . $this->_t(2) . "jQuery('#jform_"
+ . Indent::_(2) . "jQuery('#jform_"
. $target['name']
. "').removeAttr('required');";
$hide .= PHP_EOL
- . $this->_t(2) . "jQuery('#jform_"
+ . Indent::_(2) . "jQuery('#jform_"
. $target['name']
. "').removeAttr('aria-required');";
$hide .= PHP_EOL
- . $this->_t(2) . "jQuery('#jform_"
+ . Indent::_(2) . "jQuery('#jform_"
. $target['name']
. "').removeClass('required');";
$hide .= PHP_EOL
- . $this->_t(2) . "jform_" . $unique
+ . Indent::_(2) . "jform_" . $unique
. "_required = true;" . PHP_EOL;
$bucket[$target['name']]['hide'] = $hide;
// the show required function
$show = PHP_EOL
- . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " add required attribute to "
. $target['name'] . " field";
$show .= PHP_EOL
- . $this->_t(2) . "updateFieldRequired('"
+ . Indent::_(2) . "updateFieldRequired('"
. $target['name'] . "',0);";
$show .= PHP_EOL
- . $this->_t(2) . "jQuery('#jform_"
+ . Indent::_(2) . "jQuery('#jform_"
. $target['name']
. "').prop('required','required');";
$show .= PHP_EOL
- . $this->_t(2) . "jQuery('#jform_"
+ . Indent::_(2) . "jQuery('#jform_"
. $target['name']
. "').attr('aria-required',true);";
$show .= PHP_EOL
- . $this->_t(2) . "jQuery('#jform_"
+ . Indent::_(2) . "jQuery('#jform_"
. $target['name'] . "').addClass('required');";
$show .= PHP_EOL
- . $this->_t(2) . "jform_" . $unique
+ . Indent::_(2) . "jform_" . $unique
. "_required = false;" . PHP_EOL;
$bucket[$target['name']]['show'] = $show;
}
@@ -17763,14 +17583,14 @@ class Interpretation extends Fields
$keyName = $name . '_' . $unique;
if ($type === 'checkboxes' || $extends === 'checkboxes')
{
- $select = "var " . $keyName . " = [];" . PHP_EOL . $this->_t(1)
+ $select = "var " . $keyName . " = [];" . PHP_EOL . Indent::_(1)
. "jQuery('#jform_" . $name
. " input[type=checkbox]').each(function()" . PHP_EOL
- . $this->_t(1) . "{" . PHP_EOL . $this->_t(2)
- . "if (jQuery(this).is(':checked'))" . PHP_EOL . $this->_t(2)
- . "{" . PHP_EOL . $this->_t(3) . $keyName
- . ".push(jQuery(this).prop('value'));" . PHP_EOL . $this->_t(2)
- . "}" . PHP_EOL . $this->_t(1) . "});";
+ . Indent::_(1) . "{" . PHP_EOL . Indent::_(2)
+ . "if (jQuery(this).is(':checked'))" . PHP_EOL . Indent::_(2)
+ . "{" . PHP_EOL . Indent::_(3) . $keyName
+ . ".push(jQuery(this).prop('value'));" . PHP_EOL . Indent::_(2)
+ . "}" . PHP_EOL . Indent::_(1) . "});";
$isArray = true;
}
elseif ($type === 'checkbox')
@@ -17851,60 +17671,60 @@ class Interpretation extends Fields
$this->validationFixBuilder[$view]
))
{
- $fix .= PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $fix .= PHP_EOL . Indent::_(1)
. " * Method to validate the form data.";
- $fix .= PHP_EOL . $this->_t(1) . " *";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . Indent::_(1) . " *";
+ $fix .= PHP_EOL . Indent::_(1)
. " * @param JForm \$form The form to validate against.";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . Indent::_(1)
. " * @param array \$data The data to validate.";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . Indent::_(1)
. " * @param string \$group The name of the field group to validate.";
- $fix .= PHP_EOL . $this->_t(1) . " *";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . Indent::_(1) . " *";
+ $fix .= PHP_EOL . Indent::_(1)
. " * @return mixed Array of filtered data if valid, false otherwise.";
- $fix .= PHP_EOL . $this->_t(1) . " *";
- $fix .= PHP_EOL . $this->_t(1) . " * @see JFormRule";
- $fix .= PHP_EOL . $this->_t(1) . " * @see JFilterInput";
- $fix .= PHP_EOL . $this->_t(1) . " * @since 12.2";
- $fix .= PHP_EOL . $this->_t(1) . " */";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . Indent::_(1) . " *";
+ $fix .= PHP_EOL . Indent::_(1) . " * @see JFormRule";
+ $fix .= PHP_EOL . Indent::_(1) . " * @see JFilterInput";
+ $fix .= PHP_EOL . Indent::_(1) . " * @since 12.2";
+ $fix .= PHP_EOL . Indent::_(1) . " */";
+ $fix .= PHP_EOL . Indent::_(1)
. "public function validate(\$form, \$data, \$group = null)";
- $fix .= PHP_EOL . $this->_t(1) . "{";
- $fix .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(1) . "{";
+ $fix .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if the not_required field is set";
- $fix .= PHP_EOL . $this->_t(2)
+ $fix .= PHP_EOL . Indent::_(2)
. "if (isset(\$data['not_required']) && " . $Component
. "Helper::checkString(\$data['not_required']))";
- $fix .= PHP_EOL . $this->_t(2) . "{";
- $fix .= PHP_EOL . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(2) . "{";
+ $fix .= PHP_EOL . Indent::_(3)
. "\$requiredFields = (array) explode(',',(string) \$data['not_required']);";
- $fix .= PHP_EOL . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(3)
. "\$requiredFields = array_unique(\$requiredFields);";
- $fix .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " now change the required field attributes value";
- $fix .= PHP_EOL . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(3)
. "foreach (\$requiredFields as \$requiredField)";
- $fix .= PHP_EOL . $this->_t(3) . "{";
- $fix .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(3) . "{";
+ $fix .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " make sure there is a string value";
- $fix .= PHP_EOL . $this->_t(4) . "if (" . $Component
+ $fix .= PHP_EOL . Indent::_(4) . "if (" . $Component
. "Helper::checkString(\$requiredField))";
- $fix .= PHP_EOL . $this->_t(4) . "{";
- $fix .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(4) . "{";
+ $fix .= PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " change to false";
- $fix .= PHP_EOL . $this->_t(5)
+ $fix .= PHP_EOL . Indent::_(5)
. "\$form->setFieldAttribute(\$requiredField, 'required', 'false');";
- $fix .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " also clear the data set";
- $fix .= PHP_EOL . $this->_t(5) . "\$data[\$requiredField] = '';";
- $fix .= PHP_EOL . $this->_t(4) . "}";
- $fix .= PHP_EOL . $this->_t(3) . "}";
- $fix .= PHP_EOL . $this->_t(2) . "}";
- $fix .= PHP_EOL . $this->_t(2)
+ $fix .= PHP_EOL . Indent::_(5) . "\$data[\$requiredField] = '';";
+ $fix .= PHP_EOL . Indent::_(4) . "}";
+ $fix .= PHP_EOL . Indent::_(3) . "}";
+ $fix .= PHP_EOL . Indent::_(2) . "}";
+ $fix .= PHP_EOL . Indent::_(2)
. "return parent::validate(\$form, \$data, \$group);";
- $fix .= PHP_EOL . $this->_t(1) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . "}";
}
return $fix;
@@ -17916,9 +17736,9 @@ class Interpretation extends Fields
if (isset($this->customScriptBuilder['token'][$view])
&& $this->customScriptBuilder['token'][$view])
{
- $fix .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Add Ajax Token";
- $fix .= PHP_EOL . $this->_t(2)
+ $fix .= PHP_EOL . Indent::_(2)
. "\$this->document->addScriptDeclaration(\"var token = '\".JSession::getFormToken().\"';\");";
}
@@ -17947,7 +17767,7 @@ class Interpretation extends Fields
{
foreach ($taskArray as $name)
{
- $tasks .= PHP_EOL . $this->_t(2) . "\$this->registerTask('"
+ $tasks .= PHP_EOL . Indent::_(2) . "\$this->registerTask('"
. $name . "', 'ajax');";
}
}
@@ -17983,8 +17803,7 @@ class Interpretation extends Fields
. $task['value_name'] . "Value";
$getModel[$task['task_name']]
= "\$result = \$this->getModel('ajax')->"
- . $task['method_name'] . "(" . $this->bbb . "valueArray"
- . $this->ddd . ");";
+ . $task['method_name'] . "(" . Placefix::_("valueArray") . ");";
// check if null or zero is allowed
if (!isset($task['allow_zero']) || 1 != $task['allow_zero'])
{
@@ -18008,18 +17827,18 @@ class Interpretation extends Fields
{
foreach ($getModel as $task => $getMethod)
{
- $cases .= PHP_EOL . $this->_t(4) . "case '" . $task . "':";
- $cases .= PHP_EOL . $this->_t(5) . "try";
- $cases .= PHP_EOL . $this->_t(5) . "{";
+ $cases .= PHP_EOL . Indent::_(4) . "case '" . $task . "':";
+ $cases .= PHP_EOL . Indent::_(5) . "try";
+ $cases .= PHP_EOL . Indent::_(5) . "{";
foreach ($input[$task] as $string)
{
- $cases .= PHP_EOL . $this->_t(6) . $string;
+ $cases .= PHP_EOL . Indent::_(6) . $string;
}
// set the values
$values = implode(', ', $valueArray[$task]);
// set the values to method
$getMethod = str_replace(
- $this->bbb . 'valueArray' . $this->ddd, $values,
+ Placefix::_('valueArray'), $values,
$getMethod
);
// check if we have some values to check
@@ -18029,59 +17848,59 @@ class Interpretation extends Fields
// set if string
$ifvalues = implode(' && ', $ifArray[$task]);
// add to case
- $cases .= PHP_EOL . $this->_t(6) . "if(" . $ifvalues
+ $cases .= PHP_EOL . Indent::_(6) . "if(" . $ifvalues
. ")";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7) . $getMethod;
- $cases .= PHP_EOL . $this->_t(6) . "}";
- $cases .= PHP_EOL . $this->_t(6) . "else";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7) . "\$result = false;";
- $cases .= PHP_EOL . $this->_t(6) . "}";
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7) . $getMethod;
+ $cases .= PHP_EOL . Indent::_(6) . "}";
+ $cases .= PHP_EOL . Indent::_(6) . "else";
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7) . "\$result = false;";
+ $cases .= PHP_EOL . Indent::_(6) . "}";
}
else
{
- $cases .= PHP_EOL . $this->_t(6) . $getMethod;
+ $cases .= PHP_EOL . Indent::_(6) . $getMethod;
}
// continue the build
- $cases .= PHP_EOL . $this->_t(6)
+ $cases .= PHP_EOL . Indent::_(6)
. "if(\$callback)";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7)
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7)
. "echo \$callback . \"(\".json_encode(\$result).\");\";";
- $cases .= PHP_EOL . $this->_t(6) . "}";
- $cases .= PHP_EOL . $this->_t(6) . "elseif(\$returnRaw)";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7)
+ $cases .= PHP_EOL . Indent::_(6) . "}";
+ $cases .= PHP_EOL . Indent::_(6) . "elseif(\$returnRaw)";
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7)
. "echo json_encode(\$result);";
- $cases .= PHP_EOL . $this->_t(6) . "}";
- $cases .= PHP_EOL . $this->_t(6) . "else";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7)
+ $cases .= PHP_EOL . Indent::_(6) . "}";
+ $cases .= PHP_EOL . Indent::_(6) . "else";
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7)
. "echo \"(\".json_encode(\$result).\");\";";
- $cases .= PHP_EOL . $this->_t(6) . "}";
- $cases .= PHP_EOL . $this->_t(5) . "}";
- $cases .= PHP_EOL . $this->_t(5) . "catch(Exception \$e)";
- $cases .= PHP_EOL . $this->_t(5) . "{";
- $cases .= PHP_EOL . $this->_t(6)
+ $cases .= PHP_EOL . Indent::_(6) . "}";
+ $cases .= PHP_EOL . Indent::_(5) . "}";
+ $cases .= PHP_EOL . Indent::_(5) . "catch(Exception \$e)";
+ $cases .= PHP_EOL . Indent::_(5) . "{";
+ $cases .= PHP_EOL . Indent::_(6)
. "if(\$callback)";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7)
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7)
. "echo \$callback.\"(\".json_encode(\$e).\");\";";
- $cases .= PHP_EOL . $this->_t(6) . "}";
- $cases .= PHP_EOL . $this->_t(6)
+ $cases .= PHP_EOL . Indent::_(6) . "}";
+ $cases .= PHP_EOL . Indent::_(6)
. "elseif(\$returnRaw)";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7)
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7)
. "echo json_encode(\$e);";
- $cases .= PHP_EOL . $this->_t(6) . "}";
- $cases .= PHP_EOL . $this->_t(6) . "else";
- $cases .= PHP_EOL . $this->_t(6) . "{";
- $cases .= PHP_EOL . $this->_t(7)
+ $cases .= PHP_EOL . Indent::_(6) . "}";
+ $cases .= PHP_EOL . Indent::_(6) . "else";
+ $cases .= PHP_EOL . Indent::_(6) . "{";
+ $cases .= PHP_EOL . Indent::_(7)
. "echo \"(\".json_encode(\$e).\");\";";
- $cases .= PHP_EOL . $this->_t(6) . "}";
- $cases .= PHP_EOL . $this->_t(5) . "}";
- $cases .= PHP_EOL . $this->_t(4) . "break;";
+ $cases .= PHP_EOL . Indent::_(6) . "}";
+ $cases .= PHP_EOL . Indent::_(5) . "}";
+ $cases .= PHP_EOL . Indent::_(4) . "break;";
}
}
}
@@ -18102,9 +17921,9 @@ class Interpretation extends Fields
$method
)
{
- $methods .= PHP_EOL . PHP_EOL . $this->_t(1) . "//"
- . $this->setLine(__LINE__) . " Used in " . $view . PHP_EOL;
- $methods .= $this->setPlaceholders(
+ $methods .= PHP_EOL . PHP_EOL . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__) . " Used in " . $view . PHP_EOL;
+ $methods .= CFactory::_('Placeholder')->update(
$method, $this->placeholders
);
}
@@ -18150,114 +17969,114 @@ class Interpretation extends Fields
// add if this is a function path
if ($funtion_path)
{
- $function[] = PHP_EOL . $this->_t(1)
+ $function[] = PHP_EOL . Indent::_(1)
. "protected function getThe" . $filter['function']
. StringHelper::safe(
$filter['custom']['text'], 'F'
) . "Selections()";
- $function[] = $this->_t(1) . "{";
+ $function[] = Indent::_(1) . "{";
}
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get a db connection.";
- $function[] = $this->_t(2) . "\$db = JFactory::getDbo();";
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "\$db = JFactory::getDbo();";
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Create a new query object.";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query = \$db->getQuery(true);";
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Select the text.";
- $function[] = $this->_t(2)
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Select the text.";
+ $function[] = Indent::_(2)
. "\$query->select(\$db->quoteName(array('a."
. $filter['custom']['id'] . "','a."
. $filter['custom']['text'] . "')));";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->from(\$db->quoteName('"
. $filter['custom']['table'] . "', 'a'));";
- $function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get the targeted groups";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$groups= JComponentHelper::getParams('com_"
. $component . "')->get('" . $filter['type'] . "');";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "if (!empty(\$groups) && count((array) \$groups) > 0)";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3)
. "\$query->join('LEFT', \$db->quoteName('#__user_usergroup_map', 'group') . ' ON (' . \$db->quoteName('group.user_id') . ' = ' . \$db->quoteName('a.id') . ')');";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "\$query->where('group.group_id IN (' . implode(',', \$groups) . ')');";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "\$query->order('a."
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "\$query->order('a."
. $filter['custom']['text'] . " ASC');";
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Reset the query using our newly populated query object.";
- $function[] = $this->_t(2) . "\$db->setQuery(\$query);";
- $function[] = PHP_EOL . $this->_t(2)
+ $function[] = Indent::_(2) . "\$db->setQuery(\$query);";
+ $function[] = PHP_EOL . Indent::_(2)
. "\$results = \$db->loadObjectList();";
- $function[] = $this->_t(2) . "\$_filter = array();";
+ $function[] = Indent::_(2) . "\$_filter = array();";
// if this is not a multi field
if (!$funtion_path && $filter['multi'] == 1)
{
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$_filter[] = JHtml::_('select.option', '', '- Select ' . JText:"
. ":_('" . $filter['lang'] . "') . ' -');";
}
- $function[] = $this->_t(2) . "if (\$results)";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(2) . "if (\$results)";
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3)
. "foreach (\$results as \$result)";
- $function[] = $this->_t(3) . "{";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(3) . "{";
+ $function[] = Indent::_(4)
. "\$_filter[] = JHtml::_('select.option', \$result->"
. $filter['custom']['id'] . ", \$result->"
. $filter['custom']['text'] . ");";
- $function[] = $this->_t(3) . "}";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "return \$_filter;";
+ $function[] = Indent::_(3) . "}";
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "return \$_filter;";
// add if this is a function path
if ($funtion_path)
{
- $function[] = $this->_t(1) . "}";
+ $function[] = Indent::_(1) . "}";
}
/* else
{
- $function[] = PHP_EOL.$this->_t(1) . "protected function getThe".$filter['function'].StringHelper::safe($filter['custom']['text'],'F')."Selections()";
- $function[] = $this->_t(1) . "{";
- $function[] = $this->_t(2) . "//".$this->setLine(__LINE__)." Get a db connection.";
- $function[] = $this->_t(2) . "\$db = JFactory::getDbo();";
- $function[] = PHP_EOL.$this->_t(2) . "//".$this->setLine(__LINE__)." Select the text.";
- $function[] = $this->_t(2) . "\$query = \$db->getQuery(true);";
- $function[] = PHP_EOL.$this->_t(2) . "//".$this->setLine(__LINE__)." Select the text.";
- $function[] = $this->_t(2) . "\$query->select(\$db->quoteName(array('".$filter['custom']['id']."','".$filter['custom']['text']."')));";
- $function[] = $this->_t(2) . "\$query->from(\$db->quoteName('".$filter['custom']['table']."'));";
- $function[] = $this->_t(2) . "\$query->where(\$db->quoteName('published') . ' = 1');";
- $function[] = $this->_t(2) . "\$query->order(\$db->quoteName('".$filter['custom']['text']."') . ' ASC');";
- $function[] = PHP_EOL.$this->_t(2) . "//".$this->setLine(__LINE__)." Reset the query using our newly populated query object.";
- $function[] = $this->_t(2) . "\$db->setQuery(\$query);";
- $function[] = PHP_EOL.$this->_t(2) . "\$results = \$db->loadObjectList();";
- $function[] = PHP_EOL.$this->_t(2) . "if (\$results)";
- $function[] = $this->_t(2) . "{";
- $function[] = $this->_t(3) . "\$filter = array();";
- $function[] = $this->_t(3) . "\$batch = array();";
- $function[] = $this->_t(3) . "foreach (\$results as \$result)";
- $function[] = $this->_t(3) . "{";
+ $function[] = PHP_EOL.Indent::_(1) . "protected function getThe".$filter['function'].StringHelper::safe($filter['custom']['text'],'F')."Selections()";
+ $function[] = Indent::_(1) . "{";
+ $function[] = Indent::_(2) . "//".Line::_(__Line__, __Class__)." Get a db connection.";
+ $function[] = Indent::_(2) . "\$db = JFactory::getDbo();";
+ $function[] = PHP_EOL.Indent::_(2) . "//".Line::_(__Line__, __Class__)." Select the text.";
+ $function[] = Indent::_(2) . "\$query = \$db->getQuery(true);";
+ $function[] = PHP_EOL.Indent::_(2) . "//".Line::_(__Line__, __Class__)." Select the text.";
+ $function[] = Indent::_(2) . "\$query->select(\$db->quoteName(array('".$filter['custom']['id']."','".$filter['custom']['text']."')));";
+ $function[] = Indent::_(2) . "\$query->from(\$db->quoteName('".$filter['custom']['table']."'));";
+ $function[] = Indent::_(2) . "\$query->where(\$db->quoteName('published') . ' = 1');";
+ $function[] = Indent::_(2) . "\$query->order(\$db->quoteName('".$filter['custom']['text']."') . ' ASC');";
+ $function[] = PHP_EOL.Indent::_(2) . "//".Line::_(__Line__, __Class__)." Reset the query using our newly populated query object.";
+ $function[] = Indent::_(2) . "\$db->setQuery(\$query);";
+ $function[] = PHP_EOL.Indent::_(2) . "\$results = \$db->loadObjectList();";
+ $function[] = PHP_EOL.Indent::_(2) . "if (\$results)";
+ $function[] = Indent::_(2) . "{";
+ $function[] = Indent::_(3) . "\$filter = array();";
+ $function[] = Indent::_(3) . "\$batch = array();";
+ $function[] = Indent::_(3) . "foreach (\$results as \$result)";
+ $function[] = Indent::_(3) . "{";
if ($filter['custom']['text'] === 'user')
{
- $function[] = $this->_t(4) . "\$filter[] = JHtml::_('select.option', \$result->".$filter['custom']['text'].", JFactory::getUser(\$result->".$filter['custom']['text'].")->name);";
- $function[] = $this->_t(4) . "\$batch[] = JHtml::_('select.option', \$result->".$filter['custom']['id'].", JFactory::getUser(\$result->".$filter['custom']['text'].")->name);";
+ $function[] = Indent::_(4) . "\$filter[] = JHtml::_('select.option', \$result->".$filter['custom']['text'].", JFactory::getUser(\$result->".$filter['custom']['text'].")->name);";
+ $function[] = Indent::_(4) . "\$batch[] = JHtml::_('select.option', \$result->".$filter['custom']['id'].", JFactory::getUser(\$result->".$filter['custom']['text'].")->name);";
}
else
{
- $function[] = $this->_t(4) . "\$filter[] = JHtml::_('select.option', \$result->".$filter['custom']['text'].", \$result->".$filter['custom']['text'].");";
- $function[] = $this->_t(4) . "\$batch[] = JHtml::_('select.option', \$result->".$filter['custom']['id'].", \$result->".$filter['custom']['text'].");";
+ $function[] = Indent::_(4) . "\$filter[] = JHtml::_('select.option', \$result->".$filter['custom']['text'].", \$result->".$filter['custom']['text'].");";
+ $function[] = Indent::_(4) . "\$batch[] = JHtml::_('select.option', \$result->".$filter['custom']['id'].", \$result->".$filter['custom']['text'].");";
}
- $function[] = $this->_t(3) . "}";
- $function[] = $this->_t(3) . "return array('filter' => \$filter, 'batch' => \$batch);";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "return false;";
- $function[] = $this->_t(1) . "}";
+ $function[] = Indent::_(3) . "}";
+ $function[] = Indent::_(3) . "return array('filter' => \$filter, 'batch' => \$batch);";
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "return false;";
+ $function[] = Indent::_(1) . "}";
} */
}
elseif ($filter['type'] != 'category'
@@ -18278,139 +18097,139 @@ class Interpretation extends Fields
// add if this is a function path
if ($funtion_path)
{
- $function[] = PHP_EOL . $this->_t(1)
+ $function[] = PHP_EOL . Indent::_(1)
. "protected function getThe" . $filter['function']
. "Selections()";
- $function[] = $this->_t(1) . "{";
- $function[] = $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(1) . "{";
+ $function[] = Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " Get a db connection.";
}
else
{
- $function[] = "//" . $this->setLine(__LINE__)
+ $function[] = "//" . Line::_(__Line__, __Class__)
. " Get a db connection.";
}
- $function[] = $this->_t(2) . "\$db = JFactory::getDbo();";
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $function[] = Indent::_(2) . "\$db = JFactory::getDbo();";
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Create a new query object.";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query = \$db->getQuery(true);";
// check if usergroup as we change to an object query
if ($filter['type'] === 'usergroup')
{
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Select the text.";
- $function[] = $this->_t(2)
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Select the text.";
+ $function[] = Indent::_(2)
. "\$query->select(\$db->quoteName('g."
. $filter['code'] . "', 'id'));";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->select(\$db->quoteName('ug.title', 'title'));";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->from(\$db->quoteName('#__" . $component
. "_" . $filter['database'] . "', 'g'));";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->join('LEFT', \$db->quoteName('#__usergroups', 'ug') . ' ON (' . (\$db->quoteName('g."
. $filter['code']
. "') . ' = ' . \$db->quoteName('ug.id') . ')'));";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->order(\$db->quoteName('title') . ' ASC');";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->group(\$db->quoteName('ug.id'));";
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Reset the query using our newly populated query object.";
- $function[] = $this->_t(2) . "\$db->setQuery(\$query);";
- $function[] = PHP_EOL . $this->_t(2)
+ $function[] = Indent::_(2) . "\$db->setQuery(\$query);";
+ $function[] = PHP_EOL . Indent::_(2)
. "\$results = \$db->loadObjectList();";
}
else
{
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Select the text.";
- $function[] = $this->_t(2)
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Select the text.";
+ $function[] = Indent::_(2)
. "\$query->select(\$db->quoteName('"
. $filter['code'] . "'));";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->from(\$db->quoteName('#__" . $component
. "_" . $filter['database'] . "'));";
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$query->order(\$db->quoteName('"
. $filter['code'] . "') . ' ASC');";
- $function[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__)
+ $function[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__)
. " Reset the query using our newly populated query object.";
- $function[] = $this->_t(2) . "\$db->setQuery(\$query);";
- $function[] = PHP_EOL . $this->_t(2)
+ $function[] = Indent::_(2) . "\$db->setQuery(\$query);";
+ $function[] = PHP_EOL . Indent::_(2)
. "\$results = \$db->loadColumn();";
}
- $function[] = $this->_t(2) . "\$_filter = array();";
+ $function[] = Indent::_(2) . "\$_filter = array();";
// if this is not a multi field
if (!$funtion_path && $filter['multi'] == 1)
{
- $function[] = $this->_t(2)
+ $function[] = Indent::_(2)
. "\$_filter[] = JHtml::_('select.option', '', '- ' . JText:"
. ":_('" . $filter['lang_select'] . "') . ' -');";
}
- $function[] = PHP_EOL . $this->_t(2) . "if (\$results)";
- $function[] = $this->_t(2) . "{";
+ $function[] = PHP_EOL . Indent::_(2) . "if (\$results)";
+ $function[] = Indent::_(2) . "{";
// check if translated value is used
if ($funtion_path && $translation)
{
- $function[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " get model";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "\$model = \$this->getModel();";
}
elseif ($translation)
{
- $function[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " get " . $nameListCode . "model";
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "\$model = " . $Component . "Helper::getModel('"
. $nameListCode . "');";
}
// check if usergroup as we change to an object query
if ($filter['type'] !== 'usergroup')
{
- $function[] = $this->_t(3)
+ $function[] = Indent::_(3)
. "\$results = array_unique(\$results);";
}
- $function[] = $this->_t(3) . "foreach (\$results as \$"
+ $function[] = Indent::_(3) . "foreach (\$results as \$"
. $filter['code'] . ")";
- $function[] = $this->_t(3) . "{";
+ $function[] = Indent::_(3) . "{";
// check if translated value is used
if ($translation)
{
- $function[] = $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Translate the " . $filter['code']
. " selection";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(4)
. "\$text = \$model->selectionTranslation(\$"
. $filter['code'] . ",'" . $filter['code'] . "');";
- $function[] = $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Now add the " . $filter['code']
. " and its text to the options array";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(4)
. "\$_filter[] = JHtml::_('select.option', \$"
. $filter['code'] . ", JText:" . ":_(\$text));";
}
elseif ($filter['type'] === 'user')
{
- $function[] = $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Now add the " . $filter['code']
. " and its text to the options array";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(4)
. "\$_filter[] = JHtml::_('select.option', \$"
. $filter['code'] . ", JFactory::getUser(\$"
. $filter['code'] . ")->name);";
@@ -18419,34 +18238,34 @@ class Interpretation extends Fields
{
if ($filter['type'] === 'usergroup')
{
- $function[] = $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Now add the " . $filter['code']
. " and its text to the options array";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(4)
. "\$_filter[] = JHtml::_('select.option', \$"
. $filter['code'] . "->id, \$" . $filter['code']
. "->title);";
}
else
{
- $function[] = $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $function[] = Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Now add the " . $filter['code']
. " and its text to the options array";
- $function[] = $this->_t(4)
+ $function[] = Indent::_(4)
. "\$_filter[] = JHtml::_('select.option', \$"
. $filter['code'] . ", \$" . $filter['code']
. ");";
}
}
- $function[] = $this->_t(3) . "}";
- $function[] = $this->_t(2) . "}";
- $function[] = $this->_t(2) . "return \$_filter;";
+ $function[] = Indent::_(3) . "}";
+ $function[] = Indent::_(2) . "}";
+ $function[] = Indent::_(2) . "return \$_filter;";
// add if this is a function path
if ($funtion_path)
{
- $function[] = $this->_t(1) . "}";
+ $function[] = Indent::_(1) . "}";
}
}
// we check if this is a multi field
@@ -18476,7 +18295,7 @@ class Interpretation extends Fields
. $filter['id'] . '" target="_blank"';
$field_fix
= "if (\$this->multiple === false) { // <-- this if statement is needed";
- $field_fix .= PHP_EOL . $this->_t(1)
+ $field_fix .= PHP_EOL . Indent::_(1)
. "\$options[] = JHtml::_('select.option', '', 'Select an option'); // <-- the empty option";
$field_fix .= PHP_EOL . "} ";
$this->app->enqueueMessage(
@@ -18517,30 +18336,30 @@ class Interpretation extends Fields
public function setUniqueFields(&$view)
{
$fields = array();
- $fields[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $fields[] = $this->_t(1)
+ $fields[] = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $fields[] = Indent::_(1)
. " * Method to get the unique fields of this table.";
- $fields[] = $this->_t(1) . " *";
- $fields[] = $this->_t(1)
+ $fields[] = Indent::_(1) . " *";
+ $fields[] = Indent::_(1)
. " * @return mixed An array of field names, boolean false if none is set.";
- $fields[] = $this->_t(1) . " *";
- $fields[] = $this->_t(1) . " * @since 3.0";
- $fields[] = $this->_t(1) . " */";
- $fields[] = $this->_t(1) . "protected function getUniqueFields()";
- $fields[] = $this->_t(1) . "{";
+ $fields[] = Indent::_(1) . " *";
+ $fields[] = Indent::_(1) . " * @since 3.0";
+ $fields[] = Indent::_(1) . " */";
+ $fields[] = Indent::_(1) . "protected function getUniqueFields()";
+ $fields[] = Indent::_(1) . "{";
if (isset($this->dbUniqueKeys[$view])
&& ArrayHelper::check($this->dbUniqueKeys[$view]))
{
// if guid should also be added
if (isset($this->dbUniqueGuid[$view]))
{
- $fields[] = $this->_t(2) . "return array('" . implode(
+ $fields[] = Indent::_(2) . "return array('" . implode(
"','", $this->dbUniqueKeys[$view]
) . "', 'guid');";
}
else
{
- $fields[] = $this->_t(2) . "return array('" . implode(
+ $fields[] = Indent::_(2) . "return array('" . implode(
"','", $this->dbUniqueKeys[$view]
) . "');";
}
@@ -18548,13 +18367,13 @@ class Interpretation extends Fields
// if only GUID is found
elseif (isset($this->dbUniqueGuid[$view]))
{
- $fields[] = $this->_t(2) . "return array('guid');";
+ $fields[] = Indent::_(2) . "return array('guid');";
}
else
{
- $fields[] = $this->_t(2) . "return false;";
+ $fields[] = Indent::_(2) . "return false;";
}
- $fields[] = $this->_t(1) . "}";
+ $fields[] = Indent::_(1) . "}";
// return the unique fields
return implode(PHP_EOL, $fields);
@@ -18590,8 +18409,7 @@ class Interpretation extends Fields
))
{
// get component name
- $Component = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh];
+ $Component = $this->fileContentStatic[Placefix::_h('Component')];
// load the rest of the filters
foreach ($this->filterBuilder[$nameListCode] as $filter)
{
@@ -18609,53 +18427,53 @@ class Interpretation extends Fields
$type = StringHelper::safe(
$filter['custom']['type'], 'F'
);
- $fieldFilters[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Set " . $CodeName
+ $fieldFilters[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Set " . $CodeName
. " Selection";
- $fieldFilters[] = $this->_t(2) . "\$this->" . $codeName
+ $fieldFilters[] = Indent::_(2) . "\$this->" . $codeName
. "Options = JFormHelper::loadFieldType('" . $type
. "')->options;";
- $fieldFilters[] = $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $fieldFilters[] = Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " We do some sanitation for " . $CodeName
. " filter";
- $fieldFilters[] = $this->_t(2) . "if (" . $Component
+ $fieldFilters[] = Indent::_(2) . "if (" . $Component
. "Helper::checkArray(\$this->" . $codeName
. "Options) &&";
- $fieldFilters[] = $this->_t(3) . "isset(\$this->"
+ $fieldFilters[] = Indent::_(3) . "isset(\$this->"
. $codeName
. "Options[0]->value) &&";
- $fieldFilters[] = $this->_t(3) . "!" . $Component
+ $fieldFilters[] = Indent::_(3) . "!" . $Component
. "Helper::checkString(\$this->" . $codeName
. "Options[0]->value))";
- $fieldFilters[] = $this->_t(2) . "{";
- $fieldFilters[] = $this->_t(3) . "unset(\$this->"
+ $fieldFilters[] = Indent::_(2) . "{";
+ $fieldFilters[] = Indent::_(3) . "unset(\$this->"
. $codeName
. "Options[0]);";
- $fieldFilters[] = $this->_t(2) . "}";
- $fieldFilters[] = $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $fieldFilters[] = Indent::_(2) . "}";
+ $fieldFilters[] = Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Only load " . $CodeName
. " filter if it has values";
- $fieldFilters[] = $this->_t(2) . "if (" . $Component
+ $fieldFilters[] = Indent::_(2) . "if (" . $Component
. "Helper::checkArray(\$this->" . $codeName
. "Options))";
- $fieldFilters[] = $this->_t(2) . "{";
- $fieldFilters[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fieldFilters[] = Indent::_(2) . "{";
+ $fieldFilters[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " " . $CodeName . " Filter";
- $fieldFilters[] = $this->_t(3) . "JHtmlSidebar::addFilter(";
- $fieldFilters[] = $this->_t(4) . "'- Select ' . JText:"
+ $fieldFilters[] = Indent::_(3) . "JHtmlSidebar::addFilter(";
+ $fieldFilters[] = Indent::_(4) . "'- Select ' . JText:"
. ":_('" . $filter['lang'] . "') . ' -',";
- $fieldFilters[] = $this->_t(4) . "'filter_"
+ $fieldFilters[] = Indent::_(4) . "'filter_"
. $filter['code']
. "',";
- $fieldFilters[] = $this->_t(4)
+ $fieldFilters[] = Indent::_(4)
. "JHtml::_('select.options', \$this->" . $codeName
. "Options, 'value', 'text', \$this->state->get('filter."
. $filter['code'] . "'))";
- $fieldFilters[] = $this->_t(3) . ");";
- $fieldFilters[] = $this->_t(2) . "}";
+ $fieldFilters[] = Indent::_(3) . ");";
+ $fieldFilters[] = Indent::_(2) . "}";
}
elseif ($filter['type'] != 'category')
{
@@ -18676,53 +18494,53 @@ class Interpretation extends Fields
$functionName = "\$this->getThe" . $filter['function']
. "Selections();";
}
- $fieldFilters[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Set " . $Codename
+ $fieldFilters[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Set " . $Codename
. " Selection";
- $fieldFilters[] = $this->_t(2) . "\$this->"
+ $fieldFilters[] = Indent::_(2) . "\$this->"
. $filter['code']
. "Options = " . $functionName;
- $fieldFilters[] = $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $fieldFilters[] = Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " We do some sanitation for " . $Codename
. " filter";
- $fieldFilters[] = $this->_t(2) . "if (" . $Component
+ $fieldFilters[] = Indent::_(2) . "if (" . $Component
. "Helper::checkArray(\$this->" . $filter['code']
. "Options) &&";
- $fieldFilters[] = $this->_t(3) . "isset(\$this->"
+ $fieldFilters[] = Indent::_(3) . "isset(\$this->"
. $filter['code'] . "Options[0]->value) &&";
- $fieldFilters[] = $this->_t(3) . "!" . $Component
+ $fieldFilters[] = Indent::_(3) . "!" . $Component
. "Helper::checkString(\$this->" . $filter['code']
. "Options[0]->value))";
- $fieldFilters[] = $this->_t(2) . "{";
- $fieldFilters[] = $this->_t(3) . "unset(\$this->"
+ $fieldFilters[] = Indent::_(2) . "{";
+ $fieldFilters[] = Indent::_(3) . "unset(\$this->"
. $filter['code'] . "Options[0]);";
- $fieldFilters[] = $this->_t(2) . "}";
- $fieldFilters[] = $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $fieldFilters[] = Indent::_(2) . "}";
+ $fieldFilters[] = Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Only load " . $Codename
. " filter if it has values";
- $fieldFilters[] = $this->_t(2) . "if (" . $Component
+ $fieldFilters[] = Indent::_(2) . "if (" . $Component
. "Helper::checkArray(\$this->" . $filter['code']
. "Options))";
- $fieldFilters[] = $this->_t(2) . "{";
- $fieldFilters[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fieldFilters[] = Indent::_(2) . "{";
+ $fieldFilters[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " " . $Codename . " Filter";
- $fieldFilters[] = $this->_t(3) . "JHtmlSidebar::addFilter(";
- $fieldFilters[] = $this->_t(4) . "'- Select '.JText:"
+ $fieldFilters[] = Indent::_(3) . "JHtmlSidebar::addFilter(";
+ $fieldFilters[] = Indent::_(4) . "'- Select '.JText:"
. ":_('" . $filter['lang'] . "').' -',";
- $fieldFilters[] = $this->_t(4) . "'filter_"
+ $fieldFilters[] = Indent::_(4) . "'filter_"
. $filter['code']
. "',";
- $fieldFilters[] = $this->_t(4)
+ $fieldFilters[] = Indent::_(4)
. "JHtml::_('select.options', \$this->"
. $filter['code']
. "Options, 'value', 'text', \$this->state->get('filter."
. $filter['code'] . "'))";
- $fieldFilters[] = $this->_t(3) . ");";
+ $fieldFilters[] = Indent::_(3) . ");";
- $fieldFilters[] = $this->_t(2) . "}";
+ $fieldFilters[] = Indent::_(2) . "}";
}
}
}
@@ -18755,20 +18573,20 @@ class Interpretation extends Fields
&& $this->adminFilterType[$nameListCode] == 1)
{
// set batch
- $filter[] = PHP_EOL . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $filter[] = PHP_EOL . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Only load publish filter if state change is allowed";
- $filter[] = $this->_t(2)
+ $filter[] = Indent::_(2)
. "if (\$this->canState)";
- $filter[] = $this->_t(2) . "{";
- $filter[] = $this->_t(3) . "JHtmlSidebar::addFilter(";
- $filter[] = $this->_t(4) . "JText:"
+ $filter[] = Indent::_(2) . "{";
+ $filter[] = Indent::_(3) . "JHtmlSidebar::addFilter(";
+ $filter[] = Indent::_(4) . "JText:"
. ":_('JOPTION_SELECT_PUBLISHED'),";
- $filter[] = $this->_t(4) . "'filter_published',";
- $filter[] = $this->_t(4)
+ $filter[] = Indent::_(4) . "'filter_published',";
+ $filter[] = Indent::_(4)
. "JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', \$this->state->get('filter.published'), true)";
- $filter[] = $this->_t(3) . ");";
- $filter[] = $this->_t(2) . "}";
+ $filter[] = Indent::_(3) . ");";
+ $filter[] = Indent::_(2) . "}";
// check if view has access
if (isset($this->accessBuilder[$nameSingleCode])
&& StringHelper::check(
@@ -18776,13 +18594,13 @@ class Interpretation extends Fields
)
&& !isset($this->fieldsNames[$nameSingleCode]['access']))
{
- $filter[] = PHP_EOL . $this->_t(2) . "JHtmlSidebar::addFilter(";
- $filter[] = $this->_t(3) . "JText:"
+ $filter[] = PHP_EOL . Indent::_(2) . "JHtmlSidebar::addFilter(";
+ $filter[] = Indent::_(3) . "JText:"
. ":_('JOPTION_SELECT_ACCESS'),";
- $filter[] = $this->_t(3) . "'filter_access',";
- $filter[] = $this->_t(3)
+ $filter[] = Indent::_(3) . "'filter_access',";
+ $filter[] = Indent::_(3)
. "JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', \$this->state->get('filter.access'))";
- $filter[] = $this->_t(2) . ");";
+ $filter[] = Indent::_(2) . ");";
}
}
}
@@ -18810,17 +18628,17 @@ class Interpretation extends Fields
&& $this->categoryBuilder[$nameListCode]['filter'] >= 1)
{
// set filter
- $filter[] = PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Category Filter.";
- $filter[] = $this->_t(2) . "JHtmlSidebar::addFilter(";
- $filter[] = $this->_t(3) . "JText:"
+ $filter[] = PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Category Filter.";
+ $filter[] = Indent::_(2) . "JHtmlSidebar::addFilter(";
+ $filter[] = Indent::_(3) . "JText:"
. ":_('JOPTION_SELECT_CATEGORY'),";
- $filter[] = $this->_t(3) . "'filter_category_id',";
- $filter[] = $this->_t(3)
+ $filter[] = Indent::_(3) . "'filter_category_id',";
+ $filter[] = Indent::_(3)
. "JHtml::_('select.options', JHtml::_('category.options', '"
. $this->categoryBuilder[$nameListCode]['extension']
. "'), 'value', 'text', \$this->state->get('filter.category_id'))";
- $filter[] = $this->_t(2) . ");";
+ $filter[] = Indent::_(2) . ");";
}
}
@@ -18856,8 +18674,7 @@ class Interpretation extends Fields
$get_values = true;
}
// get component name
- $Component = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh];
+ $Component = $this->fileContentStatic[Placefix::_h('Component')];
// load the rest of the batch options
foreach ($this->filterBuilder[$nameListCode] as $filter)
{
@@ -18872,58 +18689,58 @@ class Interpretation extends Fields
. StringHelper::safe(
$filter['custom']['text'], 'F'
);
- $fieldBatch[] = PHP_EOL . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $fieldBatch[] = PHP_EOL . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Only load " . $CodeName
. " batch if create, edit, and batch is allowed";
- $fieldBatch[] = $this->_t(2)
+ $fieldBatch[] = Indent::_(2)
. "if (\$this->canBatch && \$this->canCreate && \$this->canEdit)";
- $fieldBatch[] = $this->_t(2) . "{";
+ $fieldBatch[] = Indent::_(2) . "{";
// add the get values here
if ($get_values)
{
$type = StringHelper::safe(
$filter['custom']['type'], 'F'
);
- $fieldBatch[] = $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " Set " . $CodeName
+ $fieldBatch[] = Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " Set " . $CodeName
. " Selection";
- $fieldBatch[] = $this->_t(3) . "\$this->" . $codeName
+ $fieldBatch[] = Indent::_(3) . "\$this->" . $codeName
. "Options = JFormHelper::loadFieldType('" . $type
. "')->options;";
- $fieldBatch[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fieldBatch[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " We do some sanitation for " . $CodeName
. " filter";
- $fieldBatch[] = $this->_t(3) . "if (" . $Component
+ $fieldBatch[] = Indent::_(3) . "if (" . $Component
. "Helper::checkArray(\$this->" . $codeName
. "Options) &&";
- $fieldBatch[] = $this->_t(4) . "isset(\$this->"
+ $fieldBatch[] = Indent::_(4) . "isset(\$this->"
. $codeName
. "Options[0]->value) &&";
- $fieldBatch[] = $this->_t(4) . "!" . $Component
+ $fieldBatch[] = Indent::_(4) . "!" . $Component
. "Helper::checkString(\$this->" . $codeName
. "Options[0]->value))";
- $fieldBatch[] = $this->_t(3) . "{";
- $fieldBatch[] = $this->_t(4) . "unset(\$this->"
+ $fieldBatch[] = Indent::_(3) . "{";
+ $fieldBatch[] = Indent::_(4) . "unset(\$this->"
. $codeName
. "Options[0]);";
- $fieldBatch[] = $this->_t(3) . "}";
+ $fieldBatch[] = Indent::_(3) . "}";
}
- $fieldBatch[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fieldBatch[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " " . $CodeName . " Batch Selection";
- $fieldBatch[] = $this->_t(3)
+ $fieldBatch[] = Indent::_(3)
. "JHtmlBatch_::addListSelection(";
- $fieldBatch[] = $this->_t(4) . "'- Keep Original '.JText:"
+ $fieldBatch[] = Indent::_(4) . "'- Keep Original '.JText:"
. ":_('" . $filter['lang'] . "').' -',";
- $fieldBatch[] = $this->_t(4) . "'batch[" . $filter['code']
+ $fieldBatch[] = Indent::_(4) . "'batch[" . $filter['code']
. "]',";
- $fieldBatch[] = $this->_t(4)
+ $fieldBatch[] = Indent::_(4)
. "JHtml::_('select.options', \$this->" . $codeName
. "Options, 'value', 'text')";
- $fieldBatch[] = $this->_t(3) . ");";
- $fieldBatch[] = $this->_t(2) . "}";
+ $fieldBatch[] = Indent::_(3) . ");";
+ $fieldBatch[] = Indent::_(2) . "}";
}
elseif ($filter['type'] != 'category')
{
@@ -18931,55 +18748,55 @@ class Interpretation extends Fields
$filter['code'], 'W'
);
- $fieldBatch[] = PHP_EOL . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $fieldBatch[] = PHP_EOL . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Only load " . $CodeName
. " batch if create, edit, and batch is allowed";
- $fieldBatch[] = $this->_t(2)
+ $fieldBatch[] = Indent::_(2)
. "if (\$this->canBatch && \$this->canCreate && \$this->canEdit)";
- $fieldBatch[] = $this->_t(2) . "{";
+ $fieldBatch[] = Indent::_(2) . "{";
// add the get values here
if ($get_values)
{
- $fieldBatch[] = $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " Set " . $CodeName
+ $fieldBatch[] = Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " Set " . $CodeName
. " Selection";
- $fieldBatch[] = $this->_t(3) . "\$this->"
+ $fieldBatch[] = Indent::_(3) . "\$this->"
. $filter['code']
. "Options = JFormHelper::loadFieldType('"
. $filter['filter_type']
. "')->options;";
- $fieldBatch[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fieldBatch[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " We do some sanitation for " . $CodeName
. " filter";
- $fieldBatch[] = $this->_t(3) . "if (" . $Component
+ $fieldBatch[] = Indent::_(3) . "if (" . $Component
. "Helper::checkArray(\$this->" . $filter['code']
. "Options) &&";
- $fieldBatch[] = $this->_t(4) . "isset(\$this->"
+ $fieldBatch[] = Indent::_(4) . "isset(\$this->"
. $filter['code'] . "Options[0]->value) &&";
- $fieldBatch[] = $this->_t(4) . "!" . $Component
+ $fieldBatch[] = Indent::_(4) . "!" . $Component
. "Helper::checkString(\$this->" . $filter['code']
. "Options[0]->value))";
- $fieldBatch[] = $this->_t(3) . "{";
- $fieldBatch[] = $this->_t(4) . "unset(\$this->"
+ $fieldBatch[] = Indent::_(3) . "{";
+ $fieldBatch[] = Indent::_(4) . "unset(\$this->"
. $filter['code'] . "Options[0]);";
- $fieldBatch[] = $this->_t(3) . "}";
+ $fieldBatch[] = Indent::_(3) . "}";
}
- $fieldBatch[] = $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fieldBatch[] = Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " " . $CodeName . " Batch Selection";
- $fieldBatch[] = $this->_t(3)
+ $fieldBatch[] = Indent::_(3)
. "JHtmlBatch_::addListSelection(";
- $fieldBatch[] = $this->_t(4) . "'- Keep Original '.JText:"
+ $fieldBatch[] = Indent::_(4) . "'- Keep Original '.JText:"
. ":_('" . $filter['lang'] . "').' -',";
- $fieldBatch[] = $this->_t(4) . "'batch[" . $filter['code']
+ $fieldBatch[] = Indent::_(4) . "'batch[" . $filter['code']
. "]',";
- $fieldBatch[] = $this->_t(4)
+ $fieldBatch[] = Indent::_(4)
. "JHtml::_('select.options', \$this->"
. $filter['code'] . "Options, 'value', 'text')";
- $fieldBatch[] = $this->_t(3) . ");";
- $fieldBatch[] = $this->_t(2) . "}";
+ $fieldBatch[] = Indent::_(3) . ");";
+ $fieldBatch[] = Indent::_(2) . "}";
}
}
}
@@ -19009,20 +18826,20 @@ class Interpretation extends Fields
$this->componentData->name_code, 'U'
);
// set batch
- $batch[] = PHP_EOL . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $batch[] = PHP_EOL . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Only load published batch if state and batch is allowed";
- $batch[] = $this->_t(2)
+ $batch[] = Indent::_(2)
. "if (\$this->canState && \$this->canBatch)";
- $batch[] = $this->_t(2) . "{";
- $batch[] = $this->_t(3) . "JHtmlBatch_::addListSelection(";
- $batch[] = $this->_t(4) . "JText:" . ":_('COM_" . $COPMONENT
+ $batch[] = Indent::_(2) . "{";
+ $batch[] = Indent::_(3) . "JHtmlBatch_::addListSelection(";
+ $batch[] = Indent::_(4) . "JText:" . ":_('COM_" . $COPMONENT
. "_KEEP_ORIGINAL_STATE'),";
- $batch[] = $this->_t(4) . "'batch[published]',";
- $batch[] = $this->_t(4)
+ $batch[] = Indent::_(4) . "'batch[published]',";
+ $batch[] = Indent::_(4)
. "JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)";
- $batch[] = $this->_t(3) . ");";
- $batch[] = $this->_t(2) . "}";
+ $batch[] = Indent::_(3) . ");";
+ $batch[] = Indent::_(2) . "}";
// check if view has access
if (isset($this->accessBuilder[$nameSingleCode])
&& StringHelper::check(
@@ -19030,20 +18847,20 @@ class Interpretation extends Fields
)
&& !isset($this->fieldsNames[$nameSingleCode]['access']))
{
- $batch[] = PHP_EOL . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $batch[] = PHP_EOL . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Only load access batch if create, edit and batch is allowed";
- $batch[] = $this->_t(2)
+ $batch[] = Indent::_(2)
. "if (\$this->canBatch && \$this->canCreate && \$this->canEdit)";
- $batch[] = $this->_t(2) . "{";
- $batch[] = $this->_t(3) . "JHtmlBatch_::addListSelection(";
- $batch[] = $this->_t(4) . "JText:" . ":_('COM_" . $COPMONENT
+ $batch[] = Indent::_(2) . "{";
+ $batch[] = Indent::_(3) . "JHtmlBatch_::addListSelection(";
+ $batch[] = Indent::_(4) . "JText:" . ":_('COM_" . $COPMONENT
. "_KEEP_ORIGINAL_ACCESS'),";
- $batch[] = $this->_t(4) . "'batch[access]',";
- $batch[] = $this->_t(4)
+ $batch[] = Indent::_(4) . "'batch[access]',";
+ $batch[] = Indent::_(4)
. "JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')";
- $batch[] = $this->_t(3) . ");";
- $batch[] = $this->_t(2) . "}";
+ $batch[] = Indent::_(3) . ");";
+ $batch[] = Indent::_(2) . "}";
}
}
@@ -19069,21 +18886,21 @@ class Interpretation extends Fields
$this->componentData->name_code, 'U'
);
// set filter
- $batch[] = PHP_EOL . $this->_t(2)
+ $batch[] = PHP_EOL . Indent::_(2)
. "if (\$this->canBatch && \$this->canCreate && \$this->canEdit)";
- $batch[] = $this->_t(2) . "{";
- $batch[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $batch[] = Indent::_(2) . "{";
+ $batch[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Category Batch selection.";
- $batch[] = $this->_t(3) . "JHtmlBatch_::addListSelection(";
- $batch[] = $this->_t(4) . "JText:" . ":_('COM_" . $COPMONENT
+ $batch[] = Indent::_(3) . "JHtmlBatch_::addListSelection(";
+ $batch[] = Indent::_(4) . "JText:" . ":_('COM_" . $COPMONENT
. "_KEEP_ORIGINAL_CATEGORY'),";
- $batch[] = $this->_t(4) . "'batch[category]',";
- $batch[] = $this->_t(4)
+ $batch[] = Indent::_(4) . "'batch[category]',";
+ $batch[] = Indent::_(4)
. "JHtml::_('select.options', JHtml::_('category.options', '"
. $this->categoryBuilder[$nameListCode]['extension']
. "'), 'value', 'text')";
- $batch[] = $this->_t(3) . ");";
- $batch[] = $this->_t(2) . "}";
+ $batch[] = Indent::_(3) . ");";
+ $batch[] = Indent::_(2) . "}";
}
}
@@ -19121,68 +18938,59 @@ class Interpretation extends Fields
$otherView = $nameSingleCode;
}
// set the OtherView value
- $this->fileContentDynamic['category' . $otherView][$this->hhh
- . 'otherview' . $this->hhh]
+ $this->fileContentDynamic['category' . $otherView][Placefix::_h('otherview')]
= $otherView;
// load the category helper details in not already loaded
if (!isset(
- $this->fileContentDynamic['category' . $otherView][$this->hhh
- . 'view' . $this->hhh]
+ $this->fileContentDynamic['category' . $otherView][Placefix::_h('view')]
))
{
// lets also set the category helper for this view
$target = array('site' => 'category' . $otherView);
$this->buildDynamique($target, 'category');
// insure the file gets updated
- $this->fileContentDynamic['category' . $otherView][$this->hhh
- . 'view' . $this->hhh]
+ $this->fileContentDynamic['category' . $otherView][Placefix::_h('view')]
= $otherView;
- $this->fileContentDynamic['category' . $otherView][$this->hhh
- . 'View' . $this->hhh]
+ $this->fileContentDynamic['category' . $otherView][Placefix::_h('View')]
= ucfirst($otherView);
- $this->fileContentDynamic['category' . $otherView][$this->hhh
- . 'views' . $this->hhh]
+ $this->fileContentDynamic['category' . $otherView][Placefix::_h('views')]
= $otherViews;
- $this->fileContentDynamic['category' . $otherView][$this->hhh
- . 'Views' . $this->hhh]
+ $this->fileContentDynamic['category' . $otherView][Placefix::_h('Views')]
= ucfirst($otherViews);
// set script to global helper file
$includeHelper = array();
- $includeHelper[] = "\n//" . $this->setLine(__LINE__)
+ $includeHelper[] = "\n//" . Line::_(__Line__, __Class__)
. "Insure this view category file is loaded.";
$includeHelper[] = "\$classname = '" . ucfirst($component)
. ucfirst($otherView) . "Categories';";
$includeHelper[] = "if (!class_exists(\$classname))";
$includeHelper[] = "{";
- $includeHelper[] = $this->_t(1)
+ $includeHelper[] = Indent::_(1)
. "\$path = JPATH_SITE . '/components/com_" . $component
. "/helpers/category" . $otherView . ".php';";
- $includeHelper[] = $this->_t(1) . "if (is_file(\$path))";
- $includeHelper[] = $this->_t(1) . "{";
- $includeHelper[] = $this->_t(2) . "include_once \$path;";
- $includeHelper[] = $this->_t(1) . "}";
+ $includeHelper[] = Indent::_(1) . "if (is_file(\$path))";
+ $includeHelper[] = Indent::_(1) . "{";
+ $includeHelper[] = Indent::_(2) . "include_once \$path;";
+ $includeHelper[] = Indent::_(1) . "}";
$includeHelper[] = "}";
- $this->fileContentStatic[$this->hhh . 'CATEGORY_CLASS_TREES'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('CATEGORY_CLASS_TREES')]
.= implode("\n", $includeHelper);
}
// return category view string
if (isset(
- $this->fileContentStatic[$this->hhh
- . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_CATEGORY_VIEWS')]
)
&& StringHelper::check(
- $this->fileContentStatic[$this->hhh
- . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_CATEGORY_VIEWS')]
))
{
- return "," . PHP_EOL . $this->_t(3) . '"'
+ return "," . PHP_EOL . Indent::_(3) . '"'
. $this->categoryBuilder[$nameListCode]['extension']
. '" => "' . $otherView . '"';
}
else
{
- return PHP_EOL . $this->_t(3) . '"'
+ return PHP_EOL . Indent::_(3) . '"'
. $this->categoryBuilder[$nameListCode]['extension']
. '" => "' . $otherView . '"';
}
@@ -19225,9 +19033,9 @@ class Interpretation extends Fields
$otherView = $nameSingleCode;
}
// setup the category script
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get the user object";
- $allow[] = $this->_t(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2) . "\$user = JFactory::getUser();";
// check if the item has permissions.
if ($coreLoad && isset($core['core.access'])
&& isset($this->permissionBuilder['global'][$core['core.access']])
@@ -19239,29 +19047,29 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
))
{
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Access check.";
- $allow[] = $this->_t(2) . "\$access = \$user->authorise('"
+ $allow[] = Indent::_(2) . "\$access = \$user->authorise('"
. $core['core.access'] . "', 'com_" . $component . "');";
- $allow[] = $this->_t(2) . "if (!\$access)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "return false;";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(2) . "if (!\$access)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "return false;";
+ $allow[] = Indent::_(2) . "}";
}
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "\$categoryId = ArrayHelper::getValue(\$data, 'catid', \$this->input->getInt('filter_category_id'), 'int');";
- $allow[] = $this->_t(2) . "\$allow = null;";
- $allow[] = PHP_EOL . $this->_t(2) . "if (\$categoryId)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "\$allow = null;";
+ $allow[] = PHP_EOL . Indent::_(2) . "if (\$categoryId)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " If the category has been passed in the URL check it.";
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "\$allow = \$user->authorise('core.create', \$this->option . '."
. $otherView . ".category.' . \$categoryId);";
- $allow[] = $this->_t(2) . "}";
- $allow[] = PHP_EOL . $this->_t(2) . "if (\$allow === null)";
- $allow[] = $this->_t(2) . "{";
+ $allow[] = Indent::_(2) . "}";
+ $allow[] = PHP_EOL . Indent::_(2) . "if (\$allow === null)";
+ $allow[] = Indent::_(2) . "{";
// check if the item has permissions.
if ($coreLoad && isset($core['core.create'])
&& isset($this->permissionBuilder['global'][$core['core.create']])
@@ -19274,29 +19082,29 @@ class Interpretation extends Fields
))
{
// setup the default script
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(3) . "return \$user->authorise('"
+ $allow[] = Indent::_(3) . "return \$user->authorise('"
. $core['core.create'] . "', \$this->option);";
}
else
{
// setup the default script
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(3) . "return parent::allowAdd(\$data);";
+ $allow[] = Indent::_(3) . "return parent::allowAdd(\$data);";
}
- $allow[] = $this->_t(2) . "}";
- $allow[] = $this->_t(2) . "else";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "return \$allow;";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(2) . "}";
+ $allow[] = Indent::_(2) . "else";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "return \$allow;";
+ $allow[] = Indent::_(2) . "}";
}
else
{
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get user object.";
- $allow[] = $this->_t(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2) . "\$user = JFactory::getUser();";
// check if the item has permissions.
if ($coreLoad && isset($core['core.access'])
&& isset($this->permissionBuilder['global'][$core['core.access']])
@@ -19308,14 +19116,14 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
))
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Access check.";
- $allow[] = $this->_t(2) . "\$access = \$user->authorise('"
+ $allow[] = Indent::_(2) . "\$access = \$user->authorise('"
. $core['core.access'] . "', 'com_" . $component . "');";
- $allow[] = $this->_t(2) . "if (!\$access)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "return false;";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(2) . "if (!\$access)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "return false;";
+ $allow[] = Indent::_(2) . "}";
}
// load custom permission script
$allow[] = $customAllow;
@@ -19331,17 +19139,17 @@ class Interpretation extends Fields
))
{
// setup the default script
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(2) . "return \$user->authorise('"
+ $allow[] = Indent::_(2) . "return \$user->authorise('"
. $core['core.create'] . "', \$this->option);";
}
else
{
// setup the default script
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(2) . "return parent::allowAdd(\$data);";
+ $allow[] = Indent::_(2) . "return parent::allowAdd(\$data);";
}
}
@@ -19384,12 +19192,12 @@ class Interpretation extends Fields
$otherView = $nameSingleCode;
}
// setup the category script
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get user object.";
- $allow[] = $this->_t(2) . "\$user = JFactory::getUser();";
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get record id.";
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
// load custom permission script
$allow[] = $customAllow;
@@ -19404,22 +19212,22 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
))
{
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Access check.";
- $allow[] = $this->_t(2) . "\$access = (\$user->authorise('"
+ $allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
. $core['core.access'] . "', 'com_" . $component . "."
. $otherView
. ".' . (int) \$recordId) && \$user->authorise('"
. $core['core.access'] . "', 'com_" . $component . "'));";
- $allow[] = $this->_t(2) . "if (!\$access)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "return false;";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(2) . "if (!\$access)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "return false;";
+ $allow[] = Indent::_(2) . "}";
}
- $allow[] = PHP_EOL . $this->_t(2) . "if (\$recordId)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit'])
@@ -19431,18 +19239,18 @@ class Interpretation extends Fields
$otherView, $this->permissionBuilder[$core['core.edit']]
))
{
- $allow[] = $this->_t(3) . "\$permission = \$user->authorise('"
+ $allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
. $core['core.edit'] . "', 'com_" . $component . "."
. $otherView . ".' . (int) \$recordId);";
}
else
{
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "\$permission = \$user->authorise('core.edit', 'com_"
. $component . "." . $otherView . ".' . (int) \$recordId);";
}
- $allow[] = $this->_t(3) . "if (!\$permission)";
- $allow[] = $this->_t(3) . "{";
+ $allow[] = Indent::_(3) . "if (!\$permission)";
+ $allow[] = Indent::_(3) . "{";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.own'])
&& isset($this->permissionBuilder[$core['core.edit.own']])
@@ -19453,37 +19261,37 @@ class Interpretation extends Fields
$otherView, $this->permissionBuilder[$core['core.edit.own']]
))
{
- $allow[] = $this->_t(4) . "if (\$user->authorise('"
+ $allow[] = Indent::_(4) . "if (\$user->authorise('"
. $core['core.edit.own'] . "', 'com_" . $component . "."
. $otherView . ".' . \$recordId))";
}
else
{
- $allow[] = $this->_t(4)
+ $allow[] = Indent::_(4)
. "if (\$user->authorise('core.edit.own', 'com_"
. $component . "." . $otherView . ".' . \$recordId))";
}
- $allow[] = $this->_t(4) . "{";
- $allow[] = $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(4) . "{";
+ $allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " Fallback on edit.own. Now test the owner is the user.";
- $allow[] = $this->_t(5)
+ $allow[] = Indent::_(5)
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
- $allow[] = $this->_t(5) . "if (empty(\$ownerId))";
- $allow[] = $this->_t(5) . "{";
- $allow[] = $this->_t(6) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(5) . "if (empty(\$ownerId))";
+ $allow[] = Indent::_(5) . "{";
+ $allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
. " Need to do a lookup from the model.";
- $allow[] = $this->_t(6)
+ $allow[] = Indent::_(6)
. "\$record = \$this->getModel()->getItem(\$recordId);";
- $allow[] = PHP_EOL . $this->_t(6) . "if (empty(\$record))";
- $allow[] = $this->_t(6) . "{";
- $allow[] = $this->_t(7) . "return false;";
- $allow[] = $this->_t(6) . "}";
- $allow[] = $this->_t(6) . "\$ownerId = \$record->created_by;";
- $allow[] = $this->_t(5) . "}";
- $allow[] = PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
+ $allow[] = Indent::_(6) . "{";
+ $allow[] = Indent::_(7) . "return false;";
+ $allow[] = Indent::_(6) . "}";
+ $allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
+ $allow[] = Indent::_(5) . "}";
+ $allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " If the owner matches 'me' then do the test.";
- $allow[] = $this->_t(5) . "if (\$ownerId == \$user->id)";
- $allow[] = $this->_t(5) . "{";
+ $allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
+ $allow[] = Indent::_(5) . "{";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.own'])
&& isset($this->permissionBuilder['global'][$core['core.edit.own']])
@@ -19495,33 +19303,33 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit.own']]
))
{
- $allow[] = $this->_t(6) . "if (\$user->authorise('"
+ $allow[] = Indent::_(6) . "if (\$user->authorise('"
. $core['core.edit.own'] . "', 'com_" . $component . "'))";
}
else
{
- $allow[] = $this->_t(6)
+ $allow[] = Indent::_(6)
. "if (\$user->authorise('core.edit.own', 'com_"
. $component . "'))";
}
- $allow[] = $this->_t(6) . "{";
- $allow[] = $this->_t(7) . "return true;";
- $allow[] = $this->_t(6) . "}";
- $allow[] = $this->_t(5) . "}";
- $allow[] = $this->_t(4) . "}";
- $allow[] = $this->_t(4) . "return false;";
- $allow[] = $this->_t(3) . "}";
-// $allow[] = PHP_EOL.$this->_t(3) . "\$categoryId = (int) isset(\$data['catid']) ? \$data['catid']: \$this->getModel()->getItem(\$recordId)->catid;"; <-- remove category from check
-// $allow[] = PHP_EOL.$this->_t(3) . "if (\$categoryId)";
-// $allow[] = $this->_t(3) . "{";
-// $allow[] = $this->_t(4) . "//".$this->setLine(__LINE__)." The category has been set. Check the category permissions.";
-// $allow[] = $this->_t(4) . "\$catpermission = \$user->authorise('core.edit', \$this->option . '.".$otherView.".category.' . \$categoryId);";
-// $allow[] = $this->_t(4) . "if (!\$catpermission && !is_null(\$catpermission))";
-// $allow[] = $this->_t(4) . "{";
-// $allow[] = $this->_t(5) . "return false;";
-// $allow[] = $this->_t(4) . "}";
-// $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(6) . "{";
+ $allow[] = Indent::_(7) . "return true;";
+ $allow[] = Indent::_(6) . "}";
+ $allow[] = Indent::_(5) . "}";
+ $allow[] = Indent::_(4) . "}";
+ $allow[] = Indent::_(4) . "return false;";
+ $allow[] = Indent::_(3) . "}";
+// $allow[] = PHP_EOL.Indent::_(3) . "\$categoryId = (int) isset(\$data['catid']) ? \$data['catid']: \$this->getModel()->getItem(\$recordId)->catid;"; <-- remove category from check
+// $allow[] = PHP_EOL.Indent::_(3) . "if (\$categoryId)";
+// $allow[] = Indent::_(3) . "{";
+// $allow[] = Indent::_(4) . "//".Line::_(__Line__, __Class__)." The category has been set. Check the category permissions.";
+// $allow[] = Indent::_(4) . "\$catpermission = \$user->authorise('core.edit', \$this->option . '.".$otherView.".category.' . \$categoryId);";
+// $allow[] = Indent::_(4) . "if (!\$catpermission && !is_null(\$catpermission))";
+// $allow[] = Indent::_(4) . "{";
+// $allow[] = Indent::_(5) . "return false;";
+// $allow[] = Indent::_(4) . "}";
+// $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(2) . "}";
if ($coreLoad && isset($core['core.edit'])
&& isset($this->permissionBuilder['global'][$core['core.edit']])
&& ArrayHelper::check(
@@ -19532,28 +19340,28 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit']]
))
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Since there is no permission, revert to the component permissions.";
- $allow[] = $this->_t(2) . "return \$user->authorise('"
+ $allow[] = Indent::_(2) . "return \$user->authorise('"
. $core['core.edit'] . "', \$this->option);";
}
else
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Since there is no permission, revert to the component permissions.";
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "return parent::allowEdit(\$data, \$key);";
}
}
else
{
// setup the category script
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get user object.";
- $allow[] = $this->_t(2) . "\$user = JFactory::getUser();";
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " get record id.";
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
// load custom permission script
$allow[] = $customAllow;
@@ -19568,22 +19376,22 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.access']]
))
{
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Access check.";
- $allow[] = $this->_t(2) . "\$access = (\$user->authorise('"
+ $allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
. $core['core.access'] . "', 'com_" . $component . "."
. $nameSingleCode
. ".' . (int) \$recordId) && \$user->authorise('"
. $core['core.access'] . "', 'com_" . $component . "'));";
- $allow[] = $this->_t(2) . "if (!\$access)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "return false;";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(2) . "if (!\$access)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "return false;";
+ $allow[] = Indent::_(2) . "}";
}
- $allow[] = PHP_EOL . $this->_t(2) . "if (\$recordId)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit'])
@@ -19596,19 +19404,19 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit']]
))
{
- $allow[] = $this->_t(3) . "\$permission = \$user->authorise('"
+ $allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
. $core['core.edit'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$recordId);";
}
else
{
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "\$permission = \$user->authorise('core.edit', 'com_"
. $component . "." . $nameSingleCode
. ".' . (int) \$recordId);";
}
- $allow[] = $this->_t(3) . "if (!\$permission)";
- $allow[] = $this->_t(3) . "{";
+ $allow[] = Indent::_(3) . "if (!\$permission)";
+ $allow[] = Indent::_(3) . "{";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.own'])
&& isset($this->permissionBuilder[$core['core.edit.own']])
@@ -19620,38 +19428,38 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.own']]
))
{
- $allow[] = $this->_t(4) . "if (\$user->authorise('"
+ $allow[] = Indent::_(4) . "if (\$user->authorise('"
. $core['core.edit.own'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . \$recordId))";
}
else
{
- $allow[] = $this->_t(4)
+ $allow[] = Indent::_(4)
. "if (\$user->authorise('core.edit.own', 'com_"
. $component . "." . $nameSingleCode
. ".' . \$recordId))";
}
- $allow[] = $this->_t(4) . "{";
- $allow[] = $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(4) . "{";
+ $allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " Now test the owner is the user.";
- $allow[] = $this->_t(5)
+ $allow[] = Indent::_(5)
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
- $allow[] = $this->_t(5) . "if (empty(\$ownerId))";
- $allow[] = $this->_t(5) . "{";
- $allow[] = $this->_t(6) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(5) . "if (empty(\$ownerId))";
+ $allow[] = Indent::_(5) . "{";
+ $allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
. " Need to do a lookup from the model.";
- $allow[] = $this->_t(6)
+ $allow[] = Indent::_(6)
. "\$record = \$this->getModel()->getItem(\$recordId);";
- $allow[] = PHP_EOL . $this->_t(6) . "if (empty(\$record))";
- $allow[] = $this->_t(6) . "{";
- $allow[] = $this->_t(7) . "return false;";
- $allow[] = $this->_t(6) . "}";
- $allow[] = $this->_t(6) . "\$ownerId = \$record->created_by;";
- $allow[] = $this->_t(5) . "}";
- $allow[] = PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
+ $allow[] = Indent::_(6) . "{";
+ $allow[] = Indent::_(7) . "return false;";
+ $allow[] = Indent::_(6) . "}";
+ $allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
+ $allow[] = Indent::_(5) . "}";
+ $allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " If the owner matches 'me' then allow.";
- $allow[] = $this->_t(5) . "if (\$ownerId == \$user->id)";
- $allow[] = $this->_t(5) . "{";
+ $allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
+ $allow[] = Indent::_(5) . "{";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.own'])
&& isset($this->permissionBuilder['global'][$core['core.edit.own']])
@@ -19663,23 +19471,23 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit.own']]
))
{
- $allow[] = $this->_t(6) . "if (\$user->authorise('"
+ $allow[] = Indent::_(6) . "if (\$user->authorise('"
. $core['core.edit.own'] . "', 'com_" . $component . "'))";
}
else
{
- $allow[] = $this->_t(6)
+ $allow[] = Indent::_(6)
. "if (\$user->authorise('core.edit.own', 'com_"
. $component . "'))";
}
- $allow[] = $this->_t(6) . "{";
- $allow[] = $this->_t(7) . "return true;";
- $allow[] = $this->_t(6) . "}";
- $allow[] = $this->_t(5) . "}";
- $allow[] = $this->_t(4) . "}";
- $allow[] = $this->_t(4) . "return false;";
- $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(6) . "{";
+ $allow[] = Indent::_(7) . "return true;";
+ $allow[] = Indent::_(6) . "}";
+ $allow[] = Indent::_(5) . "}";
+ $allow[] = Indent::_(4) . "}";
+ $allow[] = Indent::_(4) . "return false;";
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(2) . "}";
if ($coreLoad && isset($core['core.edit'])
&& isset($this->permissionBuilder['global'][$core['core.edit']])
&& ArrayHelper::check(
@@ -19690,16 +19498,16 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit']]
))
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Since there is no permission, revert to the component permissions.";
- $allow[] = $this->_t(2) . "return \$user->authorise('"
+ $allow[] = Indent::_(2) . "return \$user->authorise('"
. $core['core.edit'] . "', \$this->option);";
}
else
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Since there is no permission, revert to the component permissions.";
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "return parent::allowEdit(\$data, \$key);";
}
}
@@ -19713,42 +19521,40 @@ class Interpretation extends Fields
$component = $this->componentCodeName;
// allways load these
$getForm = array();
- $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if xpath was set in options";
- $getForm[] = $this->_t(2) . "\$xpath = false;";
- $getForm[] = $this->_t(2) . "if (isset(\$options['xpath']))";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "\$xpath = \$options['xpath'];";
- $getForm[] = $this->_t(3) . "unset(\$options['xpath']);";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "\$xpath = false;";
+ $getForm[] = Indent::_(2) . "if (isset(\$options['xpath']))";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "\$xpath = \$options['xpath'];";
+ $getForm[] = Indent::_(3) . "unset(\$options['xpath']);";
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " check if clear form was set in options";
- $getForm[] = $this->_t(2) . "\$clear = false;";
- $getForm[] = $this->_t(2) . "if (isset(\$options['clear']))";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "\$clear = \$options['clear'];";
- $getForm[] = $this->_t(3) . "unset(\$options['clear']);";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "\$clear = false;";
+ $getForm[] = Indent::_(2) . "if (isset(\$options['clear']))";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "\$clear = \$options['clear'];";
+ $getForm[] = Indent::_(3) . "unset(\$options['clear']);";
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get the form.";
- $getForm[] = $this->_t(2) . "\$form = \$this->loadForm('com_"
+ $getForm[] = Indent::_(2) . "\$form = \$this->loadForm('com_"
. $component . "." . $nameSingleCode . "', '" . $nameSingleCode
. "', \$options, \$clear, \$xpath);";
- $getForm[] = PHP_EOL . $this->_t(2) . "if (empty(\$form))";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "return false;";
- $getForm[] = $this->_t(2) . "}";
+ $getForm[] = PHP_EOL . Indent::_(2) . "if (empty(\$form))";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "return false;";
+ $getForm[] = Indent::_(2) . "}";
// load license locker
if ($this->componentData->add_license
&& $this->componentData->license_type == 3
&& isset(
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'BOOLMETHOD' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('BOOLMETHOD')]
))
{
$getForm[] = $this->checkStatmentLicenseLocked(
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'BOOLMETHOD' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('BOOLMETHOD')]
);
}
// setup correct core target
@@ -19775,64 +19581,64 @@ class Interpretation extends Fields
$otherView = $nameSingleCode;
}
// setup the category script
- $getForm[] = PHP_EOL . $this->_t(2)
+ $getForm[] = PHP_EOL . Indent::_(2)
. "\$jinput = JFactory::getApplication()->input;";
- $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $getForm[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.";
- $getForm[] = $this->_t(2) . "if (\$jinput->get('a_id'))";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(2) . "if (\$jinput->get('a_id'))";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3)
. "\$id = \$jinput->get('a_id', 0, 'INT');";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " The back end uses id so we use that the rest of the time and set it to 0 by default.";
- $getForm[] = $this->_t(2) . "else";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "\$id = \$jinput->get('id', 0, 'INT');";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "else";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "\$id = \$jinput->get('id', 0, 'INT');";
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Determine correct permissions to check.";
- $getForm[] = $this->_t(2) . "if (\$this->getState('"
+ $getForm[] = Indent::_(2) . "if (\$this->getState('"
. $nameSingleCode . ".id'))";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "\$id = \$this->getState('"
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "\$id = \$this->getState('"
. $nameSingleCode . ".id');";
- $getForm[] = PHP_EOL . $this->_t(3) . "\$catid = 0;";
- $getForm[] = $this->_t(3)
+ $getForm[] = PHP_EOL . Indent::_(3) . "\$catid = 0;";
+ $getForm[] = Indent::_(3)
. "if (isset(\$this->getItem(\$id)->catid))";
- $getForm[] = $this->_t(3) . "{";
- $getForm[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "{";
+ $getForm[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " set category id";
- $getForm[] = $this->_t(4)
+ $getForm[] = Indent::_(4)
. "\$catid = \$this->getItem(\$id)->catid;";
- $getForm[] = PHP_EOL . $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $getForm[] = PHP_EOL . Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Existing record. Can only edit in selected categories.";
- $getForm[] = $this->_t(4)
+ $getForm[] = Indent::_(4)
. "\$form->setFieldAttribute('catid', 'action', 'core.edit');";
- $getForm[] = PHP_EOL . $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $getForm[] = PHP_EOL . Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " Existing record. Can only edit own items in selected categories.";
- $getForm[] = $this->_t(4)
+ $getForm[] = Indent::_(4)
. "\$form->setFieldAttribute('catid', 'action', 'core.edit.own');";
- $getForm[] = $this->_t(3) . "}";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = $this->_t(2) . "else";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "}";
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = Indent::_(2) . "else";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " New record. Can only create in selected categories.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('catid', 'action', 'core.create');";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = PHP_EOL . $this->_t(2)
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = PHP_EOL . Indent::_(2)
. "\$user = JFactory::getUser();";
- $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $getForm[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Check for existing item.";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on Edit State access controls.";
// get the other view
$otherView = $this->catCodeBuilder[$nameSingleCode]['view'];
@@ -19847,74 +19653,74 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.state']]
))
{
- $getForm[] = $this->_t(2)
+ $getForm[] = Indent::_(2)
. "if (\$id != 0 && (!\$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$id))";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_"
. $component . "." . $otherView
. ".category.' . (int) \$catid))";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "|| (\$id == 0 && !\$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component
. "')))";
}
else
{
- $getForm[] = $this->_t(2)
+ $getForm[] = Indent::_(2)
. "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_"
. $component . "." . $nameSingleCode
. ".' . (int) \$id))";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_"
. $component . "." . $otherView
. ".category.' . (int) \$catid))";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_"
. $component . "')))";
}
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('ordering', 'disabled', 'true');";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('published', 'disabled', 'true');";
- $getForm[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $getForm[] = PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Disable fields while saving.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('ordering', 'filter', 'unset');";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('published', 'filter', 'unset');";
- $getForm[] = $this->_t(2) . "}";
+ $getForm[] = Indent::_(2) . "}";
}
else
{
- $getForm[] = PHP_EOL . $this->_t(2)
+ $getForm[] = PHP_EOL . Indent::_(2)
. "\$jinput = JFactory::getApplication()->input;";
- $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $getForm[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.";
- $getForm[] = $this->_t(2) . "if (\$jinput->get('a_id'))";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(2) . "if (\$jinput->get('a_id'))";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3)
. "\$id = \$jinput->get('a_id', 0, 'INT');";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " The back end uses id so we use that the rest of the time and set it to 0 by default.";
- $getForm[] = $this->_t(2) . "else";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "\$id = \$jinput->get('id', 0, 'INT');";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = PHP_EOL . $this->_t(2)
+ $getForm[] = Indent::_(2) . "else";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "\$id = \$jinput->get('id', 0, 'INT');";
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = PHP_EOL . Indent::_(2)
. "\$user = JFactory::getUser();";
- $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $getForm[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Check for existing item.";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on Edit State access controls.";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.state'])
@@ -19927,50 +19733,50 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.state']]
))
{
- $getForm[] = $this->_t(2)
+ $getForm[] = Indent::_(2)
. "if (\$id != 0 && (!\$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$id))";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "|| (\$id == 0 && !\$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component
. "')))";
}
else
{
- $getForm[] = $this->_t(2)
+ $getForm[] = Indent::_(2)
. "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_"
. $component . "." . $nameSingleCode
. ".' . (int) \$id))";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_"
. $component . "')))";
}
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('ordering', 'disabled', 'true');";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('published', 'disabled', 'true');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('ordering', 'filter', 'unset');";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('published', 'filter', 'unset');";
- $getForm[] = $this->_t(2) . "}";
+ $getForm[] = Indent::_(2) . "}";
}
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " If this is a new item insure the greated by is set.";
- $getForm[] = $this->_t(2) . "if (0 == \$id)";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "if (0 == \$id)";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set the created_by to this user";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setValue('created_by', null, \$user->id);";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on Edit Creaded By access controls.";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.created_by'])
@@ -19983,34 +19789,34 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.created_by']]
))
{
- $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('"
+ $getForm[] = Indent::_(2) . "if (\$id != 0 && (!\$user->authorise('"
. $core['core.edit.created_by'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$id))";
- $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('"
+ $getForm[] = Indent::_(3) . "|| (\$id == 0 && !\$user->authorise('"
. $core['core.edit.created_by'] . "', 'com_" . $component
. "')))";
}
else
{
- $getForm[] = $this->_t(2)
+ $getForm[] = Indent::_(2)
. "if (!\$user->authorise('core.edit.created_by', 'com_"
. $component . "'))";
}
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('created_by', 'disabled', 'true');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('created_by', 'readonly', 'true');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('created_by', 'filter', 'unset');";
- $getForm[] = $this->_t(2) . "}";
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "}";
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on Edit Creaded Date access controls.";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.created'])
@@ -20023,28 +19829,28 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.created']]
))
{
- $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('"
+ $getForm[] = Indent::_(2) . "if (\$id != 0 && (!\$user->authorise('"
. $core['core.edit.created'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$id))";
- $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('"
+ $getForm[] = Indent::_(3) . "|| (\$id == 0 && !\$user->authorise('"
. $core['core.edit.created'] . "', 'com_" . $component . "')))";
}
else
{
- $getForm[] = $this->_t(2)
+ $getForm[] = Indent::_(2)
. "if (!\$user->authorise('core.edit.created', 'com_"
. $component . "'))";
}
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('created', 'disabled', 'true');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('created', 'filter', 'unset');";
- $getForm[] = $this->_t(2) . "}";
+ $getForm[] = Indent::_(2) . "}";
// check if the item has access permissions.
if ($coreLoad && isset($core['core.edit.access'])
&& isset($this->permissionBuilder[$core['core.edit.access']])
@@ -20056,23 +19862,23 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.access']]
))
{
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on Edit Access 'access' controls.";
- $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('"
+ $getForm[] = Indent::_(2) . "if (\$id != 0 && (!\$user->authorise('"
. $core['core.edit.access'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$id))";
- $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('"
+ $getForm[] = Indent::_(3) . "|| (\$id == 0 && !\$user->authorise('"
. $core['core.edit.access'] . "', 'com_" . $component . "')))";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('access', 'disabled', 'true');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$form->setFieldAttribute('access', 'filter', 'unset');";
- $getForm[] = $this->_t(2) . "}";
+ $getForm[] = Indent::_(2) . "}";
}
// handel the fields permissions
if (isset($this->permissionFields[$nameSingleCode])
@@ -20118,40 +19924,40 @@ class Interpretation extends Fields
}
}
// add the redirect trick to set the field of origin
- $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Only load these values if no id is found";
- $getForm[] = $this->_t(2) . "if (0 == \$id)";
- $getForm[] = $this->_t(2) . "{";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(2) . "if (0 == \$id)";
+ $getForm[] = Indent::_(2) . "{";
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set redirected view name";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$redirectedView = \$jinput->get('ref', null, 'STRING');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set field name (or fall back to view name)";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$redirectedField = \$jinput->get('field', \$redirectedView, 'STRING');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set redirected view id";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$redirectedId = \$jinput->get('refid', 0, 'INT');";
- $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Set field id (or fall back to redirected view id)";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "\$redirectedValue = \$jinput->get('field_id', \$redirectedId, 'INT');";
- $getForm[] = $this->_t(3)
+ $getForm[] = Indent::_(3)
. "if (0 != \$redirectedValue && \$redirectedField)";
- $getForm[] = $this->_t(3) . "{";
- $getForm[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $getForm[] = Indent::_(3) . "{";
+ $getForm[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Now set the local-redirected field default value";
- $getForm[] = $this->_t(4)
+ $getForm[] = Indent::_(4)
. "\$form->setValue(\$redirectedField, null, \$redirectedValue);";
- $getForm[] = $this->_t(3) . "}";
+ $getForm[] = Indent::_(3) . "}";
// load custom script if found
- $getForm[] = $this->_t(2) . "}" . $this->getCustomScriptBuilder(
+ $getForm[] = Indent::_(2) . "}" . $this->getCustomScriptBuilder(
'php_getform', $nameSingleCode, PHP_EOL
);
// setup the default script
- $getForm[] = $this->_t(2) . "return \$form;";
+ $getForm[] = Indent::_(2) . "return \$form;";
return implode(PHP_EOL, $getForm);
}
@@ -20163,50 +19969,50 @@ class Interpretation extends Fields
// only for fields that can be edited
if (!ComponentbuilderHelper::fieldCheck($fieldType, 'spacer'))
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on Edit "
. StringHelper::safe($fieldName, 'W')
. " access controls.";
- $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('"
+ $allow[] = Indent::_(2) . "if (\$id != 0 && (!\$user->authorise('"
. $nameSingleCode . ".edit." . $fieldName . "', 'com_"
. $component . "." . $nameSingleCode . ".' . (int) \$id))";
- $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('"
+ $allow[] = Indent::_(3) . "|| (\$id == 0 && !\$user->authorise('"
. $nameSingleCode . ".edit." . $fieldName . "', 'com_"
. $component . "')))";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName
+ $allow[] = Indent::_(3) . "\$form->setFieldAttribute('" . $fieldName
. "', 'disabled', 'true');";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable fields for display.";
- $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName
+ $allow[] = Indent::_(3) . "\$form->setFieldAttribute('" . $fieldName
. "', 'readonly', 'true');";
if ('radio' === $fieldType || 'repeatable' === $fieldType)
{
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Disable radio button for display.";
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "\$class = \$form->getFieldAttribute('" . $fieldName
. "', 'class', '');";
- $allow[] = $this->_t(3) . "\$form->setFieldAttribute('"
+ $allow[] = Indent::_(3) . "\$form->setFieldAttribute('"
. $fieldName . "', 'class', \$class.' disabled no-click');";
}
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " If there is no value continue.";
- $allow[] = $this->_t(3) . "if (!\$form->getValue('" . $fieldName
+ $allow[] = Indent::_(3) . "if (!\$form->getValue('" . $fieldName
. "'))";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName
+ $allow[] = Indent::_(4) . "\$form->setFieldAttribute('" . $fieldName
. "', 'filter', 'unset');";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName
+ $allow[] = Indent::_(4) . "\$form->setFieldAttribute('" . $fieldName
. "', 'required', 'false');";
- $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(2) . "}";
}
}
@@ -20214,21 +20020,21 @@ class Interpretation extends Fields
$fieldName, $fieldType, $component
)
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the from the form based on "
. StringHelper::safe($fieldName, 'W')
. " access controls.";
- $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('"
+ $allow[] = Indent::_(2) . "if (\$id != 0 && (!\$user->authorise('"
. $nameSingleCode . ".access." . $fieldName . "', 'com_"
. $component . "." . $nameSingleCode . ".' . (int) \$id))";
- $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('"
+ $allow[] = Indent::_(3) . "|| (\$id == 0 && !\$user->authorise('"
. $nameSingleCode . ".access." . $fieldName . "', 'com_"
. $component . "')))";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Remove the field";
- $allow[] = $this->_t(3) . "\$form->removeField('" . $fieldName . "');";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(3) . "\$form->removeField('" . $fieldName . "');";
+ $allow[] = Indent::_(2) . "}";
}
protected function setPermissionViewFields(&$allow, $nameSingleCode,
@@ -20237,71 +20043,71 @@ class Interpretation extends Fields
{
if (ComponentbuilderHelper::fieldCheck($fieldType, 'spacer'))
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on View "
. StringHelper::safe($fieldName, 'W')
. " access controls.";
- $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('"
+ $allow[] = Indent::_(2) . "if (\$id != 0 && (!\$user->authorise('"
. $nameSingleCode . ".view." . $fieldName . "', 'com_"
. $component . "." . $nameSingleCode . ".' . (int) \$id))";
- $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('"
+ $allow[] = Indent::_(3) . "|| (\$id == 0 && !\$user->authorise('"
. $nameSingleCode . ".view." . $fieldName . "', 'com_"
. $component . "')))";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Remove the field";
- $allow[] = $this->_t(3) . "\$form->removeField('" . $fieldName
+ $allow[] = Indent::_(3) . "\$form->removeField('" . $fieldName
. "');";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(2) . "}";
}
else
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Modify the form based on View "
. StringHelper::safe($fieldName, 'W')
. " access controls.";
- $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('"
+ $allow[] = Indent::_(2) . "if (\$id != 0 && (!\$user->authorise('"
. $nameSingleCode . ".view." . $fieldName . "', 'com_"
. $component . "." . $nameSingleCode . ".' . (int) \$id))";
- $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('"
+ $allow[] = Indent::_(3) . "|| (\$id == 0 && !\$user->authorise('"
. $nameSingleCode . ".view." . $fieldName . "', 'com_"
. $component . "')))";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Make the field hidded.";
- $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName
+ $allow[] = Indent::_(3) . "\$form->setFieldAttribute('" . $fieldName
. "', 'type', 'hidden');";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " If there is no value continue.";
- $allow[] = $this->_t(3) . "if (!(\$val = \$form->getValue('"
+ $allow[] = Indent::_(3) . "if (!(\$val = \$form->getValue('"
. $fieldName . "')))";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName
+ $allow[] = Indent::_(4) . "\$form->setFieldAttribute('" . $fieldName
. "', 'filter', 'unset');";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Disable fields while saving.";
- $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName
+ $allow[] = Indent::_(4) . "\$form->setFieldAttribute('" . $fieldName
. "', 'required', 'false');";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Make sure";
- $allow[] = $this->_t(4) . "\$form->setValue('" . $fieldName
+ $allow[] = Indent::_(4) . "\$form->setValue('" . $fieldName
. "', null, '');";
- $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(3) . "elseif (" . ucfirst($component)
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(3) . "elseif (" . ucfirst($component)
. "Helper::checkArray(\$val))";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " We have to unset then (TODO)";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Hiddend field can not handel array value";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Even if we convert to json we get an error";
- $allow[] = $this->_t(4) . "\$form->removeField('" . $fieldName
+ $allow[] = Indent::_(4) . "\$form->removeField('" . $fieldName
. "');";
- $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(2) . "}";
}
}
@@ -20312,7 +20118,7 @@ class Interpretation extends Fields
$component = $this->componentCodeName;
// prepare custom permission script
$customAllow = $this->getCustomScriptBuilder(
- 'php_allowedit', $nameSingleCode, $this->_t(2)
+ 'php_allowedit', $nameSingleCode, Indent::_(2)
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;"
. PHP_EOL
);
@@ -20333,12 +20139,12 @@ class Interpretation extends Fields
$nameSingleCode, $this->permissionBuilder[$core['core.edit']]
))
{
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check specific edit permission then general edit permission.";
- $allow[] = $this->_t(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2) . "\$user = JFactory::getUser();";
// load custom permission script
$allow[] = $customAllow;
- $allow[] = $this->_t(2) . "return \$user->authorise('"
+ $allow[] = Indent::_(2) . "return \$user->authorise('"
. $core['core.edit'] . "', 'com_" . $component . "."
. $nameSingleCode
. ".'. ((int) isset(\$data[\$key]) ? \$data[\$key] : 0)) or \$user->authorise('"
@@ -20346,15 +20152,15 @@ class Interpretation extends Fields
}
else
{
- $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check specific edit permission then general edit permission.";
if (StringHelper::check($customAllow))
{
- $allow[] = $this->_t(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2) . "\$user = JFactory::getUser();";
}
// load custom permission script
$allow[] = $customAllow;
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "return JFactory::getUser()->authorise('core.edit', 'com_"
. $component . "." . $nameSingleCode
. ".'. ((int) isset(\$data[\$key]) ? \$data[\$key] : 0)) or parent::allowEdit(\$data, \$key);";
@@ -20392,14 +20198,14 @@ class Interpretation extends Fields
$otherView = $nameSingleCode;
}
// setup the category script
- $allow[] = PHP_EOL . $this->_t(2) . "if (!empty(\$record->id))";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "if (\$record->published != -2)";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "return;";
- $allow[] = $this->_t(3) . "}";
- $allow[] = PHP_EOL . $this->_t(3) . "\$user = JFactory::getUser();";
- $allow[] = $this->_t(3)
+ $allow[] = PHP_EOL . Indent::_(2) . "if (!empty(\$record->id))";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "if (\$record->published != -2)";
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "return;";
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = PHP_EOL . Indent::_(3) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(3)
. "\$allow = \$user->authorise('core.delete', 'com_"
. $component . "." . $otherView
. ".category.' . (int) \$record->catid);";
@@ -20413,40 +20219,40 @@ class Interpretation extends Fields
$otherView, $this->permissionBuilder[$core['core.delete']]
))
{
- $allow[] = PHP_EOL . $this->_t(3) . "if (\$allow)";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(3) . "if (\$allow)";
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
- $allow[] = $this->_t(4) . "return \$user->authorise('"
+ $allow[] = Indent::_(4) . "return \$user->authorise('"
. $core['core.delete'] . "', 'com_" . $component . "."
. $otherView . ".' . (int) \$record->id);";
- $allow[] = $this->_t(3) . "}";
+ $allow[] = Indent::_(3) . "}";
}
else
{
- $allow[] = PHP_EOL . $this->_t(3) . "if (\$allow)";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(3) . "if (\$allow)";
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
- $allow[] = $this->_t(4)
+ $allow[] = Indent::_(4)
. "return \$user->authorise('core.delete', 'com_"
. $component . "." . $otherView
. ".' . (int) \$record->id);";
- $allow[] = $this->_t(3) . "}";
+ $allow[] = Indent::_(3) . "}";
}
- $allow[] = $this->_t(3) . "return \$allow;";
- $allow[] = $this->_t(2) . "}";
- $allow[] = $this->_t(2) . "return false;";
+ $allow[] = Indent::_(3) . "return \$allow;";
+ $allow[] = Indent::_(2) . "}";
+ $allow[] = Indent::_(2) . "return false;";
}
else
{
// setup the default script
- $allow[] = PHP_EOL . $this->_t(2) . "if (!empty(\$record->id))";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "if (\$record->published != -2)";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "return;";
- $allow[] = $this->_t(3) . "}";
+ $allow[] = PHP_EOL . Indent::_(2) . "if (!empty(\$record->id))";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "if (\$record->published != -2)";
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "return;";
+ $allow[] = Indent::_(3) . "}";
// check if the item has permissions.
if ($coreLoad
&& (isset($core['core.delete'])
@@ -20459,27 +20265,27 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.delete']]
))
{
- $allow[] = PHP_EOL . $this->_t(3)
+ $allow[] = PHP_EOL . Indent::_(3)
. "\$user = JFactory::getUser();";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
- $allow[] = $this->_t(3) . "return \$user->authorise('"
+ $allow[] = Indent::_(3) . "return \$user->authorise('"
. $core['core.delete'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$record->id);";
}
else
{
- $allow[] = PHP_EOL . $this->_t(3)
+ $allow[] = PHP_EOL . Indent::_(3)
. "\$user = JFactory::getUser();";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "return \$user->authorise('core.delete', 'com_"
. $component . "." . $nameSingleCode
. ".' . (int) \$record->id);";
}
- $allow[] = $this->_t(2) . "}";
- $allow[] = $this->_t(2) . "return false;";
+ $allow[] = Indent::_(2) . "}";
+ $allow[] = Indent::_(2) . "return false;";
}
return implode(PHP_EOL, $allow);
@@ -20515,12 +20321,12 @@ class Interpretation extends Fields
$otherViews = $nameListCode;
$otherView = $nameSingleCode;
}
- $allow[] = PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();";
- $allow[] = $this->_t(2)
+ $allow[] = PHP_EOL . Indent::_(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2)
. "\$recordId = (!empty(\$record->id)) ? \$record->id : 0;";
- $allow[] = PHP_EOL . $this->_t(2) . "if (\$recordId)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.state'])
@@ -20533,38 +20339,38 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.state']]
))
{
- $allow[] = $this->_t(3) . "\$permission = \$user->authorise('"
+ $allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$recordId);";
}
else
{
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "\$permission = \$user->authorise('core.edit.state', 'com_"
. $component . "." . $nameSingleCode
. ".' . (int) \$recordId);";
}
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "if (!\$permission && !is_null(\$permission))";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "return false;";
- $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "return false;";
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(2) . "}";
// setup the category script
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check against the category.";
- $allow[] = $this->_t(2) . "if (!empty(\$record->catid))";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(2) . "if (!empty(\$record->catid))";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3)
. "\$catpermission = \$user->authorise('core.edit.state', 'com_"
. $component . "." . $otherView
. ".category.' . (int) \$record->catid);";
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "if (!\$catpermission && !is_null(\$catpermission))";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "return false;";
- $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "return false;";
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(2) . "}";
if ($coreLoad && isset($core['core.edit.state'])
&& isset($this->permissionBuilder[$core['core.edit.state']])
&& ArrayHelper::check(
@@ -20575,29 +20381,29 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.state']]
))
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(2) . "return \$user->authorise('"
+ $allow[] = Indent::_(2) . "return \$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component
. "');";
}
else
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "return parent::canEditState(\$record);";
}
}
else
{
// setup the default script
- $allow[] = PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();";
- $allow[] = $this->_t(2)
+ $allow[] = PHP_EOL . Indent::_(2) . "\$user = JFactory::getUser();";
+ $allow[] = Indent::_(2)
. "\$recordId = (!empty(\$record->id)) ? \$record->id : 0;";
- $allow[] = PHP_EOL . $this->_t(2) . "if (\$recordId)";
- $allow[] = $this->_t(2) . "{";
- $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
+ $allow[] = Indent::_(2) . "{";
+ $allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " The record has been set. Check the record permissions.";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.state'])
@@ -20610,23 +20416,23 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.edit.state']]
))
{
- $allow[] = $this->_t(3) . "\$permission = \$user->authorise('"
+ $allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component . "."
. $nameSingleCode . ".' . (int) \$recordId);";
}
else
{
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "\$permission = \$user->authorise('core.edit.state', 'com_"
. $component . "." . $nameSingleCode
. ".' . (int) \$recordId);";
}
- $allow[] = $this->_t(3)
+ $allow[] = Indent::_(3)
. "if (!\$permission && !is_null(\$permission))";
- $allow[] = $this->_t(3) . "{";
- $allow[] = $this->_t(4) . "return false;";
- $allow[] = $this->_t(3) . "}";
- $allow[] = $this->_t(2) . "}";
+ $allow[] = Indent::_(3) . "{";
+ $allow[] = Indent::_(4) . "return false;";
+ $allow[] = Indent::_(3) . "}";
+ $allow[] = Indent::_(2) . "}";
if ($coreLoad && isset($core['core.edit.state'])
&& isset($this->permissionBuilder['global'][$core['core.edit.state']])
&& ArrayHelper::check(
@@ -20637,17 +20443,17 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit.state']]
))
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(2) . "return \$user->authorise('"
+ $allow[] = Indent::_(2) . "return \$user->authorise('"
. $core['core.edit.state'] . "', 'com_" . $component
. "');";
}
else
{
- $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " In the absense of better information, revert to the component permissions.";
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "return parent::canEditState(\$record);";
}
}
@@ -20678,13 +20484,13 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit']]
))
{
- $allow[] = PHP_EOL . $this->_t(2)
+ $allow[] = PHP_EOL . Indent::_(2)
. "\$this->canEdit = \$this->canDo->get('" . $core['core.edit']
. "');";
}
else
{
- $allow[] = PHP_EOL . $this->_t(2)
+ $allow[] = PHP_EOL . Indent::_(2)
. "\$this->canEdit = \$this->canDo->get('core.edit');";
}
// check if the item has permissions for edit state.
@@ -20698,12 +20504,12 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit.state']]
))
{
- $allow[] = $this->_t(2) . "\$this->canState = \$this->canDo->get('"
+ $allow[] = Indent::_(2) . "\$this->canState = \$this->canDo->get('"
. $core['core.edit.state'] . "');";
}
else
{
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "\$this->canState = \$this->canDo->get('core.edit.state');";
}
// check if the item has permissions for create.
@@ -20717,12 +20523,12 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.create']]
))
{
- $allow[] = $this->_t(2) . "\$this->canCreate = \$this->canDo->get('"
+ $allow[] = Indent::_(2) . "\$this->canCreate = \$this->canDo->get('"
. $core['core.create'] . "');";
}
else
{
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "\$this->canCreate = \$this->canDo->get('core.create');";
}
// check if the item has permissions for delete.
@@ -20736,12 +20542,12 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.delete']]
))
{
- $allow[] = $this->_t(2) . "\$this->canDelete = \$this->canDo->get('"
+ $allow[] = Indent::_(2) . "\$this->canDelete = \$this->canDo->get('"
. $core['core.delete'] . "');";
}
else
{
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "\$this->canDelete = \$this->canDo->get('core.delete');";
}
// check if the item has permissions for batch.
@@ -20755,13 +20561,13 @@ class Interpretation extends Fields
$this->permissionBuilder['global']['global'][$core['core.delete']]
))
{
- $allow[] = $this->_t(2) . "\$this->canBatch = (\$this->canDo->get('"
+ $allow[] = Indent::_(2) . "\$this->canBatch = (\$this->canDo->get('"
. $core['core.batch']
. "') && \$this->canDo->get('core.batch'));";
}
else
{
- $allow[] = $this->_t(2)
+ $allow[] = Indent::_(2)
. "\$this->canBatch = \$this->canDo->get('core.batch');";
}
@@ -20778,34 +20584,34 @@ class Interpretation extends Fields
// set label
$label = 'Permissions in relation to this ' . $view;
// set the access fieldset
- $access = "";
- $access .= PHP_EOL . $this->_t(1)
+ $access .= PHP_EOL . Indent::_(1)
. '';
- $access .= PHP_EOL . $this->_t(2) . "";
- $access .= PHP_EOL . $this->_t(2) . '_t(3) . 'name="asset_id"';
- $access .= PHP_EOL . $this->_t(3) . 'type="hidden"';
- $access .= PHP_EOL . $this->_t(3) . 'filter="unset"';
- $access .= PHP_EOL . $this->_t(2) . '/>';
- $access .= PHP_EOL . $this->_t(2) . "";
- $access .= PHP_EOL . $this->_t(2) . '_t(3) . 'name="rules"';
- $access .= PHP_EOL . $this->_t(3) . 'type="rules"';
- $access .= PHP_EOL . $this->_t(3) . 'label="' . $label . '"';
- $access .= PHP_EOL . $this->_t(3) . 'translate_label="false"';
- $access .= PHP_EOL . $this->_t(3) . 'filter="rules"';
- $access .= PHP_EOL . $this->_t(3) . 'validate="rules"';
- $access .= PHP_EOL . $this->_t(3) . 'class="inputbox"';
- $access .= PHP_EOL . $this->_t(3) . 'component="com_' . $component
+ $access .= PHP_EOL . Indent::_(2) . '_t(3) . 'section="' . $view . '"';
- $access .= PHP_EOL . $this->_t(2) . '/>';
- $access .= PHP_EOL . $this->_t(1) . ' ';
+ $access .= PHP_EOL . Indent::_(3) . 'section="' . $view . '"';
+ $access .= PHP_EOL . Indent::_(2) . '/>';
+ $access .= PHP_EOL . Indent::_(1) . '';
}
// return access field set
@@ -20829,17 +20635,17 @@ class Interpretation extends Fields
'created_by' => true, 'modified_by' => true);
// default filter fields
$fields = "'a.id','id'";
- $fields .= "," . PHP_EOL . $this->_t(4) . "'a.published','published'";
+ $fields .= "," . PHP_EOL . Indent::_(4) . "'a.published','published'";
if (isset($this->accessBuilder[$nameSingleCode])
&& StringHelper::check(
$this->accessBuilder[$nameSingleCode]
))
{
- $fields .= "," . PHP_EOL . $this->_t(4) . "'a.access','access'";
+ $fields .= "," . PHP_EOL . Indent::_(4) . "'a.access','access'";
}
- $fields .= "," . PHP_EOL . $this->_t(4) . "'a.ordering','ordering'";
- $fields .= "," . PHP_EOL . $this->_t(4) . "'a.created_by','created_by'";
- $fields .= "," . PHP_EOL . $this->_t(4)
+ $fields .= "," . PHP_EOL . Indent::_(4) . "'a.ordering','ordering'";
+ $fields .= "," . PHP_EOL . Indent::_(4) . "'a.created_by','created_by'";
+ $fields .= "," . PHP_EOL . Indent::_(4)
. "'a.modified_by','modified_by'";
// add the rest of the set filters
@@ -20893,13 +20699,13 @@ class Interpretation extends Fields
// add the category stuff (may still remove these) TODO
if ($filter['type'] === 'category')
{
- $field = "," . PHP_EOL . $this->_t(4)
+ $field = "," . PHP_EOL . Indent::_(4)
. "'c.title','category_title'";
- $field .= "," . PHP_EOL . $this->_t(4)
+ $field .= "," . PHP_EOL . Indent::_(4)
. "'c.id', 'category_id'";
if ($filter['code'] != 'category')
{
- $field .= "," . PHP_EOL . $this->_t(4) . "'a."
+ $field .= "," . PHP_EOL . Indent::_(4) . "'a."
. $filter['code'] . "','" . $filter['code']
. "'";
}
@@ -20919,14 +20725,14 @@ class Interpretation extends Fields
$filter['custom']['text']
))
{
- $field = "," . PHP_EOL . $this->_t(4) . "'"
+ $field = "," . PHP_EOL . Indent::_(4) . "'"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "','" . $filter['code']
. "'";
}
else
{
- $field = "," . PHP_EOL . $this->_t(4) . "'a."
+ $field = "," . PHP_EOL . Indent::_(4) . "'a."
. $filter['code'] . "','" . $filter['code']
. "'";
}
@@ -20953,15 +20759,15 @@ class Interpretation extends Fields
'published' => true, 'access' => true,
'created_by' => true, 'modified_by' => true);
// set the defaults first
- $stored = "//" . $this->setLine(__LINE__) . " Compile the store id.";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored = "//" . Line::_(__Line__, __Class__) . " Compile the store id.";
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.id');";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.search');";
// add this if not already added
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
{
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.published');";
}
// add if view calls for it, and not already added
@@ -20975,7 +20781,7 @@ class Interpretation extends Fields
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 1)
{
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.access');";
}
else
@@ -20985,18 +20791,18 @@ class Interpretation extends Fields
$stored .= $this->getStoredIdCodeMulti('access', $Component);
}
}
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.ordering');";
// add this if not already added
if (!isset($this->fieldsNames[$nameSingleCode]['created_by']))
{
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.created_by');";
}
// add this if not already added
if (!isset($this->fieldsNames[$nameSingleCode]['modified_by']))
{
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.modified_by');";
}
// add the rest of the set filters
@@ -21055,13 +20861,13 @@ class Interpretation extends Fields
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 1)
{
- $stored = PHP_EOL . $this->_t(2)
+ $stored = PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.category');";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter.category_id');";
if ($filter['code'] != 'category')
{
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter."
. $filter['code'] . "');";
}
@@ -21095,7 +20901,7 @@ class Interpretation extends Fields
}
else
{
- $stored = PHP_EOL . $this->_t(2)
+ $stored = PHP_EOL . Indent::_(2)
. "\$id .= ':' . \$this->getState('filter."
. $filter['code'] . "');";
}
@@ -21117,33 +20923,33 @@ class Interpretation extends Fields
{
// top bar selection can result in
// an array due to multi selection
- $stored = PHP_EOL . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $stored = PHP_EOL . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Check if the value is an array";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "\$_" . $key . " = \$this->getState('filter."
. $key . "');";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "if (" . $Component . "Helper::checkArray(\$_"
. $key . "))";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "{";
- $stored .= PHP_EOL . $this->_t(3)
+ $stored .= PHP_EOL . Indent::_(3)
. "\$id .= ':' . implode(':', \$_" . $key . ");";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "}";
- $stored .= PHP_EOL . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $stored .= PHP_EOL . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Check if this is only an number or string";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "elseif (is_numeric(\$_" . $key . ")";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. " || " . $Component . "Helper::checkString(\$_" . $key . "))";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "{";
- $stored .= PHP_EOL . $this->_t(3)
+ $stored .= PHP_EOL . Indent::_(3)
. "\$id .= ':' . \$_" . $key . ";";
- $stored .= PHP_EOL . $this->_t(2)
+ $stored .= PHP_EOL . Indent::_(2)
. "}";
return $stored;
@@ -21169,18 +20975,18 @@ class Interpretation extends Fields
$view['settings']->name_single . ' readonly', 'U'
);
// load to lang
- $this->setLangContent(
- $this->lang, $viewNameLang_readonly,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $viewNameLang_readonly,
$view['settings']->name_single . ' :: Readonly'
);
// build toolbar
$toolBar
= "JFactory::getApplication()->input->set('hidemainmenu', true);";
- $toolBar .= PHP_EOL . $this->_t(2) . "JToolBarHelper::title(JText:"
+ $toolBar .= PHP_EOL . Indent::_(2) . "JToolBarHelper::title(JText:"
. ":_('" . $viewNameLang_readonly . "'), '" . $nameSingleCode
. "');";
- $toolBar .= PHP_EOL . $this->_t(2) . "JToolBarHelper::cancel('"
+ $toolBar .= PHP_EOL . Indent::_(2) . "JToolBarHelper::cancel('"
. $nameSingleCode . ".cancel', 'JTOOLBAR_CLOSE');";
}
else
@@ -21195,32 +21001,31 @@ class Interpretation extends Fields
$view['settings']->name_single . ' Edit', 'U'
);
// load to lang
- $this->setLangContent(
- $this->lang, $viewNameLang_new,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $viewNameLang_new,
'A New ' . $view['settings']->name_single
);
- $this->setLangContent(
- $this->lang, $viewNameLang_edit,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $viewNameLang_edit,
'Editing the ' . $view['settings']->name_single
);
// build toolbar
$toolBar
= "JFactory::getApplication()->input->set('hidemainmenu', true);";
- $toolBar .= PHP_EOL . $this->_t(2)
+ $toolBar .= PHP_EOL . Indent::_(2)
. "\$user = JFactory::getUser();";
- $toolBar .= PHP_EOL . $this->_t(2) . "\$userId = \$user->id;";
- $toolBar .= PHP_EOL . $this->_t(2)
+ $toolBar .= PHP_EOL . Indent::_(2) . "\$userId = \$user->id;";
+ $toolBar .= PHP_EOL . Indent::_(2)
. "\$isNew = \$this->item->id == 0;";
- $toolBar .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $toolBar .= PHP_EOL . PHP_EOL . Indent::_(2)
. "JToolbarHelper::title( JText:" . ":_(\$isNew ? '"
. $viewNameLang_new . "' : '" . $viewNameLang_edit
. "'), 'pencil-2 article-add');";
- $toolBar .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Built the actions for new and existing records.";
- $toolBar .= PHP_EOL . $this->_t(2) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkString(\$this->referral))";
- $toolBar .= PHP_EOL . $this->_t(2) . "{";
+ $toolBar .= PHP_EOL . Indent::_(2) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkString(\$this->referral))";
+ $toolBar .= PHP_EOL . Indent::_(2) . "{";
if ($coreLoad && isset($core['core.create'])
&& isset($this->permissionBuilder['global'][$core['core.create']])
&& ArrayHelper::check(
@@ -21231,20 +21036,20 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.create']]
))
{
- $toolBar .= PHP_EOL . $this->_t(3) . "if (\$this->canDo->get('"
+ $toolBar .= PHP_EOL . Indent::_(3) . "if (\$this->canDo->get('"
. $core['core.create'] . "') && \$isNew)";
}
else
{
- $toolBar .= PHP_EOL . $this->_t(3)
+ $toolBar .= PHP_EOL . Indent::_(3)
. "if (\$this->canDo->get('core.create') && \$isNew)";
}
- $toolBar .= PHP_EOL . $this->_t(3) . "{";
- $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(3) . "{";
+ $toolBar .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " We can create the record.";
- $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::save('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "JToolBarHelper::save('"
. $nameSingleCode . ".save', 'JTOOLBAR_SAVE');";
- $toolBar .= PHP_EOL . $this->_t(3) . "}";
+ $toolBar .= PHP_EOL . Indent::_(3) . "}";
if ($coreLoad && isset($core['core.edit'])
&& isset($this->permissionBuilder['global'][$core['core.edit']])
&& ArrayHelper::check(
@@ -21255,41 +21060,41 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit']]
))
{
- $toolBar .= PHP_EOL . $this->_t(3)
+ $toolBar .= PHP_EOL . Indent::_(3)
. "elseif (\$this->canDo->get('" . $core['core.edit']
. "'))";
}
else
{
- $toolBar .= PHP_EOL . $this->_t(3)
+ $toolBar .= PHP_EOL . Indent::_(3)
. "elseif (\$this->canDo->get('core.edit'))";
}
- $toolBar .= PHP_EOL . $this->_t(3) . "{";
- $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(3) . "{";
+ $toolBar .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " We can save the record.";
- $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::save('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "JToolBarHelper::save('"
. $nameSingleCode . ".save', 'JTOOLBAR_SAVE');";
- $toolBar .= PHP_EOL . $this->_t(3) . "}";
- $toolBar .= PHP_EOL . $this->_t(3) . "if (\$isNew)";
- $toolBar .= PHP_EOL . $this->_t(3) . "{";
- $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(3) . "}";
+ $toolBar .= PHP_EOL . Indent::_(3) . "if (\$isNew)";
+ $toolBar .= PHP_EOL . Indent::_(3) . "{";
+ $toolBar .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Do not creat but cancel.";
- $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "JToolBarHelper::cancel('"
. $nameSingleCode . ".cancel', 'JTOOLBAR_CANCEL');";
- $toolBar .= PHP_EOL . $this->_t(3) . "}";
- $toolBar .= PHP_EOL . $this->_t(3) . "else";
- $toolBar .= PHP_EOL . $this->_t(3) . "{";
- $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(3) . "}";
+ $toolBar .= PHP_EOL . Indent::_(3) . "else";
+ $toolBar .= PHP_EOL . Indent::_(3) . "{";
+ $toolBar .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " We can close it.";
- $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "JToolBarHelper::cancel('"
. $nameSingleCode . ".cancel', 'JTOOLBAR_CLOSE');";
- $toolBar .= PHP_EOL . $this->_t(3) . "}";
- $toolBar .= PHP_EOL . $this->_t(2) . "}";
- $toolBar .= PHP_EOL . $this->_t(2) . "else";
- $toolBar .= PHP_EOL . $this->_t(2) . "{";
- $toolBar .= PHP_EOL . $this->_t(3) . "if (\$isNew)";
- $toolBar .= PHP_EOL . $this->_t(3) . "{";
- $toolBar .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(3) . "}";
+ $toolBar .= PHP_EOL . Indent::_(2) . "}";
+ $toolBar .= PHP_EOL . Indent::_(2) . "else";
+ $toolBar .= PHP_EOL . Indent::_(2) . "{";
+ $toolBar .= PHP_EOL . Indent::_(3) . "if (\$isNew)";
+ $toolBar .= PHP_EOL . Indent::_(3) . "{";
+ $toolBar .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " For new records, check the create permission.";
if ($coreLoad && isset($core['core.create'])
&& isset($this->permissionBuilder['global'][$core['core.create']])
@@ -21301,28 +21106,28 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.create']]
))
{
- $toolBar .= PHP_EOL . $this->_t(4) . "if (\$this->canDo->get('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "if (\$this->canDo->get('"
. $core['core.create'] . "'))";
}
else
{
- $toolBar .= PHP_EOL . $this->_t(4)
+ $toolBar .= PHP_EOL . Indent::_(4)
. "if (\$this->canDo->get('core.create'))";
}
- $toolBar .= PHP_EOL . $this->_t(4) . "{";
- $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::apply('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "{";
+ $toolBar .= PHP_EOL . Indent::_(5) . "JToolBarHelper::apply('"
. $nameSingleCode . ".apply', 'JTOOLBAR_APPLY');";
- $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::save('"
+ $toolBar .= PHP_EOL . Indent::_(5) . "JToolBarHelper::save('"
. $nameSingleCode . ".save', 'JTOOLBAR_SAVE');";
- $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::custom('"
+ $toolBar .= PHP_EOL . Indent::_(5) . "JToolBarHelper::custom('"
. $nameSingleCode
. ".save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);";
- $toolBar .= PHP_EOL . $this->_t(4) . "};";
- $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "};";
+ $toolBar .= PHP_EOL . Indent::_(4) . "JToolBarHelper::cancel('"
. $nameSingleCode . ".cancel', 'JTOOLBAR_CANCEL');";
- $toolBar .= PHP_EOL . $this->_t(3) . "}";
- $toolBar .= PHP_EOL . $this->_t(3) . "else";
- $toolBar .= PHP_EOL . $this->_t(3) . "{";
+ $toolBar .= PHP_EOL . Indent::_(3) . "}";
+ $toolBar .= PHP_EOL . Indent::_(3) . "else";
+ $toolBar .= PHP_EOL . Indent::_(3) . "{";
if ($coreLoad && isset($core['core.edit'])
&& isset($this->permissionBuilder['global'][$core['core.edit']])
&& ArrayHelper::check(
@@ -21333,24 +21138,24 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.edit']]
))
{
- $toolBar .= PHP_EOL . $this->_t(4) . "if (\$this->canDo->get('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "if (\$this->canDo->get('"
. $core['core.edit'] . "'))";
}
else
{
- $toolBar .= PHP_EOL . $this->_t(4)
+ $toolBar .= PHP_EOL . Indent::_(4)
. "if (\$this->canDo->get('core.edit'))";
}
- $toolBar .= PHP_EOL . $this->_t(4) . "{";
- $toolBar .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(4) . "{";
+ $toolBar .= PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " We can save the new record";
- $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::apply('"
+ $toolBar .= PHP_EOL . Indent::_(5) . "JToolBarHelper::apply('"
. $nameSingleCode . ".apply', 'JTOOLBAR_APPLY');";
- $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::save('"
+ $toolBar .= PHP_EOL . Indent::_(5) . "JToolBarHelper::save('"
. $nameSingleCode . ".save', 'JTOOLBAR_SAVE');";
- $toolBar .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " We can save this record, but check the create permission to see";
- $toolBar .= PHP_EOL . $this->_t(5) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
. " if we can return to make a new one.";
if ($coreLoad && isset($core['core.create'])
&& isset($this->permissionBuilder['global'][$core['core.create']])
@@ -21362,20 +21167,20 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.create']]
))
{
- $toolBar .= PHP_EOL . $this->_t(5) . "if (\$this->canDo->get('"
+ $toolBar .= PHP_EOL . Indent::_(5) . "if (\$this->canDo->get('"
. $core['core.create'] . "'))";
}
else
{
- $toolBar .= PHP_EOL . $this->_t(5)
+ $toolBar .= PHP_EOL . Indent::_(5)
. "if (\$this->canDo->get('core.create'))";
}
- $toolBar .= PHP_EOL . $this->_t(5) . "{";
- $toolBar .= PHP_EOL . $this->_t(6) . "JToolBarHelper::custom('"
+ $toolBar .= PHP_EOL . Indent::_(5) . "{";
+ $toolBar .= PHP_EOL . Indent::_(6) . "JToolBarHelper::custom('"
. $nameSingleCode
. ".save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);";
- $toolBar .= PHP_EOL . $this->_t(5) . "}";
- $toolBar .= PHP_EOL . $this->_t(4) . "}";
+ $toolBar .= PHP_EOL . Indent::_(5) . "}";
+ $toolBar .= PHP_EOL . Indent::_(4) . "}";
if ($coreLoad && isset($core['core.edit'])
&& isset($this->permissionBuilder['global'][$core['core.edit']])
&& ArrayHelper::check(
@@ -21391,18 +21196,18 @@ class Interpretation extends Fields
$this->historyBuilder[$nameSingleCode]
))
{
- $toolBar .= PHP_EOL . $this->_t(4)
+ $toolBar .= PHP_EOL . Indent::_(4)
. "\$canVersion = (\$this->canDo->get('core.version') && \$this->canDo->get('"
. $core['core.version'] . "'));";
- $toolBar .= PHP_EOL . $this->_t(4)
+ $toolBar .= PHP_EOL . Indent::_(4)
. "if (\$this->state->params->get('save_history', 1) && \$this->canDo->get('"
. $core['core.edit'] . "') && \$canVersion)";
- $toolBar .= PHP_EOL . $this->_t(4) . "{";
- $toolBar .= PHP_EOL . $this->_t(5)
+ $toolBar .= PHP_EOL . Indent::_(4) . "{";
+ $toolBar .= PHP_EOL . Indent::_(5)
. "JToolbarHelper::versions('com_"
. $this->componentCodeName . "." . $nameSingleCode
. "', \$this->item->id);";
- $toolBar .= PHP_EOL . $this->_t(4) . "}";
+ $toolBar .= PHP_EOL . Indent::_(4) . "}";
}
}
else
@@ -21412,17 +21217,17 @@ class Interpretation extends Fields
$this->historyBuilder[$nameSingleCode]
))
{
- $toolBar .= PHP_EOL . $this->_t(4)
+ $toolBar .= PHP_EOL . Indent::_(4)
. "\$canVersion = (\$this->canDo->get('core.version') && \$this->canDo->get('"
. $core['core.version'] . "'));";
- $toolBar .= PHP_EOL . $this->_t(4)
+ $toolBar .= PHP_EOL . Indent::_(4)
. "if (\$this->state->params->get('save_history', 1) && \$this->canDo->get('core.edit') && \$canVersion)";
- $toolBar .= PHP_EOL . $this->_t(4) . "{";
- $toolBar .= PHP_EOL . $this->_t(5)
+ $toolBar .= PHP_EOL . Indent::_(4) . "{";
+ $toolBar .= PHP_EOL . Indent::_(5)
. "JToolbarHelper::versions('com_"
. $this->componentCodeName . "." . $nameSingleCode
. "', \$this->item->id);";
- $toolBar .= PHP_EOL . $this->_t(4) . "}";
+ $toolBar .= PHP_EOL . Indent::_(4) . "}";
}
}
if ($coreLoad && isset($core['core.create'])
@@ -21435,39 +21240,37 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.create']]
))
{
- $toolBar .= PHP_EOL . $this->_t(4) . "if (\$this->canDo->get('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "if (\$this->canDo->get('"
. $core['core.create'] . "'))";
}
else
{
- $toolBar .= PHP_EOL . $this->_t(4)
+ $toolBar .= PHP_EOL . Indent::_(4)
. "if (\$this->canDo->get('core.create'))";
}
- $toolBar .= PHP_EOL . $this->_t(4) . "{";
- $toolBar .= PHP_EOL . $this->_t(5) . "JToolBarHelper::custom('"
+ $toolBar .= PHP_EOL . Indent::_(4) . "{";
+ $toolBar .= PHP_EOL . Indent::_(5) . "JToolBarHelper::custom('"
. $nameSingleCode
. ".save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);";
- $toolBar .= PHP_EOL . $this->_t(4) . "}";
+ $toolBar .= PHP_EOL . Indent::_(4) . "}";
// add custom buttons
- $toolBar .= $this->setCustomButtons($view, 2, $this->_t(2));
- $toolBar .= PHP_EOL . $this->_t(4) . "JToolBarHelper::cancel('"
+ $toolBar .= $this->setCustomButtons($view, 2, Indent::_(2));
+ $toolBar .= PHP_EOL . Indent::_(4) . "JToolBarHelper::cancel('"
. $nameSingleCode . ".cancel', 'JTOOLBAR_CLOSE');";
- $toolBar .= PHP_EOL . $this->_t(3) . "}";
- $toolBar .= PHP_EOL . $this->_t(2) . "}";
- $toolBar .= PHP_EOL . $this->_t(2) . "JToolbarHelper::divider();";
- $toolBar .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $toolBar .= PHP_EOL . Indent::_(3) . "}";
+ $toolBar .= PHP_EOL . Indent::_(2) . "}";
+ $toolBar .= PHP_EOL . Indent::_(2) . "JToolbarHelper::divider();";
+ $toolBar .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " set help url for this view if found";
- $toolBar .= PHP_EOL . $this->_t(2) . "\$this->help_url = "
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::getHelpUrl('" . $nameSingleCode
+ $toolBar .= PHP_EOL . Indent::_(2) . "\$this->help_url = "
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::getHelpUrl('" . $nameSingleCode
. "');";
- $toolBar .= PHP_EOL . $this->_t(2) . "if ("
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkString(\$this->help_url))";
- $toolBar .= PHP_EOL . $this->_t(2) . "{";
- $toolBar .= PHP_EOL . $this->_t(3) . "JToolbarHelper::help('"
+ $toolBar .= PHP_EOL . Indent::_(2) . "if ("
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkString(\$this->help_url))";
+ $toolBar .= PHP_EOL . Indent::_(2) . "{";
+ $toolBar .= PHP_EOL . Indent::_(3) . "JToolbarHelper::help('"
. $this->langPrefix . "_HELP_MANAGER', false, \$this->help_url);";
- $toolBar .= PHP_EOL . $this->_t(2) . "}";
+ $toolBar .= PHP_EOL . Indent::_(2) . "}";
}
return $toolBar;
@@ -21493,9 +21296,9 @@ class Interpretation extends Fields
if (isset($this->adminFilterType[$nameListCode])
&& $this->adminFilterType[$nameListCode] == 2)
{
- $state .= PHP_EOL . PHP_EOL . $this->_t(2) . "//"
- . $this->setLine(__LINE__) . " Check if the form was submitted";
- $state .= PHP_EOL . $this->_t(2) . "\$formSubmited"
+ $state .= PHP_EOL . PHP_EOL . Indent::_(2) . "//"
+ . Line::_(__Line__, __Class__) . " Check if the form was submitted";
+ $state .= PHP_EOL . Indent::_(2) . "\$formSubmited"
. " = \$app->input->post->get('form_submited');";
$new_filter = true;
}
@@ -21557,37 +21360,37 @@ class Interpretation extends Fields
// add category stuff (may still remove these) TODO
if (isset($filter['type']) && $filter['type'] === 'category')
{
- $state .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $state .= PHP_EOL . PHP_EOL . Indent::_(2)
. "\$category = \$app->getUserStateFromRequest(\$this->context . '.filter.category', 'filter_category');";
- $state .= PHP_EOL . $this->_t(2)
+ $state .= PHP_EOL . Indent::_(2)
. "\$this->setState('filter.category', \$category);";
- $state .= PHP_EOL . PHP_EOL . $this->_t(2)
+ $state .= PHP_EOL . PHP_EOL . Indent::_(2)
. "\$categoryId = \$this->getUserStateFromRequest(\$this->context . '.filter.category_id', 'filter_category_id');";
- $state .= PHP_EOL . $this->_t(2)
+ $state .= PHP_EOL . Indent::_(2)
. "\$this->setState('filter.category_id', \$categoryId);";
}
// always add the default filter
- $state .= PHP_EOL . PHP_EOL . $this->_t(2) . "\$" . $filter['code']
+ $state .= PHP_EOL . PHP_EOL . Indent::_(2) . "\$" . $filter['code']
. " = \$this->getUserStateFromRequest(\$this->context . '.filter."
. $filter['code'] . "', 'filter_" . $filter['code']
. "'" . $extra . ");";
if ($newFilter)
{
// add the new filter option
- $state .= PHP_EOL . $this->_t(2)
+ $state .= PHP_EOL . Indent::_(2)
. "if (\$formSubmited)";
- $state .= PHP_EOL . $this->_t(2) . "{";
- $state .= PHP_EOL . $this->_t(3) . "\$" . $filter['code']
+ $state .= PHP_EOL . Indent::_(2) . "{";
+ $state .= PHP_EOL . Indent::_(3) . "\$" . $filter['code']
. " = \$app->input->post->get('" . $filter['code'] . "');";
- $state .= PHP_EOL . $this->_t(3)
+ $state .= PHP_EOL . Indent::_(3)
. "\$this->setState('filter." . $filter['code']
. "', \$" . $filter['code'] . ");";
- $state .= PHP_EOL . $this->_t(2) . "}";
+ $state .= PHP_EOL . Indent::_(2) . "}";
}
else
{
// the old filter option
- $state .= PHP_EOL . $this->_t(2)
+ $state .= PHP_EOL . Indent::_(2)
. "\$this->setState('filter." . $filter['code']
. "', \$" . $filter['code'] . ");";
}
@@ -21668,9 +21471,9 @@ class Interpretation extends Fields
$donelist = array('ordering', 'published');
// set the default first
$fields = "return array(";
- $fields .= PHP_EOL . $this->_t(3) . "'a.ordering' => JText:"
+ $fields .= PHP_EOL . Indent::_(3) . "'a.ordering' => JText:"
. ":_('JGRID_HEADING_ORDERING')";
- $fields .= "," . PHP_EOL . $this->_t(3) . "'a.published' => JText:"
+ $fields .= "," . PHP_EOL . Indent::_(3) . "'a.published' => JText:"
. ":_('JSTATUS')";
// add the rest of the set filters
@@ -21685,7 +21488,7 @@ class Interpretation extends Fields
{
if ($filter['type'] === 'category')
{
- $fields .= "," . PHP_EOL . $this->_t(3)
+ $fields .= "," . PHP_EOL . Indent::_(3)
. "'category_title' => JText:" . ":_('"
. $filter['lang'] . "')";
}
@@ -21693,23 +21496,23 @@ class Interpretation extends Fields
$filter['custom']
))
{
- $fields .= "," . PHP_EOL . $this->_t(3) . "'"
+ $fields .= "," . PHP_EOL . Indent::_(3) . "'"
. $filter['custom']['db'] . "."
. $filter['custom']['text'] . "' => JText:" . ":_('"
. $filter['lang'] . "')";
}
else
{
- $fields .= "," . PHP_EOL . $this->_t(3) . "'a."
+ $fields .= "," . PHP_EOL . Indent::_(3) . "'a."
. $filter['code'] . "' => JText:" . ":_('"
. $filter['lang'] . "')";
}
}
}
}
- $fields .= "," . PHP_EOL . $this->_t(3) . "'a.id' => JText:"
+ $fields .= "," . PHP_EOL . Indent::_(3) . "'a.id' => JText:"
. ":_('JGRID_HEADING_ID')";
- $fields .= PHP_EOL . $this->_t(2) . ");";
+ $fields .= PHP_EOL . Indent::_(2) . ");";
// return fields
return $fields;
@@ -21717,90 +21520,90 @@ class Interpretation extends Fields
public function setCheckinCall()
{
- $call = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $call = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Check in items";
- $call .= PHP_EOL . $this->_t(2) . "\$this->checkInNow();" . PHP_EOL;
+ $call .= PHP_EOL . Indent::_(2) . "\$this->checkInNow();" . PHP_EOL;
return $call;
}
public function setAutoCheckin($view, $component)
{
- $checkin = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $checkin .= PHP_EOL . $this->_t(1)
+ $checkin = PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $checkin .= PHP_EOL . Indent::_(1)
. " * Build an SQL query to checkin all items left checked out longer then a set time.";
- $checkin .= PHP_EOL . $this->_t(1) . " *";
- $checkin .= PHP_EOL . $this->_t(1) . " * @return a bool";
- $checkin .= PHP_EOL . $this->_t(1) . " *";
- $checkin .= PHP_EOL . $this->_t(1) . " */";
- $checkin .= PHP_EOL . $this->_t(1) . "protected function checkInNow()";
- $checkin .= PHP_EOL . $this->_t(1) . "{";
- $checkin .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
+ $checkin .= PHP_EOL . Indent::_(1) . " *";
+ $checkin .= PHP_EOL . Indent::_(1) . " * @return a bool";
+ $checkin .= PHP_EOL . Indent::_(1) . " *";
+ $checkin .= PHP_EOL . Indent::_(1) . " */";
+ $checkin .= PHP_EOL . Indent::_(1) . "protected function checkInNow()";
+ $checkin .= PHP_EOL . Indent::_(1) . "{";
+ $checkin .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
. " Get set check in time";
- $checkin .= PHP_EOL . $this->_t(2)
+ $checkin .= PHP_EOL . Indent::_(2)
. "\$time = JComponentHelper::getParams('com_" . $component
. "')->get('check_in');";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(2) . "if (\$time)";
- $checkin .= PHP_EOL . $this->_t(2) . "{";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(2) . "if (\$time)";
+ $checkin .= PHP_EOL . Indent::_(2) . "{";
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Get a db connection.";
- $checkin .= PHP_EOL . $this->_t(3) . "\$db = JFactory::getDbo();";
- $checkin .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $checkin .= PHP_EOL . Indent::_(3) . "\$db = JFactory::getDbo();";
+ $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Reset query.";
- $checkin .= PHP_EOL . $this->_t(3) . "\$query = \$db->getQuery(true);";
- $checkin .= PHP_EOL . $this->_t(3) . "\$query->select('*');";
- $checkin .= PHP_EOL . $this->_t(3)
+ $checkin .= PHP_EOL . Indent::_(3) . "\$query = \$db->getQuery(true);";
+ $checkin .= PHP_EOL . Indent::_(3) . "\$query->select('*');";
+ $checkin .= PHP_EOL . Indent::_(3)
. "\$query->from(\$db->quoteName('#__" . $component . "_" . $view
. "'));";
- $checkin .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
+ $checkin .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Only select items that are checked out.";
- $checkin .= PHP_EOL . $this->_t(3)
+ $checkin .= PHP_EOL . Indent::_(3)
. "\$query->where(\$db->quoteName('checked_out') . '!=0');";
- $this->_t(3) . "//" . $this->setLine(__LINE__)
+ Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " Query only to see if we have a rows";
- $checkin .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query, 0, 1);";
- $checkin .= PHP_EOL . $this->_t(3) . "\$db->execute();";
- $checkin .= PHP_EOL . $this->_t(3) . "if (\$db->getNumRows())";
- $checkin .= PHP_EOL . $this->_t(3) . "{";
- $checkin .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $checkin .= PHP_EOL . Indent::_(3) . "\$db->setQuery(\$query, 0, 1);";
+ $checkin .= PHP_EOL . Indent::_(3) . "\$db->execute();";
+ $checkin .= PHP_EOL . Indent::_(3) . "if (\$db->getNumRows())";
+ $checkin .= PHP_EOL . Indent::_(3) . "{";
+ $checkin .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Get Yesterdays date.";
- $checkin .= PHP_EOL . $this->_t(4)
+ $checkin .= PHP_EOL . Indent::_(4)
. "\$date = JFactory::getDate()->modify(\$time)->toSql();";
- $checkin .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
+ $checkin .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Reset query.";
- $checkin .= PHP_EOL . $this->_t(4) . "\$query = \$db->getQuery(true);";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $checkin .= PHP_EOL . Indent::_(4) . "\$query = \$db->getQuery(true);";
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Fields to update.";
- $checkin .= PHP_EOL . $this->_t(4) . "\$fields = array(";
- $checkin .= PHP_EOL . $this->_t(5)
+ $checkin .= PHP_EOL . Indent::_(4) . "\$fields = array(";
+ $checkin .= PHP_EOL . Indent::_(5)
. "\$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',";
- $checkin .= PHP_EOL . $this->_t(5)
+ $checkin .= PHP_EOL . Indent::_(5)
. "\$db->quoteName('checked_out') . '=0'";
- $checkin .= PHP_EOL . $this->_t(4) . ");";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $checkin .= PHP_EOL . Indent::_(4) . ");";
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Conditions for which records should be updated.";
- $checkin .= PHP_EOL . $this->_t(4) . "\$conditions = array(";
- $checkin .= PHP_EOL . $this->_t(5)
+ $checkin .= PHP_EOL . Indent::_(4) . "\$conditions = array(";
+ $checkin .= PHP_EOL . Indent::_(5)
. "\$db->quoteName('checked_out') . '!=0', ";
- $checkin .= PHP_EOL . $this->_t(5)
+ $checkin .= PHP_EOL . Indent::_(5)
. "\$db->quoteName('checked_out_time') . '<\''.\$date.'\''";
- $checkin .= PHP_EOL . $this->_t(4) . ");";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $checkin .= PHP_EOL . Indent::_(4) . ");";
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Check table.";
- $checkin .= PHP_EOL . $this->_t(4)
+ $checkin .= PHP_EOL . Indent::_(4)
. "\$query->update(\$db->quoteName('#__" . $component . "_" . $view
. "'))->set(\$fields)->where(\$conditions); ";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(4)
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(4)
. "\$db->setQuery(\$query);";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "\$db->execute();";
- $checkin .= PHP_EOL . $this->_t(3) . "}";
- $checkin .= PHP_EOL . $this->_t(2) . "}";
- $checkin .= PHP_EOL . PHP_EOL . $this->_t(2) . "return false;";
- $checkin .= PHP_EOL . $this->_t(1) . "}";
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(4) . "\$db->execute();";
+ $checkin .= PHP_EOL . Indent::_(3) . "}";
+ $checkin .= PHP_EOL . Indent::_(2) . "}";
+ $checkin .= PHP_EOL . PHP_EOL . Indent::_(2) . "return false;";
+ $checkin .= PHP_EOL . Indent::_(1) . "}";
return $checkin;
}
@@ -21838,58 +21641,57 @@ class Interpretation extends Fields
$this->permissionBuilder[$core['core.access']]
))
{
- $fix_access = PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//"
- . $this->setLine(__LINE__)
+ $fix_access = PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__)
. " Remove items the user can't access.";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "\$access = (\$user->authorise('" . $core['core.access']
. "', 'com_" . $component . "." . $nameSingleCode
. ".' . (int) \$item->id) && \$user->authorise('"
. $core['core.access'] . "', 'com_" . $component . "'));";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "if (!\$access)";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "unset(\$items[\$nr]);";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "continue;";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "}"
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "}"
. PHP_EOL;
}
// add the tags if needed
if (isset($this->tagsBuilder[$nameSingleCode]))
{
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//"
- . $this->setLine(
- __LINE__
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//"
+ . Line::_(
+ __LINE__,__CLASS__
) . " Add the tags";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "\$item->tags = new JHelperTags;";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "\$item->tags->getTagIds(";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "\$item->id, 'com_"
- . $this->fileContentStatic[$this->hhh . 'component'
- . $this->hhh] . ".$nameSingleCode'";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . ");";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ . $this->fileContentStatic[Placefix::_h('component')] . ".$nameSingleCode'";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . ");";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "if (\$item->tags->tags)";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "\$item->tags = implode(', ',";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
. "\$item->tags->getTagNames(";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(6)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(6)
. "explode(',', \$item->tags->tags)";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5) . ")";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . ");";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "}";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5) . ")";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . ");";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "}";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "else";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "\$item->tags = '';";
- $fix_access .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "}";
+ $fix_access .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "}";
}
// get the correct array
if ($export || $all)
@@ -21975,66 +21777,66 @@ class Interpretation extends Fields
if ($item['type'] === 'usergroup' && !$export
&& $item['method'] != 6)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " decode " . $item['name'];
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$"
+ $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 . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "if (" . $Component . "Helper::checkArray(\$"
. $item['name'] . "Array))";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "\$"
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "\$"
. $item['name'] . "Names = array();";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "foreach (\$" . $item['name'] . "Array as \$"
. $item['name'] . ")";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5) . "\$"
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5) . "\$"
. $item['name'] . "Names[] = " . $Component
. "Helper::getGroupName(\$" . $item['name'] . ");";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "}";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "\$item->" . $item['name'] . " = implode(', ', \$"
. $item['name'] . "Names);";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "}";
}
/* elseif ($item['type'] === 'usergroup' && $export)
{
- $fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(3) . "//".$this->setLine(__LINE__)." decode ".$item['name'];
- $fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(3) . "\$".$item['name']."Array = ".$decode."(\$item->".$item['name'].$suffix_decode.");";
- $fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(3) . "if (".$Component."Helper::checkArray(\$".$item['name']."Array))";
- $fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(3) . "{";
- $fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(4) . "\$item->".$item['name']." = implode('|',\$".$item['name']."Array);";
- $fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(3) . "}";
+ $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 (".$Component."Helper::checkArray(\$".$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) . "}";
} */
elseif ($item['translation'] && !$export
&& $item['method'] != 6)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " decode " . $item['name'];
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$"
+ $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 . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "if (" . $Component . "Helper::checkArray(\$"
. $item['name'] . "Array))";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "\$"
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "\$"
. $item['name'] . "Names = array();";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "foreach (\$" . $item['name'] . "Array as \$"
. $item['name'] . ")";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5) . "\$"
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5) . "\$"
. $item['name'] . "Names[] = JText:"
. ":_(\$this->selectionTranslation(\$" . $item['name']
. ", '" . $item['name'] . "'));";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "}";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "\$item->" . $item['name'] . " = implode(', ', \$"
. $item['name'] . "Names);";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "}";
}
else
{
@@ -22049,10 +21851,10 @@ class Interpretation extends Fields
$_placeholder_for_field
= array('[[[field]]]' => "\$item->"
. $item['name']);
- $fix .= $this->setPlaceholders(
- PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= CFactory::_('Placeholder')->update(
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. implode(
- PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(
3
),
$this->expertFieldModeling[$nameSingleCode][$item['name']]['get']
@@ -22064,68 +21866,68 @@ class Interpretation extends Fields
$taber = '';
if ($item['method'] == 3)
{
- $taber = $this->_t(1);
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3)
+ $taber = Indent::_(1);
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3)
. "if (\$basickey && !is_numeric(\$item->"
. $item['name'] . ") && \$item->"
. $item['name']
. " === base64_encode(base64_decode(\$item->"
. $item['name'] . ", true)))";
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "{";
}
elseif ($item['method'] == 5)
{
- $taber = $this->_t(1);
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3)
+ $taber = Indent::_(1);
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3)
. "if (\$mediumkey && !is_numeric(\$item->"
. $item['name'] . ") && \$item->"
. $item['name']
. " === base64_encode(base64_decode(\$item->"
. $item['name'] . ", true)))";
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "{";
}
elseif ($item['method'] == 4)
{
- $taber = $this->_t(1);
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3)
+ $taber = Indent::_(1);
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3)
. "if (\$whmcskey && !is_numeric(\$item->"
. $item['name'] . ") && \$item->"
. $item['name']
. " === base64_encode(base64_decode(\$item->"
. $item['name'] . ", true)))";
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "{";
}
if ($item['method'] == 3 || $item['method'] == 4
|| $item['method'] == 5)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " decrypt " . $item['name'];
}
else
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $taber
- . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fix .= PHP_EOL . Indent::_(1) . $tab . $taber
+ . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " decode " . $item['name'];
}
- $fix .= PHP_EOL . $this->_t(1) . $tab . $taber
- . $this->_t(3) . "\$item->" . $item['name']
+ $fix .= PHP_EOL . Indent::_(1) . $tab . $taber
+ . Indent::_(3) . "\$item->" . $item['name']
. " = " . $decode . "(\$item->" . $item['name']
. ");";
if ($item['method'] == 3 || $item['method'] == 4
|| $item['method'] == 5)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "}";
}
}
}
@@ -22133,76 +21935,76 @@ class Interpretation extends Fields
{
if ($export && $item['type'] === 'repeatable')
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
- . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
+ . "//" . Line::_(__Line__, __Class__)
. " decode repeatable " . $item['name'];
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "\$" . $item['name'] . "Array = " . $decode
. "(\$item->" . $item['name'] . $suffix_decode
. ");";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "if (" . $Component . "Helper::checkArray(\$"
. $item['name'] . "Array))";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "\$bucket" . $item['name'] . " = array();";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "foreach (\$" . $item['name'] . "Array as \$"
. $item['name'] . "FieldName => \$"
. $item['name'] . ")";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
. "if (" . $Component . "Helper::checkArray(\$"
. $item['name'] . "))";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
. "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(6)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(6)
. "\$bucket" . $item['name'] . "[] = \$"
. $item['name']
. "FieldName . '<||VDM||>' . implode('<|VDM|>',\$"
. $item['name'] . ");";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
. "}";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "}";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
- . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
+ . "//" . Line::_(__Line__, __Class__)
. " make sure the bucket has values.";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "if (" . $Component
. "Helper::checkArray(\$bucket" . $item['name']
. "))";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
- . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
+ . "//" . Line::_(__Line__, __Class__)
. " clear the repeatable field.";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
. "unset(\$item->" . $item['name'] . ");";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
- . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
+ . "//" . Line::_(__Line__, __Class__)
. " set repeatable field for export.";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
. "\$item->" . $item['name']
. " = implode('<|||VDM|||>',\$bucket"
. $item['name'] . ");";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
- . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
+ . "//" . Line::_(__Line__, __Class__)
. " unset the bucket.";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(5)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(5)
. "unset(\$bucket" . $item['name'] . ");";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(4)
. "}";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "}";
}
elseif ($item['method'] == 1 && !$export)
{
// TODO we check if this works well.
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
- . "//" . $this->setLine(__LINE__) . " convert "
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
+ . "//" . Line::_(__Line__, __Class__) . " convert "
. $item['name'];
if (isset($item['custom']['table']))
{
@@ -22221,8 +22023,8 @@ class Interpretation extends Fields
{
$keyTableNAme = $item['custom']['table'];
}
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "\$item->" . $item['name']
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "\$item->" . $item['name']
. " = " . $Component
. "Helper::jsonToString(\$item->"
. $item['name'] . ", ', ', '"
@@ -22232,8 +22034,8 @@ class Interpretation extends Fields
}
else
{
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "\$item->" . $item['name']
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "\$item->" . $item['name']
. " = " . $Component
. "Helper::jsonToString(\$item->"
. $item['name'] . ", ', ', '"
@@ -22245,12 +22047,12 @@ class Interpretation extends Fields
if (!$export)
{
// For those we have not cached yet.
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " convert " . $item['name'];
- $fix .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(3) . "\$item->" . $item['name']
+ $fix .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(3) . "\$item->" . $item['name']
. " = " . $Component
. "Helper::jsonToString(\$item->"
. $item['name'] . ");";
@@ -22265,8 +22067,8 @@ class Interpretation extends Fields
{
foreach ($this->selectionTranslationFixBuilder[$nameListCode] as $name => $values)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//" . $this->setLine(__LINE__) . " convert " . $name;
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$item->" . $name . " = \$this->selectionTranslation(\$item->" . $name . ", '" . $name . "');";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " convert " . $name;
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "\$item->" . $name . " = \$this->selectionTranslation(\$item->" . $name . ", '" . $name . "');";
}
} */
// load the relations after modeling
@@ -22295,28 +22097,27 @@ class Interpretation extends Fields
|| $all)
{
// start the loop
- $forEachStart = PHP_EOL . PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $forEachStart = PHP_EOL . PHP_EOL . Indent::_(1) . $tab . Indent::_(
1
- ) . "//" . $this->setLine(__LINE__)
+ ) . "//" . Line::_(__Line__, __Class__)
. " Set values to display correctly.";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "if (" . $Component . "Helper::checkArray(\$items))";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "{";
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{";
// do not add to export since it is already done
if (!$export)
{
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
- . "//" . $this->setLine(__LINE__)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
+ . "//" . Line::_(__Line__, __Class__)
. " Get the user object if not set.";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "if (!isset(\$user) || !"
- . $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . "Helper::checkObject(\$user))";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ . $this->fileContentStatic[Placefix::_h('Component')] . "Helper::checkObject(\$user))";
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "{";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "\$user = JFactory::getUser();";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "}";
}
// the permissional acttion switch
@@ -22356,11 +22157,11 @@ class Interpretation extends Fields
// add the notes and get the global switch
if ($hasPermissional)
{
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(
2
- ) . "//" . $this->setLine(__LINE__)
+ ) . "//" . Line::_(__Line__, __Class__)
. " Get global permissional control activation. (default is inactive)";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(
2
)
. "\$strict_permission_per_field = JComponentHelper::getParams('com_"
@@ -22369,20 +22170,20 @@ class Interpretation extends Fields
. PHP_EOL;
}
}
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "foreach (\$items as \$nr => &\$item)";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "{";
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "{";
// add the access options
$forEachStart .= $fix_access;
// add the permissional removal of values the user has not right to view or access
if ($hasPermissional)
{
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
- . "//" . $this->setLine(__LINE__)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
+ . "//" . Line::_(__Line__, __Class__)
. " use permissional control if globally set.";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "if (\$strict_permission_per_field)";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "{";
foreach (
$this->permissionFields[$nameSingleCode] as $fieldName =>
@@ -22397,72 +22198,72 @@ class Interpretation extends Fields
{
case 'access':
case 'view':
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(4) . "//" . $this->setLine(
- __LINE__
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(4) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " set " . $permission_option
. " permissional control for " . $fieldName
. " value.";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(4) . "if (isset(\$item->"
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(4) . "if (isset(\$item->"
. $fieldName . ") && (!\$user->authorise('"
. $nameSingleCode . "."
. $permission_option . "." . $fieldName
. "', 'com_" . $component . "."
. $nameSingleCode
. ".' . (int) \$item->id)";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(5) . "|| !\$user->authorise('"
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(5) . "|| !\$user->authorise('"
. $nameSingleCode . "."
. $permission_option . "." . $fieldName
. "', 'com_" . $component . "')))";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(4) . "{";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(5) . "//" . $this->setLine(
- __LINE__
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(4) . "{";
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(5) . "//" . Line::_(
+ __LINE__,__CLASS__
)
. " We JUST empty the value (do you have a better idea)";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(5) . "\$item->" . $fieldName
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(5) . "\$item->" . $fieldName
. " = '';";
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab
- . $this->_t(4) . "}";
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(4) . "}";
break;
}
}
}
- $forEachStart .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $forEachStart .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "}";
}
// remove these values if export
if ($export)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//"
- . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__)
. " unset the values we don't want exported.";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "unset(\$item->asset_id);";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "unset(\$item->checked_out);";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "unset(\$item->checked_out_time);";
}
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "}";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "}";
if ($export)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "//"
- . $this->setLine(__LINE__) . " Add headers to items array.";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "//"
+ . Line::_(__Line__, __Class__) . " Add headers to items array.";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$headers = \$this->getExImPortHeaders();";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "if ("
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "if ("
. $Component . "Helper::checkObject(\$headers))";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "array_unshift(\$items,\$headers);";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "}";
}
}
@@ -22479,16 +22280,16 @@ class Interpretation extends Fields
{
if ('expert' !== $cryptionType)
{
- $script .= PHP_EOL . PHP_EOL . $this->_t(1) . $tab
- . $this->_t(1) . "//" . $this->setLine(__LINE__)
+ $script .= PHP_EOL . PHP_EOL . Indent::_(1) . $tab
+ . Indent::_(1) . "//" . Line::_(__Line__, __Class__)
. " Get the " . $cryptionType . " encryption key.";
- $script .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$" . $cryptionType . "key = " . $Component
. "Helper::getCryptKey('" . $cryptionType . "');";
- $script .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "//" . $this->setLine(__LINE__)
+ $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "//" . Line::_(__Line__, __Class__)
. " Get the encryption object.";
- $script .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. "\$" . $cryptionType . " = new FOFEncryptAes(\$"
. $cryptionType . "key);";
}
@@ -22507,9 +22308,9 @@ class Interpretation extends Fields
$block
)
{
- $script .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
. implode(
- PHP_EOL . $this->_t(1) . $tab . $this->_t(1),
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(1),
$block
);
}
@@ -22636,7 +22437,7 @@ class Interpretation extends Fields
break;
}
// Trigger Event: jcb_ce_setClassHeader
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_setClassHeader',
array(&$this->componentContext, &$context, &$codeName,
&$headers)
@@ -22645,7 +22446,7 @@ class Interpretation extends Fields
if (ArrayHelper::check($headers))
{
// return the headers
- return $this->setPlaceholders(implode(PHP_EOL, $headers), $this->placeholders);
+ return CFactory::_('Placeholder')->update(implode(PHP_EOL, $headers), $this->placeholders);
}
return $default;
@@ -22772,8 +22573,8 @@ class Interpretation extends Fields
$filter_name_select, 'U'
);
// and to translation
- $this->setLangContent(
- $this->lang, $filter_name_select_lang, $filter_name_select
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $filter_name_select_lang, $filter_name_select
);
// add the header
$headers[]
@@ -22813,23 +22614,23 @@ class Interpretation extends Fields
array_keys($field), array_values($field), $item['set']
)
);
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . implode(
- PHP_EOL . $this->_t(1) . $tab . $this->_t(3), $code
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . implode(
+ PHP_EOL . Indent::_(1) . $tab . Indent::_(3), $code
);
}
else
{
// concatenate
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " concatenate these fields";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$item->"
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " concatenate these fields";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "\$item->"
. $item['code'] . ' = ' . implode(
" . '" . str_replace("'", ''', $item['set']) . "' . ",
$field
) . ';';
}
- return $this->setPlaceholders($fix, $this->placeholders);
+ return CFactory::_('Placeholder')->update($fix, $this->placeholders);
}
public function setSelectionTranslationFix($views, $Component, $tab = '')
@@ -22841,29 +22642,29 @@ class Interpretation extends Fields
$this->selectionTranslationFixBuilder[$views]
))
{
- $fix .= PHP_EOL . PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
- . "//" . $this->setLine(__LINE__)
+ $fix .= PHP_EOL . PHP_EOL . Indent::_(1) . $tab . Indent::_(1)
+ . "//" . Line::_(__Line__, __Class__)
. " set selection value to a translatable value";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "if ("
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "if ("
. $Component . "Helper::checkArray(\$items))";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "{";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
. "foreach (\$items as \$nr => &\$item)";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "{";
foreach (
$this->selectionTranslationFixBuilder[$views] as $name =>
$values
)
{
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//"
- . $this->setLine(__LINE__) . " convert " . $name;
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3)
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//"
+ . Line::_(__Line__, __Class__) . " convert " . $name;
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
. "\$item->" . $name
. " = \$this->selectionTranslation(\$item->" . $name . ", '"
. $name . "');";
}
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "}";
- $fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "}"
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "}";
+ $fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(1) . "}"
. PHP_EOL;
}
@@ -22879,15 +22680,15 @@ class Interpretation extends Fields
$this->selectionTranslationFixBuilder[$views]
))
{
- $fix .= PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . PHP_EOL . Indent::_(1) . "/**";
+ $fix .= PHP_EOL . Indent::_(1)
. " * Method to convert selection values to translatable string.";
- $fix .= PHP_EOL . $this->_t(1) . " *";
- $fix .= PHP_EOL . $this->_t(1) . " * @return translatable string";
- $fix .= PHP_EOL . $this->_t(1) . " */";
- $fix .= PHP_EOL . $this->_t(1)
+ $fix .= PHP_EOL . Indent::_(1) . " *";
+ $fix .= PHP_EOL . Indent::_(1) . " * @return translatable string";
+ $fix .= PHP_EOL . Indent::_(1) . " */";
+ $fix .= PHP_EOL . Indent::_(1)
. "public function selectionTranslation(\$value,\$name)";
- $fix .= PHP_EOL . $this->_t(1) . "{";
+ $fix .= PHP_EOL . Indent::_(1) . "{";
foreach (
$this->selectionTranslationFixBuilder[$views] as $name =>
$values
@@ -22895,13 +22696,13 @@ class Interpretation extends Fields
{
if (ArrayHelper::check($values))
{
- $fix .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $fix .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Array of " . $name . " language strings";
- $fix .= PHP_EOL . $this->_t(2) . "if (\$name === '"
+ $fix .= PHP_EOL . Indent::_(2) . "if (\$name === '"
. $name . "')";
- $fix .= PHP_EOL . $this->_t(2) . "{";
- $fix .= PHP_EOL . $this->_t(3) . "\$" . $name
+ $fix .= PHP_EOL . Indent::_(2) . "{";
+ $fix .= PHP_EOL . Indent::_(3) . "\$" . $name
. "Array = array(";
$counter = 0;
foreach ($values as $value => $translang)
@@ -22921,32 +22722,32 @@ class Interpretation extends Fields
}
if ($counter == 0)
{
- $fix .= PHP_EOL . $this->_t(4) . $key . " => '"
+ $fix .= PHP_EOL . Indent::_(4) . $key . " => '"
. $translang . "'";
}
else
{
- $fix .= "," . PHP_EOL . $this->_t(4) . $key
+ $fix .= "," . PHP_EOL . Indent::_(4) . $key
. " => '" . $translang . "'";
}
$counter++;
}
- $fix .= PHP_EOL . $this->_t(3) . ");";
- $fix .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(
- __LINE__
+ $fix .= PHP_EOL . Indent::_(3) . ");";
+ $fix .= PHP_EOL . Indent::_(3) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Now check if value is found in this array";
- $fix .= PHP_EOL . $this->_t(3) . "if (isset(\$" . $name
+ $fix .= PHP_EOL . Indent::_(3) . "if (isset(\$" . $name
. "Array[\$value]) && " . $Component
. "Helper::checkString(\$" . $name . "Array[\$value]))";
- $fix .= PHP_EOL . $this->_t(3) . "{";
- $fix .= PHP_EOL . $this->_t(4) . "return \$" . $name
+ $fix .= PHP_EOL . Indent::_(3) . "{";
+ $fix .= PHP_EOL . Indent::_(4) . "return \$" . $name
. "Array[\$value];";
- $fix .= PHP_EOL . $this->_t(3) . "}";
- $fix .= PHP_EOL . $this->_t(2) . "}";
+ $fix .= PHP_EOL . Indent::_(3) . "}";
+ $fix .= PHP_EOL . Indent::_(2) . "}";
}
}
- $fix .= PHP_EOL . $this->_t(2) . "return \$value;";
- $fix .= PHP_EOL . $this->_t(1) . "}";
+ $fix .= PHP_EOL . Indent::_(2) . "return \$value;";
+ $fix .= PHP_EOL . Indent::_(1) . "}";
}
return $fix;
@@ -22956,14 +22757,14 @@ class Interpretation extends Fields
{
if (strlen($viewsCodeName) > 0)
{
- $router = PHP_EOL . $this->_t(2) . "case '" . $viewsCodeName . "':";
- $router .= PHP_EOL . $this->_t(3)
+ $router = PHP_EOL . Indent::_(2) . "case '" . $viewsCodeName . "':";
+ $router .= PHP_EOL . Indent::_(3)
. "\$id = explode(':', \$segments[\$count-1]);";
- $router .= PHP_EOL . $this->_t(3) . "\$vars['id'] = (int) \$id[0];";
- $router .= PHP_EOL . $this->_t(3) . "\$vars['view'] = '"
+ $router .= PHP_EOL . Indent::_(3) . "\$vars['id'] = (int) \$id[0];";
+ $router .= PHP_EOL . Indent::_(3) . "\$vars['view'] = '"
. $viewsCodeName
. "';";
- $router .= PHP_EOL . $this->_t(2) . "break;";
+ $router .= PHP_EOL . Indent::_(2) . "break;";
return $router;
}
@@ -23002,10 +22803,10 @@ class Interpretation extends Fields
$this->permissionDashboard
);
- return PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
- . " view access array" . PHP_EOL . $this->_t(2)
- . "\$viewAccess = array(" . PHP_EOL . $this->_t(3) . implode(
- "," . PHP_EOL . $this->_t(3), $this->permissionDashboard
+ return PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
+ . " view access array" . PHP_EOL . Indent::_(2)
+ . "\$viewAccess = array(" . PHP_EOL . Indent::_(3) . implode(
+ "," . PHP_EOL . Indent::_(3), $this->permissionDashboard
) . ");";
}
@@ -23067,7 +22868,7 @@ class Interpretation extends Fields
$view['settings']->name_single, 'U'
) . '_ADD';
// add to lang
- $this->setLangContent($this->lang, $langKey, $langName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName);
$counter++;
}
if (isset($view['dashboard_list'])
@@ -23104,7 +22905,7 @@ class Interpretation extends Fields
$view['settings']->name_list, 'U'
);
// add to lang
- $this->setLangContent($this->lang, $langKey, $langName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName);
$counter++;
}
// dashboard link to category on dashboard is build here
@@ -23153,7 +22954,7 @@ class Interpretation extends Fields
) . '_' . StringHelper::safe(
$catCode, 'U'
);
- $this->setLangContent($this->lang, $langKey, $langName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName);
// get image type
$type = ComponentbuilderHelper::imageInfo(
$view['settings']->icon_category
@@ -23254,7 +23055,7 @@ class Interpretation extends Fields
);
// return the methods
- return PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ return PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
$this->componentData->php_dashboard_methods,
$this->placeholders
);
@@ -23281,8 +23082,8 @@ class Interpretation extends Fields
}
// return the gets
- return PHP_EOL . $this->_t(2) . implode(
- PHP_EOL . $this->_t(2), $gets
+ return PHP_EOL . Indent::_(2) . implode(
+ PHP_EOL . Indent::_(2), $gets
);
}
@@ -23295,7 +23096,7 @@ class Interpretation extends Fields
$display = array();
$mainAccordianName = 'cPanel';
$builder = array();
- $tab = $this->_t(1);
+ $tab = Indent::_(1);
$loadTabs = false;
// check if we have custom tabs
if (isset($this->componentData->dashboard_tab)
@@ -23307,21 +23108,21 @@ class Interpretation extends Fields
foreach ($this->componentData->dashboard_tab as $data)
{
$builder[$data['name']][$data['header']]
- = $this->setPlaceholders(
+ = CFactory::_('Placeholder')->update(
$data['html'], $this->placeholders
);
}
// since we have custom tabs we must load the tab structure around the cpanel
$display[] = '';
- $display[] = $this->_t(1) . '
";
}
$display[] = "
";
@@ -23468,7 +23267,7 @@ class Interpretation extends Fields
$langKey = $this->langPrefix . '_DASHBOARD_'
. $menu['settings']->CODE;
// add to lang
- $this->setLangContent($this->lang, $langKey, $langName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName);
// set icon
if ($counter == 0)
{
@@ -23505,7 +23304,7 @@ class Interpretation extends Fields
$langKey = $this->langPrefix . '_DASHBOARD_'
. $menu['settings']->CODE;
// add to lang
- $this->setLangContent($this->lang, $langKey, $langName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName);
// set icon
$this->lastCustomDashboardIcon[$nr] = ", '" . $type
. $menu['settings']->code . "'";
@@ -23548,7 +23347,7 @@ class Interpretation extends Fields
$langName = $menu['name'] . ' ';
$langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper;
// add to lang
- $this->setLangContent($this->lang, $langKey, $langName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName);
// if this is a link build the icon values with pipe
if (isset($menu['link'])
@@ -23604,7 +23403,7 @@ class Interpretation extends Fields
$langName = $menu['name'] . ' ';
$langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper;
// add to lang
- $this->setLangContent($this->lang, $langKey, $langName);
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langKey, $langName);
// if this is a link build the icon values with pipe
if (isset($menu['link'])
@@ -23646,8 +23445,8 @@ class Interpretation extends Fields
. "_DASHBOARD'), 'index.php?option=com_" . $codeName
. "&view=" . $codeName . "', \$submenu === '" . $codeName
. "');";
- $this->setLangContent(
- $this->lang, $lang . '_DASHBOARD', 'Dashboard'
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DASHBOARD', 'Dashboard'
);
}
$catArray = array();
@@ -23685,22 +23484,22 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
))
{
- $menus .= PHP_EOL . $this->_t(2)
+ $menus .= PHP_EOL . Indent::_(2)
. "if (\$user->authorise('" . $core['core.access']
. "', 'com_" . $codeName
. "') && \$user->authorise('" . $nameSingleCode
. ".submenu', 'com_" . $codeName . "'))";
- $menus .= PHP_EOL . $this->_t(2) . "{";
+ $menus .= PHP_EOL . Indent::_(2) . "{";
// add tab to lines to follow
- $tab = $this->_t(1);
+ $tab = Indent::_(1);
}
- $menus .= PHP_EOL . $this->_t(2) . $tab
+ $menus .= PHP_EOL . Indent::_(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper . "'), 'index.php?option=com_" . $codeName
. "&view=" . $nameListCode . "', \$submenu === '"
. $nameListCode . "');";
- $this->setLangContent(
- $this->lang, $lang . "_" . $nameUpper,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . "_" . $nameUpper,
$view['settings']->name_list
);
// check if category has another name
@@ -23740,7 +23539,7 @@ class Interpretation extends Fields
$_menu = "categories";
}
// now load the menus
- $menus .= PHP_EOL . $this->_t(2) . $tab
+ $menus .= PHP_EOL . Indent::_(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('"
. $this->categoryBuilder[$nameListCode]['name']
. "'), 'index.php?option=com_categories&view=categories&extension="
@@ -23760,35 +23559,35 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
))
{
- $menus .= PHP_EOL . $this->_t(2) . "}";
+ $menus .= PHP_EOL . Indent::_(2) . "}";
}
}
// set the Joomla custom fields options
if (isset($view['joomla_fields'])
&& $view['joomla_fields'] == 1)
{
- $menus .= PHP_EOL . $this->_t(2)
+ $menus .= PHP_EOL . Indent::_(2)
. "if (JComponentHelper::isEnabled('com_fields'))";
- $menus .= PHP_EOL . $this->_t(2) . "{";
- $menus .= PHP_EOL . $this->_t(3)
+ $menus .= PHP_EOL . Indent::_(2) . "{";
+ $menus .= PHP_EOL . Indent::_(3)
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper
. "_FIELDS'), 'index.php?option=com_fields&context=com_"
. $codeName . "." . $nameSingleCode
. "', \$submenu === 'fields.fields');";
- $menus .= PHP_EOL . $this->_t(3)
+ $menus .= PHP_EOL . Indent::_(3)
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper
. "_FIELDS_GROUPS'), 'index.php?option=com_fields&view=groups&context=com_"
. $codeName . "." . $nameSingleCode
. "', \$submenu === 'fields.groups');";
- $menus .= PHP_EOL . $this->_t(2) . "}";
- $this->setLangContent(
- $this->lang, $lang . "_" . $nameUpper . "_FIELDS",
+ $menus .= PHP_EOL . Indent::_(2) . "}";
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . "_" . $nameUpper . "_FIELDS",
$view['settings']->name_list . ' Fields'
);
- $this->setLangContent(
- $this->lang,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target,
$lang . "_" . $nameUpper . "_FIELDS_GROUPS",
$view['settings']->name_list . ' Field Groups'
);
@@ -23900,28 +23699,28 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
))
{
- $custom .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $custom .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Access control (" . $core['core.access'] . " && "
. $nameSingle . ".submenu).";
- $custom .= PHP_EOL . $this->_t(2) . "if (\$user->authorise('"
+ $custom .= PHP_EOL . Indent::_(2) . "if (\$user->authorise('"
. $core['core.access'] . "', 'com_" . $codeName
. "') && \$user->authorise('" . $nameSingle
. ".submenu', 'com_" . $codeName . "'))";
- $custom .= PHP_EOL . $this->_t(2) . "{";
+ $custom .= PHP_EOL . Indent::_(2) . "{";
// add tab to lines to follow
- $tab = $this->_t(1);
+ $tab = Indent::_(1);
}
else
{
- $custom .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(
- __LINE__
+ $custom .= PHP_EOL . Indent::_(2) . "//" . Line::_(
+ __LINE__,__CLASS__
) . " Access control (" . $nameSingle . ".submenu).";
- $custom .= PHP_EOL . $this->_t(2) . "if (\$user->authorise('"
+ $custom .= PHP_EOL . Indent::_(2) . "if (\$user->authorise('"
. $nameSingle . ".submenu', 'com_" . $codeName . "'))";
- $custom .= PHP_EOL . $this->_t(2) . "{";
+ $custom .= PHP_EOL . Indent::_(2) . "{";
// add tab to lines to follow
- $tab = $this->_t(1);
+ $tab = Indent::_(1);
}
if (isset($menu['link'])
&& StringHelper::check(
@@ -23929,29 +23728,29 @@ class Interpretation extends Fields
))
{
- $this->setLangContent(
- $this->lang, $lang . '_' . $nameUpper, $name
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_' . $nameUpper, $name
);
// add custom menu
- $custom .= PHP_EOL . $this->_t(2) . $tab
+ $custom .= PHP_EOL . Indent::_(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper . "'), '" . $menu['link']
. "', \$submenu === '" . $nameList . "');";
}
else
{
- $this->setLangContent(
- $this->lang, $lang . '_' . $nameUpper, $name
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_' . $nameUpper, $name
);
// add custom menu
- $custom .= PHP_EOL . $this->_t(2) . $tab
+ $custom .= PHP_EOL . Indent::_(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper . "'), 'index.php?option=com_" . $codeName
. "&view=" . $nameList . "', \$submenu === '" . $nameList
. "');";
}
// check if the item has permissions.
- $custom .= PHP_EOL . $this->_t(2) . "}";
+ $custom .= PHP_EOL . Indent::_(2) . "}";
return $custom;
}
@@ -23979,51 +23778,51 @@ class Interpretation extends Fields
$this->permissionBuilder['global'][$core['core.access']]
))
{
- $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2)
+ $this->lastCustomSubMenu[$nr] .= PHP_EOL . Indent::_(2)
. "if (\$user->authorise('" . $core['core.access']
. "', 'com_" . $codeName . "') && \$user->authorise('"
. $nameSingle . ".submenu', 'com_" . $codeName . "'))";
- $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2) . "{";
+ $this->lastCustomSubMenu[$nr] .= PHP_EOL . Indent::_(2) . "{";
// add tab to lines to follow
- $tab = $this->_t(1);
+ $tab = Indent::_(1);
}
else
{
- $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2)
+ $this->lastCustomSubMenu[$nr] .= PHP_EOL . Indent::_(2)
. "if (\$user->authorise('" . $nameSingle
. ".submenu', 'com_" . $codeName . "'))";
- $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2) . "{";
+ $this->lastCustomSubMenu[$nr] .= PHP_EOL . Indent::_(2) . "{";
// add tab to lines to follow
- $tab = $this->_t(1);
+ $tab = Indent::_(1);
}
if (isset($menu['link'])
&& StringHelper::check(
$menu['link']
))
{
- $this->setLangContent(
- $this->lang, $lang . '_' . $nameUpper, $name
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_' . $nameUpper, $name
);
// add custom menu
- $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2) . $tab
+ $this->lastCustomSubMenu[$nr] .= PHP_EOL . Indent::_(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper . "'), '" . $menu['link']
. "', \$submenu === '" . $nameList . "');";
}
else
{
- $this->setLangContent(
- $this->lang, $lang . '_' . $nameUpper, $name
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_' . $nameUpper, $name
);
// add custom menu
- $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2) . $tab
+ $this->lastCustomSubMenu[$nr] .= PHP_EOL . Indent::_(2) . $tab
. "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_"
. $nameUpper . "'), 'index.php?option=com_" . $codeName
. "&view=" . $nameList . "', \$submenu === '" . $nameList
. "');";
}
// check if the item has permissions.
- $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2) . "}";
+ $this->lastCustomSubMenu[$nr] .= PHP_EOL . Indent::_(2) . "}";
}
return false;
@@ -24072,13 +23871,13 @@ class Interpretation extends Fields
// add the prefix
if ($addPrefix == 1)
{
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang, $prefix . $this->componentData->name
);
}
else
{
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang, $this->componentData->name
);
}
@@ -24095,10 +23894,10 @@ class Interpretation extends Fields
$nameUpper = StringHelper::safe(
$view['settings']->name_list, 'U'
);
- $menus .= PHP_EOL . $this->_t(3) . '' . $lang
. '_' . $nameUpper . ' ';
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_' . $nameUpper,
$view['settings']->name_list
);
@@ -24138,12 +23937,12 @@ class Interpretation extends Fields
if (isset($menu['mainmenu']) && $menu['mainmenu'] == 1
&& $view['adminview'] == $menu['before'])
{
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_' . $menu['settings']->CODE,
$menu['settings']->name
);
// add custom menu
- $customMenu .= PHP_EOL . $this->_t(3)
+ $customMenu .= PHP_EOL . Indent::_(3)
. '' . $lang . '_'
. $menu['settings']->CODE . ' ';
@@ -24151,12 +23950,12 @@ class Interpretation extends Fields
elseif (isset($menu['mainmenu']) && $menu['mainmenu'] == 1
&& empty($menu['before']))
{
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_' . $menu['settings']->CODE,
$menu['settings']->name
);
// add custom menu
- $this->lastCustomMainMenu[$nr] = PHP_EOL . $this->_t(3)
+ $this->lastCustomMainMenu[$nr] = PHP_EOL . Indent::_(3)
. '' . $lang . '_'
. $menu['settings']->CODE . ' ';
@@ -24185,7 +23984,7 @@ class Interpretation extends Fields
$nameUpper = StringHelper::safe(
$menu['name'], 'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_' . $nameUpper, $menu['name']
);
// sanitize url
@@ -24213,7 +24012,7 @@ class Interpretation extends Fields
$menu['link'], ENT_XML1, 'UTF-8'
);
// add custom menu
- $customMenu .= PHP_EOL . $this->_t(3) . '' . $lang . '_' . $nameUpper
. ' ';
}
@@ -24225,11 +24024,11 @@ class Interpretation extends Fields
$nameUpper = StringHelper::safe(
$menu['name_code'], 'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_' . $nameUpper, $menu['name']
);
// add custom menu
- $customMenu .= PHP_EOL . $this->_t(3)
+ $customMenu .= PHP_EOL . Indent::_(3)
. '' . $lang . '_' . $nameUpper
. ' ';
@@ -24247,7 +24046,7 @@ class Interpretation extends Fields
$nameUpper = StringHelper::safe(
$menu['name'], 'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_' . $nameUpper, $menu['name']
);
// sanitize url
@@ -24275,7 +24074,7 @@ class Interpretation extends Fields
$menu['link'], ENT_XML1, 'UTF-8'
);
// add custom menu
- $this->lastCustomMainMenu[$nr] = PHP_EOL . $this->_t(3)
+ $this->lastCustomMainMenu[$nr] = PHP_EOL . Indent::_(3)
. '' . $lang
. '_' . $nameUpper . ' ';
}
@@ -24287,11 +24086,11 @@ class Interpretation extends Fields
$nameUpper = StringHelper::safe(
$menu['name_code'], 'U'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'adminsys', $lang . '_' . $nameUpper, $menu['name']
);
// add custom menu
- $this->lastCustomMainMenu[$nr] = PHP_EOL . $this->_t(3)
+ $this->lastCustomMainMenu[$nr] = PHP_EOL . Indent::_(3)
. '' . $lang . '_' . $nameUpper
. ' ';
@@ -24330,31 +24129,29 @@ class Interpretation extends Fields
$nameListCode = 'configs';
// set place holders
$placeholders = array();
- $placeholders[$this->hhh . 'component' . $this->hhh]
+ $placeholders[Placefix::_h('component')]
= $this->componentCodeName;
- $placeholders[$this->hhh . 'Component' . $this->hhh]
+ $placeholders[Placefix::_h('Component')]
= StringHelper::safe(
$this->componentData->name_code, 'F'
);
- $placeholders[$this->hhh . 'COMPONENT' . $this->hhh]
+ $placeholders[Placefix::_h('COMPONENT')]
= StringHelper::safe(
$this->componentData->name_code, 'U'
);
- $placeholders[$this->hhh . 'view' . $this->hhh]
+ $placeholders[Placefix::_h('view')]
= $nameSingleCode;
- $placeholders[$this->hhh . 'views' . $this->hhh]
+ $placeholders[Placefix::_h('views')]
= $nameListCode;
- $placeholders[$this->bbb . 'component' . $this->ddd]
+ $placeholders[Placefix::_('component')]
= $this->componentCodeName;
- $placeholders[$this->bbb . 'Component' . $this->ddd]
- = $placeholders[$this->hhh . 'Component'
- . $this->hhh];
- $placeholders[$this->bbb . 'COMPONENT' . $this->ddd]
- = $placeholders[$this->hhh . 'COMPONENT'
- . $this->hhh];
- $placeholders[$this->bbb . 'view' . $this->ddd]
+ $placeholders[Placefix::_('Component')]
+ = $placeholders[Placefix::_h('Component')];
+ $placeholders[Placefix::_('COMPONENT')]
+ = $placeholders[Placefix::_h('COMPONENT')];
+ $placeholders[Placefix::_('view')]
= $nameSingleCode;
- $placeholders[$this->bbb . 'views' . $this->ddd]
+ $placeholders[Placefix::_('views')]
= $nameListCode;
// load the global placeholders
if (ArrayHelper::check(
@@ -24374,7 +24171,7 @@ class Interpretation extends Fields
// set the custom table key
$dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeSetConfigFieldsets',
array(&$this->componentContext, &$timer,
&$this->configFieldSets,
@@ -24401,13 +24198,13 @@ class Interpretation extends Fields
= $xmlField;
// set global params to db on install
$fieldName = StringHelper::safe(
- $this->setPlaceholders(
+ CFactory::_('Placeholder')->update(
GetHelper::between(
$xmlField, 'name="', '"'
), $placeholders
)
);
- $fieldDefault = $this->setPlaceholders(
+ $fieldDefault = CFactory::_('Placeholder')->update(
GetHelper::between(
$xmlField, 'default="', '"'
), $placeholders
@@ -24451,7 +24248,7 @@ class Interpretation extends Fields
elseif (2 == $timer) // this is after the admin views are build
{
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeSetConfigFieldsets',
array(&$this->componentContext, &$timer,
&$this->configFieldSets,
@@ -24470,7 +24267,7 @@ class Interpretation extends Fields
$this->setCustomControlConfigFieldsets($lang);
}
// Trigger Event: jcb_ce_onAfterSetConfigFieldsets
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterSetConfigFieldsets',
array(&$this->componentContext, &$timer, &$this->configFieldSets,
&$this->configFieldSetsCustomField, &$this->extensionsParams,
@@ -24654,19 +24451,19 @@ class Interpretation extends Fields
if (ArrayHelper::check($bucket))
{
// setup lang
- $this->setLangContent(
- $this->lang, $lang . '_' . $tabUpper, $tab
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_' . $tabUpper, $tab
);
// start field set
- $this->configFieldSets[] = $this->_t(1) . "configFieldSets[] = $this->_t(2) . 'name="'
+ $this->configFieldSets[] = Indent::_(1) . "configFieldSets[] = Indent::_(2) . 'name="'
. $tabCode . '"';
- $this->configFieldSets[] = $this->_t(2) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'label="' . $lang
. '_' . $tabUpper . '">';
// set the fields
$this->configFieldSets[] = implode("", $bucket);
// close field set
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . " ";
}
// remove after loading
unset($this->configFieldSetsCustomField[$tab]);
@@ -24683,36 +24480,36 @@ class Interpretation extends Fields
))
{
// start building field set for config
- $this->configFieldSets[] = $this->_t(1) . "configFieldSets[] = $this->_t(2) . 'name="group_config"';
- $this->configFieldSets[] = $this->_t(2) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(1) . "configFieldSets[] = Indent::_(2) . 'name="group_config"';
+ $this->configFieldSets[] = Indent::_(2) . 'label="' . $lang
. '_GROUPS_LABEL"';
- $this->configFieldSets[] = $this->_t(2) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'description="' . $lang
. '_GROUPS_DESC">';
// setup lang
- $this->setLangContent(
- $this->lang, $lang . '_GROUPS_LABEL', "Target Groups"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_GROUPS_LABEL', "Target Groups"
);
- $this->setLangContent(
- $this->lang, $lang . '_GROUPS_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_GROUPS_DESC',
"The Parameters for the targeted groups are set here."
);
- $this->setLangContent(
- $this->lang, $lang . '_TARGET_GROUP_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_TARGET_GROUP_DESC',
"Set the group/s being targeted by this user type."
);
foreach ($this->setGroupControl as $selector => $label)
{
- $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="usergroup"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $label
+ $this->configFieldSets[] = Indent::_(3) . 'type="usergroup"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $label
. '"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $lang . '_TARGET_GROUP_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'multiple="true"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(3) . 'multiple="true"';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
// set params defaults
$this->extensionsParams[] = '"' . $selector . '":["2"]';
}
@@ -24728,7 +24525,7 @@ class Interpretation extends Fields
unset($this->configFieldSetsCustomField['Target Groups']);
}
// close that fieldse
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . " ";
}
}
@@ -24744,82 +24541,82 @@ class Interpretation extends Fields
// start building field set for config
$this->configFieldSets[] = 'configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'addrulepath="/administrator/components/com_' . $component
. '/models/rules"';
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'addfieldpath="/administrator/components/com_' . $component
. '/models/fields"';
- $this->configFieldSets[] = $this->_t(2) . 'name="global_config"';
- $this->configFieldSets[] = $this->_t(2) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'name="global_config"';
+ $this->configFieldSets[] = Indent::_(2) . 'label="' . $lang
. '_GLOBAL_LABEL"';
- $this->configFieldSets[] = $this->_t(2) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'description="' . $lang
. '_GLOBAL_DESC">';
// setup lang
- $this->setLangContent($this->lang, $lang . '_GLOBAL_LABEL', "Global");
- $this->setLangContent(
- $this->lang, $lang . '_GLOBAL_DESC', "The Global Parameters"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_GLOBAL_LABEL', "Global");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_GLOBAL_DESC', "The Global Parameters"
);
// add auto checin if required
if ($this->addCheckin)
{
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . 'name="check_in"';
- $this->configFieldSets[] = $this->_t(3) . 'type="list"';
- $this->configFieldSets[] = $this->_t(3) . 'default="0"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . 'name="check_in"';
+ $this->configFieldSets[] = Indent::_(3) . 'type="list"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="0"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_CHECK_TIMER_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'description="' . $lang
. '_CHECK_TIMER_DESC">';
- $this->configFieldSets[] = $this->_t(3) . 'configFieldSets[] = $this->_t(4) . 'value="-5 hours">'
+ $this->configFieldSets[] = Indent::_(3) . ' configFieldSets[] = Indent::_(4) . 'value="-5 hours">'
. $lang . '_CHECK_TIMER_OPTION_ONE ';
- $this->configFieldSets[] = $this->_t(3) . 'configFieldSets[] = $this->_t(4) . 'value="-12 hours">'
+ $this->configFieldSets[] = Indent::_(3) . ' configFieldSets[] = Indent::_(4) . 'value="-12 hours">'
. $lang . '_CHECK_TIMER_OPTION_TWO ';
- $this->configFieldSets[] = $this->_t(3) . 'configFieldSets[] = $this->_t(4) . 'value="-1 day">' . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' configFieldSets[] = Indent::_(4) . 'value="-1 day">' . $lang
. '_CHECK_TIMER_OPTION_THREE ';
- $this->configFieldSets[] = $this->_t(3) . 'configFieldSets[] = $this->_t(4) . 'value="-2 day">' . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' configFieldSets[] = Indent::_(4) . 'value="-2 day">' . $lang
. '_CHECK_TIMER_OPTION_FOUR ';
- $this->configFieldSets[] = $this->_t(3) . 'configFieldSets[] = $this->_t(4) . 'value="-1 week">' . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' configFieldSets[] = Indent::_(4) . 'value="-1 week">' . $lang
. '_CHECK_TIMER_OPTION_FIVE ';
- $this->configFieldSets[] = $this->_t(3) . 'configFieldSets[] = $this->_t(4) . 'value="0">' . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' configFieldSets[] = Indent::_(4) . 'value="0">' . $lang
. '_CHECK_TIMER_OPTION_SIX ';
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . " ";
+ $this->configFieldSets[] = Indent::_(2)
. ' ';
// setup lang
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_LABEL', "Check in timer"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_LABEL', "Check in timer"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_DESC',
"Set the intervals for the auto checkin fuction of tables that checks out the items to an user."
);
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_OPTION_ONE',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_OPTION_ONE',
"Every five hours"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_OPTION_TWO',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_OPTION_TWO',
"Every twelve hours"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_OPTION_THREE', "Once a day"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_OPTION_THREE', "Once a day"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_OPTION_FOUR',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_OPTION_FOUR',
"Every second day"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_OPTION_FIVE', "Once a week"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_OPTION_FIVE', "Once a week"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHECK_TIMER_OPTION_SIX', "Never"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHECK_TIMER_OPTION_SIX', "Never"
);
// load the Global checkin defautls
$this->extensionsParams[] = '"check_in":"-1 day"';
@@ -24827,33 +24624,33 @@ class Interpretation extends Fields
// set history control
if ($this->setTagHistory)
{
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . 'name="save_history"';
- $this->configFieldSets[] = $this->_t(3) . 'type="radio"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . 'name="save_history"';
+ $this->configFieldSets[] = Indent::_(3) . 'type="radio"';
+ $this->configFieldSets[] = Indent::_(3)
. 'class="btn-group btn-group-yesno"';
- $this->configFieldSets[] = $this->_t(3) . 'default="1"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . 'default="1"';
+ $this->configFieldSets[] = Indent::_(3)
. 'label="JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'description="JGLOBAL_SAVE_HISTORY_OPTIONS_DESC"';
- $this->configFieldSets[] = $this->_t(3) . ">";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . ">";
+ $this->configFieldSets[] = Indent::_(3)
. 'JYES ';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'JNO ';
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . 'name="history_limit"';
- $this->configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'filter="integer"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . " ";
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . 'name="history_limit"';
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'filter="integer"';
+ $this->configFieldSets[] = Indent::_(3)
. 'label="JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'description="JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'default="10"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(3) . 'default="10"';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. ' ';
// load the Global checkin defautls
$this->extensionsParams[]
@@ -24871,49 +24668,49 @@ class Interpretation extends Fields
unset($this->configFieldSetsCustomField['Global']);
}
// set the author details
- $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="spacer"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'configFieldSets[] = Indent::_(3) . 'type="spacer"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_AUTHOR"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2) . 'configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_AUTHOR_NAME_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'description="' . $lang
. '_AUTHOR_NAME_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default="' . $autorName
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="' . $autorName
. '"';
- $this->configFieldSets[] = $this->_t(3) . 'readonly="true"';
- $this->configFieldSets[] = $this->_t(3) . 'class="readonly"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="email"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'readonly="true"';
+ $this->configFieldSets[] = Indent::_(3) . 'class="readonly"';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2) . 'configFieldSets[] = Indent::_(3) . 'type="email"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_AUTHOR_EMAIL_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'description="' . $lang
. '_AUTHOR_EMAIL_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default="' . $autorEmail
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="' . $autorEmail
. '"';
- $this->configFieldSets[] = $this->_t(3) . 'readonly="true"';
- $this->configFieldSets[] = $this->_t(3) . 'class="readonly"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(3) . 'readonly="true"';
+ $this->configFieldSets[] = Indent::_(3) . 'class="readonly"';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
// setup lang
- $this->setLangContent($this->lang, $lang . '_AUTHOR', "Author Info");
- $this->setLangContent(
- $this->lang, $lang . '_AUTHOR_NAME_LABEL', "Author Name"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_AUTHOR', "Author Info");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_AUTHOR_NAME_LABEL', "Author Name"
);
- $this->setLangContent(
- $this->lang, $lang . '_AUTHOR_NAME_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_AUTHOR_NAME_DESC',
"The name of the author of this component."
);
- $this->setLangContent(
- $this->lang, $lang . '_AUTHOR_EMAIL_LABEL', "Author Email"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_AUTHOR_EMAIL_LABEL', "Author Email"
);
- $this->setLangContent(
- $this->lang, $lang . '_AUTHOR_EMAIL_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_AUTHOR_EMAIL_DESC',
"The email address of the author of this component."
);
// set if contributors were added
@@ -24946,103 +24743,103 @@ class Interpretation extends Fields
$contributor['website'], ENT_XML1, 'UTF-8'
); // StringHelper::html($contributor['website']);
// load to the $fieldsets
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. ' ';
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="spacer"';
- $this->configFieldSets[] = $this->_t(3) . 'class="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="spacer"';
+ $this->configFieldSets[] = Indent::_(3) . 'class="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_' . $COUNTER . '"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_TITLE_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_TITLE_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default="' . $cbTitle
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="' . $cbTitle
. '"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_NAME_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_NAME_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default="' . $cbName
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="' . $cbName
. '"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="email"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="email"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_EMAIL_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_EMAIL_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default="' . $cbEmail
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="' . $cbEmail
. '"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="url"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="url"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_LINK_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_LINK_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default="'
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="'
. $cbWebsite . '"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="list"';
- $this->configFieldSets[] = $this->_t(3) . 'default="'
+ $this->configFieldSets[] = Indent::_(3) . 'type="list"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="'
. (int) $contributor['use'] . '"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_USE_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_USE_DESC">';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_USE_NONE ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_USE_EMAIL ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_USE_WWW ';
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . " ";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="list"';
- $this->configFieldSets[] = $this->_t(3) . 'default="'
+ $this->configFieldSets[] = Indent::_(3) . 'type="list"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="'
. (int) $contributor['show'] . '"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_SHOW_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_SHOW_DESC">';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_NONE ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_BACK ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_FRONT ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_ALL ';
- $this->configFieldSets[] = $this->_t(2) . " ";
+ $this->configFieldSets[] = Indent::_(2) . " ";
// add the contributor
- $this->theContributors .= PHP_EOL . $this->_t(1) . "@"
- . strtolower($contributor['title']) . $this->_t(2)
+ $this->theContributors .= PHP_EOL . Indent::_(1) . "@"
+ . strtolower($contributor['title']) . Indent::_(2)
. $contributor['name'] . ' <' . $contributor['website']
. '>';
// setup lang
$Counter = StringHelper::safe($counter, 'Ww');
- $this->setLangContent(
- $this->lang, $langCont . '_' . $COUNTER,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_' . $COUNTER,
"Contributor " . $Counter
);
// load the Global checkin defautls
@@ -25078,92 +24875,92 @@ class Interpretation extends Fields
{
$COUNTER = StringHelper::safe($counter, 'U');
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. ' ';
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="spacer"';
- $this->configFieldSets[] = $this->_t(3) . 'class="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="spacer"';
+ $this->configFieldSets[] = Indent::_(3) . 'class="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_' . $COUNTER . '"';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_TITLE_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_TITLE_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default=""';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default=""';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_NAME_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_NAME_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default=""';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default=""';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="email"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="email"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_EMAIL_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_EMAIL_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default=""';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default=""';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="url"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="url"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_LINK_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_LINK_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default=""';
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default=""';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="list"';
- $this->configFieldSets[] = $this->_t(3) . 'default="0"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="list"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="0"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_USE_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_USE_DESC">';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_USE_NONE ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_USE_EMAIL ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_USE_WWW ';
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . " ";
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="list"';
- $this->configFieldSets[] = $this->_t(3) . 'default="0"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $langCont
+ $this->configFieldSets[] = Indent::_(3) . 'type="list"';
+ $this->configFieldSets[] = Indent::_(3) . 'default="0"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $langCont
. '_SHOW_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $langCont . '_SHOW_DESC">';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_NONE ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_BACK ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_FRONT ';
- $this->configFieldSets[] = $this->_t(3) . ''
+ $this->configFieldSets[] = Indent::_(3) . ' '
. $langCont . '_SHOW_ALL ';
- $this->configFieldSets[] = $this->_t(2) . " ";
+ $this->configFieldSets[] = Indent::_(2) . " ";
// setup lang
$Counter = StringHelper::safe($counter, 'Ww');
- $this->setLangContent(
- $this->lang, $langCont . '_' . $COUNTER,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_' . $COUNTER,
"Contributor " . $Counter
);
}
@@ -25172,68 +24969,68 @@ class Interpretation extends Fields
|| $this->componentData->emptycontributors == 1)
{
// setup lang
- $this->setLangContent(
- $this->lang, $langCont . '_TITLE_LABEL', "Contributor Job Title"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_TITLE_LABEL', "Contributor Job Title"
);
- $this->setLangContent(
- $this->lang, $langCont . '_TITLE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_TITLE_DESC',
"The job title that best describes the contributor's relationship to this component."
);
- $this->setLangContent(
- $this->lang, $langCont . '_NAME_LABEL', "Contributor Name"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_NAME_LABEL', "Contributor Name"
);
- $this->setLangContent(
- $this->lang, $langCont . '_NAME_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_NAME_DESC',
"The name of this contributor."
);
- $this->setLangContent(
- $this->lang, $langCont . '_EMAIL_LABEL', "Contributor Email"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_EMAIL_LABEL', "Contributor Email"
);
- $this->setLangContent(
- $this->lang, $langCont . '_EMAIL_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_EMAIL_DESC',
"The email of this contributor."
);
- $this->setLangContent(
- $this->lang, $langCont . '_LINK_LABEL', "Contributor Website"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_LINK_LABEL', "Contributor Website"
);
- $this->setLangContent(
- $this->lang, $langCont . '_LINK_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_LINK_DESC',
"The link to this contributor's website."
);
- $this->setLangContent($this->lang, $langCont . '_USE_LABEL', "Use");
- $this->setLangContent(
- $this->lang, $langCont . '_USE_DESC',
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langCont . '_USE_LABEL', "Use");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_USE_DESC',
"How should we link to this contributor."
);
- $this->setLangContent($this->lang, $langCont . '_USE_NONE', "None");
- $this->setLangContent(
- $this->lang, $langCont . '_USE_EMAIL', "Email"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $langCont . '_USE_NONE', "None");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_USE_EMAIL', "Email"
);
- $this->setLangContent(
- $this->lang, $langCont . '_USE_WWW', "Website"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_USE_WWW', "Website"
);
- $this->setLangContent(
- $this->lang, $langCont . '_SHOW_LABEL', "Show"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_SHOW_LABEL', "Show"
);
- $this->setLangContent(
- $this->lang, $langCont . '_SHOW_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_SHOW_DESC',
"Select where you want this contributor's details to show in the component."
);
- $this->setLangContent(
- $this->lang, $langCont . '_SHOW_NONE', "Hide"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_SHOW_NONE', "Hide"
);
- $this->setLangContent(
- $this->lang, $langCont . '_SHOW_BACK', "Back-end"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_SHOW_BACK', "Back-end"
);
- $this->setLangContent(
- $this->lang, $langCont . '_SHOW_FRONT', "Front-end"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_SHOW_FRONT', "Front-end"
);
- $this->setLangContent(
- $this->lang, $langCont . '_SHOW_ALL', "Both Front & Back-end"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $langCont . '_SHOW_ALL', "Both Front & Back-end"
);
}
// close that fieldset
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . "";
}
public function setUikitConfigFieldsets($lang)
@@ -25243,41 +25040,41 @@ class Interpretation extends Fields
// main lang prefix
$lang = $lang . '';
// start building field set for uikit functions
- $this->configFieldSets[] = $this->_t(1) . "configFieldSets[] = $this->_t(2) . 'name="uikit_config"';
- $this->configFieldSets[] = $this->_t(2) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(1) . "configFieldSets[] = Indent::_(2) . 'name="uikit_config"';
+ $this->configFieldSets[] = Indent::_(2) . 'label="' . $lang
. '_UIKIT_LABEL"';
- $this->configFieldSets[] = $this->_t(2) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'description="' . $lang
. '_UIKIT_DESC">';
// set tab lang
if (1 == $this->uikit)
{
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_LABEL', "Uikit2 Settings"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_LABEL', "Uikit2 Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here. Uikit is a lightweight and modular front-end framework
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here. Uikit is a lightweight and modular front-end framework
for developing fast and powerful web interfaces. For more info visit https://getuikit.com/v2/ "
);
}
elseif (2 == $this->uikit)
{
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_LABEL',
"Uikit2 and Uikit3 Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here. Uikit is a lightweight and modular front-end framework
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here. Uikit is a lightweight and modular front-end framework
for developing fast and powerful web interfaces. For more info visit version 2 or version 3 "
);
}
elseif (3 == $this->uikit)
{
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_LABEL', "Uikit3 Settings"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_LABEL', "Uikit3 Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here. Uikit is a lightweight and modular front-end framework
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here. Uikit is a lightweight and modular front-end framework
for developing fast and powerful web interfaces. For more info visit https://getuikit.com/ "
);
}
@@ -25286,171 +25083,171 @@ for developing fast and powerful web interfaces. For more info visit uikit)
{
// set field lang
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_VERSION_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_VERSION_LABEL',
"Uikit Versions"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_VERSION_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_VERSION_DESC',
"Select what version you would like to use"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_V2', "Version 2"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_V2', "Version 2"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_V3', "Version 3"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_V3', "Version 3"
);
// set the field
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="radio"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'type="radio"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_UIKIT_VERSION_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $lang . '_UIKIT_VERSION_DESC"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'class="btn-group btn-group-yesno"';
- $this->configFieldSets[] = $this->_t(3) . 'default="2">';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'default="2">';
+ $this->configFieldSets[] = Indent::_(3) . '';
+ $this->configFieldSets[] = Indent::_(3) . ' ';
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_UIKIT_V2 "';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' ';
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_UIKIT_V3 "';
- $this->configFieldSets[] = $this->_t(2) . " ";
+ $this->configFieldSets[] = Indent::_(2) . "";
// set params defaults
$this->extensionsParams[] = '"uikit_version":"2"';
}
// set field lang
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_LOAD_LABEL', "Loading Options"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_LOAD_LABEL', "Loading Options"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_LOAD_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_LOAD_DESC',
"Set the uikit loading option."
);
- $this->setLangContent($this->lang, $lang . '_AUTO_LOAD', "Auto");
- $this->setLangContent($this->lang, $lang . '_FORCE_LOAD', "Force");
- $this->setLangContent($this->lang, $lang . '_DONT_LOAD', "Not");
- $this->setLangContent(
- $this->lang, $lang . '_ONLY_EXTRA', "Only Extra"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_AUTO_LOAD', "Auto");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_FORCE_LOAD', "Force");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_DONT_LOAD', "Not");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ONLY_EXTRA', "Only Extra"
);
// set the field
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="radio"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'type="radio"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_UIKIT_LOAD_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'description="' . $lang
. '_UIKIT_LOAD_DESC"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'class="btn-group btn-group-yesno"';
- $this->configFieldSets[] = $this->_t(3) . 'default="">';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' ';
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_AUTO_LOAD "';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' ';
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_FORCE_LOAD "';
if (2 == $this->uikit || 1 == $this->uikit)
{
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' ';
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_ONLY_EXTRA "';
}
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(3) . ' ';
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_DONT_LOAD "';
- $this->configFieldSets[] = $this->_t(2) . " ";
+ $this->configFieldSets[] = Indent::_(2) . "";
// set params defaults
$this->extensionsParams[] = '"uikit_load":"1"';
// set field lang
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_MIN_LABEL', "Load Minified"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_MIN_LABEL', "Load Minified"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_MIN_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_MIN_DESC',
"Should the minified version of uikit files be loaded?"
);
- $this->setLangContent($this->lang, $lang . '_YES', "Yes");
- $this->setLangContent($this->lang, $lang . '_NO', "No");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_YES', "Yes");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_NO', "No");
// set the field
- $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="radio"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'configFieldSets[] = Indent::_(3) . 'type="radio"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_UIKIT_MIN_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'description="' . $lang
. '_UIKIT_MIN_DESC"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'class="btn-group btn-group-yesno"';
- $this->configFieldSets[] = $this->_t(3) . 'default="">';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang . '_NO "';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang . '_YES "';
- $this->configFieldSets[] = $this->_t(2) . " ";
+ $this->configFieldSets[] = Indent::_(3) . '';
+ $this->configFieldSets[] = Indent::_(4) . $lang . '_NO "';
+ $this->configFieldSets[] = Indent::_(3) . '';
+ $this->configFieldSets[] = Indent::_(4) . $lang . '_YES "';
+ $this->configFieldSets[] = Indent::_(2) . " ";
// set params defaults
$this->extensionsParams[] = '"uikit_min":""';
if (2 == $this->uikit || 1 == $this->uikit)
{
// set field lang
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_STYLE_LABEL', "css Style"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_STYLE_LABEL', "css Style"
);
- $this->setLangContent(
- $this->lang, $lang . '_UIKIT_STYLE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_UIKIT_STYLE_DESC',
"Set the css style that should be used."
);
- $this->setLangContent(
- $this->lang, $lang . '_FLAT_LOAD', "Flat"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_FLAT_LOAD', "Flat"
);
- $this->setLangContent(
- $this->lang, $lang . '_ALMOST_FLAT_LOAD', "Almost Flat"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ALMOST_FLAT_LOAD', "Almost Flat"
);
- $this->setLangContent(
- $this->lang, $lang . '_GRADIANT_LOAD', "Gradient"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_GRADIANT_LOAD', "Gradient"
);
// set the field
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="radio"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'type="radio"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_UIKIT_STYLE_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $lang . '_UIKIT_STYLE_DESC"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'class="btn-group btn-group-yesno"';
if (2 == $this->uikit)
{
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. 'showon="uikit_version:2"';
}
- $this->configFieldSets[] = $this->_t(3) . 'default="">';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(3) . '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'default="">';
+ $this->configFieldSets[] = Indent::_(3) . '';
+ $this->configFieldSets[] = Indent::_(3) . ' ';
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_FLAT_LOAD "';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_ALMOST_FLAT_LOAD "';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. '';
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. '_GRADIANT_LOAD "';
- $this->configFieldSets[] = $this->_t(2) . " ";
+ $this->configFieldSets[] = Indent::_(2) . "";
// set params defaults
$this->extensionsParams[] = '"uikit_style":""';
}
@@ -25466,7 +25263,7 @@ for developing fast and powerful web interfaces. For more info visit configFieldSetsCustomField['Uikit Settings']);
}
// close that fieldset
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . " ";
}
}
@@ -25478,15 +25275,15 @@ for developing fast and powerful web interfaces. For more info visit setLangContent(
- $this->lang, $lang . '_MAIL_CONFIGURATION', "Mail Configuration"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAIL_CONFIGURATION', "Mail Configuration"
);
- $this->setLangContent($this->lang, $lang . '_DKIM', "DKIM");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_DKIM', "DKIM");
// start building field set for email helper functions
- $this->configFieldSets[] = PHP_EOL . $this->_t(1) . " configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = PHP_EOL . Indent::_(1) . "configFieldSets[] = Indent::_(2)
. "name=\"mail_configuration_custom_config\"";
- $this->configFieldSets[] = $this->_t(2) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "label=\"" . $lang
. "_MAIL_CONFIGURATION\">";
// add custom Mail Configurations
if (isset($this->configFieldSetsCustomField['Mail Configuration'])
@@ -25502,459 +25299,459 @@ for developing fast and powerful web interfaces. For more info visit setLangContent(
- $this->lang, $lang . '_MAILONLINE_LABEL', "Mailer Status"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAILONLINE_LABEL', "Mailer Status"
);
- $this->setLangContent(
- $this->lang, $lang . '_MAILONLINE_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAILONLINE_DESCRIPTION',
"Warning this will stop all emails from going out."
);
- $this->setLangContent($this->lang, $lang . '_ON', "On");
- $this->setLangContent($this->lang, $lang . '_OFF', "Off");
- $this->setLangContent(
- $this->lang, $lang . '_MAILER_LABEL', "Mailer"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_ON', "On");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_OFF', "Off");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAILER_LABEL', "Mailer"
);
- $this->setLangContent(
- $this->lang, $lang . '_MAILER_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAILER_DESCRIPTION',
"Select what mailer you would like to use to send emails."
);
- $this->setLangContent($this->lang, $lang . '_GLOBAL', "Global");
- $this->setLangContent(
- $this->lang, $lang . '_PHP_MAIL', "PHP Mail"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_GLOBAL', "Global");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_PHP_MAIL', "PHP Mail"
);
- $this->setLangContent(
- $this->lang, $lang . '_SENDMAIL', "Sendmail"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SENDMAIL', "Sendmail"
);
- $this->setLangContent($this->lang, $lang . '_SMTP', "SMTP");
- $this->setLangContent(
- $this->lang, $lang . '_EMAILFROM_LABEL', " From Email"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_SMTP', "SMTP");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_EMAILFROM_LABEL', " From Email"
);
- $this->setLangContent(
- $this->lang, $lang . '_EMAILFROM_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_EMAILFROM_DESCRIPTION',
"The global email address that will be used to send system email."
);
- $this->setLangContent(
- $this->lang, $lang . '_EMAILFROM_HINT', "Email Address Here"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_EMAILFROM_HINT', "Email Address Here"
);
- $this->setLangContent(
- $this->lang, $lang . '_FROMNAME_LABEL', "From Name"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_FROMNAME_LABEL', "From Name"
);
- $this->setLangContent(
- $this->lang, $lang . '_FROMNAME_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_FROMNAME_DESCRIPTION',
"Text displayed in the header "From:" field when sending a site email. Usually the site name."
);
- $this->setLangContent(
- $this->lang, $lang . '_FROMNAME_HINT', "From Name Here"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_FROMNAME_HINT', "From Name Here"
);
- $this->setLangContent(
- $this->lang, $lang . '_EMAILREPLY_LABEL', " Reply to Email"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_EMAILREPLY_LABEL', " Reply to Email"
);
- $this->setLangContent(
- $this->lang, $lang . '_EMAILREPLY_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_EMAILREPLY_DESCRIPTION',
"The global email address that will be used to set as the reply email. (leave blank for none)"
);
- $this->setLangContent(
- $this->lang, $lang . '_EMAILREPLY_HINT',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_EMAILREPLY_HINT',
"Email Address Here"
);
- $this->setLangContent(
- $this->lang, $lang . '_REPLYNAME_LABEL', "Reply to Name"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_REPLYNAME_LABEL', "Reply to Name"
);
- $this->setLangContent(
- $this->lang, $lang . '_REPLYNAME_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_REPLYNAME_DESCRIPTION',
"Text displayed in the header "Reply To:" field when replying to the site email. Usually the the person that receives the response. (leave blank for none)"
);
- $this->setLangContent(
- $this->lang, $lang . '_REPLYNAME_HINT', "Reply Name Here"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_REPLYNAME_HINT', "Reply Name Here"
);
- $this->setLangContent(
- $this->lang, $lang . '_SENDMAIL_LABEL', "Sendmail Path"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SENDMAIL_LABEL', "Sendmail Path"
);
- $this->setLangContent(
- $this->lang, $lang . '_SENDMAIL_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SENDMAIL_DESCRIPTION',
"Enter the path to the sendmail program directory on your host server."
);
- $this->setLangContent(
- $this->lang, $lang . '_SENDMAIL_HINT', "/usr/sbin/sendmail"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SENDMAIL_HINT', "/usr/sbin/sendmail"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPAUTH_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPAUTH_LABEL',
"SMTP Authentication"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPAUTH_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPAUTH_DESCRIPTION',
"Select yes if your SMTP host requires SMTP Authentication."
);
- $this->setLangContent($this->lang, $lang . '_YES', "Yes");
- $this->setLangContent($this->lang, $lang . '_NO', "No");
- $this->setLangContent(
- $this->lang, $lang . '_SMTPSECURE_LABEL', "SMTP Security"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_YES', "Yes");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_NO', "No");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPSECURE_LABEL', "SMTP Security"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPSECURE_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPSECURE_DESCRIPTION',
"Select the security model that your SMTP server uses."
);
- $this->setLangContent($this->lang, $lang . '_NONE', "None");
- $this->setLangContent($this->lang, $lang . '_SSL', "SSL");
- $this->setLangContent($this->lang, $lang . '_TLS', "TLS");
- $this->setLangContent(
- $this->lang, $lang . '_SMTPPORT_LABEL', "SMTP Port"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_NONE', "None");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_SSL', "SSL");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_TLS', "TLS");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPPORT_LABEL', "SMTP Port"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPPORT_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPPORT_DESCRIPTION',
"Enter the port number of your SMTP server. Use 25 for most unsecured servers and 465 for most secure servers."
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPPORT_HINT', "25"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPPORT_HINT', "25"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPUSER_LABEL', "SMTP Username"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPUSER_LABEL', "SMTP Username"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPUSER_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPUSER_DESCRIPTION',
"Enter the username for access to the SMTP host."
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPUSER_HINT', "email@demo.com"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPUSER_HINT', "email@demo.com"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPPASS_LABEL', "SMTP Password"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPPASS_LABEL', "SMTP Password"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPPASS_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPPASS_DESCRIPTION',
"Enter the password for access to the SMTP host."
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPHOST_LABEL', "SMTP Host"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPHOST_LABEL', "SMTP Host"
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPHOST_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPHOST_DESCRIPTION',
"Enter the name of the SMTP host."
);
- $this->setLangContent(
- $this->lang, $lang . '_SMTPHOST_HINT', "localhost"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SMTPHOST_HINT', "localhost"
);
// set the mailer fields
- $this->configFieldSets[] = PHP_EOL . $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"radio\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"mailonline\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"radio\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"mailonline\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_MAILONLINE_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_MAILONLINE_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "class=\"btn-group btn-group-yesno\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"1\">";
- $this->configFieldSets[] = $this->_t(3) . "";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "default=\"1\">";
+ $this->configFieldSets[] = Indent::_(3) . "";
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_ON ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_OFF ";
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"list\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"mailer\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"list\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"mailer\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_MAILER_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_MAILER_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "class=\"list_class\"";
- $this->configFieldSets[] = $this->_t(3) . "multiple=\"false\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"WORD\"";
- $this->configFieldSets[] = $this->_t(3) . "required=\"true\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"global\">";
- $this->configFieldSets[] = $this->_t(3) . "";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "multiple=\"false\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"WORD\"";
+ $this->configFieldSets[] = Indent::_(3) . "required=\"true\"";
+ $this->configFieldSets[] = Indent::_(3) . "default=\"global\">";
+ $this->configFieldSets[] = Indent::_(3) . "";
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_GLOBAL ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_PHP_MAIL ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_SENDMAIL ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_SMTP ";
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"emailfrom\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"emailfrom\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_EMAILFROM_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_EMAILFROM_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3) . "validate=\"email\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3) . "validate=\"email\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add email address here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_EMAILFROM_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp,sendmail,default\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"fromname\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"fromname\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_FROMNAME_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_FROMNAME_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add some name here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_FROMNAME_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp,sendmail,default\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"replyto\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"replyto\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_EMAILREPLY_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_EMAILREPLY_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3) . "validate=\"email\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3) . "validate=\"email\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add email address here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_EMAILREPLY_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp,sendmail,default\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"replytoname\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_REPLYNAME_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_REPLYNAME_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add some name here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_REPLYNAME_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp,sendmail,default\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"sendmail\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"sendmail\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_SENDMAIL_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_SENDMAIL_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "required=\"false\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"PATH\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "required=\"false\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"PATH\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add path to you local sendmail here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_SENDMAIL_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:sendmail\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"radio\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"smtpauth\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"radio\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"smtpauth\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_SMTPAUTH_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_SMTPAUTH_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "class=\"btn-group btn-group-yesno\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"0\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "default=\"0\"";
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp\">";
- $this->configFieldSets[] = $this->_t(3) . "";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "";
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_YES ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_NO ";
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"list\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"smtpsecure\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"list\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"smtpsecure\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_SMTPSECURE_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_SMTPSECURE_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "class=\"list_class\"";
- $this->configFieldSets[] = $this->_t(3) . "multiple=\"false\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"WORD\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"none\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "multiple=\"false\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"WORD\"";
+ $this->configFieldSets[] = Indent::_(3) . "default=\"none\"";
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp\">";
- $this->configFieldSets[] = $this->_t(3) . "";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "";
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_NONE ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_SSL ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_TLS ";
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"smtpport\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"smtpport\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_SMTPPORT_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"25\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "default=\"25\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_SMTPPORT_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add the port number of your SMTP server here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_SMTPPORT_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"smtpuser\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"smtpuser\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_SMTPUSER_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_SMTPUSER_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add the username for SMTP server here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_SMTPUSER_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"password\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"smtppass\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"password\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"smtppass\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_SMTPPASS_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_SMTPPASS_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"raw\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"raw\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add the password for SMTP server here.\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"smtphost\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"smtphost\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_SMTPHOST_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3)
. "default=\"localhost\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_SMTPHOST_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add the name of the SMTP host here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_SMTPHOST_HINT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "showon=\"mailer:smtp\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2) . "/>";
}
// close that fieldset
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . " ";
// start dkim field set
- $this->configFieldSets[] = $this->_t(1) . "configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(1) . "configFieldSets[] = Indent::_(2)
. "name=\"dkim_custom_config\"";
- $this->configFieldSets[] = $this->_t(2) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "label=\"" . $lang
. "_DKIM\">";
// add custom DKIM fields
if (isset($this->configFieldSetsCustomField['DKIM'])
@@ -25969,74 +25766,74 @@ for developing fast and powerful web interfaces. For more info visit setLangContent(
- $this->lang, $lang . '_DKIM_LABEL', "Enable DKIM"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_LABEL', "Enable DKIM"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_DESCRIPTION',
"Set this option to Yes if you want to sign your emails using DKIM."
);
- $this->setLangContent($this->lang, $lang . '_YES', "Yes");
- $this->setLangContent($this->lang, $lang . '_NO', "No");
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_DOMAIN_LABEL', "Domain"
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_YES', "Yes");
+ CFactory::_('Language')->set(CFactory::_('Config')->lang_target, $lang . '_NO', "No");
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_DOMAIN_LABEL', "Domain"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_DOMAIN_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_DOMAIN_DESCRIPTION',
"Set the domain. Eg. domain.com"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_DOMAIN_HINT', "domain.com"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_DOMAIN_HINT', "domain.com"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_SELECTOR_LABEL', "Selector"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_SELECTOR_LABEL', "Selector"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_SELECTOR_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_SELECTOR_DESCRIPTION',
"Set your DKIM/DNS selector."
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_SELECTOR_HINT', "vdm"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_SELECTOR_HINT', "vdm"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_PASSPHRASE_LABEL', "Passphrase"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_PASSPHRASE_LABEL', "Passphrase"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_PASSPHRASE_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_PASSPHRASE_DESCRIPTION',
"Enter your passphrase here."
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_IDENTITY_LABEL', "Identity"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_IDENTITY_LABEL', "Identity"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_IDENTITY_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_IDENTITY_DESCRIPTION',
"Set DKIM identity. This can be in the format of an email address 'you@yourdomain.com' typically used as the source of the email."
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_IDENTITY_HINT',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_IDENTITY_HINT',
"you@yourdomain.com"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_PRIVATE_KEY_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_PRIVATE_KEY_LABEL',
"Private key"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_PRIVATE_KEY_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_PRIVATE_KEY_DESCRIPTION',
"set private key"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_PUBLIC_KEY_LABEL', "Public key"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_PUBLIC_KEY_LABEL', "Public key"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_PUBLIC_KEY_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_PUBLIC_KEY_DESCRIPTION',
"set public key"
);
- $this->setLangContent(
- $this->lang, $lang . '_NOTE_DKIM_USE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_NOTE_DKIM_USE_LABEL',
"Server Configuration"
);
- $this->setLangContent(
- $this->lang, $lang . '_NOTE_DKIM_USE_DESCRIPTION', "Using the below details, you need to configure your DNS by adding a TXT record on your domain:
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_NOTE_DKIM_USE_DESCRIPTION', "Using the below details, you need to configure your DNS by adding a TXT record on your domain:
"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_KEY_LABEL', "Key"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_KEY_LABEL', "Key"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_KEY_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_KEY_DESCRIPTION',
"This is the KEY to use in the DNS record."
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_KEY_HINT', "vdm._domainkey"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_KEY_HINT', "vdm._domainkey"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_VALUE_LABEL', "Value"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_VALUE_LABEL', "Value"
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_VALUE_DESCRIPTION',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_VALUE_DESCRIPTION',
"This is the TXT value to use in the DNS. Replace the PUBLICKEY with your public key."
);
- $this->setLangContent(
- $this->lang, $lang . '_DKIM_VALUE_HINT',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_DKIM_VALUE_HINT',
"v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY"
);
- $this->configFieldSets[] = PHP_EOL . $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"radio\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"dkim\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"radio\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"dkim\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "class=\"btn-group btn-group-yesno\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"0\"";
- $this->configFieldSets[] = $this->_t(3) . "required=\"true\">";
- $this->configFieldSets[] = $this->_t(3) . "";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "default=\"0\"";
+ $this->configFieldSets[] = Indent::_(3) . "required=\"true\">";
+ $this->configFieldSets[] = Indent::_(3) . "";
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_YES ";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "";
- $this->configFieldSets[] = $this->_t(4) . $lang
+ $this->configFieldSets[] = Indent::_(4) . $lang
. "_NO ";
- $this->configFieldSets[] = $this->_t(2) . " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"dkim_domain\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_DOMAIN_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_DOMAIN_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add DKIM Domain here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_DKIM_DOMAIN_HINT\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "showon=\"dkim:1\"";
+ $this->configFieldSets[] = Indent::_(3)
. "onchange=\"vdm_dkim();\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"dkim_selector\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_SELECTOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"vdm\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "default=\"vdm\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_SELECTOR_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add DKIM/DNS selector here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_DKIM_SELECTOR_HINT\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "showon=\"dkim:1\"";
+ $this->configFieldSets[] = Indent::_(3)
. "onchange=\"vdm_dkim();\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"password\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"password\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"dkim_passphrase\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_PASSPHRASE_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_PASSPHRASE_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"raw\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"raw\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add passphrase here.\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"dkim_identity\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_IDENTITY_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"60\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"60\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_IDENTITY_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"raw\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"raw\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add DKIM Identity here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_DKIM_IDENTITY_HINT\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"textarea\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"textarea\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"dkim_private_key\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_PRIVATE_KEY_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "rows=\"15\"";
- $this->configFieldSets[] = $this->_t(3) . "cols=\"5\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "rows=\"15\"";
+ $this->configFieldSets[] = Indent::_(3) . "cols=\"5\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_PRIVATE_KEY_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "class=\"input-xxlarge span12\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"textarea\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"textarea\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"dkim_public_key\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_PUBLIC_KEY_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "rows=\"5\"";
- $this->configFieldSets[] = $this->_t(3) . "cols=\"5\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "rows=\"5\"";
+ $this->configFieldSets[] = Indent::_(3) . "cols=\"5\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_PUBLIC_KEY_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3)
. "class=\"input-xxlarge span12\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "showon=\"dkim:1\"";
+ $this->configFieldSets[] = Indent::_(3)
. "onchange=\"vdm_dkim();\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"dkim_key\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"dkim_key\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_KEY_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"40\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"150\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"40\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"150\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_KEY_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add KEY here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_DKIM_KEY_HINT\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"dkim_value\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"dkim_value\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_DKIM_VALUE_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"80\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"350\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\""
+ $this->configFieldSets[] = Indent::_(3) . "size=\"80\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"350\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\""
. $lang . "_DKIM_VALUE_DESCRIPTION\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"STRING\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"STRING\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add TXT record here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_DKIM_VALUE_HINT\"";
- $this->configFieldSets[] = $this->_t(3) . "showon=\"dkim:1\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(3) . "showon=\"dkim:1\"";
+ $this->configFieldSets[] = Indent::_(2) . "/>";
}
// close that fieldset
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . " ";
}
}
@@ -26291,403 +26088,403 @@ function vdm_dkim() {
{
if ($this->googlechart)
{
- $this->configFieldSets[] = PHP_EOL . $this->_t(1) . "configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = PHP_EOL . Indent::_(1) . "configFieldSets[] = Indent::_(2)
. "name=\"googlechart_config\"";
- $this->configFieldSets[] = $this->_t(2) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "label=\"" . $lang
. "_CHART_SETTINGS_LABEL\"";
- $this->configFieldSets[] = $this->_t(2) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "description=\"" . $lang
. "_CHART_SETTINGS_DESC\">";
- $this->configFieldSets[] = $this->_t(2);
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2);
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_chartbackground\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#F7F7FA\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#F7F7FA\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTBACKGROUND_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTBACKGROUND_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_mainwidth\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_MAINWIDTH_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_MAINWIDTH_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add area width here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_MAINWIDTH_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_chartareatop\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTAREATOP_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTAREATOP_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add top spacing here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_CHARTAREATOP_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_chartarealeft\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTAREALEFT_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTAREALEFT_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add left spacing here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_CHARTAREALEFT_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_chartareawidth\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTAREAWIDTH_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTAREAWIDTH_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add chart width here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_CHARTAREAWIDTH_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_legendtextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_LEGENDTEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_LEGENDTEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_legendtextstylefontsize\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_LEGENDTEXTSTYLEFONTSIZE_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_LEGENDTEXTSTYLEFONTSIZE_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add size of the legend here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_LEGENDTEXTSTYLEFONTSIZE_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_vaxistextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_VAXISTEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_VAXISTEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_haxistextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_HAXISTEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_HAXISTEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"admin_haxistitletextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_HAXISTITLETEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2);
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2);
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2);
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_chartbackground\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#F7F7FA\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#F7F7FA\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTBACKGROUND_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTBACKGROUND_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3) . "name=\"site_mainwidth\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3) . "name=\"site_mainwidth\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_MAINWIDTH_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_MAINWIDTH_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add area width here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_MAINWIDTH_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_chartareatop\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTAREATOP_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTAREATOP_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add top spacing here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_CHARTAREATOP_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_chartarealeft\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTAREALEFT_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTAREALEFT_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add left spacing here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_CHARTAREALEFT_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_chartareawidth\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_CHARTAREAWIDTH_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_CHARTAREAWIDTH_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add chart width here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_CHARTAREAWIDTH_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_legendtextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_LEGENDTEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_LEGENDTEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"text\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"text\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_legendtextstylefontsize\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_LEGENDTEXTSTYLEFONTSIZE_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "size=\"20\"";
- $this->configFieldSets[] = $this->_t(3) . "maxlength=\"50\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "size=\"20\"";
+ $this->configFieldSets[] = Indent::_(3) . "maxlength=\"50\"";
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_LEGENDTEXTSTYLEFONTSIZE_DESC\"";
- $this->configFieldSets[] = $this->_t(3) . "class=\"text_area\"";
- $this->configFieldSets[] = $this->_t(3) . "filter=\"INT\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . "class=\"text_area\"";
+ $this->configFieldSets[] = Indent::_(3) . "filter=\"INT\"";
+ $this->configFieldSets[] = Indent::_(3)
. "message=\"Error! Please add size of the legend here.\"";
- $this->configFieldSets[] = $this->_t(3) . "hint=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "hint=\"" . $lang
. "_LEGENDTEXTSTYLEFONTSIZE_HINT\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_vaxistextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_VAXISTEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_VAXISTEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. " ";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_haxistextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_HAXISTEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_HAXISTEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
- $this->configFieldSets[] = $this->_t(2) . "";
- $this->configFieldSets[] = $this->_t(2) . "configFieldSets[] = $this->_t(3) . "type=\"color\"";
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(2) . "configFieldSets[] = Indent::_(3) . "type=\"color\"";
+ $this->configFieldSets[] = Indent::_(3)
. "name=\"site_haxistitletextstylefontcolor\"";
- $this->configFieldSets[] = $this->_t(3) . "default=\"#63B1F2\"";
- $this->configFieldSets[] = $this->_t(3) . "label=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "default=\"#63B1F2\"";
+ $this->configFieldSets[] = Indent::_(3) . "label=\"" . $lang
. "_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL\"";
- $this->configFieldSets[] = $this->_t(3) . "description=\"" . $lang
+ $this->configFieldSets[] = Indent::_(3) . "description=\"" . $lang
. "_HAXISTITLETEXTSTYLEFONTCOLOR_DESC\"";
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(2) . "/>";
// add custom Encryption Settings fields
if (isset($this->configFieldSetsCustomField['Chart Settings'])
@@ -26701,124 +26498,124 @@ function vdm_dkim() {
unset($this->configFieldSetsCustomField['Chart Settings']);
}
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . " ";
// set params defaults
$this->extensionsParams[]
= '"admin_chartbackground":"#F7F7FA","admin_mainwidth":"1000","admin_chartareatop":"20","admin_chartarealeft":"20","admin_chartareawidth":"170","admin_legendtextstylefontcolor":"10","admin_legendtextstylefontsize":"20","admin_vaxistextstylefontcolor":"#63B1F2","admin_haxistextstylefontcolor":"#63B1F2","admin_haxistitletextstylefontcolor":"#63B1F2","site_chartbackground":"#F7F7FA","site_mainwidth":"1000","site_chartareatop":"20","site_chartarealeft":"20","site_chartareawidth":"170","site_legendtextstylefontcolor":"10","site_legendtextstylefontsize":"20","site_vaxistextstylefontcolor":"#63B1F2","site_haxistextstylefontcolor":"#63B1F2","site_haxistitletextstylefontcolor":"#63B1F2"';
// set field lang
- $this->setLangContent(
- $this->lang, $lang . '_CHART_SETTINGS_LABEL', "Chart Settings"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHART_SETTINGS_LABEL', "Chart Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHART_SETTINGS_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHART_SETTINGS_DESC',
"The Google Chart Display Settings Are Made Here."
);
- $this->setLangContent(
- $this->lang, $lang . '_ADMIN_CHART_NOTE_LABEL', "Admin Settings"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ADMIN_CHART_NOTE_LABEL', "Admin Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_ADMIN_CHART_NOTE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ADMIN_CHART_NOTE_DESC',
"The following settings are used on the back-end of the site called (admin)."
);
- $this->setLangContent(
- $this->lang, $lang . '_SITE_CHART_NOTE_LABEL', "Site Settings"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SITE_CHART_NOTE_LABEL', "Site Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_SITE_CHART_NOTE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_SITE_CHART_NOTE_DESC',
"The following settings are used on the front-end of the site called (site)."
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREALEFT_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREALEFT_DESC',
"Set in pixels the spacing from the left of the chart area to the beginning of the chart it self. Please don't add the px sign"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREALEFT_HINT', "170"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREALEFT_HINT', "170"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREALEFT_LABEL', "Left Spacing"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREALEFT_LABEL', "Left Spacing"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREATOP_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREATOP_DESC',
"Set in pixels the spacing from the top of the chart area to the beginning of the chart it self. Please don't add the px sign"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREATOP_HINT', "20"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREATOP_HINT', "20"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREATOP_LABEL', "Top Spacing"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREATOP_LABEL', "Top Spacing"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREAWIDTH_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREAWIDTH_DESC',
"Set in % the width of the chart it self inside the chart area. Please don't add the % sign"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREAWIDTH_HINT', "60"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREAWIDTH_HINT', "60"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTAREAWIDTH_LABEL', "Chart Width"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTAREAWIDTH_LABEL', "Chart Width"
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTBACKGROUND_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTBACKGROUND_DESC',
"Select the chart background color here."
);
- $this->setLangContent(
- $this->lang, $lang . '_CHARTBACKGROUND_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_CHARTBACKGROUND_LABEL',
"Chart Background"
);
- $this->setLangContent(
- $this->lang, $lang . '_HAXISTEXTSTYLEFONTCOLOR_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_HAXISTEXTSTYLEFONTCOLOR_DESC',
"Select the horizontal axis font color."
);
- $this->setLangContent(
- $this->lang, $lang . '_HAXISTEXTSTYLEFONTCOLOR_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_HAXISTEXTSTYLEFONTCOLOR_LABEL',
"hAxis Font Color"
);
- $this->setLangContent(
- $this->lang, $lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_DESC',
"Select the horizontal axis title's font color."
);
- $this->setLangContent(
- $this->lang, $lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL',
"hAxis Title Font Color"
);
- $this->setLangContent(
- $this->lang, $lang . '_LEGENDTEXTSTYLEFONTCOLOR_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_LEGENDTEXTSTYLEFONTCOLOR_DESC',
"Select the legend font color."
);
- $this->setLangContent(
- $this->lang, $lang . '_LEGENDTEXTSTYLEFONTCOLOR_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_LEGENDTEXTSTYLEFONTCOLOR_LABEL',
"Legend Font Color"
);
- $this->setLangContent(
- $this->lang, $lang . '_LEGENDTEXTSTYLEFONTSIZE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_LEGENDTEXTSTYLEFONTSIZE_DESC',
"Set in pixels the font size of the legend"
);
- $this->setLangContent(
- $this->lang, $lang . '_LEGENDTEXTSTYLEFONTSIZE_HINT', "10"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_LEGENDTEXTSTYLEFONTSIZE_HINT', "10"
);
- $this->setLangContent(
- $this->lang, $lang . '_LEGENDTEXTSTYLEFONTSIZE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_LEGENDTEXTSTYLEFONTSIZE_LABEL',
"Legend Font Size"
);
- $this->setLangContent(
- $this->lang, $lang . '_MAINWIDTH_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAINWIDTH_DESC',
"Set the width of the entire chart area"
);
- $this->setLangContent(
- $this->lang, $lang . '_MAINWIDTH_HINT', "1000"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAINWIDTH_HINT', "1000"
);
- $this->setLangContent(
- $this->lang, $lang . '_MAINWIDTH_LABEL', "Chart Area Width"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MAINWIDTH_LABEL', "Chart Area Width"
);
- $this->setLangContent(
- $this->lang, $lang . '_VAXISTEXTSTYLEFONTCOLOR_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_VAXISTEXTSTYLEFONTCOLOR_DESC',
"Select the vertical axis font color."
);
- $this->setLangContent(
- $this->lang, $lang . '_VAXISTEXTSTYLEFONTCOLOR_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_VAXISTEXTSTYLEFONTCOLOR_LABEL',
"vAxis Font Color"
);
}
@@ -26843,12 +26640,12 @@ function vdm_dkim() {
{
$dynamicAddFields[] = "Encryption Settings";
// start building field set for encryption functions
- $this->configFieldSets[] = $this->_t(1) . "configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(1) . "configFieldSets[] = Indent::_(2)
. 'name="encryption_config"';
- $this->configFieldSets[] = $this->_t(2) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'label="' . $lang
. '_ENCRYPTION_LABEL"';
- $this->configFieldSets[] = $this->_t(2) . 'description="' . $lang
+ $this->configFieldSets[] = Indent::_(2) . 'description="' . $lang
. '_ENCRYPTION_DESC">';
// set tab lang
@@ -26860,12 +26657,12 @@ function vdm_dkim() {
&& $this->componentData->add_license
&& $this->componentData->license_type == 3)
{
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_LABEL',
"License & Encryption Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_DESC',
"The license & encryption keys are set here."
);
// add the next dynamic option
@@ -26879,12 +26676,12 @@ function vdm_dkim() {
&& $this->componentData->add_license
&& $this->componentData->license_type == 2)
{
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_LABEL',
"Update & Encryption Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_DESC',
"The update & encryption keys are set here."
);
// add the next dynamic option
@@ -26893,11 +26690,11 @@ function vdm_dkim() {
elseif ($this->componentData->add_license
&& $this->componentData->license_type == 3)
{
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_LABEL', "License Settings"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_LABEL', "License Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_DESC',
"The license key is set here."
);
// add the next dynamic option
@@ -26906,11 +26703,11 @@ function vdm_dkim() {
elseif ($this->componentData->add_license
&& $this->componentData->license_type == 2)
{
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_LABEL', "Update Settings"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_LABEL', "Update Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_DESC',
"The update key is set here."
);
// add the next dynamic option
@@ -26918,12 +26715,12 @@ function vdm_dkim() {
}
else
{
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_LABEL',
"Encryption Settings"
);
- $this->setLangContent(
- $this->lang, $lang . '_ENCRYPTION_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_ENCRYPTION_DESC',
"The encryption key for the field encryption is set here."
);
}
@@ -26931,77 +26728,77 @@ function vdm_dkim() {
if (isset($this->basicEncryption) && $this->basicEncryption)
{
// set field lang
- $this->setLangContent(
- $this->lang, $lang . '_BASIC_KEY_LABEL', "Basic Key"
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_BASIC_KEY_LABEL', "Basic Key"
);
- $this->setLangContent(
- $this->lang, $lang . '_BASIC_KEY_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_BASIC_KEY_DESC',
"Set the basic local key here."
);
- $this->setLangContent(
- $this->lang, $lang . '_BASIC_KEY_NOTE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_BASIC_KEY_NOTE_LABEL',
"Basic Encryption"
);
- $this->setLangContent(
- $this->lang, $lang . '_BASIC_KEY_NOTE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_BASIC_KEY_NOTE_DESC',
"When using the basic encryption please use set a 32 character passphrase. Never change this passphrase once it is set! DATA WILL GET CORRUPTED IF YOU DO! "
);
// set the field
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. ' ';
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_BASIC_KEY_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $lang . '_BASIC_KEY_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default=""';
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default=""';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
}
if (isset($this->mediumEncryption) && $this->mediumEncryption)
{
// set field lang
- $this->setLangContent(
- $this->lang, $lang . '_MEDIUM_KEY_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MEDIUM_KEY_LABEL',
"Medium Key (Path)"
);
- $this->setLangContent(
- $this->lang, $lang . '_MEDIUM_KEY_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_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."
);
- $this->setLangContent(
- $this->lang, $lang . '_MEDIUM_KEY_NOTE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_MEDIUM_KEY_NOTE_LABEL',
"Medium Encryption"
);
- $this->setLangContent(
- $this->lang, $lang . '_MEDIUM_KEY_NOTE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_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. Never change this key once it is set, or remove the key file! DATA WILL GET CORRUPTED IF YOU DO! 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 secure connection is recommended!"
);
// set the field
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. ' ';
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_MEDIUM_KEY_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $lang . '_MEDIUM_KEY_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="160"';
- $this->configFieldSets[] = $this->_t(3) . 'filter="PATH"';
- $this->configFieldSets[] = $this->_t(3)
+ $this->configFieldSets[] = Indent::_(3) . 'size="160"';
+ $this->configFieldSets[] = Indent::_(3) . 'filter="PATH"';
+ $this->configFieldSets[] = Indent::_(3)
. 'hint="/home/user/hiddenfolder123/"';
- $this->configFieldSets[] = $this->_t(3) . 'default=""';
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(3) . 'default=""';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
// set some error message if the path does not exist
- $this->setLangContent(
- $this->lang, $lang . '_MEDIUM_KEY_PATH_ERROR',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_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."
);
}
@@ -27012,12 +26809,12 @@ function vdm_dkim() {
if ($this->componentData->add_license
&& $this->componentData->license_type == 3)
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_LABEL',
$this->componentData->companyname . " License Key"
);
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_DESC',
"Add the license key you recieved from "
. $this->componentData->companyname . " here."
);
@@ -27025,24 +26822,24 @@ function vdm_dkim() {
elseif ($this->componentData->add_license
&& $this->componentData->license_type == 2)
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_LABEL',
$this->componentData->companyname . " Update Key"
);
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_DESC',
"Add the update key you recieved from "
. $this->componentData->companyname . " here."
);
}
else
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_LABEL',
$this->componentData->companyname . " Key"
);
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_DESC',
"Add the key you recieved from "
. $this->componentData->companyname . " here."
);
@@ -27050,16 +26847,16 @@ function vdm_dkim() {
// ajust the notice based on license
if ($this->componentData->license_type == 3)
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_LABEL',
"Your " . $this->componentData->companyname
. " License Key"
);
}
elseif ($this->componentData->license_type == 2)
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_LABEL',
"Your " . $this->componentData->companyname
. " Update Key"
);
@@ -27068,16 +26865,16 @@ function vdm_dkim() {
{
if (isset($this->whmcsEncryption) && $this->whmcsEncryption)
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_LABEL',
"Your " . $this->componentData->companyname
. " Field Encryption Key"
);
}
else
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_LABEL',
"Your " . $this->componentData->companyname . " Key"
);
}
@@ -27085,8 +26882,8 @@ function vdm_dkim() {
// add the description based on global settings
if (isset($this->whmcsEncryption) && $this->whmcsEncryption)
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_NOTE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_DESC',
"You need to get this key from "
@@ -27098,8 +26895,8 @@ function vdm_dkim() {
}
else
{
- $this->setLangContent(
- $this->lang, $lang . '_WHMCS_KEY_NOTE_DESC',
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target, $lang . '_WHMCS_KEY_NOTE_DESC',
"You need to get this key from "
@@ -27107,20 +26904,20 @@ function vdm_dkim() {
);
}
// set the fields
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. ' ';
- $this->configFieldSets[] = $this->_t(2)
+ $this->configFieldSets[] = Indent::_(2)
. 'configFieldSets[] = $this->_t(3) . 'type="text"';
- $this->configFieldSets[] = $this->_t(3) . 'label="' . $lang
+ $this->configFieldSets[] = Indent::_(3) . 'type="text"';
+ $this->configFieldSets[] = Indent::_(3) . 'label="' . $lang
. '_WHMCS_KEY_LABEL"';
- $this->configFieldSets[] = $this->_t(3) . 'description="'
+ $this->configFieldSets[] = Indent::_(3) . 'description="'
. $lang . '_WHMCS_KEY_DESC"';
- $this->configFieldSets[] = $this->_t(3) . 'size="60"';
- $this->configFieldSets[] = $this->_t(3) . 'default=""';
- $this->configFieldSets[] = $this->_t(2) . "/>";
+ $this->configFieldSets[] = Indent::_(3) . 'size="60"';
+ $this->configFieldSets[] = Indent::_(3) . 'default=""';
+ $this->configFieldSets[] = Indent::_(2) . "/>";
}
// load the dynamic field sets
foreach ($dynamicAddFields as $dynamicAddField)
@@ -27138,7 +26935,7 @@ function vdm_dkim() {
}
}
// close that fieldset
- $this->configFieldSets[] = $this->_t(1) . " ";
+ $this->configFieldSets[] = Indent::_(1) . " ";
}
}
@@ -27152,19 +26949,19 @@ function vdm_dkim() {
$otherViews = $this->catCodeBuilder[$nameSingleCode]['views'];
if ($otherViews == $nameListCode)
{
- $component .= PHP_EOL . $this->_t(1)
+ $component .= PHP_EOL . Indent::_(1)
. '';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(1) . " ";
+ $component .= PHP_EOL . Indent::_(1) . "";
}
}
@@ -27175,30 +26972,30 @@ function vdm_dkim() {
{
$component = '';
// set all the core field permissions
- $component .= PHP_EOL . $this->_t(1) . '';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(1) . '';
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(1) . ' ';
- $component .= PHP_EOL . $this->_t(1) . '';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(1) . ' ';
+ $component .= PHP_EOL . Indent::_(1) . '';
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(2)
+ $component .= PHP_EOL . Indent::_(2)
. ' ';
- $component .= PHP_EOL . $this->_t(1) . ' ';
+ $component .= PHP_EOL . Indent::_(1) . ' ';
return $component;
}
@@ -27213,18 +27010,18 @@ function vdm_dkim() {
$this->permissionViews = array();
// Trigger Event: jcb_ce_onBeforeBuildAccessSections
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildAccessSections',
array(&$this->componentContext, &$this)
);
$this->componentHead[] = '';
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
if ($this->addEximport)
{
@@ -27233,12 +27030,12 @@ function vdm_dkim() {
$exportDesc = $this->langPrefix . '_'
. StringHelper::safe('Export Data', 'U')
. '_DESC';
- $this->setLangContent('bothadmin', $exportTitle, 'Export Data');
- $this->setLangContent(
+ CFactory::_('Language')->set('bothadmin', $exportTitle, 'Export Data');
+ CFactory::_('Language')->set(
'bothadmin', $exportDesc,
' Allows users in this group to export data.'
);
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
// the size needs increase
@@ -27248,12 +27045,12 @@ function vdm_dkim() {
$importDesc = $this->langPrefix . '_'
. StringHelper::safe('Import Data', 'U')
. '_DESC';
- $this->setLangContent('bothadmin', $importTitle, 'Import Data');
- $this->setLangContent(
+ CFactory::_('Language')->set('bothadmin', $importTitle, 'Import Data');
+ CFactory::_('Language')->set(
'bothadmin', $importDesc,
' Allows users in this group to import data.'
);
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
// the size needs increase
@@ -27264,12 +27061,12 @@ function vdm_dkim() {
. StringHelper::safe('Use Batch', 'U');
$batchDesc = $this->langPrefix . '_'
. StringHelper::safe('Use Batch', 'U') . '_DESC';
- $this->setLangContent('bothadmin', $batchTitle, 'Use Batch');
- $this->setLangContent(
+ CFactory::_('Language')->set('bothadmin', $batchTitle, 'Use Batch');
+ CFactory::_('Language')->set(
'bothadmin', $batchDesc,
' Allows users in this group to use batch copy/update method.'
);
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
// version permission
@@ -27278,29 +27075,29 @@ function vdm_dkim() {
$importDesc = $this->langPrefix . '_'
. StringHelper::safe('Edit Versions', 'U')
. '_DESC';
- $this->setLangContent('bothadmin', $importTitle, 'Edit Version');
- $this->setLangContent(
+ CFactory::_('Language')->set('bothadmin', $importTitle, 'Edit Version');
+ CFactory::_('Language')->set(
'bothadmin', $importDesc,
' Allows users in this group to edit versions.'
);
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
// set the defaults
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
// set the Joomla fields
if ($this->setJoomlaFields)
{
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
// the size needs increase
$this->accessSize++;
@@ -27311,12 +27108,12 @@ function vdm_dkim() {
$created_byDesc = $this->langPrefix . '_'
. StringHelper::safe('Edit Created By', 'U')
. '_DESC';
- $this->setLangContent('bothadmin', $created_byTitle, 'Edit Created By');
- $this->setLangContent(
+ CFactory::_('Language')->set('bothadmin', $created_byTitle, 'Edit Created By');
+ CFactory::_('Language')->set(
'bothadmin', $created_byDesc,
' Allows users in this group to edit created by.'
);
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
// new custom created date permissions
@@ -27325,12 +27122,12 @@ function vdm_dkim() {
$createdDesc = $this->langPrefix . '_'
. StringHelper::safe('Edit Created Date', 'U')
. '_DESC';
- $this->setLangContent('bothadmin', $createdTitle, 'Edit Created Date');
- $this->setLangContent(
+ CFactory::_('Language')->set('bothadmin', $createdTitle, 'Edit Created Date');
+ CFactory::_('Language')->set(
'bothadmin', $createdDesc,
' Allows users in this group to edit created date.'
);
- $this->componentHead[] = $this->_t(2)
+ $this->componentHead[] = Indent::_(2)
. ' ';
@@ -27361,16 +27158,16 @@ function vdm_dkim() {
$sortKey = StringHelper::safe(
$customAdminName . ' Access'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $customAdminTitle, $customAdminName . ' Access'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $customAdminDesc,
' Allows the users in this group to access '
. StringHelper::safe($customAdminName, 'w')
. '.'
);
- $this->componentGlobal[$sortKey] = $this->_t(2)
+ $this->componentGlobal[$sortKey] = Indent::_(2)
. ' ';
@@ -27447,16 +27244,16 @@ function vdm_dkim() {
);
if (isset($site_view['access']) && $site_view['access'] == 1)
{
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $siteTitle, $siteName . ' (Site) Access'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $siteDesc,
' Allows the users in this group to access site '
. StringHelper::safe($siteName, 'w')
. '.'
);
- $this->componentGlobal[$sortKey] = $this->_t(2)
+ $this->componentGlobal[$sortKey] = Indent::_(2)
. ' ';
// the size needs increase
@@ -27502,7 +27299,7 @@ function vdm_dkim() {
&& $_customTab['permission'] == 1)
{
$this->componentGlobal[$_customTab['sortKey']]
- = $this->_t(2) . '';
foreach ($actions as $action)
{
- $componentViews[] = $this->_t(2) . $action;
+ $componentViews[] = Indent::_(2) . $action;
}
- $componentViews[] = $this->_t(1) . " ";
+ $componentViews[] = Indent::_(1) . "";
}
}
/// now build the section
@@ -27675,7 +27472,7 @@ function vdm_dkim() {
ksort($this->componentGlobal, SORT_STRING);
// add global to the compnent section
$component .= PHP_EOL . implode(PHP_EOL, $this->componentGlobal)
- . PHP_EOL . $this->_t(1) . "";
+ . PHP_EOL . Indent::_(1) . "";
// add views to the component section
$component .= PHP_EOL . implode(PHP_EOL, $componentViews);
// be sure to reset again. (memory)
@@ -27689,7 +27486,7 @@ function vdm_dkim() {
// since we have less than 30 actions
// we do not need the fix for this component
$this->addAssetsTableFix = 0;
- Config::set('add_assets_table_fix', $this->addAssetsTableFix);
+ CFactory::_('Config')->set('add_assets_table_fix', $this->addAssetsTableFix);
}
else
{
@@ -27735,17 +27532,17 @@ function vdm_dkim() {
$sortButtonKey = StringHelper::safe(
$nameView . ' ' . $customButtonName . ' Button Access'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $customButtonTitle,
$nameView . ' ' . $customButtonName . ' Button Access'
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $customButtonDesc,
' Allows the users in this group to access the '
. StringHelper::safe($customButtonName, 'w')
. ' button.'
);
- $this->componentGlobal[$sortButtonKey] = $this->_t(2)
+ $this->componentGlobal[$sortButtonKey] = Indent::_(2)
. ' ';
@@ -28087,7 +27884,7 @@ function vdm_dkim() {
elseif ($permission['implementation'] == 2)
{
// relation to whole component
- $this->componentGlobal[$sortKey] = $this->_t(2)
+ $this->componentGlobal[$sortKey] = Indent::_(2)
. ' ';
// the size needs increase
@@ -28137,7 +27934,7 @@ function vdm_dkim() {
// load permission to action
$this->permissionBuilder[$action][$nameView] = $nameView;
// relation to whole component
- $this->componentGlobal[$sortKey] = $this->_t(2)
+ $this->componentGlobal[$sortKey] = Indent::_(2)
. ' ';
// the size needs increase
@@ -28179,10 +27976,10 @@ function vdm_dkim() {
}
}
// set to language file
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $title, $permission['title']
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'bothadmin', $title . '_DESC', $permission['description']
);
}
@@ -28203,15 +28000,12 @@ function vdm_dkim() {
public function getModCode(&$module)
{
// get component helper string
- $Helper = $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh] . 'Helper';
- $component = $this->fileContentStatic[$this->hhh . 'component'
- . $this->hhh];
+ $Helper = $this->fileContentStatic[Placefix::_h('Component')] . 'Helper';
+ $component = $this->fileContentStatic[Placefix::_h('component')];
$_helper = '';
// get libraries code
- $libraries = array($this->bbb . 'MOD_LIBRARIES'
- . $this->ddd => $this->getModLibCode($module));
- $code = $this->setPlaceholders($module->mod_code, $libraries);
+ $libraries = array(Placefix::_('MOD_LIBRARIES') => $this->getModLibCode($module));
+ $code = CFactory::_('Placeholder')->update($module->mod_code, $libraries);
// check if component helper class should be added
if (strpos($code, $Helper . '::') !== false
&& strpos(
@@ -28220,14 +28014,14 @@ function vdm_dkim() {
. ".php"
) === false)
{
- $_helper = '//' . $this->setLine(__LINE__)
+ $_helper = '//' . Line::_(__Line__, __Class__)
. ' Include the component helper functions only once';
$_helper .= PHP_EOL . "JLoader::register('" . $Helper
. "', JPATH_ADMINISTRATOR . '/components/com_" . $component
. "/helpers/" . $component . ".php');";
}
- return $this->setPlaceholders($_helper . PHP_EOL . $code . PHP_EOL, $this->fileContentStatic);
+ return CFactory::_('Placeholder')->update($_helper . PHP_EOL . $code . PHP_EOL, $this->fileContentStatic);
}
public function getModDefault(&$module, &$key)
@@ -28249,13 +28043,13 @@ function vdm_dkim() {
);
// return the default content for the model default area
- return $this->setPlaceholders($default, $this->fileContentStatic);
+ return CFactory::_('Placeholder')->update($default, $this->fileContentStatic);
}
public function getModHelperCode(&$module)
{
return
- $this->setPlaceholders($module->class_helper_header . PHP_EOL .
+ CFactory::_('Placeholder')->update($module->class_helper_header . PHP_EOL .
$module->class_helper_type . $module->class_helper_name . PHP_EOL
. '{' . PHP_EOL .
$module->class_helper_code . PHP_EOL .
@@ -28270,7 +28064,7 @@ function vdm_dkim() {
$this->libManager[$module->key][$module->code_name]
))
{
- $setter .= '//' . $this->setLine(__LINE__)
+ $setter .= '//' . Line::_(__Line__, __Class__)
. 'get the document object';
$setter .= PHP_EOL . '$document = JFactory::getDocument();';
foreach (
@@ -28302,7 +28096,7 @@ function vdm_dkim() {
// check if we have string
if (StringHelper::check($setter))
{
- return $this->setPlaceholders( $this->setPlaceholders(
+ return CFactory::_('Placeholder')->update( CFactory::_('Placeholder')->update(
str_replace(
'$this->document->', '$document->',
implode(
@@ -28348,7 +28142,7 @@ function vdm_dkim() {
if ($add_scripts_field && $module->add_scripts_field)
{
// get the custom script field
- $xmlFields .= PHP_EOL . $this->_t(2)
+ $xmlFields .= PHP_EOL . Indent::_(2)
. " ";
// don't add it again
$add_scripts_field = false;
@@ -28376,25 +28170,26 @@ function vdm_dkim() {
// switch to add the language xml
$addLang = array();
// now build the language files
- if (isset($this->langContent[$module->key]))
+ if (CFactory::_('Language')->exist($module->key))
{
+ // for plugin event TODO change event api signatures
+ $langContent = CFactory::_('Language')->getTarget($module->key);
// Trigger Event: jcb_ce_onBeforeBuildModuleLang
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildModuleLang',
array(&$this->componentContext, &$module,
- &$this->langContent[$module->key],
- &$module->lang_prefix, &$module->official_name)
+ &$langContent, &$module->lang_prefix, &$module->official_name)
);
// get other languages
- $values = array_unique($this->langContent[$module->key]);
+ $values = array_unique($langContent);
// get the other lang strings if there is any
$this->multiLangString = $this->getMultiLangStrings($values);
// start the modules language bucket (must rest every time)
$this->languages['modules'] = array();
- $this->languages['modules'][Config::get('lang_tag', 'en-GB')] = array();
- $this->languages['modules'][Config::get('lang_tag', 'en-GB')]['all']
- = $this->langContent[$module->key];
- unset($this->langContent[$module->key]);
+ $this->languages['modules'][CFactory::_('Config')->get('lang_tag', 'en-GB')] = array();
+ $this->languages['modules'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['all']
+ = $langContent;
+ CFactory::_('Language')->setTarget($module->key, null);
// update insert the current lang in to DB
$this->setLangPlaceholders($values, $module->id, 'modules');
// remove old unused language strings
@@ -28402,12 +28197,14 @@ function vdm_dkim() {
$total = count($values);
unset($values);
// Trigger Event: jcb_ce_onBeforeBuildModuleLangFiles
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildModuleLangFiles',
array(&$this->componentContext, &$module,
&$this->languages['modules'],
&$this->langTag)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Config')->lang_tag = $this->langTag;
// now we insert the values into the files
if (ArrayHelper::check($this->languages['modules']))
{
@@ -28473,64 +28270,64 @@ function vdm_dkim() {
// should the scriptfile be added
if ($module->add_install_script)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1)
+ $xml .= PHP_EOL . Indent::_(1)
. 'script.php ';
}
// should the sql install be added
if ($module->add_sql)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . '';
- $xml .= PHP_EOL . $this->_t(3)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2) . '';
+ $xml .= PHP_EOL . Indent::_(3)
. 'sql/mysql/install.sql ';
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(2) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
// should the sql uninstall be added
if ($module->add_sql_uninstall)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . '';
- $xml .= PHP_EOL . $this->_t(3)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2) . '';
+ $xml .= PHP_EOL . Indent::_(3)
. 'sql/mysql/uninstall.sql ';
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(2) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
// should the language xml be added
if (ArrayHelper::check($addLang))
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1)
+ $xml .= PHP_EOL . Indent::_(1)
. '';
// load all the language files to xml
foreach ($addLang as $addTag)
{
- $xml .= PHP_EOL . $this->_t(2) . '' . $addTag . '/' . $addTag . '.'
. $module->file_name . '.ini ';
- $xml .= PHP_EOL . $this->_t(2) . '' . $addTag . '/' . $addTag . '.'
. $module->file_name . '.sys.ini ';
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '';
}
// add the module files
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . 'file_name . '">' . $module->file_name
. '.php ';
// add other files found
@@ -28541,7 +28338,7 @@ function vdm_dkim() {
// only add what is not ignored
if (!in_array($file, $ignore))
{
- $xml .= PHP_EOL . $this->_t(2) . '' . $file
+ $xml .= PHP_EOL . Indent::_(2) . '' . $file
. ' ';
}
}
@@ -28549,12 +28346,12 @@ function vdm_dkim() {
// add language folder
if (ArrayHelper::check($addLang))
{
- $xml .= PHP_EOL . $this->_t(2) . 'language ';
+ $xml .= PHP_EOL . Indent::_(2) . 'language ';
}
// add sql folder
if ($module->add_sql || $module->add_sql_uninstall)
{
- $xml .= PHP_EOL . $this->_t(2) . 'sql ';
+ $xml .= PHP_EOL . Indent::_(2) . 'sql ';
}
// add other files found
if (ArrayHelper::check($folders))
@@ -28564,39 +28361,39 @@ function vdm_dkim() {
// only add what is not ignored
if (!in_array($folder, $ignore))
{
- $xml .= PHP_EOL . $this->_t(2) . '' . $folder
+ $xml .= PHP_EOL . Indent::_(2) . '' . $folder
. ' ';
}
}
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '';
// now add the Config Params if needed
if (ArrayHelper::check($config_fields))
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
// only add if part of the component field types path is required
if ($add_component_path)
{
// add path to module rules and custom fields
- $xml .= PHP_EOL . $this->_t(1) . '_t(2)
+ $xml .= PHP_EOL . Indent::_(1) . 'componentCodeName . '/models/rules"';
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(2)
. 'addfieldpath="/administrator/components/com_'
. $this->componentCodeName . '/models/fields"';
- $xml .= PHP_EOL . $this->_t(1) . '>';
+ $xml .= PHP_EOL . Indent::_(1) . '>';
}
else
{
- $xml .= PHP_EOL . $this->_t(1) . '';
+ $xml .= PHP_EOL . Indent::_(1) . '';
}
// add the fields
foreach ($module->config_fields as $field_name => $fieldsets)
{
- $xml .= PHP_EOL . $this->_t(1) . '';
foreach ($fieldsets as $fieldset => $fields)
{
@@ -28649,30 +28446,30 @@ function vdm_dkim() {
|| isset($module->add_field_path[$field_name . $fieldset]))
{
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . 'add_rule_path[$field_name . $fieldset]))
{
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(2)
. 'addrulepath="' . $module->add_rule_path[$field_name . $fieldset] . '"';
}
if (isset($module->add_field_path[$field_name . $fieldset]))
{
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(2)
. 'addfieldpath="' . $module->add_field_path[$field_name . $fieldset] . '"';
}
- $xml .= PHP_EOL . $this->_t(1) . '>';
+ $xml .= PHP_EOL . Indent::_(1) . '>';
}
else
{
- $xml .= PHP_EOL . $this->_t(1) . '';
}
// load the fields
@@ -28681,24 +28478,24 @@ function vdm_dkim() {
$xml .= $config_fields[$field_name . $fieldset];
unset($config_fields[$field_name . $fieldset]);
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '';
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
// set update server if found
if ($module->add_update_server)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2)
. '' . $module->update_server_url
. ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
return $xml;
@@ -28707,7 +28504,7 @@ function vdm_dkim() {
public function getPluginMainClass(&$plugin)
{
return
- $this->setPlaceholders(PHP_EOL . $plugin->head . PHP_EOL .
+ CFactory::_('Placeholder')->update(PHP_EOL . $plugin->head . PHP_EOL .
$plugin->comment . PHP_EOL . 'class ' .
$plugin->class_name . ' extends ' .
$plugin->extends . PHP_EOL . '{' . PHP_EOL .
@@ -28761,25 +28558,27 @@ function vdm_dkim() {
// switch to add the language xml
$addLang = array();
// now build the language files
- if (isset($this->langContent[$plugin->key]))
+ if (CFactory::_('Language')->exist($plugin->key))
{
+ // for plugin event TODO change event api signatures
+ $langContent = CFactory::_('Language')->getTarget($plugin->key);
// Trigger Event: jcb_ce_onBeforeBuildPluginLang
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildPluginLang',
array(&$this->componentContext, &$plugin,
- &$this->langContent[$plugin->key],
+ &$langContent,
&$plugin->lang_prefix, &$plugin->official_name)
);
// get other languages
- $values = array_unique($this->langContent[$plugin->key]);
+ $values = array_unique($langContent);
// get the other lang strings if there is any
$this->multiLangString = $this->getMultiLangStrings($values);
// start the plugins language bucket (must rest every time)
$this->languages['plugins'] = array();
- $this->languages['plugins'][Config::get('lang_tag', 'en-GB')] = array();
- $this->languages['plugins'][Config::get('lang_tag', 'en-GB')]['all']
- = $this->langContent[$plugin->key];
- unset($this->langContent[$plugin->key]);
+ $this->languages['plugins'][CFactory::_('Config')->get('lang_tag', 'en-GB')] = array();
+ $this->languages['plugins'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['all']
+ = $langContent;
+ CFactory::_('Language')->setTarget($plugin->key, null);
// update insert the current lang in to DB
$this->setLangPlaceholders($values, $plugin->id, 'plugins');
// remove old unused language strings
@@ -28787,12 +28586,14 @@ function vdm_dkim() {
$total = count($values);
unset($values);
// Trigger Event: jcb_ce_onBeforeBuildPluginLangFiles
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildPluginLangFiles',
array(&$this->componentContext, &$plugin,
&$this->languages['plugins'],
&$this->langTag)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Config')->lang_tag = $this->langTag;
// now we insert the values into the files
if (ArrayHelper::check($this->languages['plugins']))
{
@@ -28863,67 +28664,67 @@ function vdm_dkim() {
// should the scriptfile be added
if ($plugin->add_install_script)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1)
+ $xml .= PHP_EOL . Indent::_(1)
. 'script.php ';
}
// should the sql install be added
if ($plugin->add_sql)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . '';
- $xml .= PHP_EOL . $this->_t(3)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2) . '';
+ $xml .= PHP_EOL . Indent::_(3)
. 'sql/mysql/install.sql ';
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(2) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
// should the sql uninstall be added
if ($plugin->add_sql_uninstall)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . '';
- $xml .= PHP_EOL . $this->_t(3)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2) . '';
+ $xml .= PHP_EOL . Indent::_(3)
. 'sql/mysql/uninstall.sql ';
- $xml .= PHP_EOL . $this->_t(2) . ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(2) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
// should the language xml be added
if (ArrayHelper::check($addLang))
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
+ $xml .= PHP_EOL . Indent::_(1) . '';
// load all the language files to xml
foreach ($addLang as $addTag)
{
- $xml .= PHP_EOL . $this->_t(2) . '' . $addTag . '/' . $addTag . '.plg_'
. strtolower($plugin->group) . '_' . strtolower(
$plugin->code_name
) . '.ini ';
- $xml .= PHP_EOL . $this->_t(2) . '' . $addTag . '/' . $addTag . '.plg_'
. strtolower($plugin->group) . '_' . strtolower(
$plugin->code_name
) . '.sys.ini ';
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
// add the plugin files
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2) . 'file_name . '">' . $plugin->file_name
. '.php ';
// add other files found
@@ -28934,7 +28735,7 @@ function vdm_dkim() {
// only add what is not ignored
if (!in_array($file, $ignore))
{
- $xml .= PHP_EOL . $this->_t(2) . '' . $file
+ $xml .= PHP_EOL . Indent::_(2) . '' . $file
. ' ';
}
}
@@ -28942,12 +28743,12 @@ function vdm_dkim() {
// add language folder
if (ArrayHelper::check($addLang))
{
- $xml .= PHP_EOL . $this->_t(2) . 'language ';
+ $xml .= PHP_EOL . Indent::_(2) . 'language ';
}
// add sql folder
if ($plugin->add_sql || $plugin->add_sql_uninstall)
{
- $xml .= PHP_EOL . $this->_t(2) . 'sql ';
+ $xml .= PHP_EOL . Indent::_(2) . 'sql ';
}
// add other files found
if (ArrayHelper::check($folders))
@@ -28957,39 +28758,39 @@ function vdm_dkim() {
// only add what is not ignored
if (!in_array($folder, $ignore))
{
- $xml .= PHP_EOL . $this->_t(2) . '' . $folder
+ $xml .= PHP_EOL . Indent::_(2) . '' . $folder
. ' ';
}
}
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '';
// now add the Config Params if needed
if (ArrayHelper::check($config_fields))
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
// only add if part of the component field types path is required
if ($add_component_path)
{
// add path to plugin rules and custom fields
- $xml .= PHP_EOL . $this->_t(1) . '_t(2)
+ $xml .= PHP_EOL . Indent::_(1) . 'componentCodeName . '/models/rules"';
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(2)
. 'addfieldpath="/administrator/components/com_'
. $this->componentCodeName . '/models/fields"';
- $xml .= PHP_EOL . $this->_t(1) . '>';
+ $xml .= PHP_EOL . Indent::_(1) . '>';
}
else
{
- $xml .= PHP_EOL . $this->_t(1) . '';
+ $xml .= PHP_EOL . Indent::_(1) . '';
}
// add the fields
foreach ($plugin->config_fields as $field_name => $fieldsets)
{
- $xml .= PHP_EOL . $this->_t(1) . '';
foreach ($fieldsets as $fieldset => $fields)
{
@@ -29024,30 +28825,30 @@ function vdm_dkim() {
if (isset($plugin->add_rule_path[$field_name . $fieldset])
|| isset($plugin->add_field_path[$field_name . $fieldset]))
{
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . 'add_rule_path[$field_name . $fieldset]))
{
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(2)
. 'addrulepath="' . $plugin->add_rule_path[$field_name . $fieldset] . '"';
}
if (isset($plugin->add_field_path[$field_name . $fieldset]))
{
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(2)
. 'addfieldpath="' . $plugin->add_field_path[$field_name . $fieldset] . '"';
}
- $xml .= PHP_EOL . $this->_t(1) . '>';
+ $xml .= PHP_EOL . Indent::_(1) . '>';
}
else
{
- $xml .= PHP_EOL . $this->_t(1) . '';
}
// load the fields
@@ -29056,24 +28857,24 @@ function vdm_dkim() {
$xml .= $config_fields[$field_name . $fieldset];
unset($config_fields[$field_name . $fieldset]);
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . '';
}
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
// set update server if found
if ($plugin->add_update_server)
{
- $xml .= PHP_EOL . PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(1) . '';
- $xml .= PHP_EOL . $this->_t(2)
+ $xml .= PHP_EOL . Indent::_(1) . '';
+ $xml .= PHP_EOL . Indent::_(2)
. '' . $plugin->update_server_url
. ' ';
- $xml .= PHP_EOL . $this->_t(1) . ' ';
+ $xml .= PHP_EOL . Indent::_(1) . ' ';
}
return $xml;
@@ -29121,7 +28922,7 @@ function vdm_dkim() {
}
$code[] = '}' . PHP_EOL . PHP_EOL;
- return $this->setPlaceholders(implode(PHP_EOL, $code), $this->fileContentStatic);
+ return CFactory::_('Placeholder')->update(implode(PHP_EOL, $code), $this->fileContentStatic);
}
public function setPowersAutoloader($namespace, $loadSite)
@@ -29129,7 +28930,7 @@ function vdm_dkim() {
if (($size = ArrayHelper::check($namespace)) > 0)
{
// check if we are using a plugin
- $use_plugin = isset($this->fileContentStatic[$this->hhh . 'PLUGIN_POWER_AUTOLOADER' . $this->hhh]);
+ $use_plugin = isset($this->fileContentStatic[Placefix::_h('PLUGIN_POWER_AUTOLOADER')]);
// build the methods
$autoloadNotSiteMethod = array();
$autoloadMethod = array();
@@ -29143,20 +28944,20 @@ function vdm_dkim() {
elseif (!$loadSite)
{
// we add code to prevent this plugin from triggering on the site area
- $autoloadNotSiteMethod[] = PHP_EOL . $this->_t(2) . '//'
- . $this->setLine(__LINE__) . ' do not run the autoloader in the site area';
- $autoloadNotSiteMethod[] = $this->_t(2) . 'if ($this->app->isClient(\'site\'))';
- $autoloadNotSiteMethod[] = $this->_t(2) . '{';
- $autoloadNotSiteMethod[] = $this->_t(3) . 'return;';
- $autoloadNotSiteMethod[] = $this->_t(2) . '}' . PHP_EOL;
+ $autoloadNotSiteMethod[] = PHP_EOL . Indent::_(2) . '//'
+ . Line::_(__Line__, __Class__) . ' do not run the autoloader in the site area';
+ $autoloadNotSiteMethod[] = Indent::_(2) . 'if ($this->app->isClient(\'site\'))';
+ $autoloadNotSiteMethod[] = Indent::_(2) . '{';
+ $autoloadNotSiteMethod[] = Indent::_(3) . 'return;';
+ $autoloadNotSiteMethod[] = Indent::_(2) . '}' . PHP_EOL;
}
// we start building the spl_autoload_register function call
- $autoloadMethod[] = $this->_t($tab_space) . '//'
- . $this->setLine(__LINE__) . ' register this component namespace';
- $autoloadMethod[] = $this->_t($tab_space) . 'spl_autoload_register(function ($class) {';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//'
- . $this->setLine(__LINE__) . ' project-specific base directories and namespace prefix';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$search = array(';
+ $autoloadMethod[] = Indent::_($tab_space) . '//'
+ . Line::_(__Line__, __Class__) . ' register this component namespace';
+ $autoloadMethod[] = Indent::_($tab_space) . 'spl_autoload_register(function ($class) {';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '//'
+ . Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '$search = array(';
// ==== IMPORTANT NOTICE =====
// make sure the name space values are sorted from the longest string to the shortest
// so that the search do not mistakenly match a shorter namespace before a longer one
@@ -29178,78 +28979,78 @@ function vdm_dkim() {
// don't add the ending comma on last value
if ($size == $counter)
{
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . "'" . Config::get('jcb_powers_path', 'libraries/jcb_powers') . "/$base_dir' => '" . implode('\\\\', $prefix) . "'";
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . "'" . CFactory::_('Config')->get('jcb_powers_path', 'libraries/jcb_powers') . "/$base_dir' => '" . implode('\\\\', $prefix) . "'";
}
else
{
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . "'" . Config::get('jcb_powers_path', 'libraries/jcb_powers') . "/$base_dir' => '" . implode('\\\\', $prefix) . "',";
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . "'" . CFactory::_('Config')->get('jcb_powers_path', 'libraries/jcb_powers') . "/$base_dir' => '" . implode('\\\\', $prefix) . "',";
}
$counter++;
}
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . ');';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '// Start the search and load if found';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found = false;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found_base_dir = "";';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$found_len = 0;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . 'foreach ($search as $base_dir => $prefix)';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '{';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '//'
- . $this->setLine(__LINE__) . ' does the class use the namespace prefix?';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '$len = strlen($prefix);';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . 'if (strncmp($prefix, $class, $len) === 0)';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '{';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '//'
- . $this->setLine(__LINE__) . ' we have a match so load the values';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found = true;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found_base_dir = $base_dir;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '$found_len = $len;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . '//'
- . $this->setLine(__LINE__) . ' done here';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(3) . 'break;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '}';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '}';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//'
- . $this->setLine(__LINE__) . ' check if we found a match';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . 'if (!$found)';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '{';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . '//'
- . $this->setLine(__LINE__) . ' no, move to the next registered autoloader';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . 'return;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '}';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//'
- . $this->setLine(__LINE__) . ' get the relative class name';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '$relative_class = substr($class, $found_len);';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//'
- . $this->setLine(__LINE__) . ' replace the namespace prefix with the base directory, replace namespace';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '// separators with directory separators in the relative class name, append';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '// with .php';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . "\$file = JPATH_ROOT . '/' . \$found_base_dir . '/src' . str_replace('\\\\', '/', \$relative_class) . '.php';";
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '//'
- . $this->setLine(__LINE__) . ' if the file exists, require it';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . 'if (file_exists($file))';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '{';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(2) . 'require $file;';
- $autoloadMethod[] = $this->_t($tab_space) . $this->_t(1) . '}';
- $autoloadMethod[] = $this->_t($tab_space) . '});';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . ');';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '// Start the search and load if found';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '$found = false;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '$found_base_dir = "";';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '$found_len = 0;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . 'foreach ($search as $base_dir => $prefix)';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '{';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . '//'
+ . Line::_(__Line__, __Class__) . ' does the class use the namespace prefix?';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . '$len = strlen($prefix);';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . 'if (strncmp($prefix, $class, $len) === 0)';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . '{';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(3) . '//'
+ . Line::_(__Line__, __Class__) . ' we have a match so load the values';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(3) . '$found = true;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(3) . '$found_base_dir = $base_dir;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(3) . '$found_len = $len;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(3) . '//'
+ . Line::_(__Line__, __Class__) . ' done here';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(3) . 'break;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . '}';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '}';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '//'
+ . Line::_(__Line__, __Class__) . ' check if we found a match';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . 'if (!$found)';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '{';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . '//'
+ . Line::_(__Line__, __Class__) . ' no, move to the next registered autoloader';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . 'return;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '}';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '//'
+ . Line::_(__Line__, __Class__) . ' get the relative class name';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '$relative_class = substr($class, $found_len);';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '//'
+ . Line::_(__Line__, __Class__) . ' replace the namespace prefix with the base directory, replace namespace';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '// separators with directory separators in the relative class name, append';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '// with .php';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . "\$file = JPATH_ROOT . '/' . \$found_base_dir . '/src' . str_replace('\\\\', '/', \$relative_class) . '.php';";
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '//'
+ . Line::_(__Line__, __Class__) . ' if the file exists, require it';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . 'if (file_exists($file))';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '{';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(2) . 'require $file;';
+ $autoloadMethod[] = Indent::_($tab_space) . Indent::_(1) . '}';
+ $autoloadMethod[] = Indent::_($tab_space) . '});';
// create the method string
$autoloader = implode(PHP_EOL, $autoloadNotSiteMethod) . implode(PHP_EOL, $autoloadMethod);
// check if we are using a plugin
if ($use_plugin)
{
- $this->fileContentStatic[$this->hhh . 'PLUGIN_POWER_AUTOLOADER' . $this->hhh] = PHP_EOL . $autoloader;
+ $this->fileContentStatic[Placefix::_h('PLUGIN_POWER_AUTOLOADER')] = PHP_EOL . $autoloader;
}
else
{
// load to events placeholders
- $this->fileContentStatic[$this->hhh . 'ADMIN_POWER_HELPER' . $this->hhh] .= $autoloader;
+ $this->fileContentStatic[Placefix::_h('ADMIN_POWER_HELPER')] .= $autoloader;
// load to site if needed
if ($loadSite)
{
- $this->fileContentStatic[$this->hhh . 'SITE_POWER_HELPER' . $this->hhh] .= $autoloader;
+ $this->fileContentStatic[Placefix::_h('SITE_POWER_HELPER')] .= $autoloader;
}
}
// to add to custom files
- $this->fileContentStatic[$this->hhh . 'CUSTOM_POWER_AUTOLOADER' . $this->hhh] .= PHP_EOL . implode(PHP_EOL, $autoloadMethod);
+ $this->fileContentStatic[Placefix::_h('CUSTOM_POWER_AUTOLOADER')] .= PHP_EOL . implode(PHP_EOL, $autoloadMethod);
}
}
@@ -29283,8 +29084,8 @@ function vdm_dkim() {
&$file_name
)
{
- // only log messages for none Config::get('lang_tag', 'en-GB') translations
- if (Config::get('lang_tag', 'en-GB') !== $tag)
+ // only log messages for none CFactory::_('Config')->get('lang_tag', 'en-GB') translations
+ if (CFactory::_('Config')->get('lang_tag', 'en-GB') !== $tag)
{
$langStringNr = count($languageStrings);
$langStringSum = MathHelper::bc(
@@ -29297,7 +29098,7 @@ function vdm_dkim() {
. $tag . ' translated)'
: '(strings ' . $tag . ' translated)';
// force load if debug lines are added
- if (!Config::get('debug_line_nr', false))
+ if (!CFactory::_('Config')->get('debug_line_nr', false))
{
// check if we should install this translation
if ($percentage < $this->percentageLanguageAdd)
@@ -29305,7 +29106,7 @@ function vdm_dkim() {
// dont add
$this->langNot[$file_name] = ''
. $total . ' (total '
- . Config::get('lang_tag', 'en-GB') . ' strings) only '
+ . CFactory::_('Config')->get('lang_tag', 'en-GB') . ' strings) only '
. $langStringNr . ' ' . $stringNAme
. ' = ' . $percentage;
@@ -29315,7 +29116,7 @@ function vdm_dkim() {
// show if it was added as well
$this->langSet[$file_name] = ''
. $total . ' (total '
- . Config::get('lang_tag', 'en-GB') . ' strings) and '
+ . CFactory::_('Config')->get('lang_tag', 'en-GB') . ' strings) and '
. $langStringNr . ' ' . $stringNAme . ' = '
. $percentage;
}
diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php
index c92c44c3e..212fd1a47 100644
--- a/admin/helpers/compiler/f_Infusion.php
+++ b/admin/helpers/compiler/f_Infusion.php
@@ -19,14 +19,18 @@ use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\FileHelper;
-use VDM\Joomla\Componentbuilder\Extension\InstallScript;
-use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
+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;
/**
* Infusion class
*/
class Infusion extends Interpretation
{
+
+
public $langFiles = array();
public $removeSiteFolder = false;
public $removeSiteEditFolder = true;
@@ -34,10 +38,10 @@ class Infusion extends Interpretation
/**
* Constructor
*/
- public function __construct($config = array())
+ public function __construct()
{
// first we run the perent constructor
- if (parent::__construct($config))
+ if (parent::__construct())
{
// infuse the data into the structure
return $this->buildFileContent();
@@ -46,24 +50,6 @@ class Infusion extends Interpretation
return false;
}
- /**
- * Set the line number in comments
- *
- * @param int $nr The line number
- *
- * @return void
- *
- */
- private function setLine($nr)
- {
- if (Config::get('debug_line_nr', false))
- {
- return ' [Infusion ' . $nr . ']';
- }
-
- return '';
- }
-
/**
* Build the content for the structure
*
@@ -78,87 +64,87 @@ class Infusion extends Interpretation
$this->componentData->admin_views
))
{
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildFilesContent',
array(&$this->componentContext, &$this->componentData,
&$this->fileContentStatic, &$this->fileContentDynamic,
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// COMPONENT
- $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh]
- = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
+ $this->fileContentStatic[Placefix::_h('COMPONENT')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('COMPONENT')];
// Component
- $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]
- = $this->placeholders[$this->hhh . 'Component' . $this->hhh];
+ $this->fileContentStatic[Placefix::_h('Component')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('Component')];
// component
- $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]
- = $this->placeholders[$this->hhh . 'component' . $this->hhh];
+ $this->fileContentStatic[Placefix::_h('component')]
+ = CFactory::_('Placeholder')->active[Placefix::_h('component')];
// COMPANYNAME
- $this->fileContentStatic[$this->hhh . 'COMPANYNAME' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('COMPANYNAME')]
= trim(
JFilterOutput::cleanText($this->componentData->companyname)
);
// CREATIONDATE
- $this->fileContentStatic[$this->hhh . 'CREATIONDATE' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('CREATIONDATE')]
= JFactory::getDate($this->componentData->created)->format(
'jS F, Y'
);
- $this->fileContentStatic[$this->hhh . 'CREATIONDATE' . $this->hhh
+ $this->fileContentStatic[Placefix::_h('CREATIONDATE')
. 'GLOBAL']
- = $this->fileContentStatic[$this->hhh . 'CREATIONDATE'
- . $this->hhh];
+ = $this->fileContentStatic[Placefix::_h('CREATIONDATE')];
// BUILDDATE
- $this->fileContentStatic[$this->hhh . 'BUILDDATE' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('BUILDDATE')]
= JFactory::getDate()->format('jS F, Y');
- $this->fileContentStatic[$this->hhh . 'BUILDDATE' . $this->hhh
+ $this->fileContentStatic[Placefix::_h('BUILDDATE')
. 'GLOBAL']
- = $this->fileContentStatic[$this->hhh . 'BUILDDATE'
- . $this->hhh];
+ = $this->fileContentStatic[Placefix::_h('BUILDDATE')];
// AUTHOR
- $this->fileContentStatic[$this->hhh . 'AUTHOR' . $this->hhh] = trim(
+ $this->fileContentStatic[Placefix::_h('AUTHOR')] = trim(
JFilterOutput::cleanText($this->componentData->author)
);
// AUTHOREMAIL
- $this->fileContentStatic[$this->hhh . 'AUTHOREMAIL' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('AUTHOREMAIL')]
= trim($this->componentData->email);
// AUTHORWEBSITE
- $this->fileContentStatic[$this->hhh . 'AUTHORWEBSITE' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('AUTHORWEBSITE')]
= trim($this->componentData->website);
// COPYRIGHT
- $this->fileContentStatic[$this->hhh . 'COPYRIGHT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('COPYRIGHT')]
= trim($this->componentData->copyright);
// LICENSE
- $this->fileContentStatic[$this->hhh . 'LICENSE' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('LICENSE')]
= trim($this->componentData->license);
// VERSION
- $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('VERSION')]
= trim($this->componentData->component_version);
// set the actual global version
- $this->fileContentStatic[$this->hhh . 'ACTUALVERSION' . $this->hhh]
- = $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh];
+ $this->fileContentStatic[Placefix::_h('ACTUALVERSION')]
+ = $this->fileContentStatic[Placefix::_h('VERSION')];
// do some Tweaks to the version based on selected options
if (strpos(
- $this->fileContentStatic[$this->hhh . 'VERSION'
- . $this->hhh], '.'
+ $this->fileContentStatic[Placefix::_h('VERSION')], '.'
) !== false)
{
$versionArray = explode(
- '.', $this->fileContentStatic[$this->hhh . 'VERSION'
- . $this->hhh]
+ '.', $this->fileContentStatic[Placefix::_h('VERSION')]
);
}
// load only first two values
@@ -168,7 +154,7 @@ class Infusion extends Interpretation
)
&& $this->componentData->mvc_versiondate == 2)
{
- $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('VERSION')]
= $versionArray[0] . '.' . $versionArray[1] . '.x';
}
// load only the first value
@@ -178,27 +164,26 @@ class Infusion extends Interpretation
)
&& $this->componentData->mvc_versiondate == 3)
{
- $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('VERSION')]
= $versionArray[0] . '.x.x';
}
unset($versionArray);
// set the global version in case
- $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh
+ $this->fileContentStatic[Placefix::_h('VERSION')
. 'GLOBAL']
- = $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh];
+ = $this->fileContentStatic[Placefix::_h('VERSION')];
// set the joomla target xml version
- $this->fileContentStatic[$this->hhh . 'XMLVERSION' . $this->hhh]
- = $this->joomlaVersions[Config::get('version', 3)]['xml_version'];
+ $this->fileContentStatic[Placefix::_h('XMLVERSION')]
+ = $this->joomlaVersions[CFactory::_('Config')->joomla_version]['xml_version'];
// Component_name
- $this->fileContentStatic[$this->hhh . 'Component_name' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('Component_name')]
= JFilterOutput::cleanText($this->componentData->name);
// SHORT_DISCRIPTION
- $this->fileContentStatic[$this->hhh . 'SHORT_DESCRIPTION'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SHORT_DESCRIPTION')]
= trim(
JFilterOutput::cleanText(
$this->componentData->short_description
@@ -206,159 +191,136 @@ class Infusion extends Interpretation
);
// DESCRIPTION
- $this->fileContentStatic[$this->hhh . 'DESCRIPTION' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('DESCRIPTION')]
= trim($this->componentData->description);
// COMP_IMAGE_TYPE
- $this->fileContentStatic[$this->hhh . 'COMP_IMAGE_TYPE'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('COMP_IMAGE_TYPE')]
= $this->setComponentImageType($this->componentData->image);
// ACCESS_SECTIONS
- $this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ACCESS_SECTIONS')]
= $this->setAccessSections();
// CONFIG_FIELDSETS
- $keepLang = $this->lang;
- $this->lang = 'admin';
+ $keepLang = CFactory::_('Config')->lang_target;
+ CFactory::_('Config')->lang_target = 'admin';
// start loading the category tree scripts
- $this->fileContentStatic[$this->hhh . 'CATEGORY_CLASS_TREES'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('CATEGORY_CLASS_TREES')]
= '';
// run the field sets for first time
$this->setConfigFieldsets(1);
- $this->lang = $keepLang;
+ CFactory::_('Config')->lang_target = $keepLang;
// ADMINJS
- $this->fileContentStatic[$this->hhh . 'ADMINJS' . $this->hhh]
- = $this->setPlaceholders(
- $this->customScriptBuilder['component_js'], $this->placeholders
+ $this->fileContentStatic[Placefix::_h('ADMINJS')]
+ = CFactory::_('Placeholder')->update(
+ $this->customScriptBuilder['component_js'], CFactory::_('Placeholder')->active
);
// SITEJS
- $this->fileContentStatic[$this->hhh . 'SITEJS' . $this->hhh]
- = $this->setPlaceholders(
- $this->customScriptBuilder['component_js'], $this->placeholders
+ $this->fileContentStatic[Placefix::_h('SITEJS')]
+ = CFactory::_('Placeholder')->update(
+ $this->customScriptBuilder['component_js'], CFactory::_('Placeholder')->active
);
// ADMINCSS
- $this->fileContentStatic[$this->hhh . 'ADMINCSS' . $this->hhh]
- = $this->setPlaceholders(
+ $this->fileContentStatic[Placefix::_h('ADMINCSS')]
+ = CFactory::_('Placeholder')->update(
$this->customScriptBuilder['component_css_admin'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
// SITECSS
- $this->fileContentStatic[$this->hhh . 'SITECSS' . $this->hhh]
- = $this->setPlaceholders(
+ $this->fileContentStatic[Placefix::_h('SITECSS')]
+ = CFactory::_('Placeholder')->update(
$this->customScriptBuilder['component_css_site'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
// CUSTOM_HELPER_SCRIPT
- $this->fileContentStatic[$this->hhh . 'CUSTOM_HELPER_SCRIPT'
- . $this->hhh]
- = $this->setPlaceholders(
+ $this->fileContentStatic[Placefix::_h('CUSTOM_HELPER_SCRIPT')]
+ = CFactory::_('Placeholder')->update(
$this->customScriptBuilder['component_php_helper_admin'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
// BOTH_CUSTOM_HELPER_SCRIPT
- $this->fileContentStatic[$this->hhh . 'BOTH_CUSTOM_HELPER_SCRIPT'
- . $this->hhh]
- = $this->setPlaceholders(
+ $this->fileContentStatic[Placefix::_h('BOTH_CUSTOM_HELPER_SCRIPT')]
+ = CFactory::_('Placeholder')->update(
$this->customScriptBuilder['component_php_helper_both'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
// ADMIN_GLOBAL_EVENT_HELPER
- if (!isset($this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT'
- . $this->hhh]))
+ if (!isset($this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT')]))
{
- $this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT'
- . $this->hhh] = '';
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT')] = '';
}
- if (!isset($this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]))
+ if (!isset($this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]))
{
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh] = '';
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')] = '';
}
// now load the data for the global event if needed
if ($this->componentData->add_admin_event == 1)
{
// ADMIN_GLOBAL_EVENT
- $this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT')]
.= PHP_EOL . PHP_EOL . '// Trigger the Global Admin Event';
- $this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT'
- . $this->hhh]
- .= PHP_EOL . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT')]
+ .= PHP_EOL . $this->fileContentStatic[Placefix::_h('Component')]
. 'Helper::globalEvent($document);';
// ADMIN_GLOBAL_EVENT_HELPER
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1)
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . PHP_EOL . Indent::_(1) . '/**';
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1)
. '* The Global Admin Event Method.';
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1) . '**/';
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1)
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1) . '**/';
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1)
. 'public static function globalEvent($document)';
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1) . '{';
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->setPlaceholders(
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1) . '{';
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . CFactory::_('Placeholder')->update(
$this->customScriptBuilder['component_php_admin_event'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
- $this->fileContentStatic[$this->hhh
- . 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1) . '}';
+ $this->fileContentStatic[Placefix::_h('ADMIN_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1) . '}';
}
// now load the readme file if needed
if ($this->componentData->addreadme == 1)
{
- $this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FILES'
- . $this->hhh]
- .= PHP_EOL . $this->_t(3)
+ $this->fileContentStatic[Placefix::_h('EXSTRA_ADMIN_FILES')]
+ .= PHP_EOL . Indent::_(3)
. "README.txt ";
}
// HELPER_CREATEUSER
- $this->fileContentStatic[$this->hhh . 'HELPER_CREATEUSER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_CREATEUSER')]
= $this->setCreateUserHelperMethod(
$this->componentData->creatuserhelper
);
// HELP
- $this->fileContentStatic[$this->hhh . 'HELP' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELP')]
= $this->noHelp();
// HELP_SITE
- $this->fileContentStatic[$this->hhh . 'HELP_SITE' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELP_SITE')]
= $this->noHelp();
// build route parse switch
- $this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_PARSE_SWITCH')]
= '';
// build route views
- $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')]
= '';
// add the helper emailer if set
- $this->fileContentStatic[$this->hhh . 'HELPER_EMAIL' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_EMAIL')]
= $this->addEmailHelper();
// load the global placeholders
@@ -380,8 +342,8 @@ class Infusion extends Interpretation
foreach ($this->componentData->admin_views as $view)
{
// set the target
- $this->target = 'admin';
- $this->lang = 'admin';
+ CFactory::_('Config')->build_target = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
// set local names
$nameSingleCode = $view['settings']->name_single_code;
@@ -397,9 +359,9 @@ class Infusion extends Interpretation
)
&& $view['edit_create_site_view'] > 0)
{
- $site_edit_view_array[] = $this->_t(4) . "'"
+ $site_edit_view_array[] = Indent::_(4) . "'"
. $nameSingleCode . "'";
- $this->lang = 'both';
+ CFactory::_('Config')->lang_target = 'both';
// insure site view does not get removed
$this->removeSiteEditFolder = false;
}
@@ -411,7 +373,7 @@ class Infusion extends Interpretation
);
// set view array
- $viewarray[] = $this->_t(4) . "'"
+ $viewarray[] = Indent::_(4) . "'"
. $nameSingleCode . "' => '"
. $nameListCode . "'";
// set the view names
@@ -420,14 +382,16 @@ class Infusion extends Interpretation
{
// set license per view if needed
$this->setLockLicensePer(
- $nameSingleCode, $this->target
+ $nameSingleCode, CFactory::_('Config')->build_target
);
$this->setLockLicensePer(
- $nameListCode, $this->target
+ $nameListCode, CFactory::_('Config')->build_target
);
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@@ -436,53 +400,48 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$nameSingleCode],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// FIELDSETS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'FIELDSETS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('FIELDSETS')]
= $this->setFieldSet(
- $view, Config::get('component_code_name'),
+ $view, CFactory::_('Config')->component_code_name,
$nameSingleCode,
$nameListCode
);
// ACCESSCONTROL <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'ACCESSCONTROL' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('ACCESSCONTROL')]
= $this->setFieldSetAccessControl(
$nameSingleCode
);
// LINKEDVIEWITEMS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWITEMS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWITEMS')]
= '';
// ADDTOOLBAR <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'ADDTOOLBAR' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('ADDTOOLBAR')]
= $this->setAddToolBar($view);
// set the script for this view
$this->buildTheViewScript($view);
// VIEW_SCRIPT
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'VIEW_SCRIPT' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('VIEW_SCRIPT')]
= $this->setViewScript(
$nameSingleCode, 'fileScript'
);
// EDITBODYSCRIPT
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'EDITBODYSCRIPT' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('EDITBODYSCRIPT')]
= $this->setViewScript(
$nameSingleCode, 'footerScript'
);
// AJAXTOKE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'AJAXTOKE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('AJAXTOKE')]
= $this->setAjaxToke(
$nameSingleCode
);
@@ -494,8 +453,7 @@ class Infusion extends Interpretation
false
))
{
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'DOCUMENT_CUSTOM_PHP' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('DOCUMENT_CUSTOM_PHP')]
= str_replace(
'$document->', '$this->document->', $phpDocument
);
@@ -504,124 +462,105 @@ class Infusion extends Interpretation
}
else
{
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'DOCUMENT_CUSTOM_PHP' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('DOCUMENT_CUSTOM_PHP')]
= '';
}
// LINKEDVIEWTABLESCRIPTS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWTABLESCRIPTS')]
= '';
// VALIDATEFIX <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'VALIDATIONFIX' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('VALIDATIONFIX')]
= $this->setValidationFix(
$nameSingleCode,
- $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('Component')]
);
// EDITBODY <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'EDITBODY' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('EDITBODY')]
= $this->setEditBody($view);
// EDITBODYFADEIN <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'EDITBODYFADEIN' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('EDITBODYFADEIN')]
= $this->setFadeInEfect($view);
// JTABLECONSTRUCTOR <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JTABLECONSTRUCTOR' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JTABLECONSTRUCTOR')]
= $this->setJtableConstructor(
$nameSingleCode
);
// JTABLEALIASCATEGORY <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JTABLEALIASCATEGORY' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JTABLEALIASCATEGORY')]
= $this->setJtableAliasCategory(
$nameSingleCode
);
// METHOD_GET_ITEM <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'METHOD_GET_ITEM' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('METHOD_GET_ITEM')]
= $this->setMethodGetItem(
$nameSingleCode
);
// LINKEDVIEWGLOBAL <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWGLOBAL' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWGLOBAL')]
= '';
// LINKEDVIEWMETHODS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'LINKEDVIEWMETHODS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('LINKEDVIEWMETHODS')]
= '';
// JMODELADMIN_BEFORE_DELETE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_BEFORE_DELETE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_BEFORE_DELETE')]
= $this->getCustomScriptBuilder(
'php_before_delete',
$nameSingleCode, PHP_EOL
);
// JMODELADMIN_AFTER_DELETE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_AFTER_DELETE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_AFTER_DELETE')]
= $this->getCustomScriptBuilder(
'php_after_delete', $nameSingleCode,
PHP_EOL . PHP_EOL
);
// JMODELADMIN_BEFORE_DELETE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_BEFORE_PUBLISH' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_BEFORE_PUBLISH')]
= $this->getCustomScriptBuilder(
'php_before_publish',
$nameSingleCode, PHP_EOL
);
// JMODELADMIN_AFTER_DELETE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_AFTER_PUBLISH' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_AFTER_PUBLISH')]
= $this->getCustomScriptBuilder(
'php_after_publish',
$nameSingleCode, PHP_EOL . PHP_EOL
);
// CHECKBOX_SAVE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'CHECKBOX_SAVE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('CHECKBOX_SAVE')]
= $this->setCheckboxSave(
$nameSingleCode
);
// METHOD_ITEM_SAVE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'METHOD_ITEM_SAVE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('METHOD_ITEM_SAVE')]
= $this->setMethodItemSave(
$nameSingleCode
);
// POSTSAVEHOOK <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'POSTSAVEHOOK' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('POSTSAVEHOOK')]
= $this->getCustomScriptBuilder(
'php_postsavehook', $nameSingleCode,
PHP_EOL, null,
- true, PHP_EOL . $this->_t(2) . "return;",
- PHP_EOL . PHP_EOL . $this->_t(2) . "return;"
+ true, PHP_EOL . Indent::_(2) . "return;",
+ PHP_EOL . PHP_EOL . Indent::_(2) . "return;"
);
// VIEWCSS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'VIEWCSS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('VIEWCSS')]
= $this->getCustomScriptBuilder(
'css_view', $nameSingleCode, '',
null, true
@@ -634,44 +573,37 @@ class Infusion extends Interpretation
)
&& $view['edit_create_site_view'] > 0)
{
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'SITE_VIEWCSS' . $this->hhh]
- = $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'VIEWCSS' . $this->hhh];
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('SITE_VIEWCSS')]
+ = $this->fileContentDynamic[$nameSingleCode][Placefix::_h('VIEWCSS')];
// check if we should add a create menu
if ($view['edit_create_site_view'] == 2)
{
// SITE_MENU_XML <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'SITE_MENU_XML' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('SITE_MENU_XML')]
= $this->setAdminViewMenu(
$nameSingleCode, $view
);
}
// SITE_ADMIN_VIEW_CONTROLLER_HEADER <<>> add the header details for the controller
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'SITE_ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('SITE_ADMIN_VIEW_CONTROLLER_HEADER')]
= $this->setFileHeader(
'site.admin.view.controller',
$nameSingleCode
);
// SITE_ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'SITE_ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('SITE_ADMIN_VIEW_MODEL_HEADER')]
= $this->setFileHeader(
'site.admin.view.model',
$nameSingleCode
);
// SITE_ADMIN_VIEW_HTML_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'SITE_ADMIN_VIEW_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('SITE_ADMIN_VIEW_HTML_HEADER')]
= $this->setFileHeader(
'site.admin.view.html',
$nameSingleCode
);
// SITE_ADMIN_VIEW_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'SITE_ADMIN_VIEW_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('SITE_ADMIN_VIEW_HEADER')]
= $this->setFileHeader(
'site.admin.view',
$nameSingleCode
@@ -679,40 +611,37 @@ class Infusion extends Interpretation
}
// TABLAYOUTFIELDSARRAY <<>> add the tab layout fields array to the model
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'TABLAYOUTFIELDSARRAY' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('TABLAYOUTFIELDSARRAY')]
= $this->getTabLayoutFieldsArray(
$nameSingleCode
);
// ADMIN_VIEW_CONTROLLER_HEADER <<>> add the header details for the controller
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('ADMIN_VIEW_CONTROLLER_HEADER')]
= $this->setFileHeader(
'admin.view.controller',
$nameSingleCode
);
// ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('ADMIN_VIEW_MODEL_HEADER')]
= $this->setFileHeader(
'admin.view.model', $nameSingleCode
);
// ADMIN_VIEW_HTML_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'ADMIN_VIEW_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('ADMIN_VIEW_HTML_HEADER')]
= $this->setFileHeader(
'admin.view.html', $nameSingleCode
);
// ADMIN_VIEW_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'ADMIN_VIEW_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('ADMIN_VIEW_HEADER')]
= $this->setFileHeader(
'admin.view', $nameSingleCode
);
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@@ -721,20 +650,23 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$nameSingleCode],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
}
// set the views names
if (isset($view['settings']->name_list)
&& $view['settings']->name_list != 'null')
{
- $this->lang = 'admin';
+ CFactory::_('Config')->lang_target = 'admin';
// ICOMOON <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ICOMOON' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ICOMOON')]
= $view['icomoon'];
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildAdminListViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@@ -743,6 +675,8 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$nameListCode],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// set the export/import option
if (isset($view['port']) && $view['port']
@@ -771,145 +705,121 @@ class Infusion extends Interpretation
if (isset($view['checkin']) && $view['checkin'] == 1)
{
// AUTOCHECKIN <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'AUTOCHECKIN' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('AUTOCHECKIN')]
= $this->setAutoCheckin(
$nameSingleCode,
- Config::get('component_code_name')
+ CFactory::_('Config')->component_code_name
);
// CHECKINCALL <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'CHECKINCALL' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('CHECKINCALL')]
= $this->setCheckinCall();
}
else
{
// AUTOCHECKIN <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'AUTOCHECKIN' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('AUTOCHECKIN')]
= '';
// CHECKINCALL <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'CHECKINCALL' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('CHECKINCALL')]
= '';
}
// admin list file contnet
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_JAVASCRIPT_FILE' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_JAVASCRIPT_FILE')]
= $this->setViewScript(
$nameListCode, 'list_fileScript'
);
// ADMIN_CUSTOM_BUTTONS_LIST
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_CUSTOM_BUTTONS_LIST' . $this->hhh]
- = $this->setCustomButtons($view, 3, $this->_t(1));
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_CUSTOM_BUTTONS_LIST')]
+ = $this->setCustomButtons($view, 3, Indent::_(1));
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST')]
= $this->setFunctionOnlyButtons(
$nameListCode
);
// GET_ITEMS_METHOD_STRING_FIX <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'GET_ITEMS_METHOD_STRING_FIX' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('GET_ITEMS_METHOD_STRING_FIX')]
= $this->setGetItemsMethodStringFix(
$nameSingleCode,
$nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('Component')]
);
// GET_ITEMS_METHOD_AFTER_ALL <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'GET_ITEMS_METHOD_AFTER_ALL' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('GET_ITEMS_METHOD_AFTER_ALL')]
= $this->getCustomScriptBuilder(
'php_getitems_after_all',
$nameSingleCode, PHP_EOL
);
// SELECTIONTRANSLATIONFIX <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'SELECTIONTRANSLATIONFIX' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('SELECTIONTRANSLATIONFIX')]
= $this->setSelectionTranslationFix(
$nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('Component')]
);
// SELECTIONTRANSLATIONFIXFUNC <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'SELECTIONTRANSLATIONFIXFUNC' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('SELECTIONTRANSLATIONFIXFUNC')]
= $this->setSelectionTranslationFixFunc(
$nameListCode,
- $this->fileContentStatic[$this->hhh . 'Component'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('Component')]
);
// FILTER_FIELDS <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'FILTER_FIELDS' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('FILTER_FIELDS')]
= $this->setFilterFieldsArray(
$nameSingleCode,
$nameListCode
);
// STOREDID <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'STOREDID' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('STOREDID')]
= $this->setStoredId(
$nameSingleCode, $nameListCode
);
// POPULATESTATE <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'POPULATESTATE' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('POPULATESTATE')]
= $this->setPopulateState(
$nameSingleCode, $nameListCode
);
// SORTFIELDS <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'SORTFIELDS' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('SORTFIELDS')]
= $this->setSortFields(
$nameListCode
);
// CATEGORY_VIEWS
if (!isset(
- $this->fileContentStatic[$this->hhh
- . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_CATEGORY_VIEWS')]
))
{
- $this->fileContentStatic[$this->hhh
- . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_CATEGORY_VIEWS')]
= '';
}
- $this->fileContentStatic[$this->hhh
- . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_CATEGORY_VIEWS')]
.= $this->setRouterCategoryViews(
$nameSingleCode,
$nameListCode
);
// FILTERFIELDDISPLAYHELPER <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'FILTERFIELDDISPLAYHELPER' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('FILTERFIELDDISPLAYHELPER')]
= $this->setFilterFieldSidebarDisplayHelper(
$nameSingleCode,
$nameListCode
);
// BATCHDISPLAYHELPER <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'BATCHDISPLAYHELPER' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('BATCHDISPLAYHELPER')]
= $this->setBatchDisplayHelper(
$nameSingleCode,
$nameListCode
);
// FILTERFUNCTIONS <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'FILTERFUNCTIONS' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('FILTERFUNCTIONS')]
= $this->setFilterFieldHelper(
$nameSingleCode,
$nameListCode
@@ -917,8 +827,7 @@ class Infusion extends Interpretation
// FIELDFILTERSETS <<>>
$this->fileContentDynamic['filter_'
- . $nameListCode][$this->hhh
- . 'FIELDFILTERSETS' . $this->hhh]
+ . $nameListCode][Placefix::_h('FIELDFILTERSETS')]
= $this->setFieldFilterSet(
$nameSingleCode,
$nameListCode
@@ -926,109 +835,96 @@ class Infusion extends Interpretation
// FIELDLISTSETS <<>>
$this->fileContentDynamic['filter_'
- . $nameListCode][$this->hhh
- . 'FIELDLISTSETS' . $this->hhh]
+ . $nameListCode][Placefix::_h('FIELDLISTSETS')]
= $this->setFieldFilterListSet(
$nameSingleCode,
$nameListCode
);
// LISTQUERY <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'LISTQUERY' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('LISTQUERY')]
= $this->setListQuery(
$nameSingleCode,
$nameListCode
);
// MODELEXPORTMETHOD <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'MODELEXPORTMETHOD' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('MODELEXPORTMETHOD')]
= $this->setGetItemsModelMethod(
$nameSingleCode,
$nameListCode
);
// MODELEXIMPORTMETHOD <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'CONTROLLEREXIMPORTMETHOD' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('CONTROLLEREXIMPORTMETHOD')]
= $this->setControllerEximportMethod(
$nameSingleCode,
$nameListCode
);
// EXPORTBUTTON <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'EXPORTBUTTON' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('EXPORTBUTTON')]
= $this->setExportButton(
$nameSingleCode,
$nameListCode
);
// IMPORTBUTTON <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'IMPORTBUTTON' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('IMPORTBUTTON')]
= $this->setImportButton(
$nameSingleCode,
$nameListCode
);
// VIEWS_DEFAULT_BODY <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'VIEWS_DEFAULT_BODY' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('VIEWS_DEFAULT_BODY')]
= $this->setDefaultViewsBody(
$nameSingleCode,
$nameListCode
);
// LISTHEAD <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'LISTHEAD' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('LISTHEAD')]
= $this->setListHead(
$nameSingleCode,
$nameListCode
);
// LISTBODY <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'LISTBODY' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('LISTBODY')]
= $this->setListBody(
$nameSingleCode,
$nameListCode
);
// LISTCOLNR <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'LISTCOLNR' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('LISTCOLNR')]
= $this->setListColnr(
$nameListCode
);
// JVIEWLISTCANDO <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'JVIEWLISTCANDO' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('JVIEWLISTCANDO')]
= $this->setJviewListCanDo(
$nameSingleCode,
$nameListCode
);
// VIEWSCSS <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'VIEWSCSS' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('VIEWSCSS')]
= $this->getCustomScriptBuilder(
'css_views', $nameSingleCode, '',
null, true
);
// ADMIN_DIPLAY_METHOD <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_DIPLAY_METHOD' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_DIPLAY_METHOD')]
= $this->setAdminViewDisplayMethod(
$nameListCode
);
// VIEWS_FOOTER_SCRIPT <<>>
- $scriptNote = PHP_EOL . '//' . $this->setLine(__LINE__)
+ $scriptNote = PHP_EOL . '//' . Line::_(__Line__, __Class__)
. ' ' . $nameListCode
. ' footer script';
if (($footerScript = $this->getCustomScriptBuilder(
@@ -1039,7 +935,7 @@ class Infusion extends Interpretation
&& StringHelper::check($footerScript))
{
// only minfy if no php is added to the footer script
- if (Config::get('minify', 0)
+ if (CFactory::_('Config')->get('minify', 0)
&& strpos($footerScript, 'fileContentDynamic[$nameListCode][$this->hhh
- . 'VIEWS_FOOTER_SCRIPT' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('VIEWS_FOOTER_SCRIPT')]
= PHP_EOL . '";
// clear some memory
@@ -1058,39 +953,36 @@ class Infusion extends Interpretation
}
else
{
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'VIEWS_FOOTER_SCRIPT' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('VIEWS_FOOTER_SCRIPT')]
= '';
}
// ADMIN_VIEWS_CONTROLLER_HEADER <<>> add the header details for the controller
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_VIEWS_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_VIEWS_CONTROLLER_HEADER')]
= $this->setFileHeader(
'admin.views.controller',
$nameListCode
);
// ADMIN_VIEWS_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_VIEWS_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_VIEWS_MODEL_HEADER')]
= $this->setFileHeader(
'admin.views.model', $nameListCode
);
// ADMIN_VIEWS_HTML_HEADER <<>> add the header details for the views
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_VIEWS_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_VIEWS_HTML_HEADER')]
= $this->setFileHeader(
'admin.views.html', $nameListCode
);
// ADMIN_VIEWS_HEADER <<>> add the header details for the views
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'ADMIN_VIEWS_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('ADMIN_VIEWS_HEADER')]
= $this->setFileHeader(
'admin.views', $nameListCode
);
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildAdminListViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@@ -1099,62 +991,55 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$nameListCode],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
}
// set u fields used in batch
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'UNIQUEFIELDS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('UNIQUEFIELDS')]
= $this->setUniqueFields(
$nameSingleCode
);
// TITLEALIASFIX <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'TITLEALIASFIX' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('TITLEALIASFIX')]
= $this->setAliasTitleFix(
$nameSingleCode
);
// GENERATENEWTITLE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'GENERATENEWTITLE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('GENERATENEWTITLE')]
= $this->setGenerateNewTitle(
$nameSingleCode
);
// GENERATENEWALIAS <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'GENERATENEWALIAS' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('GENERATENEWALIAS')]
= $this->setGenerateNewAlias(
$nameSingleCode
);
// MODEL_BATCH_COPY <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'MODEL_BATCH_COPY' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('MODEL_BATCH_COPY')]
= $this->setBatchCopy($nameSingleCode);
// MODEL_BATCH_MOVE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'MODEL_BATCH_MOVE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('MODEL_BATCH_MOVE')]
= $this->setBatchMove($nameSingleCode);
// BATCH_ONCLICK_CANCEL_SCRIPT <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('BATCH_ONCLICK_CANCEL_SCRIPT')]
= ''; // TODO <-- must still be build
// JCONTROLLERFORM_ALLOWADD <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JCONTROLLERFORM_ALLOWADD' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JCONTROLLERFORM_ALLOWADD')]
= $this->setJcontrollerAllowAdd(
$nameSingleCode,
$nameListCode
);
// JCONTROLLERFORM_BEFORECANCEL <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JCONTROLLERFORM_BEFORECANCEL')]
= $this->getCustomScriptBuilder(
'php_before_cancel', $nameSingleCode,
PHP_EOL, null, null,
@@ -1162,8 +1047,7 @@ class Infusion extends Interpretation
);
// JCONTROLLERFORM_AFTERCANCEL <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JCONTROLLERFORM_AFTERCANCEL' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JCONTROLLERFORM_AFTERCANCEL')]
= $this->getCustomScriptBuilder(
'php_after_cancel', $nameSingleCode,
PHP_EOL, null, null,
@@ -1171,40 +1055,35 @@ class Infusion extends Interpretation
);
// JCONTROLLERFORM_ALLOWEDIT <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JCONTROLLERFORM_ALLOWEDIT')]
= $this->setJcontrollerAllowEdit(
$nameSingleCode,
$nameListCode
);
// JMODELADMIN_GETFORM <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_GETFORM' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_GETFORM')]
= $this->setJmodelAdminGetForm(
$nameSingleCode,
$nameListCode
);
// JMODELADMIN_ALLOWEDIT <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_ALLOWEDIT' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_ALLOWEDIT')]
= $this->setJmodelAdminAllowEdit(
$nameSingleCode,
$nameListCode
);
// JMODELADMIN_CANDELETE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_CANDELETE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_CANDELETE')]
= $this->setJmodelAdminCanDelete(
$nameSingleCode,
$nameListCode
);
// JMODELADMIN_CANEDITSTATE <<>>
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'JMODELADMIN_CANEDITSTATE' . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('JMODELADMIN_CANEDITSTATE')]
= $this->setJmodelAdminCanEditState(
$nameSingleCode,
$nameListCode
@@ -1212,30 +1091,25 @@ class Infusion extends Interpretation
// set custom admin view Toolbare buttons
// CUSTOM_ADMIN_DYNAMIC_BUTTONS <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'CUSTOM_ADMIN_DYNAMIC_BUTTONS' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('CUSTOM_ADMIN_DYNAMIC_BUTTONS')]
= $this->setCustomAdminDynamicButton(
$nameListCode
);
// CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER <<>>
- $this->fileContentDynamic[$nameListCode][$this->hhh
- . 'CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER' . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER')]
= $this->setCustomAdminDynamicButtonController(
$nameListCode
);
// set helper router
if (!isset(
- $this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTEHELPER')]
))
{
- $this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTEHELPER')]
= '';
}
- $this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTEHELPER')]
.= $this->setRouterHelp(
$nameSingleCode,
$nameListCode
@@ -1248,13 +1122,11 @@ class Infusion extends Interpretation
&& $view['edit_create_site_view'] > 0)
{
// add needed router stuff for front edit views
- $this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_PARSE_SWITCH')]
.= $this->routerParseSwitch(
$nameSingleCode, null, false
);
- $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')]
.= $this->routerBuildViews(
$nameSingleCode
);
@@ -1262,16 +1134,13 @@ class Infusion extends Interpretation
// ACCESS_SECTIONS
if (!isset(
- $this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ACCESS_SECTIONS')]
))
{
- $this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ACCESS_SECTIONS')]
= '';
}
- $this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ACCESS_SECTIONS')]
.= $this->setAccessSectionsCategory(
$nameSingleCode,
$nameListCode
@@ -1280,13 +1149,14 @@ class Infusion extends Interpretation
if (isset($view['joomla_fields'])
&& $view['joomla_fields'] == 1)
{
- $this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ACCESS_SECTIONS')]
.= $this->setAccessSectionsJoomlaFields();
}
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildAdminViewContent',
array(&$this->componentContext, &$view,
&$nameSingleCode,
@@ -1295,6 +1165,8 @@ class Infusion extends Interpretation
&$this->fileContentDynamic, &$this->placeholders,
&$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
}
// setup the layouts
@@ -1306,75 +1178,70 @@ class Infusion extends Interpretation
$this->componentData->custom_admin_views
))
{
- $this->target = 'custom_admin';
- $this->lang = 'admin';
+ CFactory::_('Config')->build_target = 'custom_admin';
+ CFactory::_('Config')->lang_target = 'admin';
// start dynamic build
foreach ($this->componentData->custom_admin_views as $view)
{
// for single views
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SView' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SView')]
= $view['settings']->Code;
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'sview' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('sview')]
= $view['settings']->code;
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SVIEW' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SVIEW')]
= $view['settings']->CODE;
// for list views
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SViews' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SViews')]
= $view['settings']->Code;
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'sviews' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('sviews')]
= $view['settings']->code;
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SVIEWS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SVIEWS')]
= $view['settings']->CODE;
// add to lang array
- $this->setLangContent(
- $this->lang,
- Config::get('lang_prefix') . '_' . $view['settings']->CODE,
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target,
+ CFactory::_('Config')->lang_prefix . '_' . $view['settings']->CODE,
$view['settings']->name
);
- $this->setLangContent(
- $this->lang,
- Config::get('lang_prefix') . '_' . $view['settings']->CODE
+ CFactory::_('Language')->set(
+ CFactory::_('Config')->lang_target,
+ CFactory::_('Config')->lang_prefix . '_' . $view['settings']->CODE
. '_DESC', $view['settings']->description
);
// ICOMOON <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'ICOMOON' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('ICOMOON')]
= $view['icomoon'];
// set placeholders
- $this->placeholders[$this->hhh . 'SView' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SView')]
= $view['settings']->Code;
- $this->placeholders[$this->hhh . 'sview' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('sview')]
= $view['settings']->code;
- $this->placeholders[$this->hhh . 'SVIEW' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SVIEW')]
= $view['settings']->CODE;
- $this->placeholders[$this->bbb . 'SView' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SView')]
= $view['settings']->Code;
- $this->placeholders[$this->bbb . 'sview' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('sview')]
= $view['settings']->code;
- $this->placeholders[$this->bbb . 'SVIEW' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SVIEW')]
= $view['settings']->CODE;
- $this->placeholders[$this->hhh . 'SViews' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SViews')]
= $view['settings']->Code;
- $this->placeholders[$this->hhh . 'sviews' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('sviews')]
= $view['settings']->code;
- $this->placeholders[$this->hhh . 'SVIEWS' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SVIEWS')]
= $view['settings']->CODE;
- $this->placeholders[$this->bbb . 'SViews' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SViews')]
= $view['settings']->Code;
- $this->placeholders[$this->bbb . 'sviews' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('sviews')]
= $view['settings']->code;
- $this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SVIEWS')]
= $view['settings']->CODE;
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildCustomAdminViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@@ -1382,10 +1249,12 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$view['settings']->code],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// set license per view if needed
$this->setLockLicensePer(
- $view['settings']->code, $this->target
+ $view['settings']->code, CFactory::_('Config')->build_target
);
// check if this custom admin view is the default view
@@ -1393,135 +1262,116 @@ class Infusion extends Interpretation
&& $this->dynamicDashboard === $view['settings']->code)
{
// HIDEMAINMENU <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'HIDEMAINMENU' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('HIDEMAINMENU')]
= '';
}
else
{
// HIDEMAINMENU <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'HIDEMAINMENU' . $this->hhh]
- = PHP_EOL . $this->_t(2) . '//' . $this->setLine(
- __LINE__
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('HIDEMAINMENU')]
+ = PHP_EOL . Indent::_(2) . '//' . Line::_(
+ __LINE__,__CLASS__
) . " hide the main menu"
- . PHP_EOL . $this->_t(2)
+ . PHP_EOL . Indent::_(2)
. "\$this->app->input->set('hidemainmenu', true);";
}
if ($view['settings']->main_get->gettype == 1)
{
// CUSTOM_ADMIN_BEFORE_GET_ITEM <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_BEFORE_GET_ITEM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_BEFORE_GET_ITEM')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_before_getitem',
+ CFactory::_('Config')->build_target . '_php_before_getitem',
$view['settings']->code, '', null, true
);
// CUSTOM_ADMIN_GET_ITEM <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_GET_ITEM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_GET_ITEM')]
= $this->setCustomViewGetItem(
$view['settings']->main_get,
- $view['settings']->code, $this->_t(2)
+ $view['settings']->code, Indent::_(2)
);
// CUSTOM_ADMIN_AFTER_GET_ITEM <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_AFTER_GET_ITEM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_AFTER_GET_ITEM')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_after_getitem',
+ CFactory::_('Config')->build_target . '_php_after_getitem',
$view['settings']->code, '', null, true
);
}
elseif ($view['settings']->main_get->gettype == 2)
{
// CUSTOM_ADMIN_GET_LIST_QUERY <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_GET_LIST_QUERY' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_GET_LIST_QUERY')]
= $this->setCustomViewListQuery(
$view['settings']->main_get, $view['settings']->code
);
// CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_getlistquery',
+ CFactory::_('Config')->build_target . '_php_getlistquery',
$view['settings']->code, PHP_EOL, null, true
);
// CUSTOM_ADMIN_BEFORE_GET_ITEMS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_BEFORE_GET_ITEMS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_BEFORE_GET_ITEMS')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_before_getitems',
+ CFactory::_('Config')->build_target . '_php_before_getitems',
$view['settings']->code, PHP_EOL, null, true
);
// CUSTOM_ADMIN_GET_ITEMS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_GET_ITEMS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_GET_ITEMS')]
= $this->setCustomViewGetItems(
$view['settings']->main_get, $view['settings']->code
);
// CUSTOM_ADMIN_AFTER_GET_ITEMS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_AFTER_GET_ITEMS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_AFTER_GET_ITEMS')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_after_getitems',
+ CFactory::_('Config')->build_target . '_php_after_getitems',
$view['settings']->code, PHP_EOL, null, true
);
}
// CUSTOM_ADMIN_CUSTOM_METHODS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_CUSTOM_METHODS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_CUSTOM_METHODS')]
= $this->setCustomViewCustomItemMethods(
$view['settings']->main_get, $view['settings']->code
);
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_CUSTOM_METHODS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_CUSTOM_METHODS')]
.= $this->setCustomViewCustomMethods(
$view, $view['settings']->code
);
// CUSTOM_ADMIN_DIPLAY_METHOD <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_DIPLAY_METHOD' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_DIPLAY_METHOD')]
= $this->setCustomViewDisplayMethod($view);
// set document details
$this->setPrepareDocument($view);
// CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS')]
= $this->setCustomViewExtraDisplayMethods($view);
// CUSTOM_ADMIN_CODE_BODY <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_CODE_BODY' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_CODE_BODY')]
= $this->setCustomViewCodeBody($view);
// CUSTOM_ADMIN_BODY <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_BODY' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_BODY')]
= $this->setCustomViewBody($view);
// CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT')]
= $this->setCustomViewSubmitButtonScript($view);
// setup the templates
$this->setCustomViewTemplateBody($view);
// set the site form if needed
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_TOP_FORM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_TOP_FORM')]
= $this->setCustomViewForm(
$view['settings']->code,
$view['settings']->main_get->gettype, 1
);
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_BOTTOM_FORM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_BOTTOM_FORM')]
= $this->setCustomViewForm(
$view['settings']->code,
$view['settings']->main_get->gettype, 2
@@ -1531,27 +1381,23 @@ class Infusion extends Interpretation
if ($view['settings']->main_get->gettype == 1)
{
// CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER <<>> add the header details for the controller
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER')]
= $this->setFileHeader(
'custom.admin.view.controller',
$view['settings']->code
);
// CUSTOM_ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEW_MODEL_HEADER')]
= $this->setFileHeader(
'custom.admin.view.model', $view['settings']->code
);
// CUSTOM_ADMIN_VIEW_HTML_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEW_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEW_HTML_HEADER')]
= $this->setFileHeader(
'custom.admin.view.html', $view['settings']->code
);
// CUSTOM_ADMIN_VIEW_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEW_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEW_HEADER')]
= $this->setFileHeader(
'custom.admin.view', $view['settings']->code
);
@@ -1559,34 +1405,32 @@ class Infusion extends Interpretation
elseif ($view['settings']->main_get->gettype == 2)
{
// CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER <<>> add the header details for the controller
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER')]
= $this->setFileHeader(
'custom.admin.views.controller',
$view['settings']->code
);
// CUSTOM_ADMIN_VIEWS_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEWS_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEWS_MODEL_HEADER')]
= $this->setFileHeader(
'custom.admin.views.model', $view['settings']->code
);
// CUSTOM_ADMIN_VIEWS_HTML_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEWS_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEWS_HTML_HEADER')]
= $this->setFileHeader(
'custom.admin.views.html', $view['settings']->code
);
// CUSTOM_ADMIN_VIEWS_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'CUSTOM_ADMIN_VIEWS_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('CUSTOM_ADMIN_VIEWS_HEADER')]
= $this->setFileHeader(
'custom.admin.views', $view['settings']->code
);
}
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildCustomAdminViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@@ -1594,6 +1438,8 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$view['settings']->code],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
}
// setup the layouts
@@ -1601,72 +1447,66 @@ class Infusion extends Interpretation
}
// ADMIN_HELPER_CLASS_HEADER
- $this->fileContentStatic[$this->hhh . 'ADMIN_HELPER_CLASS_HEADER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ADMIN_HELPER_CLASS_HEADER')]
= $this->setFileHeader(
'admin.helper', 'admin'
);
// ADMIN_COMPONENT_HEADER
- $this->fileContentStatic[$this->hhh . 'ADMIN_COMPONENT_HEADER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ADMIN_COMPONENT_HEADER')]
= $this->setFileHeader(
'admin.component', 'admin'
);
// SITE_HELPER_CLASS_HEADER
- $this->fileContentStatic[$this->hhh . 'SITE_HELPER_CLASS_HEADER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_HELPER_CLASS_HEADER')]
= $this->setFileHeader(
'site.helper', 'site'
);
// SITE_COMPONENT_HEADER
- $this->fileContentStatic[$this->hhh . 'SITE_COMPONENT_HEADER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_COMPONENT_HEADER')]
= $this->setFileHeader(
'site.component', 'site'
);
// HELPER_EXEL
- $this->fileContentStatic[$this->hhh . 'HELPER_EXEL'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_EXEL')]
= $this->setHelperExelMethods();
// VIEWARRAY
- $this->fileContentStatic[$this->hhh . 'VIEWARRAY' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('VIEWARRAY')]
= PHP_EOL . implode("," . PHP_EOL, $viewarray);
// CUSTOM_ADMIN_EDIT_VIEW_ARRAY
- $this->fileContentStatic[$this->hhh . 'SITE_EDIT_VIEW_ARRAY'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_EDIT_VIEW_ARRAY')]
= PHP_EOL . implode("," . PHP_EOL, $site_edit_view_array);
// MAINMENUS
- $this->fileContentStatic[$this->hhh . 'MAINMENUS' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('MAINMENUS')]
= $this->setMainMenus();
// SUBMENU
- $this->fileContentStatic[$this->hhh . 'SUBMENU' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SUBMENU')]
= $this->setSubMenus();
// GET_CRYPT_KEY
- $this->fileContentStatic[$this->hhh . 'GET_CRYPT_KEY' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('GET_CRYPT_KEY')]
= $this->setGetCryptKey();
// set the license locker
$this->setLockLicense();
// CONTRIBUTORS
- $this->fileContentStatic[$this->hhh . 'CONTRIBUTORS' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('CONTRIBUTORS')]
= $this->theContributors;
// INSTALL
- $this->fileContentStatic[$this->hhh . 'INSTALL' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('INSTALL')]
= $this->setInstall();
// UNINSTALL
- $this->fileContentStatic[$this->hhh . 'UNINSTALL' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('UNINSTALL')]
= $this->setUninstall();
// UPDATE_VERSION_MYSQL
@@ -1676,57 +1516,46 @@ class Infusion extends Interpretation
if (!StringHelper::check($this->dynamicDashboard))
{
// DASHBOARDVIEW
- $this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW'
- . $this->hhh]
- = Config::get('component_code_name');
+ $this->fileContentStatic[Placefix::_h('DASHBOARDVIEW')]
+ = CFactory::_('Config')->component_code_name;
// DASHBOARDICONS
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASHBOARDICONS' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASHBOARDICONS')]
= $this->setDashboardIcons();
// DASHBOARDICONACCESS
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASHBOARDICONACCESS' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASHBOARDICONACCESS')]
= $this->setDashboardIconAccess();
// DASH_MODEL_METHODS
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASH_MODEL_METHODS' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASH_MODEL_METHODS')]
= $this->setDashboardModelMethods();
// DASH_GET_CUSTOM_DATA
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASH_GET_CUSTOM_DATA' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASH_GET_CUSTOM_DATA')]
= $this->setDashboardGetCustomData();
// DASH_DISPLAY_DATA
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASH_DISPLAY_DATA' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASH_DISPLAY_DATA')]
= $this->setDashboardDisplayData();
// DASH_VIEW_HEADER
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASH_VIEW_HEADER' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASH_VIEW_HEADER')]
= $this->setFileHeader('dashboard.view', 'dashboard');
// DASH_VIEW_HTML_HEADER
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASH_VIEW_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASH_VIEW_HTML_HEADER')]
= $this->setFileHeader('dashboard.view.html', 'dashboard');
// DASH_MODEL_HEADER
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASH_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASH_MODEL_HEADER')]
= $this->setFileHeader('dashboard.model', 'dashboard');
// DASH_CONTROLLER_HEADER
- $this->fileContentDynamic[Config::get('component_code_name')][$this->hhh
- . 'DASH_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[CFactory::_('Config')->component_code_name][Placefix::_h('DASH_CONTROLLER_HEADER')]
= $this->setFileHeader('dashboard.controller', 'dashboard');
}
else
{
// DASHBOARDVIEW
- $this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('DASHBOARDVIEW')]
= $this->dynamicDashboard;
}
@@ -1737,25 +1566,22 @@ class Infusion extends Interpretation
$target = array('admin' => 'import');
$this->buildDynamique($target, 'import');
// IMPORT_EXT_METHOD <<>>
- $this->fileContentDynamic['import'][$this->hhh
- . 'IMPORT_EXT_METHOD' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $this->fileContentDynamic['import'][Placefix::_h('IMPORT_EXT_METHOD')]
+ = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
ComponentbuilderHelper::getDynamicScripts('ext'),
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
// IMPORT_SETDATA_METHOD <<>>
- $this->fileContentDynamic['import'][$this->hhh
- . 'IMPORT_SETDATA_METHOD' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $this->fileContentDynamic['import'][Placefix::_h('IMPORT_SETDATA_METHOD')]
+ = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
ComponentbuilderHelper::getDynamicScripts('setdata'),
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
// IMPORT_SAVE_METHOD <<>>
- $this->fileContentDynamic['import'][$this->hhh
- . 'IMPORT_SAVE_METHOD' . $this->hhh]
- = PHP_EOL . PHP_EOL . $this->setPlaceholders(
+ $this->fileContentDynamic['import'][Placefix::_h('IMPORT_SAVE_METHOD')]
+ = PHP_EOL . PHP_EOL . CFactory::_('Placeholder')->update(
ComponentbuilderHelper::getDynamicScripts('save'),
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
}
@@ -1766,19 +1592,15 @@ class Infusion extends Interpretation
$target = array('admin' => 'ajax');
$this->buildDynamique($target, 'ajax');
// set the controller
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'REGISTER_AJAX_TASK' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('REGISTER_AJAX_TASK')]
= $this->setRegisterAjaxTask('admin');
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'AJAX_INPUT_RETURN' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('AJAX_INPUT_RETURN')]
= $this->setAjaxInputReturn('admin');
// set the model header
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'AJAX_ADMIN_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('AJAX_ADMIN_MODEL_HEADER')]
= $this->setFileHeader('ajax.admin.model', 'ajax');
// set the module
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'AJAX_MODEL_METHODS' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('AJAX_MODEL_METHODS')]
= $this->setAjaxModelMethods('admin');
}
@@ -1789,19 +1611,15 @@ class Infusion extends Interpretation
$target = array('site' => 'ajax');
$this->buildDynamique($target, 'ajax');
// set the controller
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'REGISTER_SITE_AJAX_TASK' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('REGISTER_SITE_AJAX_TASK')]
= $this->setRegisterAjaxTask('site');
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'AJAX_SITE_INPUT_RETURN' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('AJAX_SITE_INPUT_RETURN')]
= $this->setAjaxInputReturn('site');
// set the model header
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'AJAX_SITE_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('AJAX_SITE_MODEL_HEADER')]
= $this->setFileHeader('ajax.site.model', 'ajax');
// set the module
- $this->fileContentDynamic['ajax'][$this->hhh
- . 'AJAX_SITE_MODEL_METHODS' . $this->hhh]
+ $this->fileContentDynamic['ajax'][Placefix::_h('AJAX_SITE_MODEL_METHODS')]
= $this->setAjaxModelMethods('site');
}
@@ -1815,12 +1633,10 @@ class Infusion extends Interpretation
$target = array('admin' => 'a_rule_zi');
$this->buildDynamique($target, 'rule', $rule);
// set the JFormRule Name
- $this->fileContentDynamic['a_rule_zi_' . $rule][$this->hhh
- . 'Name' . $this->hhh]
+ $this->fileContentDynamic['a_rule_zi_' . $rule][Placefix::_h('Name')]
= ucfirst($rule);
// set the JFormRule PHP
- $this->fileContentDynamic['a_rule_zi_' . $rule][$this->hhh
- . 'VALIDATION_RULE_METHODS' . $this->hhh]
+ $this->fileContentDynamic['a_rule_zi_' . $rule][Placefix::_h('VALIDATION_RULE_METHODS')]
= PHP_EOL . $_php;
}
}
@@ -1844,11 +1660,11 @@ class Infusion extends Interpretation
}
// CONFIG_FIELDSETS
- $keepLang = $this->lang;
- $this->lang = 'admin';
+ $keepLang = CFactory::_('Config')->lang_target;
+ CFactory::_('Config')->lang_target = 'admin';
// run field sets for second time
$this->setConfigFieldsets(2);
- $this->lang = $keepLang;
+ CFactory::_('Config')->lang_target = $keepLang;
// setup front-views and all needed stuff for the site
if (isset($this->componentData->site_views)
@@ -1856,53 +1672,51 @@ class Infusion extends Interpretation
$this->componentData->site_views
))
{
- $this->target = 'site';
+ CFactory::_('Config')->build_target = 'site';
// start dynamic build
foreach ($this->componentData->site_views as $view)
{
// for list views
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SViews' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SViews')]
= $view['settings']->Code;
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'sviews' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('sviews')]
= $view['settings']->code;
// for single views
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SView' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SView')]
= $view['settings']->Code;
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'sview' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('sview')]
= $view['settings']->code;
// set placeholder
- $this->placeholders[$this->hhh . 'SView' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SView')]
= $view['settings']->Code;
- $this->placeholders[$this->hhh . 'sview' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('sview')]
= $view['settings']->code;
- $this->placeholders[$this->hhh . 'SVIEW' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SVIEW')]
= $view['settings']->CODE;
- $this->placeholders[$this->bbb . 'SView' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SView')]
= $view['settings']->Code;
- $this->placeholders[$this->bbb . 'sview' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('sview')]
= $view['settings']->code;
- $this->placeholders[$this->bbb . 'SVIEW' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SVIEW')]
= $view['settings']->CODE;
- $this->placeholders[$this->hhh . 'SViews' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SViews')]
= $view['settings']->Code;
- $this->placeholders[$this->hhh . 'sviews' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('sviews')]
= $view['settings']->code;
- $this->placeholders[$this->hhh . 'SVIEWS' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('SVIEWS')]
= $view['settings']->CODE;
- $this->placeholders[$this->bbb . 'SViews' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SViews')]
= $view['settings']->Code;
- $this->placeholders[$this->bbb . 'sviews' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('sviews')]
= $view['settings']->code;
- $this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('SVIEWS')]
= $view['settings']->CODE;
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildSiteViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@@ -1910,165 +1724,145 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$view['settings']->code],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
// set license per view if needed
$this->setLockLicensePer(
- $view['settings']->code, $this->target
+ $view['settings']->code, CFactory::_('Config')->build_target
);
// set the site default view
if (isset($view['default_view'])
&& $view['default_view'] == 1)
{
- $this->fileContentStatic[$this->hhh
- . 'SITE_DEFAULT_VIEW' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')]
= $view['settings']->code;
}
// add site menu
if (isset($view['menu']) && $view['menu'] == 1)
{
// SITE_MENU_XML <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_MENU_XML' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_MENU_XML')]
= $this->setCustomViewMenu($view);
}
// insure the needed route helper is loaded
- $this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTEHELPER')]
.= $this->setRouterHelp(
$view['settings']->code, $view['settings']->code, true
);
// build route details
- $this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_PARSE_SWITCH')]
.= $this->routerParseSwitch(
$view['settings']->code, $view
);
- $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')]
.= $this->routerBuildViews($view['settings']->code);
if ($view['settings']->main_get->gettype == 1)
{
// set user permission access check USER_PERMISSION_CHECK_ACCESS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'USER_PERMISSION_CHECK_ACCESS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('USER_PERMISSION_CHECK_ACCESS')]
= $this->setUserPermissionCheckAccess($view, 1);
// SITE_BEFORE_GET_ITEM <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_BEFORE_GET_ITEM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_BEFORE_GET_ITEM')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_before_getitem',
+ CFactory::_('Config')->build_target . '_php_before_getitem',
$view['settings']->code, '', null, true
);
// SITE_GET_ITEM <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_GET_ITEM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_GET_ITEM')]
= $this->setCustomViewGetItem(
$view['settings']->main_get,
- $view['settings']->code, $this->_t(2)
+ $view['settings']->code, Indent::_(2)
);
// SITE_AFTER_GET_ITEM <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_AFTER_GET_ITEM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_AFTER_GET_ITEM')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_after_getitem',
+ CFactory::_('Config')->build_target . '_php_after_getitem',
$view['settings']->code, '', null, true
);
}
elseif ($view['settings']->main_get->gettype == 2)
{
// set user permission access check USER_PERMISSION_CHECK_ACCESS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'USER_PERMISSION_CHECK_ACCESS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('USER_PERMISSION_CHECK_ACCESS')]
= $this->setUserPermissionCheckAccess($view, 2);
// SITE_GET_LIST_QUERY <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_GET_LIST_QUERY' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_GET_LIST_QUERY')]
= $this->setCustomViewListQuery(
$view['settings']->main_get, $view['settings']->code
);
// SITE_BEFORE_GET_ITEMS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_BEFORE_GET_ITEMS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_BEFORE_GET_ITEMS')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_before_getitems',
+ CFactory::_('Config')->build_target . '_php_before_getitems',
$view['settings']->code, PHP_EOL, null, true
);
// SITE_GET_ITEMS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_GET_ITEMS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_GET_ITEMS')]
= $this->setCustomViewGetItems(
$view['settings']->main_get, $view['settings']->code
);
// SITE_AFTER_GET_ITEMS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_AFTER_GET_ITEMS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_AFTER_GET_ITEMS')]
= $this->getCustomScriptBuilder(
- $this->target . '_php_after_getitems',
+ CFactory::_('Config')->build_target . '_php_after_getitems',
$view['settings']->code, PHP_EOL, null, true
);
}
// add to lang array
- $this->setLangContent(
+ CFactory::_('Language')->set(
'site',
- Config::get('lang_prefix') . '_' . $view['settings']->CODE,
+ CFactory::_('Config')->lang_prefix . '_' . $view['settings']->CODE,
$view['settings']->name
);
- $this->setLangContent(
+ CFactory::_('Language')->set(
'site',
- Config::get('lang_prefix') . '_' . $view['settings']->CODE
+ CFactory::_('Config')->lang_prefix . '_' . $view['settings']->CODE
. '_DESC', $view['settings']->description
);
// SITE_CUSTOM_METHODS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_CUSTOM_METHODS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_CUSTOM_METHODS')]
= $this->setCustomViewCustomItemMethods(
$view['settings']->main_get, $view['settings']->code
);
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_CUSTOM_METHODS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_CUSTOM_METHODS')]
.= $this->setCustomViewCustomMethods(
$view, $view['settings']->code
);
// SITE_DIPLAY_METHOD <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_DIPLAY_METHOD' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_DIPLAY_METHOD')]
= $this->setCustomViewDisplayMethod($view);
// set document details
$this->setPrepareDocument($view);
// SITE_EXTRA_DIPLAY_METHODS <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_EXTRA_DIPLAY_METHODS' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_EXTRA_DIPLAY_METHODS')]
= $this->setCustomViewExtraDisplayMethods($view);
// SITE_CODE_BODY <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_CODE_BODY' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_CODE_BODY')]
= $this->setCustomViewCodeBody($view);
// SITE_BODY <<>>
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_BODY' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_BODY')]
= $this->setCustomViewBody($view);
// setup the templates
$this->setCustomViewTemplateBody($view);
// set the site form if needed
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_TOP_FORM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_TOP_FORM')]
= $this->setCustomViewForm(
$view['settings']->code,
$view['settings']->main_get->gettype, 1
);
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_BOTTOM_FORM' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_BOTTOM_FORM')]
= $this->setCustomViewForm(
$view['settings']->code,
$view['settings']->main_get->gettype, 2
@@ -2084,27 +1878,23 @@ class Infusion extends Interpretation
&& $view['settings']->php_controller != '//')
{
// SITE_VIEW_CONTROLLER_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEW_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEW_CONTROLLER_HEADER')]
= $this->setFileHeader(
'site.view.controller', $view['settings']->code
);
}
// SITE_VIEW_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEW_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEW_MODEL_HEADER')]
= $this->setFileHeader(
'site.view.model', $view['settings']->code
);
// SITE_VIEW_HTML_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEW_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEW_HTML_HEADER')]
= $this->setFileHeader(
'site.view.html', $view['settings']->code
);
// SITE_VIEW_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEW_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEW_HEADER')]
= $this->setFileHeader(
'site.view', $view['settings']->code
);
@@ -2118,34 +1908,32 @@ class Infusion extends Interpretation
&& $view['settings']->php_controller != '//')
{
// SITE_VIEW_CONTROLLER_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEW_CONTROLLER_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEW_CONTROLLER_HEADER')]
= $this->setFileHeader(
'site.views.controller', $view['settings']->code
);
}
// SITE_VIEWS_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEWS_MODEL_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEWS_MODEL_HEADER')]
= $this->setFileHeader(
'site.views.model', $view['settings']->code
);
// SITE_VIEWS_HTML_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEWS_HTML_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEWS_HTML_HEADER')]
= $this->setFileHeader(
'site.views.html', $view['settings']->code
);
// SITE_VIEWS_HEADER <<>> add the header details for the view
- $this->fileContentDynamic[$view['settings']->code][$this->hhh
- . 'SITE_VIEWS_HEADER' . $this->hhh]
+ $this->fileContentDynamic[$view['settings']->code][Placefix::_h('SITE_VIEWS_HEADER')]
= $this->setFileHeader(
'site.views', $view['settings']->code
);
}
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildSiteViewContent',
array(&$this->componentContext, &$view,
&$view['settings']->code,
@@ -2153,6 +1941,8 @@ class Infusion extends Interpretation
&$this->fileContentDynamic[$view['settings']->code],
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
}
// setup the layouts
@@ -2166,181 +1956,150 @@ class Infusion extends Interpretation
// load the site statics
if (!$this->removeSiteFolder || !$this->removeSiteEditFolder)
{
- $this->target = 'site';
+ CFactory::_('Config')->build_target = 'site';
// if no default site view was set, the redirect to root
if (!isset(
- $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')]
))
{
- $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_DEFAULT_VIEW')]
= '';
}
// set site custom script to helper class
// SITE_CUSTOM_HELPER_SCRIPT
- $this->fileContentStatic[$this->hhh
- . 'SITE_CUSTOM_HELPER_SCRIPT' . $this->hhh]
- = $this->setPlaceholders(
+ $this->fileContentStatic[Placefix::_h('SITE_CUSTOM_HELPER_SCRIPT')]
+ = CFactory::_('Placeholder')->update(
$this->customScriptBuilder['component_php_helper_site'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
// SITE_GLOBAL_EVENT_HELPER
- if (!isset($this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT'
- . $this->hhh]))
+ if (!isset($this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT')]))
{
- $this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT'
- . $this->hhh] = '';
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT')] = '';
}
- if (!isset($this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]))
+ if (!isset($this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]))
{
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh] = '';
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')] = '';
}
// now load the data for the global event if needed
if ($this->componentData->add_site_event == 1)
{
- $this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT')]
.= PHP_EOL . PHP_EOL . '// Trigger the Global Site Event';
- $this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT'
- . $this->hhh]
- .= PHP_EOL . $this->fileContentStatic[$this->hhh
- . 'Component' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT')]
+ .= PHP_EOL . $this->fileContentStatic[Placefix::_h('Component')]
. 'Helper::globalEvent($document);';
// SITE_GLOBAL_EVENT_HELPER
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1)
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . PHP_EOL . Indent::_(1) . '/**';
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1)
. '* The Global Site Event Method.';
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1) . '**/';
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1)
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1) . '**/';
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1)
. 'public static function globalEvent($document)';
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1) . '{';
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->setPlaceholders(
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1) . '{';
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . CFactory::_('Placeholder')->update(
$this->customScriptBuilder['component_php_site_event'],
- $this->placeholders
+ CFactory::_('Placeholder')->active
);
- $this->fileContentStatic[$this->hhh
- . 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
- .= PHP_EOL . $this->_t(1) . '}';
+ $this->fileContentStatic[Placefix::_h('SITE_GLOBAL_EVENT_HELPER')]
+ .= PHP_EOL . Indent::_(1) . '}';
}
}
// PREINSTALLSCRIPT
- $this->fileContentStatic[$this->hhh . 'PREINSTALLSCRIPT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('PREINSTALLSCRIPT')]
= $this->getCustomScriptBuilder(
'php_preflight', 'install', PHP_EOL, null, true
);
// PREUPDATESCRIPT
- $this->fileContentStatic[$this->hhh . 'PREUPDATESCRIPT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('PREUPDATESCRIPT')]
= $this->getCustomScriptBuilder(
'php_preflight', 'update', PHP_EOL, null, true
);
// POSTINSTALLSCRIPT
- $this->fileContentStatic[$this->hhh . 'POSTINSTALLSCRIPT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('POSTINSTALLSCRIPT')]
= $this->setPostInstallScript();
// POSTUPDATESCRIPT
- $this->fileContentStatic[$this->hhh . 'POSTUPDATESCRIPT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('POSTUPDATESCRIPT')]
= $this->setPostUpdateScript();
// UNINSTALLSCRIPT
- $this->fileContentStatic[$this->hhh . 'UNINSTALLSCRIPT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('UNINSTALLSCRIPT')]
= $this->setUninstallScript();
// MOVEFOLDERSSCRIPT
- $this->fileContentStatic[$this->hhh . 'MOVEFOLDERSSCRIPT'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('MOVEFOLDERSSCRIPT')]
= $this->setMoveFolderScript();
// MOVEFOLDERSMETHOD
- $this->fileContentStatic[$this->hhh . 'MOVEFOLDERSMETHOD'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('MOVEFOLDERSMETHOD')]
= $this->setMoveFolderMethod();
// HELPER_UIKIT
- $this->fileContentStatic[$this->hhh . 'HELPER_UIKIT' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('HELPER_UIKIT')]
= $this->setUikitHelperMethods();
// CONFIG_FIELDSETS
- $this->fileContentStatic[$this->hhh . 'CONFIG_FIELDSETS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('CONFIG_FIELDSETS')]
= implode(PHP_EOL, $this->configFieldSets);
// check if this has been set
if (!isset(
- $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')]
)
|| !StringHelper::check(
- $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')]
))
{
- $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
- . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')]
= 0;
}
else
{
- $this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
- . $this->hhh]
- = '(' . $this->fileContentStatic[$this->hhh
- . 'ROUTER_BUILD_VIEWS' . $this->hhh] . ')';
+ $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')]
+ = '(' . $this->fileContentStatic[Placefix::_h('ROUTER_BUILD_VIEWS')] . ')';
}
// README
if ($this->componentData->addreadme)
{
- $this->fileContentStatic[$this->hhh . 'README' . $this->hhh]
+ $this->fileContentStatic[Placefix::_h('README')]
= $this->componentData->readme;
}
// remove all the power placeholders
- $this->fileContentStatic[$this->hhh . 'ADMIN_POWER_HELPER' . $this->hhh] = '';
- $this->fileContentStatic[$this->hhh . 'SITE_POWER_HELPER' . $this->hhh] = '';
- $this->fileContentStatic[$this->hhh . 'CUSTOM_POWER_AUTOLOADER' . $this->hhh] = '';
+ $this->fileContentStatic[Placefix::_h('ADMIN_POWER_HELPER')] = '';
+ $this->fileContentStatic[Placefix::_h('SITE_POWER_HELPER')] = '';
+ $this->fileContentStatic[Placefix::_h('CUSTOM_POWER_AUTOLOADER')] = '';
// infuse powers data if set
- if (ArrayHelper::check($this->powers))
+ if (ArrayHelper::check(CFactory::_('Power')->active))
{
// start the autoloader
$autoloader = array();
- foreach ($this->powers as $power)
+ foreach (CFactory::_('Power')->active as $power)
{
if (ObjectHelper::check($power))
{
// Trigger Event: jcb_ce_onBeforeInfusePowerData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeInfusePowerData',
array(&$this->componentContext, &$power, &$this)
);
// POWERCODE
- $this->fileContentDynamic[$power->key][$this->hhh
- . 'POWERCODE' . $this->hhh]
+ $this->fileContentDynamic[$power->key][Placefix::_h('POWERCODE')]
= $this->getPowerCode($power);
// build the autoloader
$autoloader[implode('.', $power->_namespace_prefix)] = $power->_namespace_prefix;
// Trigger Event: jcb_ce_onAfterInfusePowerData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterInfusePowerData',
array(&$this->componentContext, &$power, &$this)
);
@@ -2350,9 +2109,9 @@ class Infusion extends Interpretation
$this->setPowersAutoloader($autoloader, (!$this->removeSiteFolder || !$this->removeSiteEditFolder));
}
// tweak system to set stuff to the module domain
- $_backup_target = $this->target;
- $_backup_lang = $this->lang;
- $_backup_langPrefix = Config::get('lang_prefix');
+ $_backup_target = CFactory::_('Config')->build_target;
+ $_backup_lang = CFactory::_('Config')->lang_target;
+ $_backup_langPrefix = CFactory::_('Config')->lang_prefix;
// infuse module data if set
if (ArrayHelper::check($this->joomlaModules))
{
@@ -2361,42 +2120,37 @@ class Infusion extends Interpretation
if (ObjectHelper::check($module))
{
// Trigger Event: jcb_ce_onBeforeInfuseModuleData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeInfuseModuleData',
array(&$this->componentContext, &$module, &$this)
);
- $this->target = $module->key;
- $this->lang = $module->key;
+ CFactory::_('Config')->build_target = $module->key;
+ CFactory::_('Config')->lang_target = $module->key;
$this->langPrefix = $module->lang_prefix;
- Config::set('lang_prefix', $module->lang_prefix);
+ CFactory::_('Config')->set('lang_prefix', $module->lang_prefix);
// MODCODE
- $this->fileContentDynamic[$module->key][$this->hhh
- . 'MODCODE' . $this->hhh]
+ $this->fileContentDynamic[$module->key][Placefix::_h('MODCODE')]
= $this->getModCode($module);
// DYNAMICGET
- $this->fileContentDynamic[$module->key][$this->hhh
- . 'DYNAMICGETS' . $this->hhh]
+ $this->fileContentDynamic[$module->key][Placefix::_h('DYNAMICGETS')]
= $this->setCustomViewCustomMethods(
$module, $module->key
);
// HELPERCODE
if ($module->add_class_helper >= 1)
{
- $this->fileContentDynamic[$module->key][$this->hhh
- . 'HELPERCODE' . $this->hhh]
+ $this->fileContentDynamic[$module->key][Placefix::_h('HELPERCODE')]
= $this->getModHelperCode($module);
}
// MODDEFAULT
- $this->fileContentDynamic[$module->key][$this->hhh
- . 'MODDEFAULT' . $this->hhh]
+ $this->fileContentDynamic[$module->key][Placefix::_h('MODDEFAULT')]
= $this->getModDefault($module, $module->key);
// only add install script if needed
if ($module->add_install_script)
{
// INSTALLCLASS
- $this->fileContentDynamic[$module->key][$this->hhh
- . 'INSTALLCLASS' . $this->hhh]
- = (new InstallScript($module))->get();
+ $this->fileContentDynamic[$module->key][Placefix::_h('INSTALLCLASS')]
+ = CFactory::_J('Extension.InstallScript')->get($module);
}
// FIELDSET
if (isset($module->form_files)
@@ -2411,9 +2165,8 @@ class Infusion extends Interpretation
foreach ($fieldsets as $fieldset => $fields)
{
// FIELDSET_ . $file.$field_name.$fieldset
- $this->fileContentDynamic[$module->key][$this->hhh
- . 'FIELDSET_' . $file . $field_name
- . $fieldset . $this->hhh]
+ $this->fileContentDynamic[$module->key][Placefix::_h('FIELDSET_'
+ . $file . $field_name . $fieldset)]
= $this->getExtensionFieldsetXML(
$module, $fields
);
@@ -2422,11 +2175,10 @@ class Infusion extends Interpretation
}
}
// MAINXML
- $this->fileContentDynamic[$module->key][$this->hhh
- . 'MAINXML' . $this->hhh]
+ $this->fileContentDynamic[$module->key][Placefix::_h('MAINXML')]
= $this->getModuleMainXML($module);
// Trigger Event: jcb_ce_onAfterInfuseModuleData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterInfuseModuleData',
array(&$this->componentContext, &$module, &$this)
);
@@ -2441,25 +2193,23 @@ class Infusion extends Interpretation
if (ObjectHelper::check($plugin))
{
// Trigger Event: jcb_ce_onBeforeInfusePluginData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeInfusePluginData',
array(&$this->componentContext, &$plugin, &$this)
);
- $this->target = $plugin->key;
- $this->lang = $plugin->key;
+ CFactory::_('Config')->build_target = $plugin->key;
+ CFactory::_('Config')->lang_target = $plugin->key;
$this->langPrefix = $plugin->lang_prefix;
- Config::set('lang_prefix', $plugin->lang_prefix);
+ CFactory::_('Config')->set('lang_prefix', $plugin->lang_prefix);
// MAINCLASS
- $this->fileContentDynamic[$plugin->key][$this->hhh
- . 'MAINCLASS' . $this->hhh]
+ $this->fileContentDynamic[$plugin->key][Placefix::_h('MAINCLASS')]
= $this->getPluginMainClass($plugin);
// only add install script if needed
if ($plugin->add_install_script)
{
// INSTALLCLASS
- $this->fileContentDynamic[$plugin->key][$this->hhh
- . 'INSTALLCLASS' . $this->hhh]
- = (new InstallScript($plugin))->get();
+ $this->fileContentDynamic[$plugin->key][Placefix::_h('INSTALLCLASS')]
+ = CFactory::_J('Extension.InstallScript')->get($plugin);
}
// FIELDSET
if (isset($plugin->form_files)
@@ -2474,9 +2224,8 @@ class Infusion extends Interpretation
foreach ($fieldsets as $fieldset => $fields)
{
// FIELDSET_ . $file.$field_name.$fieldset
- $this->fileContentDynamic[$plugin->key][$this->hhh
- . 'FIELDSET_' . $file . $field_name
- . $fieldset . $this->hhh]
+ $this->fileContentDynamic[$plugin->key][Placefix::_h(
+ 'FIELDSET_' . $file . $field_name . $fieldset)]
= $this->getExtensionFieldsetXML(
$plugin, $fields
);
@@ -2485,11 +2234,10 @@ class Infusion extends Interpretation
}
}
// MAINXML
- $this->fileContentDynamic[$plugin->key][$this->hhh
- . 'MAINXML' . $this->hhh]
+ $this->fileContentDynamic[$plugin->key][Placefix::_h('MAINXML')]
= $this->getPluginMainXML($plugin);
// Trigger Event: jcb_ce_onAfterInfusePluginData
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterInfusePluginData',
array(&$this->componentContext, &$plugin, &$this)
);
@@ -2497,17 +2245,21 @@ class Infusion extends Interpretation
}
}
// rest globals
- $this->target = $_backup_target;
- $this->lang = $_backup_lang;
+ CFactory::_('Config')->build_target = $_backup_target;
+ CFactory::_('Config')->lang_target = $_backup_lang;
$this->langPrefix = $_backup_langPrefix;
- Config::set('lang_prefix', $_backup_langPrefix);
+ CFactory::_('Config')->set('lang_prefix', $_backup_langPrefix);
+ // for plugin event TODO change event api signatures
+ $this->placeholders = CFactory::_('Placeholder')->active;
// Trigger Event: jcb_ce_onAfterBuildFilesContent
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onAfterBuildFilesContent',
array(&$this->componentContext, &$this->componentData,
&$this->fileContentStatic, &$this->fileContentDynamic,
&$this->placeholders, &$this->hhh)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Placeholder')->active = $this->placeholders;
return true;
}
@@ -2525,7 +2277,7 @@ class Infusion extends Interpretation
protected function setViewPlaceholders(&$view)
{
// just to be safe, lets clear previous view placeholders
- $this->clearFromPlaceHolders('view');
+ CFactory::_('Placeholder')->clearType('view');
// VIEW <<>>
if (isset($view->name_single) && $view->name_single != 'null')
@@ -2540,17 +2292,17 @@ class Infusion extends Interpretation
);
// set some place holder for the views
- $this->placeholders[$this->hhh . 'view' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('view')]
= $nameSingleCode;
- $this->placeholders[$this->hhh . 'View' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('View')]
= $name_single_first_uppercase;
- $this->placeholders[$this->hhh . 'VIEW' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('VIEW')]
= $name_single_uppercase;
- $this->placeholders[$this->bbb . 'view' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('view')]
= $nameSingleCode;
- $this->placeholders[$this->bbb . 'View' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('View')]
= $name_single_first_uppercase;
- $this->placeholders[$this->bbb . 'VIEW' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('VIEW')]
= $name_single_uppercase;
}
@@ -2566,43 +2318,37 @@ class Infusion extends Interpretation
);
// set some place holder for the views
- $this->placeholders[$this->hhh . 'views' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('views')]
= $nameListCode;
- $this->placeholders[$this->hhh . 'Views' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('Views')]
= $name_list_first_uppercase;
- $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]
+ CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')]
= $name_list_uppercase;
- $this->placeholders[$this->bbb . 'views' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('views')]
= $nameListCode;
- $this->placeholders[$this->bbb . 'Views' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('Views')]
= $name_list_first_uppercase;
- $this->placeholders[$this->bbb . 'VIEWS' . $this->ddd]
+ CFactory::_('Placeholder')->active[Placefix::_('VIEWS')]
= $name_list_uppercase;
}
// view <<>>
if (isset($nameSingleCode))
{
- $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'view'
- . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('view')]
= $nameSingleCode;
- $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VIEW'
- . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('VIEW')]
= $name_single_uppercase;
- $this->fileContentDynamic[$nameSingleCode][$this->hhh . 'View'
- . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('View')]
= $name_single_first_uppercase;
if (isset($nameListCode))
{
- $this->fileContentDynamic[$nameListCode][$this->hhh . 'view'
- . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('view')]
= $nameSingleCode;
- $this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEW'
- . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('VIEW')]
= $name_single_uppercase;
- $this->fileContentDynamic[$nameListCode][$this->hhh . 'View'
- . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('View')]
= $name_single_first_uppercase;
}
}
@@ -2610,29 +2356,20 @@ class Infusion extends Interpretation
// views <<>>
if (isset($nameListCode))
{
- $this->fileContentDynamic[$nameListCode][$this->hhh . 'views'
- . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('views')]
= $nameListCode;
- $this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEWS'
- . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('VIEWS')]
= $name_list_uppercase;
- $this->fileContentDynamic[$nameListCode][$this->hhh . 'Views'
- . $this->hhh]
+ $this->fileContentDynamic[$nameListCode][Placefix::_h('Views')]
= $name_list_first_uppercase;
if (isset($nameSingleCode))
{
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'views'
- . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('views')]
= $nameListCode;
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'VIEWS'
- . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('VIEWS')]
= $name_list_uppercase;
- $this->fileContentDynamic[$nameSingleCode][$this->hhh
- . 'Views'
- . $this->hhh]
+ $this->fileContentDynamic[$nameSingleCode][Placefix::_h('Views')]
= $name_list_first_uppercase;
}
}
@@ -2653,20 +2390,20 @@ class Infusion extends Interpretation
if ($this->setLangAdmin())
{
$values[] = array_values(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['admin']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['admin']
);
$mainLangLoader['admin'] = count(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['admin']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['admin']
);
}
// check the admin system lang is set
if ($this->setLangAdminSys())
{
$values[] = array_values(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['adminsys']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['adminsys']
);
$mainLangLoader['adminsys'] = count(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['adminsys']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['adminsys']
);
}
// check the site lang is set
@@ -2674,10 +2411,10 @@ class Infusion extends Interpretation
&& $this->setLangSite())
{
$values[] = array_values(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['site']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['site']
);
$mainLangLoader['site'] = count(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['site']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['site']
);
}
// check the site system lang is set
@@ -2685,27 +2422,29 @@ class Infusion extends Interpretation
&& $this->setLangSiteSys())
{
$values[] = array_values(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['sitesys']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['sitesys']
);
$mainLangLoader['sitesys'] = count(
- $this->languages['components'][Config::get('lang_tag', 'en-GB')]['sitesys']
+ $this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')]['sitesys']
);
}
$values = array_unique(ArrayHelper::merge($values));
// get the other lang strings if there is any
$this->multiLangString = $this->getMultiLangStrings($values);
// update insert the current lang in to DB
- $this->setLangPlaceholders($values, Config::get('component_id'));
+ $this->setLangPlaceholders($values, CFactory::_('Config')->component_id);
// remove old unused language strings
- $this->purgeLanuageStrings($values, Config::get('component_id'));
+ $this->purgeLanuageStrings($values, CFactory::_('Config')->component_id);
// path to INI file
$getPAth = $this->templatePath . '/en-GB.com_admin.ini';
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
- $this->triggerEvent(
+ CFactory::_J('Event')->trigger(
'jcb_ce_onBeforeBuildAllLangFiles',
array(&$this->componentContext, &$this->languages['components'],
&$this->langTag)
);
+ // for plugin event TODO change event api signatures
+ CFactory::_('Config')->lang_tag = $this->langTag;
// now we insert the values into the files
if (ArrayHelper::check($this->languages['components']))
{
@@ -2734,7 +2473,7 @@ class Infusion extends Interpretation
$t = '.sys';
}
// build the file name
- $file_name = $tag . '.com_' . Config::get('component_code_name') . $t
+ $file_name = $tag . '.com_' . CFactory::_('Config')->component_code_name . $t
. '.ini';
// check if language should be added
if ($this->shouldLanguageBeAdded(
@@ -2789,25 +2528,25 @@ class Infusion extends Interpretation
if (isset($langXML['admin'])
&& ArrayHelper::check($langXML['admin']))
{
- $replace[$this->hhh . 'ADMIN_LANGUAGES' . $this->hhh]
- = implode(PHP_EOL . $this->_t(3), $langXML['admin']);
+ $replace[Placefix::_h('ADMIN_LANGUAGES')]
+ = implode(PHP_EOL . Indent::_(3), $langXML['admin']);
}
if ((!$this->removeSiteFolder || !$this->removeSiteEditFolder)
&& isset($langXML['site'])
&& ArrayHelper::check($langXML['site']))
{
- $replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh]
- = implode(PHP_EOL . $this->_t(2), $langXML['site']);
+ $replace[Placefix::_h('SITE_LANGUAGES')]
+ = implode(PHP_EOL . Indent::_(2), $langXML['site']);
}
// build xml path
- $xmlPath = $this->componentPath . '/' . Config::get('component_code_name')
+ $xmlPath = $this->componentPath . '/' . CFactory::_('Config')->component_code_name
. '.xml';
// get the content in xml
$componentXML = FileHelper::getContent(
$xmlPath
);
// update the xml content
- $componentXML = $this->setPlaceholders($componentXML, $replace);
+ $componentXML = CFactory::_('Placeholder')->update($componentXML, $replace);
// store the values back to xml
$this->writeFile($xmlPath, $componentXML);
}
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index a4cb1bba7..895288ce3 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -3230,6 +3230,8 @@ COM_COMPONENTBUILDER_CONDITIONS="Conditions"
COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix"
+COM_COMPONENTBUILDER_CONFIG_ADD_PLACEHOLDERS_DESCRIPTION="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
+COM_COMPONENTBUILDER_CONFIG_ADD_PLACEHOLDERS_LABEL="Add Custom Code Placeholders"
COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS="Admin Custom Tabs (tabs)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_ADDFIELDS="Admin Fields (addfields)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS="Admin Fields Conditions (addconditions)"
@@ -3341,12 +3343,12 @@ COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION="Select the plugin you would like to use in JCB's compiler"
COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL="Activate Compiler Plugins"
-COM_COMPONENTBUILDER_CONFIG_COMPONENT="Component"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS="Component Admin Views (addadmin_views)"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS="Component Custom Admin Menus (addcustommenus)"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS="Component Custom Admin Views (addcustom_admin_views)"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_DASHBOARD_DASHBOARD_TAB="Component Dashboard (dashboard_tab)"
-COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL="Component"
+COM_COMPONENTBUILDER_CONFIG_COMPONENT_ID="Component Id"
+COM_COMPONENTBUILDER_CONFIG_COMPONENT_ID_LABEL="Component"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS="Component Site Views (addsite_views)"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_UPDATES_VERSION_UPDATE="Component Updates (version_update)"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to."
@@ -3604,8 +3606,6 @@ COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_LABEL="Package Name Placeho
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION="Select percentage any language should be translated before the system should add the language to the component during compilation."
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL="Add Language if %? ready."
COM_COMPONENTBUILDER_CONFIG_PHP_MAIL="PHP Mail"
-COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
-COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL="Add Custom Code Placeholders"
COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER="Remote Server"
COM_COMPONENTBUILDER_CONFIG_REPEATABLETABLE_JOOMLA="Repeatable-table (joomla)"
COM_COMPONENTBUILDER_CONFIG_REPEATABLE_JOOMLA="Repeatable (Joomla)"
@@ -5597,8 +5597,13 @@ 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_HTHREEEXTERNAL_CODE_ERRORHTHREE="External Code Error "
+COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE="External Code Notice "
+COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE="External Code Warning "
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.
"
+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!
"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE="Data is corrupt! This could be due to key error , or broken package!"
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BROKEN_PACKAGE="Data is corrupt! This could be due to broken package!"
@@ -5607,6 +5612,7 @@ COM_COMPONENTBUILDER_HTWOWE_COULD_NOT_OPEN_THE_PACKAGEHTWOTHIS_COULD_BE_DUE_TO_T
COM_COMPONENTBUILDER_IAUTHORI_BSB="Author: %s "
COM_COMPONENTBUILDER_ICOMPANYI_BSB="Company: %s "
COM_COMPONENTBUILDER_ICON="Icon"
+COM_COMPONENTBUILDER_ID_MISMATCH_WAS_DETECTED_WITH_THE_SSSS_GUI_CODE_FIELD_SO_THE_PLACEHOLDER_WAS_NOT_SET="ID mismatch was detected with the %s.%s.%s.%s GUI code field. So the placeholder was not set."
COM_COMPONENTBUILDER_IEMAILI_BSB="Email: %s "
COM_COMPONENTBUILDER_IMPORT_BY_GUID_ONLY="Import by GUID only!"
COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue"
@@ -8108,12 +8114,14 @@ COM_COMPONENTBUILDER_POWER_USE_SELECTION_LABEL="Use Selection"
COM_COMPONENTBUILDER_POWER_VERSION_DESC="A count of the number of times this Power has been revised."
COM_COMPONENTBUILDER_POWER_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_POWER_YES="Yes"
+COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="Power guid:%s not found!
"
COM_COMPONENTBUILDER_PROPERTIES="Properties"
COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="PropertiesHere you can set the properties for this field. "
COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER="Property already selected, try another."
COM_COMPONENTBUILDER_PROPERTY_NAME="Property Name"
COM_COMPONENTBUILDER_PROPERTY_VALUE="Property Value"
+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_PUBLIC_ACCESS="Public Access"
COM_COMPONENTBUILDER_PUBLISHED="Published"
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
@@ -8967,6 +8975,8 @@ COM_COMPONENTBUILDER_S_BEING_IMPORTED="%s Being Imported"
COM_COMPONENTBUILDER_S_NOT_LINKED="%s Not Linked"
COM_COMPONENTBUILDER_S_PLEASE_WAIT="%s, please wait!"
COM_COMPONENTBUILDER_S_S_NUMBER_BSB_COULD_NOT_BE_DOWNLOADED_SUCCESSFULLY_TO_THIS_JOOMLA_INSTALL="%s (%s) number %s could not be downloaded successfully to this Joomla Install!"
+COM_COMPONENTBUILDER_S_WE_DETECTED_A_CHANGE_IN_BEXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_CHANGE_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected a change in EXTERNALCODE , but you do not have permission to allow this change so %s was removed from the compilation. Please contact your system administrator for more info!(admin access required) "
+COM_COMPONENTBUILDER_S_WE_DETECTED_BNEW_EXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_NEW_CODESTRING_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOU_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected NEW EXTERNALCODE , but you do not have permission to allow this new code/string so %s was removed from the compilation. Please contact you system administrator for more info!(admin access required) "
COM_COMPONENTBUILDER_TAB="Tab"
COM_COMPONENTBUILDER_TABLE_BSB_NOT_FOUND_IN_THE_LOCAL_DATABASE_SO_ITS_VALUES_COULD_NOT_BE_IMPORTED_PLEASE_UPDATE_YOUR_JCB_INSTALL_AND_TRY_AGAIN="Table %s not found in the local database so its values could not be imported, please update your JCB install and try again."
COM_COMPONENTBUILDER_TABLE_BSB_NOT_FOUND_IN_THE_LOCAL_DATABASE_SO_ITS_VALUES_COULD_NOT_BE_IMPORTED_THE_WHOLE_POWERS_FEATURE_IS_ONLY_AVAILABLE_TO_A_HREFSPRO_MEMBERSA_AT_THIS_TIME="Table %s not found in the local database so its values could not be imported. The whole powers feature is only available to PRO Members at this time."
@@ -9110,12 +9120,17 @@ COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVE
COM_COMPONENTBUILDER_THE_BONLY_IN_ADMIN_LIST_VIEWB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW_NOT_TO_ANY_LINKED_VIEWS="The Only in Admin List View option will only Add this field to the admin list view, not to any linked views."
COM_COMPONENTBUILDER_THE_BONLY_IN_LINKED_LIST_VIEWSB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_LINKED_LIST_VIEW_IF_THIS_VIEW_GETS_LINKED_TO_OTHER_VIEW_NOT_TO_THIS_ADMIN_LIST_VIEW="The Only in Linked List Views option will only Add this field to the linked list view, if this view gets linked to other view, not to this admin list view."
COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The phpseclib\NET\SFTP library\class is not available! This library\class should have been added to your libraries/vdm_io/vendor folder. Please contact your system administrator for more info"
+COM_COMPONENTBUILDER_THE_BSB_CUT_SEQUENCE_FAILED_ON_THE_RETURNED_EXTERNAL_CODESTRING_AS_MORE_LINES_HAS_TO_BE_CUT_THEN_WAS_FOUND_IN_THE_CODESTRING_WE_HAVE_COMPLETELY_REMOVED_THE_CODE_PLEASE_CHECK_THIS_CODESTRING="The %s cut sequence failed on the returned external code/string as more lines has to be cut then was found in the code/string. We have completely removed the code. Please check this code/string!"
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The %s file could not be moved to %s path on %s server."
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The %s file could not be moved to %s server."
+COM_COMPONENTBUILDER_THE_BSB_IS_NOT_A_VALID_URLPATH="The %s is not a valid url/path!"
COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESPHPSECLIBVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The %s library\class is not available! This library\class should have been added to your libraries/phpseclib/vendor folder. Please contact your system administrator for more info!"
COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The %s library can not be deleted, or things will break."
+COM_COMPONENTBUILDER_THE_BSB_RETURNED_AN_INVALID_STRING="The %s returned an invalid string!"
COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED="The Show in All List Views option will Add this field to all list views, admin & linked."
COM_COMPONENTBUILDER_THE_BSINGLE_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_JUST_ONE_VALUE_IN_THIS_FILTERFIELD="The single filter selection option allows the user to select just one value in this filter/field."
+COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_ADDED_FOR_THE_BFIRST_TIMEB_PLEASE_IINVESTIGATEI_TO_ENSURE_THE_CORRECT_CODESTRING_WAS_USED_BSHOULD_YOU_NOT_KNOW_ABOUT_THIS_NEW_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_DANGER_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB="The code/string from %s has been added for the first time . Please investigate to ensure the correct code/string was used! Should you not know about this NEW external code/string being added, then this is a serious danger! and requires immediate attention! Do not ignore this warning as it will only show once ."
+COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_BCHANGEDB_SINCE_THE_LAST_COMPILATION_PLEASE_INVESTIGATE_TO_ENSURE_THE_CHANGES_ARE_SAFE_BSHOULD_YOU_NOT_EXPECT_THIS_CHANGE_TO_THE_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_ISSUE_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB="The code/string from %s has been changed since the last compilation. Please investigate to ensure the changes are safe! Should you not expect this change to the external code/string being added, then this is a serious issue! and requires immediate attention! Do not ignore this warning as it will only show once ."
COM_COMPONENTBUILDER_THE_COMPONENT="The Component"
COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views"
COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config"
diff --git a/admin/models/compiler.php b/admin/models/compiler.php
index ff338e856..d8b405e61 100644
--- a/admin/models/compiler.php
+++ b/admin/models/compiler.php
@@ -202,18 +202,10 @@ class ComponentbuilderModelCompiler extends ListModel
return true;
}
- public function builder($version, $id, $backup, $repo, $addPlaceholders, $addPowers, $debugLinenr, $minify)
+ public function builder()
{
- $set['version'] = $version;
- $set['component'] = $id;
- $set['backup'] = $backup;
- $set['repository'] = $repo;
- $set['placeholders'] = $addPlaceholders;
- $set['powers'] = $addPowers;
- $set['debuglinenr'] = $debugLinenr;
- $set['minify'] = $minify;
// run compiler
- $this->compiler = new Compiler($set);
+ $this->compiler = new Compiler();
if($this->compiler)
{
return true;
diff --git a/admin/models/powers.php b/admin/models/powers.php
index 55c580c18..9a3f0a281 100644
--- a/admin/models/powers.php
+++ b/admin/models/powers.php
@@ -158,6 +158,8 @@ class ComponentbuilderModelPowers extends ListModel
continue;
}
+ // remove dots
+ $item->namespace = str_replace('.','\\', $item->namespace);
}
}
diff --git a/admin/views/compiler/tmpl/default.php b/admin/views/compiler/tmpl/default.php
index 9618879fe..24a3811f9 100644
--- a/admin/views/compiler/tmpl/default.php
+++ b/admin/views/compiler/tmpl/default.php
@@ -33,7 +33,7 @@ Joomla.submitbutton = function(task, key)
if (task == ''){
return false;
} else {
- var component = jQuery('#component').val();
+ var component = jQuery('#component_id').val();
var isValid = true;
if(component == '' && task == 'compiler.compiler'){
@@ -56,7 +56,7 @@ Joomla.submitbutton = function(task, key)
// some ui movements
if (task == 'compiler.compiler'){
// get the component name
- let component_name = jQuery("#component option:selected").text();
+ let component_name = jQuery("#component_id option:selected").text();
// set the component name
jQuery(".component-name").text(component_name);
// wait a little since to much is happening...
@@ -189,9 +189,9 @@ jQuery('
')
// token
var token = '= JSession::getFormToken() ?>';
var all_is_good = '= JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME') ?>';
-jQuery('#compilerForm').on('change', '#component',function (e)
+jQuery('#compilerForm').on('change', '#component_id',function (e)
{
- var component = jQuery('#component').val();
+ var component = jQuery('#component_id').val();
if(component == "") {
jQuery('#component-details').html("= $selectNotice ?>");
jQuery("#noticeboard").show();
diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php
index 689e0509d..970ebbf4c 100644
--- a/admin/views/compiler/view.html.php
+++ b/admin/views/compiler/view.html.php
@@ -133,7 +133,7 @@ class ComponentbuilderViewCompiler extends HtmlView
// placeholders attributes
$attributes = array(
'type' => 'radio',
- 'name' => 'placeholders',
+ 'name' => 'add_placeholders',
'label' => 'COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS',
'class' => 'btn-group btn-group-yesno',
'description' => 'COM_COMPONENTBUILDER_SHOULD_JCB_INSERT_THE_CUSTOM_CODE_PLACEHOLDERS_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_CUSTOM_CODE',
@@ -148,7 +148,7 @@ class ComponentbuilderViewCompiler extends HtmlView
// debuglinenr attributes
$attributes = array(
'type' => 'radio',
- 'name' => 'debuglinenr',
+ 'name' => 'debug_line_nr',
'label' => 'COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS',
'class' => 'btn-group btn-group-yesno',
'description' => 'COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING',
@@ -190,7 +190,7 @@ class ComponentbuilderViewCompiler extends HtmlView
// component attributes
$attributes = array(
'type' => 'list',
- 'name' => 'component',
+ 'name' => 'component_id',
'label' => 'COM_COMPONENTBUILDER_COMPONENTS',
'class' => 'list_class',
'description' => 'COM_COMPONENTBUILDER_SELECT_THE_COMPONENT_TO_COMPILE',
diff --git a/admin/views/powers/tmpl/default_body.php b/admin/views/powers/tmpl/default_body.php
index 830c1199d..4c886a499 100644
--- a/admin/views/powers/tmpl/default_body.php
+++ b/admin/views/powers/tmpl/default_body.php
@@ -71,7 +71,7 @@ $edit = "index.php?option=com_componentbuilder&view=powers&task=power.edit";
- escape($item->namespace); ?>
+ namespace; ?>
:
@@ -80,7 +80,8 @@ $edit = "index.php?option=com_componentbuilder&view=powers&task=power.edit";
escape($item->extends_name); ?>
escape($item->extends_name); ?>
-
+ extends === '-1') : ?>
:
+ escape($item->extends_custom); ?>
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 4a6de3979..3a5f4b84d 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 21st August, 2022
+ 30th August, 2022
Llewellyn van der Merwe
joomla@vdm.io
https://dev.vdm.io
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php
new file mode 100644
index 000000000..f0c1320eb
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/Placeholder.php
@@ -0,0 +1,144 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Component;
+
+
+use Joomla\CMS\Factory;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\GetHelper;
+use VDM\Joomla\Utilities\JsonHelper;
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
+
+
+/**
+ * Get a Components Global Placeholders
+ *
+ * @since 3.2.0
+ */
+class Placeholder
+{
+ /**
+ * Placeholders
+ *
+ * @var arraya
+ * @since 3.2.0
+ **/
+ protected $placeholders = null;
+
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected $config;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var \JDatabaseDriver
+ * @since 3.2.0
+ **/
+ protected $db;
+
+ /**
+ * Constructor.
+ *
+ * @param Config $config The compiler config object.
+ * @param \JDatabaseDriver $db The Database Driver object.
+ *
+ * @since 3.2.0
+ **/
+ public function __construct(?Config $config = null, ?\JDatabaseDriver $db = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ $this->db = $db ?: Factory::getDbo();
+ }
+
+ /**
+ * get all System Placeholders
+ *
+ * @return array The global placeholders
+ *
+ * @since 3.2.0
+ */
+ public function get()
+ {
+ // set only once
+ if (is_array($this->placeholders))
+ {
+ return $this->placeholders;
+ }
+
+ // load the config
+ $config = $this->config;
+ // load the db
+ $db = $this->db;
+ // reset bucket
+ $bucket = array();
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->select($db->quoteName(array('a.target', 'a.value')));
+ // from these tables
+ $query->from('#__componentbuilder_placeholder AS a');
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ // Load the items
+ $db->execute();
+ if ($db->getNumRows())
+ {
+ $bucket = $db->loadAssocList('target', 'value');
+ // open all the code
+ foreach ($bucket as $key => &$code)
+ {
+ $code = base64_decode($code);
+ }
+ }
+
+ // set component place holders
+ $bucket[Placefix::_h('component')] = $config->component_code_name;
+ $bucket[Placefix::_h('Component')] = StringHelper::safe($config->component_code_name, 'F');
+ $bucket[Placefix::_h('COMPONENT')] = StringHelper::safe($config->component_code_name, 'U');
+ $bucket[Placefix::_('component')] = $bucket[Placefix::_h('component')];
+ $bucket[Placefix::_('Component')] = $bucket[Placefix::_h('Component')];
+ $bucket[Placefix::_('COMPONENT')] = $bucket[Placefix::_h('COMPONENT')];
+ $bucket[Placefix::_h('LANG_PREFIX')] = $config->lang_prefix;
+ $bucket[Placefix::_('LANG_PREFIX')] = $bucket[Placefix::_h('LANG_PREFIX')];
+
+ // get the current components overrides
+ if (($_placeholders = GetHelper::var(
+ 'component_placeholders', $config->component_id,
+ 'joomla_component', 'addplaceholders'
+ )) !== false
+ && JsonHelper::check($_placeholders))
+ {
+ $_placeholders = json_decode($_placeholders, true);
+ if (ArrayHelper::check($_placeholders))
+ {
+ foreach ($_placeholders as $row)
+ {
+ $bucket[$row['target']] = $row['value'];
+ }
+ }
+ }
+
+ $this->placeholders = $bucket;
+
+ return $bucket;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extension/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/index.html
similarity index 100%
rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extension/index.html
rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Component/index.html
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
index 96d8cbcbb..933ff6bc4 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
@@ -12,167 +12,492 @@
namespace VDM\Joomla\Componentbuilder\Compiler;
-use Joomla\Registry\Registry;
+use Joomla\Registry\Registry;
+use Joomla\CMS\Factory;
+use Joomla\Input\Input;
use VDM\Joomla\Utilities\Component\Helper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\String\ClassfunctionHelper;
/**
- * Compiler Configurations Registry
+ * Compiler Configurations
*
- * @since 3.1.6
+ * @since 3.2.0
*/
class Config extends Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable
{
+ /**
+ * Hold a JInput object for easier access to the input variables.
+ *
+ * @var Input
+ * @since 3.2.0
+ */
+ protected $input;
+
/**
* The Params
*
* @var Registry
- * @since 3.1.6
+ * @since 3.2.0
*/
protected Registry $params;
/**
* Constructor
*
- * @param array $config The data to bind to the new Config object.
- * @param Registry $params The component parameters
+ * @param Input|null $input Input
+ * @param Registry|null $params The component parameters
*
- * @since 3.1.6
+ * @throws \Exception
+ * @since 3.2.0
*/
- public function __construct(array $config, ?Registry $params = null)
+ public function __construct(?Input $input = null, ?Registry $params = null)
{
- // Set the params
+ $this->input = $input ?: Factory::getApplication()->input;
$this->params = $params ?: Helper::getParams('com_componentbuilder');
- // Instantiate the internal data object.
- $this->data = new \stdClass;
+ // use underscore as the separator
+ $this->separator = '_';
- // Load the config to the data object
- $this->bindData($this->data, $this->modelConfig($config));
+ // Instantiate the internal data object.
+ $this->data = new \stdClass();
}
/**
- * model the configuration data array
+ * setting any config value
*
- * @param array $config The data to bind to the new Config object.
+ * @param String $key The value's key/path name
+ * @param mixed $value Optional default value, returned if the internal value is null.
*
- * @return array
- * @since 3.1.6
+ * @since 3.2.0
*/
- protected function modelConfig(array $config): array
+ public function __set($key, $value)
{
- // we do not yet have this set as an option
- $config['remove_line_breaks']
- = 2; // 2 is global (use the components value)
+ $this->set($key, $value);
+ }
- // set the minfy switch of the JavaScript
- $config['minify'] = (isset($config['minify']) && $config['minify'] != 2)
- ? $config['minify'] : $this->params->get('minify', 0);
+ /**
+ * getting any valid value
+ *
+ * @param String $key The value's key/path name
+ *
+ * @since 3.2.0
+ * @throws \InvalidArgumentException If $key is not a valid function name.
+ */
+ public function __get($key)
+ {
+ // function name with no underscores
+ $method = 'get' . ucfirst(ClassfunctionHelper::safe(str_replace('_', '', $key)));
- // set the global language
- $config['lang_tag'] = $this->params->get('language', 'en-GB');
+ if (($value = $this->get($key, '__N0T_S3T_')) !== '__N0T_S3T_')
+ {
+ return $value;
+ }
+ elseif (method_exists($this, $method))
+ {
+ $value = $this->{$method}();
- // check if we have Tidy enabled
- $config['tidy'] = extension_loaded('Tidy');
+ $this->set($key, $value);
- // set the field type builder
- $config['field_builder_type'] = $this->params->get(
- 'compiler_field_builder_type', 2
+ return $value;
+ }
+
+ throw new \InvalidArgumentException(sprintf('Argument %s could not be found as function [%s], or path.', $key, $method));
+ }
+
+ /**
+ * Get a registry value.
+ *
+ * @param string $path Registry path (e.g. joomla.content.showauthor)
+ * @param mixed $default Optional default value, returned if the internal value is null.
+ *
+ * @return mixed Value of entry or null
+ *
+ * @since 3.2.0
+ */
+ public function get($path, $default = null)
+ {
+ // function name with no underscores
+ $method = 'get' . ucfirst(ClassfunctionHelper::safe(str_replace('_', '', $path)));
+
+ // check if it has been set
+ if (($value = parent::get($path, '__N0T_S3T_Y3T_')) !== '__N0T_S3T_Y3T_')
+ {
+ return $value;
+ }
+ elseif (method_exists($this, $method))
+ {
+ $value = $this->{$method}();
+
+ $this->set($path, $value);
+
+ return $value;
+ }
+
+ return $default;
+ }
+
+ /**
+ * get posted component id
+ *
+ * @return int Component id
+ * @since 3.2.0
+ */
+ protected function getComponentid(): int
+ {
+ return $this->input->post->get('component_id', 0, 'INT');
+ }
+
+ /**
+ * get components code name
+ *
+ * @return string The components code name
+ * @since 3.2.0
+ */
+ protected function getComponentcodename(): string
+ {
+ // get components code name
+ return StringHelper::safe(GetHelper::var(
+ 'joomla_component', $this->component_id, 'id', 'name_code'
+ ));
+ }
+
+ /**
+ * get component context
+ *
+ * @return string The component context
+ * @since 3.2.0
+ */
+ protected function getComponentcontext(): string
+ {
+ // get component context
+ return $this->component_code_name . '.' . $this->component_id;
+ }
+
+ /**
+ * get component code name length
+ *
+ * @return int The component code name length
+ * @since 3.2.0
+ */
+ protected function getComponentcodenamelength(): int
+ {
+ // get component name length
+ return strlen($this->component_code_name);
+ }
+
+ /**
+ * get posted Joomla version
+ *
+ * @return int Joomla version code
+ * @since 3.2.0
+ */
+ protected function getJoomlaversion(): int
+ {
+ return $this->input->post->get('joomla_version', 3, 'INT');
+ }
+
+ /**
+ * get posted Joomla version name
+ *
+ * @return string Joomla version code name
+ * @since 3.2.0
+ */
+ protected function getJoomlaversionname(): string
+ {
+ return StringHelper::safe($this->joomla_version);
+ }
+
+ /**
+ * get indentation value
+ *
+ * @return string Indentation value
+ * @since 3.2.0
+ */
+ protected function getIndentationvalue(): string
+ {
+ return "\t"; // TODO add to GUI as an Global Option?
+ }
+
+ /**
+ * get posted backup switch
+ *
+ * @return int Backup switch number
+ * @since 3.2.0
+ */
+ protected function getBackup(): int
+ {
+ return $this->input->post->get('backup', 0, 'INT');
+ }
+
+ /**
+ * get posted repository switch
+ *
+ * @return int Repository switch number
+ * @since 3.2.0
+ */
+ protected function getRepository(): int
+ {
+ return $this->input->post->get('repository', 0, 'INT');
+ }
+
+ /**
+ * get posted debuglinenr switch
+ *
+ * @return int Debuglinenr switch number
+ * @since 3.2.0
+ */
+ protected function getDebuglinenr(): int
+ {
+ // get posted value
+ $value = $this->input->post->get('debug_line_nr', 2, 'INT');
+
+ // get active value
+ $add = ($value == 0) ? false : (
+ ($value == 1) ? true : (
+ ((int) GetHelper::var('joomla_component', $this->component_id, 'id', 'debug_linenr' ) == 1) ? true : false
+ )
);
- // load the compiler path
- $config['compiler_path'] = $this->params->get(
+ return $add;
+ }
+
+ /**
+ * get posted minify switch
+ *
+ * @return int Minify switch number
+ * @since 3.2.0
+ */
+ protected function getMinify(): int
+ {
+ $minify = $this->input->post->get('minify', 2, 'INT');
+
+ // if value is 2 use global value
+ $minify = ($minify != 2) ? $minify : $this->params->get('minify', 0);
+
+ return $minify;
+ }
+
+ /**
+ * get posted remove line breaks switch
+ *
+ * @return bool Remove line breaks switch number
+ * @since 3.2.0
+ */
+ protected function getRemovelinebreaks(): bool
+ {
+ $value = 2; // 2 is global (use the components value) TODO: get from post
+
+ // get active value
+ $remove = ($value == 0) ? false : (
+ ($value == 1) ? true : (
+ ((int) GetHelper::var('joomla_component', $this->component_id, 'id', 'remove_line_breaks' ) == 1) ? true : false
+ )
+ );
+
+ return $remove;
+ }
+
+ /**
+ * get system tidy state
+ *
+ * @return bool Tidy is active
+ * @since 3.2.0
+ */
+ protected function getTidy(): bool
+ {
+ // check if we have Tidy enabled
+ return \extension_loaded('Tidy');
+ }
+
+ /**
+ * get language tag
+ *
+ * @return string The active language tag
+ * @since 3.2.0
+ */
+ protected function getLangtag(): string
+ {
+ // get the global language
+ return $this->params->get('language', 'en-GB');
+ }
+
+ /**
+ * get language prefix
+ *
+ * @return string The language prefix
+ * @since 3.2.0
+ */
+ protected function getLangprefix(): string
+ {
+ // get components code name
+ return 'COM_' . StringHelper::safe(GetHelper::var(
+ 'joomla_component', $this->component_id, 'id', 'name_code'
+ ), 'U');
+ }
+
+ /**
+ * get language target
+ *
+ * @return string The language active target
+ * @since 3.2.0
+ */
+ protected function getLangtarget(): string
+ {
+ // we start with admin
+ // but this is a switch value and is changed many times
+ return 'admin';
+ }
+
+ /**
+ * get language string targets
+ *
+ * @return array The language prefix
+ * @since 3.2.0
+ */
+ protected function getLangstringtargets(): array
+ {
+ // these strings are used to search for language strings in all content
+ return array_values($this->lang_string_key_targets);
+ }
+
+ /**
+ * get language string targets (by key name)
+ *
+ * @return array The language prefix
+ * @since 3.2.0
+ */
+ protected function getLangstringkeytargets(): array
+ {
+ // these strings are used to search for language strings in all content
+ return [
+ 'jjt' => 'Joomla' . '.JText._(',
+ 'js' => 'JText:' . ':script(',
+ 't' => 'Text:' . ':_(', // namespace and J version will be found
+ 'ts' => 'Text:' . ':sprintf(', // namespace and J version will be found
+ 'jt' => 'JustTEXT:' . ':_('
+ ];
+ }
+
+ /**
+ * get field builder type
+ *
+ * @return int The field builder type
+ * @since 3.2.0
+ */
+ protected function getFieldbuildertype(): int
+ {
+ // get the field type builder
+ return $this->params->get(
+ 'compiler_field_builder_type', 2
+ );
+ }
+
+ /**
+ * get compiler path
+ *
+ * @return string The compiler path
+ * @since 3.2.0
+ */
+ protected function getCompilerpath(): string
+ {
+ // get the compiler path
+ return $this->params->get(
'compiler_folder_path',
JPATH_COMPONENT_ADMINISTRATOR . '/compiler'
);
+ }
- // load the jcb powers path
- $config['jcb_powers_path'] = $this->params->get(
- 'jcb_powers_path',
- 'libraries/jcb_powers');
+ /**
+ * get jcb powers path
+ *
+ * @return string The jcb powers path
+ * @since 3.2.0
+ */
+ protected function getJcbpowerspath(): string
+ {
+ // get jcb powers path
+ return $this->params->get('jcb_powers_path', 'libraries/jcb_powers');
+ }
- // set the component ID
- $config['component_id'] = (int)$config['component'];
- // TODO set up stream correctly
- unset($config['component']);
+ /**
+ * get switch to add assets table fix
+ *
+ * @return int Switch number to add assets table fix
+ * @since 3.2.0
+ */
+ protected function getAddassetstablefix(): int
+ {
+ // get global add assets table fix
+ $global = $this->params->get(
+ 'assets_table_fix', 1
+ );
- // set this components code name
- if ($name_code = GetHelper::var(
- 'joomla_component', $config['component_id'], 'id', 'name_code'
- )) {
- // set lang prefix
- $config['lang_prefix'] = 'COM_' . StringHelper::safe(
- $name_code, 'U'
- );
+ // get component value
+ $add = (($add_assets_table_fix = (int) GetHelper::var(
+ 'joomla_component', $this->component_id, 'id',
+ 'assets_table_fix'
+ )) == 3) ? $global : $add_assets_table_fix;
- // set component code name
- $config['component_code_name'] = StringHelper::safe(
- $name_code
- );
+ return $add;
+ }
- // set component context
- $config['component_context'] = $config['component_code_name'] . '.'
- . $config['component_id'];
+ /**
+ * get switch add placeholders
+ *
+ * @return bool Switch to add placeholders
+ * @since 3.2.0
+ */
+ protected function getAddplaceholders(): bool
+ {
+ // get posted value
+ $value = $this->input->post->get('add_placeholders', 2, 'INT');
- // set the component name length
- $config['component_code_name_length'] = strlen(
- $config['component_code_name']
- );
+ // get active value
+ $add = ($value == 0) ? false : (
+ ($value == 1) ? true : (
+ ((int) GetHelper::var('joomla_component', $this->component_id, 'id', 'add_placeholders' ) == 1) ? true : false
+ )
+ );
- // add assets table fix
- $global = (int)$this->params->get(
- 'assets_table_fix', 1
- );
- $config['add_assets_table_fix'] = (($add_assets_table_fix
- = (int)GetHelper::var(
- 'joomla_component', $config['component_id'], 'id',
- 'assets_table_fix'
- )) == 3) ? $global : $add_assets_table_fix;
+ return $add;
+ }
- // set if language strings line breaks should be removed
- $global = ((int)GetHelper::var(
- 'joomla_component', $config['component_id'], 'id',
- 'remove_line_breaks'
- ) == 1) ? true : false;
- $config['remove_line_breaks'] = ((int)$config['remove_line_breaks']
- == 0)
- ? false
- : (((int)$config['remove_line_breaks'] == 1) ? true
- : $global);
+ /**
+ * get switch add power
+ *
+ * @return bool Switch to add power
+ * @since 3.2.0
+ */
+ protected function getAddpower(): bool
+ {
+ // get posted value
+ $value = $this->input->post->get('powers', 2, 'INT');
- // set if placeholders should be added to customcode
- $global = ((int)GetHelper::var(
- 'joomla_component', $config['component_id'], 'id',
- 'add_placeholders'
- ) == 1) ? true : false;
- $config['add_placeholders'] = ((int)$config['placeholders'] == 0)
- ? false
- : (((int)$config['placeholders'] == 1) ? true : $global);
- // TODO set up stream correctly
- unset($config['placeholders']);
+ // get active value
+ $add = ($value == 0) ? false : (
+ ($value == 1) ? true : (
+ ((int) GetHelper::var('joomla_component', $this->component_id, 'id', 'add_powers' ) == 1) ? true : false
+ )
+ );
- // set if line numbers should be added to comments
- $global = ((int)GetHelper::var(
- 'joomla_component', $config['component_id'], 'id',
- 'debug_linenr'
- ) == 1) ? true : false;
- $config['debug_line_nr'] = ((int)$config['debuglinenr'] == 0) ? false
- : (((int)$config['debuglinenr'] == 1) ? true : $global);
+ return $add;
+ }
- // set if powers should be added to component (default is true)
- $global = ((int)GetHelper::var(
- 'joomla_component', $config['component_id'], 'id',
- 'add_powers'
- ) == 1) ? true : false;
- $config['add_power'] = (isset($config['powers']) && (int)$config['powers'] == 0)
- ? false : ((isset($config['powers']) && (int)$config['powers'] == 1) ? true : $global);
- // TODO set up stream correctly
- unset($config['powers']);
- }
-
- return $config;
- }
+ /**
+ * get switch build target switch
+ *
+ * @return string Switch to control the build flow
+ * @since 3.2.0
+ */
+ protected function getBuildtarget(): string
+ {
+ // we start with admin
+ // but this is a switch value and is changed many times
+ return 'admin';
+ }
+
}
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode.php
new file mode 100644
index 000000000..9777f1bac
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode.php
@@ -0,0 +1,635 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler;
+
+
+use Joomla\CMS\Factory;
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\GetHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
+use VDM\Joomla\Componentbuilder\Compiler\Language\Extractor;
+use VDM\Joomla\Componentbuilder\Compiler\Customcode\External;
+use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
+
+
+/**
+ * Compiler Custom Code
+ *
+ * @since 3.2.0
+ */
+class Customcode
+{
+ /**
+ * The function name memory ids
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ public array $functionNameMemory = [];
+
+ /**
+ * The active custom code
+ *
+ * @var array
+ * @since 3.2.0
+ */
+ public $active = [];
+
+ /**
+ * The custom code memory
+ *
+ * @var array
+ * @since 3.2.0
+ */
+ public $memory = [];
+
+ /**
+ * The placeholders for custom code keys
+ *
+ * @var array
+ */
+ protected $keys
+ = array(
+ '[' => '[',
+ ']' => ']',
+ ',' => ',',
+ '+' => '+',
+ '=' => '='
+ );
+
+ /**
+ * The custom code to be added
+ *
+ * @var array
+ * @since 3.2.0
+ */
+ protected $data = [];
+
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected Config $config;
+
+ /**
+ * Compiler Placeholder
+ *
+ * @var Placeholder
+ * @since 3.2.0
+ **/
+ protected Placeholder $placeholder;
+
+ /**
+ * Compiler Language Extractor
+ *
+ * @var Extractor
+ * @since 3.2.0
+ **/
+ protected Extractor $extractor;
+
+ /**
+ * Compiler Custom Code External
+ *
+ * @var External
+ * @since 3.2.0
+ **/
+ protected External $external;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var \JDatabaseDriver
+ * @since 3.2.0
+ **/
+ protected $db;
+
+ /**
+ * Constructor.
+ *
+ * @param Config|null $config The compiler config object.
+ * @param Placeholder|null $placeholder The compiler placeholder object.
+ * @param Extract|null $extractor The compiler language extractor object.
+ * @param External|null $external The compiler external custom code object.
+ * @param \JDatabaseDriver $db The Database Driver object.
+ *
+ * @since 3.2.0
+ */
+ public function __construct(?Config $config = null, ?Placeholder $placeholder = null,
+ ?Extractor $extractor = null, ?External $external = null, ?\JDatabaseDriver $db = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ $this->placeholder = $placeholder ?: Compiler::_('Placeholder');
+ $this->extractor = $extractor ?: Compiler::_('Language.Extractor');
+ $this->external = $external ?: Compiler::_('Customcode.External');
+ $this->db = $db ?: Factory::getDbo();
+ }
+
+ /**
+ * Set the **ALL** dynamic values in a strings here
+ *
+ * @param string $string The content to check
+ * @param int $debug The switch to debug the update
+ * We can now at any time debug the
+ * dynamic build values if it gets broken
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function add(string $string, int $debug = 0): string
+ {
+ if (StringHelper::check($string))
+ {
+ $string = $this->extractor->engine(
+ $this->set(
+ $this->external->set($string, $debug), $debug
+ )
+ );
+ }
+ // if debug
+ if ($debug)
+ {
+ jexit();
+ }
+
+ return $string;
+ }
+
+ /**
+ * We start set the custom code data & can load it in to string
+ *
+ * @param string $string The content to check
+ * @param int $debug The switch to debug the update
+ * @param int|null $not The not switch
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function set(string $string, int $debug = 0, ?int $not = null): string
+ {
+ // insure the code is loaded
+ $loaded = false;
+ // check if content has custom code place holder
+ if (strpos($string, '[CUSTO' . 'MCODE=') !== false)
+ {
+ // if debug
+ if ($debug)
+ {
+ echo 'Custom Code String:';
+ var_dump($string);
+ }
+ // the ids found in this content
+ $bucket = array();
+ $found = GetHelper::allBetween(
+ $string, '[CUSTO' . 'MCODE=', ']'
+ );
+ if (ArrayHelper::check($found))
+ {
+ foreach ($found as $key)
+ {
+ // if debug
+ if ($debug)
+ {
+ echo '$key before update:';
+ var_dump($key);
+ }
+ // check if we have args
+ if (is_numeric($key))
+ {
+ $id = (int) $key;
+ }
+ elseif (StringHelper::check($key)
+ && strpos(
+ $key, '+'
+ ) === false)
+ {
+ $getFuncName = trim($key);
+ if (!isset($this->functionNameMemory[$getFuncName]))
+ {
+ if (!$found_local = GetHelper::var(
+ 'custom_code', $getFuncName, 'function_name',
+ 'id'
+ ))
+ {
+ continue;
+ }
+ $this->functionNameMemory[$getFuncName]
+ = $found_local;
+ }
+ $id = (int) $this->functionNameMemory[$getFuncName];
+ }
+ elseif (StringHelper::check($key)
+ && strpos(
+ $key, '+'
+ ) !== false)
+ {
+ $array = explode('+', $key);
+ // set ID
+ if (is_numeric($array[0]))
+ {
+ $id = (int) $array[0];
+ }
+ elseif (StringHelper::check($array[0]))
+ {
+ $getFuncName = trim($array[0]);
+ if (!isset($this->functionNameMemory[$getFuncName]))
+ {
+ if (!$found_local
+ = GetHelper::var(
+ 'custom_code', $getFuncName,
+ 'function_name', 'id'
+ ))
+ {
+ continue;
+ }
+ $this->functionNameMemory[$getFuncName]
+ = $found_local;
+ }
+ $id = (int) $this->functionNameMemory[$getFuncName];
+ }
+ else
+ {
+ continue;
+ }
+ // load args for this ID
+ if (isset($array[1]))
+ {
+ if (!isset($this->data[$id]['args']))
+ {
+ $this->data[$id]['args'] = array();
+ }
+ // only load if not already loaded
+ if (!isset($this->data[$id]['args'][$key]))
+ {
+ if (strpos($array[1], ',') !== false)
+ {
+ // update the function values with the custom code key placholdres (this allow the use of [] + and , in the values)
+ $this->data[$id]['args'][$key]
+ = array_map(
+ function ($_key) {
+ return $this->placeholder->update(
+ $_key,
+ $this->keys
+ );
+ }, (array) explode(',', $array[1])
+ );
+ }
+ elseif (StringHelper::check(
+ $array[1]
+ ))
+ {
+ $this->data[$id]['args'][$key]
+ = array();
+ // update the function values with the custom code key placeholders (this allow the use of [] + and , in the values)
+ $this->data[$id]['args'][$key][]
+ = $this->placeholder->update(
+ $array[1],
+ $this->keys
+ );
+ }
+ }
+ }
+ }
+ else
+ {
+ continue;
+ }
+ // make sure to remove the not if set
+ if ($not && is_numeric($not) && $not > 0 && $not == $id)
+ {
+ continue;
+ }
+ $bucket[$id] = $id;
+ }
+ }
+ // if debug
+ if ($debug)
+ {
+ echo 'Bucket:';
+ var_dump($bucket);
+ }
+ // check if any custom code placeholders where found
+ if (ArrayHelper::check($bucket))
+ {
+ $_tmpLang = $this->config->lang_target;
+ // insure we add the langs to both site and admin
+ $this->config->lang_target = 'both';
+ // now load the code to memory
+ $loaded = $this->load($bucket, false, $debug);
+ // revert lang to current setting
+ $this->config->lang_target = $_tmpLang;
+ }
+ // if debug
+ if ($debug)
+ {
+ echo 'Loaded:';
+ var_dump($loaded);
+ }
+ // when the custom code is loaded
+ if ($loaded === true)
+ {
+ $string = $this->insert($bucket, $string, $debug);
+ }
+ // if debug
+ if ($debug)
+ {
+ echo 'Custom Code String After Update:';
+ var_dump($string);
+ }
+ }
+
+ return $string;
+ }
+
+ /**
+ * Load the custom code from the system
+ *
+ * @param array|null $ids The custom code ides if known
+ * @param bool $setLang The set lang switch
+ * @param int $debug The switch to debug the update
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ public function load(?array $ids = null, bool $setLang = true, $debug = 0): bool
+ {
+ // should the result be stored in memory
+ $loadInMemory = false;
+ // Create a new query object.
+ $query = $this->db->getQuery(true);
+ $query->from(
+ $this->db->quoteName('#__componentbuilder_custom_code', 'a')
+ );
+ if (ArrayHelper::check($ids))
+ {
+ if ($idArray = $this->check($ids))
+ {
+ $query->select(
+ $this->db->quoteName(
+ array('a.id', 'a.code', 'a.comment_type')
+ )
+ );
+ $query->where(
+ $this->db->quoteName('a.id') . ' IN (' . implode(
+ ',', $idArray
+ ) . ')'
+ );
+ $query->where(
+ $this->db->quoteName('a.target') . ' = 2'
+ ); // <--- to load the correct target
+ $loadInMemory = true;
+ }
+ else
+ {
+ // all values are already in memory continue
+ return true;
+ }
+ }
+ else
+ {
+ $query->select(
+ $this->db->quoteName(
+ array('a.id', 'a.code', 'a.comment_type', 'a.component',
+ 'a.from_line', 'a.hashtarget', 'a.hashendtarget',
+ 'a.path', 'a.to_line', 'a.type')
+ )
+ );
+ $query->where(
+ $this->db->quoteName('a.component') . ' = '
+ . (int) $this->config->component_id
+ );
+ $query->where(
+ $this->db->quoteName('a.target') . ' = 1'
+ ); // <--- to load the correct target
+ $query->order(
+ $this->db->quoteName('a.from_line') . ' ASC'
+ ); // <--- insure we always add code from top of file
+ // reset custom code
+ $this->active = array();
+ }
+ $query->where($this->db->quoteName('a.published') . ' >= 1');
+ $this->db->setQuery($query);
+ $this->db->execute();
+ if ($this->db->getNumRows())
+ {
+ $bucket = $this->db->loadAssocList('id');
+ // open the code
+ foreach ($bucket as $nr => &$customCode)
+ {
+ $customCode['code'] = base64_decode($customCode['code']);
+ // always insure that the external code is loaded
+ $customCode['code'] = $this->external->set(
+ $customCode['code']
+ );
+ // set the lang only if needed
+ if ($setLang)
+ {
+ $customCode['code'] = $this->extractor->engine(
+ $customCode['code']
+ );
+ }
+ // check for more custom code (since this is a custom code placeholder)
+ else
+ {
+ $customCode['code'] = $this->set(
+ $customCode['code'], $debug, $nr
+ );
+ }
+ // build the hash array
+ if (isset($customCode['hashtarget']))
+ {
+ $customCode['hashtarget'] = explode(
+ "__", $customCode['hashtarget']
+ );
+ // is this a replace code, set end has array
+ if ($customCode['type'] == 1
+ && strpos(
+ $customCode['hashendtarget'], '__'
+ ) !== false)
+ {
+ $customCode['hashendtarget'] = explode(
+ "__", $customCode['hashendtarget']
+ );
+ // NOW see if this is an end of page target (TODO not sure if the string is always d41d8cd98f00b204e9800998ecf8427e)
+ // I know this fix is not air-tight, but it should work as the value of an empty line when md5'ed is ^^^^
+ // Then if the line number is only >>>one<<< it is almost always end of the page.
+ // So I am using those two values to detect end of page replace ending, to avoid mismatching the ending target hash.
+ if ($customCode['hashendtarget'][0] == 1
+ && 'd41d8cd98f00b204e9800998ecf8427e'
+ === $customCode['hashendtarget'][1])
+ {
+ // unset since this will force the replacement unto end of page.
+ unset($customCode['hashendtarget']);
+ }
+ }
+ }
+ }
+ // load this code into memory if needed
+ if ($loadInMemory === true)
+ {
+ $this->memory = $this->memory + $bucket;
+ }
+ $this->active = array_merge($this->active, $bucket);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Insert the custom code into the string
+ *
+ * @param array|null $ids The custom code ides if known
+ * @param string $string The string to insert custom code into
+ * @param int $debug The switch to debug the update
+ *
+ * @return string on success
+ * @since 3.2.0
+ */
+ protected function insert(array $ids, string $string, int $debug = 0)
+ {
+ $code = array();
+ // load the code
+ foreach ($ids as $id)
+ {
+ $this->buildPlaceholders(
+ $this->memory[$id], $code, $debug
+ );
+ }
+ // if debug
+ if ($debug)
+ {
+ echo 'Place holders to Update String:';
+ var_dump($code);
+ echo 'Custom Code String Before Update:';
+ var_dump($string);
+ }
+
+ // now update the string
+ return $this->placeholder->update($string, $code);
+ }
+
+ /**
+ * Build custom code placeholders
+ *
+ * @param array $item The memory item
+ * @param array $code The custom code bucket
+ * @param int $debug The switch to debug the update
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function buildPlaceholders(array $item, array &$code, int $debug = 0)
+ {
+ // check if there is args for this code
+ if (isset($this->data[$item['id']]['args'])
+ && ArrayHelper::check(
+ $this->data[$item['id']]['args']
+ ))
+ {
+ // since we have args we cant update this code via IDE (TODO)
+ $placeholder = $this->placeholder->keys(3, null);
+ // if debug
+ if ($debug)
+ {
+ echo 'Custom Code Placeholders:';
+ var_dump($placeholder);
+ }
+ // we have args and so need to load each
+ foreach (
+ $this->data[$item['id']]['args'] as $key => $args
+ )
+ {
+ $this->placeholder->setType('arg', $args);
+ // if debug
+ if ($debug)
+ {
+ echo 'Custom Code Global Placeholders:';
+ var_dump($this->placeholder->active);
+ }
+ $code['[CUSTOM' . 'CODE=' . $key . ']'] = $placeholder['start']
+ . PHP_EOL . $this->placeholder->update(
+ $item['code'], $this->placeholder->active
+ ) . $placeholder['end'];
+ }
+ // always clear the args
+ $this->placeholder->clearType('arg');
+ }
+ else
+ {
+ if (($keyPlaceholder = array_search(
+ $item['id'], $this->functionNameMemory
+ )) === false)
+ {
+ $keyPlaceholder = $item['id'];
+ }
+ // check what type of place holders we should load here
+ $placeholderType = (int) $item['comment_type'] . '2';
+ if (stripos($item['code'], Placefix::b() . 'view') !== false
+ || stripos($item['code'], Placefix::b() . 'sview') !== false
+ || stripos($item['code'], Placefix::b() . 'arg') !== false)
+ {
+ // if view is being set dynamicly then we can't update this code via IDE (TODO)
+ $placeholderType = 3;
+ }
+ // if now ars were found, clear it
+ $this->placeholder->clearType('arg');
+ // load args for this code
+ $placeholder = $this->placeholder->keys(
+ $placeholderType, $item['id']
+ );
+ $code['[CUSTOM' . 'CODE=' . $keyPlaceholder . ']']
+ = $placeholder['start'] . PHP_EOL
+ . $this->placeholder->update(
+ $item['code'], $this->placeholder->active
+ ) . $placeholder['end'];
+ }
+ }
+
+ /**
+ * check if we already have these ids in local memory
+ *
+ * @param array $ids The custom code ids
+ *
+ * @return Mixed
+ * @since 3.2.0
+ */
+ protected function check(array $ids)
+ {
+ // reset custom code
+ $this->active = [];
+
+ foreach ($ids as $pointer => $id)
+ {
+ if (isset($this->memory[$id]))
+ {
+ $this->active[] = $this->memory[$id];
+ unset($ids[$pointer]);
+ }
+ }
+
+ // check if any ids left to fetch
+ if (ArrayHelper::check($ids))
+ {
+ return $ids;
+ }
+
+ return false;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/External.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/External.php
new file mode 100644
index 000000000..685c0baba
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/External.php
@@ -0,0 +1,406 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Customcode;
+
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\User\User;
+use Joomla\CMS\Application\CMSApplication;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Filesystem\Path;
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\GetHelper;
+use VDM\Joomla\Utilities\FileHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
+
+
+/**
+ * Compiler External Custom Code
+ *
+ * @since 3.2.0
+ */
+class External
+{
+ /**
+ * The external code/string to be added
+ *
+ * @var array
+ * @since 3.2.0
+ */
+ protected array $code = [];
+
+ /**
+ * The external code/string cutter
+ *
+ * @var array
+ * @since 3.2.0
+ */
+ protected array $cutter = [];
+
+ /**
+ * Compiler Placeholder
+ *
+ * @var Placeholder
+ * @since 3.2.0
+ **/
+ protected Placeholder $placeholder;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var \JDatabaseDriver
+ * @since 3.2.0
+ **/
+ protected \JDatabaseDriver $db;
+
+ /**
+ * User object
+ *
+ * @var User
+ * @since 3.2.0
+ **/
+ protected User $user;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var CMSApplication
+ * @since 3.2.0
+ **/
+ protected CMSApplication $app;
+
+ /**
+ * Constructor.
+ *
+ * @param Placeholder|null $placeholder The compiler placeholder object.
+ * @param \JDatabaseDriver|null $db The Database Driver object.
+ * @param User|null $user The User object.
+ * @param CMSApplication|null $app The CMS Application object.
+ *
+ * @throws \Exception
+ * @since 3.2.0
+ */
+ public function __construct(?Placeholder $placeholder = null,
+ ?\JDatabaseDriver $db = null, ?User $user = null, ?CMSApplication $app = null)
+ {
+ $this->placeholder = $placeholder ?: Compiler::_('Placeholder');
+ $this->db = $db ?: Factory::getDbo();
+ $this->user = $user ?: Factory::getUser();
+ $this->app = $app ?: Factory::getApplication();
+ }
+
+ /**
+ * Set the external code string & load it in to string
+ *
+ * @param string $string The content to check
+ * @param int $debug The switch to debug the update
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function set(string $string, int $debug = 0): string
+ {
+ // check if content has custom code placeholder
+ if (strpos($string, '[EXTERNA' . 'LCODE=') !== false)
+ {
+ // if debug
+ if ($debug)
+ {
+ echo 'External Code String:';
+ var_dump($string);
+ }
+ // target content
+ $bucket = array();
+ $found = GetHelper::allBetween(
+ $string, '[EXTERNA' . 'LCODE=', ']'
+ );
+ if (ArrayHelper::check($found))
+ {
+ // build local bucket
+ foreach ($found as $target)
+ {
+ // check for cutting sequence
+ // example: >{3|4
+ // will cut 3 rows at top and 4 rows at bottom
+ // if the external code has 8 or more lines
+ if (($pos = strpos($target, '>{')) !== false)
+ {
+ // the length
+ $target_len = strlen($target);
+ // where to cut
+ $cutting = $target_len - $pos;
+ // get the sequence
+ $sequence = substr($target, "-$cutting");
+ // remove from the URL
+ $target_url = str_replace($sequence, '', $target);
+ // set the cut key for this target if not set
+ $this->cutter[trim($target)] = str_replace('>{', '', $sequence);
+ }
+ else
+ {
+ $target_url = $target;
+ }
+ // check if the target is valid URL or path
+ if ((!filter_var($target_url, FILTER_VALIDATE_URL) === false
+ && FileHelper::exists($target_url))
+ || (Path::clean($target_url) === $target_url
+ && FileHelper::exists($target_url)))
+ {
+ $this->getCode($target, $bucket);
+ }
+ // give notice that target is not a valid url/path
+ else
+ {
+ // set key
+ $key = '[EXTERNA' . 'LCODE=' . $target . ']';
+ // set the notice
+ $this->app->enqueueMessage(
+ Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE'
+ ), 'Warning'
+ );
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_THE_BSB_IS_NOT_A_VALID_URLPATH',
+ $key
+ ), 'Warning'
+ );
+ // remove the placeholder
+ $bucket[$key] = '';
+ }
+ }
+ // now update local string if bucket has values
+ if (ArrayHelper::check($bucket))
+ {
+ $string = $this->placeholder->update($string, $bucket);
+ }
+ }
+ // if debug
+ if ($debug)
+ {
+ echo 'External Code String After Update:';
+ var_dump($string);
+ }
+ }
+
+ return $string;
+ }
+
+ /**
+ * Get the External Code/String
+ *
+ * @param string $string The content to check
+ * @param array $bucket The Placeholders bucket
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function getCode(string $target, array &$bucket)
+ {
+ // set URL key
+ $target_key = trim($target);
+ // set key
+ $key = '[EXTERNA' . 'LCODE=' . $target . ']';
+ // remove the cut sequence from the url
+ if (isset($this->cutter[$target_key]))
+ {
+ // remove from the URL
+ $target_url = trim(str_replace('>{' . $this->cutter[$target_key], '', $target));
+ }
+ else
+ {
+ $target_url = trim($target);
+ }
+ // check if we already fetched this
+ if (!isset($this->code[$target_key]))
+ {
+ // get the data string (code)
+ $this->code[$target_key]
+ = FileHelper::getContent($target_url);
+ // check if we must cut this
+ if (isset($this->cutter[$target_key]) &&
+ $this->cutter[$target_key])
+ {
+ $this->code[$target_key] = $this->cut(
+ $this->code[$target_key],
+ $this->cutter[$target_key],
+ $key
+ );
+ }
+ // did we get any value
+ if (StringHelper::check(
+ $this->code[$target_key]
+ ))
+ {
+ // check for changes
+ $live_hash = md5($this->code[$target_key]);
+ // check if it exists local
+ if ($hash = GetHelper::var(
+ 'external_code', $target_key, 'target', 'hash'
+ ))
+ {
+ // must be an admin make a change to use EXTERNAL code (we may add a custom access switch - use ADMIN for now)
+ if ($hash !== $live_hash && $this->user->authorise(
+ 'core.admin', 'com_componentbuilder'
+ ))
+ {
+ // update the hash since it changed
+ $object = new stdClass();
+ $object->target = $target_key;
+ $object->hash = $live_hash;
+ // update local hash
+ $this->db->updateObject(
+ '#__componentbuilder_external_code', $object,
+ 'target'
+ );
+ // give notice of the change
+ $this->app->enqueueMessage(
+ Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE'),
+ 'Warning'
+ );
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_BCHANGEDB_SINCE_THE_LAST_COMPILATION_PLEASE_INVESTIGATE_TO_ENSURE_THE_CHANGES_ARE_SAFE_BSHOULD_YOU_NOT_EXPECT_THIS_CHANGE_TO_THE_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_ISSUE_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB',
+ $key
+ ), 'Warning'
+ );
+ }
+ elseif ($hash !== $live_hash)
+ {
+ // set the notice
+ $this->app->enqueueMessage(
+ Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_ERRORHTHREE'),
+ 'Error'
+ );
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_S_WE_DETECTED_A_CHANGE_IN_BEXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_CHANGE_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL',
+ $this->user->get('name'), $key
+ ), 'Error'
+ );
+ // remove the code/string
+ $this->code[$target_key] = '';
+ }
+ }
+ // only an admin can add new EXTERNAL code (we may add a custom access switch - use ADMIN for now)
+ elseif ($this->user->authorise(
+ 'core.admin', 'com_componentbuilder'
+ ))
+ {
+ // add the hash to track changes
+ $object = new stdClass();
+ $object->target = $target_key;
+ $object->hash = $live_hash;
+ // insert local hash
+ $this->db->insertObject(
+ '#__componentbuilder_external_code', $object
+ );
+ // give notice the first time this is added
+ $this->app->enqueueMessage(
+ Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE'),
+ 'Warning'
+ );
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_ADDED_FOR_THE_BFIRST_TIMEB_PLEASE_IINVESTIGATEI_TO_ENSURE_THE_CORRECT_CODESTRING_WAS_USED_BSHOULD_YOU_NOT_KNOW_ABOUT_THIS_NEW_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_DANGER_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB',
+ $key
+ ), 'Warning'
+ );
+ }
+ else
+ {
+ // set the notice
+ $this->app->enqueueMessage(
+ Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_ERRORHTHREE'),
+ 'Error'
+ );
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_S_WE_DETECTED_BNEW_EXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_NEW_CODESTRING_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOU_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL',
+ $this->user->get('name'), $key
+ ), 'Error'
+ );
+ // remove the code/string
+ $this->code[$target_key] = '';
+ }
+ }
+ else
+ {
+ // set notice that we could not get a valid string from the target
+ $this->app->enqueueMessage(
+ Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE'), 'Error'
+ );
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_THE_BSB_RETURNED_AN_INVALID_STRING', $key
+ ), 'Error'
+ );
+ }
+ }
+ // add to local bucket
+ if (isset($this->code[$target_key]))
+ {
+ // update the placeholder with the external code string
+ $bucket[$key] = $this->code[$target_key];
+ }
+ else
+ {
+ // remove the placeholder
+ $bucket[$key] = '';
+ }
+ }
+
+ /**
+ * Cut the External Code/String
+ *
+ * @param string $string The content to cut
+ * @param string $sequence The cutting sequence
+ * @param string $key The content key
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ protected function cut(string $string, string $sequence, string $key): string
+ {
+ // we first break the string up in rows
+ $rows = (array) explode(PHP_EOL, $string);
+ // get the cutting sequence
+ $cutter = (array) explode('|', $sequence);
+ // we only continue if we have more rows than we have to cut
+ if (array_sum($cutter) < ArrayHelper::check($rows))
+ {
+ // remove the rows at the bottom if needed
+ if (isset($cutter[1]) && $cutter[1] > 0)
+ {
+ array_splice($rows, "-$cutter[1]");
+ }
+ // remove the rows at the top if needed
+ if ($cutter[0] > 0)
+ {
+ $rows = array_splice($rows, $cutter[0]);
+ }
+
+ // return the remaining rows
+ return implode(PHP_EOL, $rows);
+ }
+
+ // we set an error message about too few lines to cut
+ $this->app->enqueueMessage(
+ Text::_('COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE'),
+ 'Error'
+ );
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_THE_BSB_CUT_SEQUENCE_FAILED_ON_THE_RETURNED_EXTERNAL_CODESTRING_AS_MORE_LINES_HAS_TO_BE_CUT_THEN_WAS_FOUND_IN_THE_CODESTRING_WE_HAVE_COMPLETELY_REMOVED_THE_CODE_PLEASE_CHECK_THIS_CODESTRING',
+ $key
+ ), 'Error'
+ );
+
+ return '';
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Gui.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Gui.php
new file mode 100644
index 000000000..808aabcdb
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/Gui.php
@@ -0,0 +1,256 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Customcode;
+
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Application\CMSApplication;
+use Joomla\CMS\Language\Text;
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\GetHelper;
+use VDM\Joomla\Utilities\FileHelper;
+use VDM\Joomla\Utilities\String\FieldHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder\Reverse;
+
+
+/**
+ * Compiler Gui Custom Code
+ *
+ * @since 3.2.0
+ */
+class Gui
+{
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected Config $config;
+
+ /**
+ * Compiler Placeholder Reverse
+ *
+ * @var Reverse
+ * @since 3.2.0
+ **/
+ protected Reverse $reverse;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var \JDatabaseDriver
+ * @since 3.2.0
+ **/
+ protected \JDatabaseDriver $db;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var CMSApplication
+ * @since 3.2.0
+ **/
+ protected CMSApplication $app;
+
+ /**
+ * Constructor.
+ *
+ * @param Config|null $config The compiler config object.
+ * @param Reverse|null $reverse The compiler placeholder reverse object.
+ * @param \JDatabaseDriver|null $db The Database Driver object.
+ * @param CMSApplication|null $app The CMS Application object.
+ *
+ * @throws \Exception
+ * @since 3.2.0
+ */
+ public function __construct(?Config $config = null, ?Reverse $reverse = null,
+ ?\JDatabaseDriver $db = null, ?CMSApplication $app = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ $this->reverse = $reverse ?: Compiler::_('Placeholder.Reverse');
+ $this->db = $db ?: Factory::getDbo();
+ $this->app = $app ?: Factory::getApplication();
+ }
+
+ /**
+ * Set the JCB GUI code placeholder
+ *
+ * @param string $string The code string
+ * @param array $config The placeholder config values
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function set(string $string, array $config): string
+ {
+ if (StringHelper::check($string))
+ {
+ if ($this->config->get('add_placeholders', false)
+ && $this->check($string) && ArrayHelper::check($config)
+ && isset($config['table']) && StringHelper::check($config['table'])
+ && isset($config['field']) && StringHelper::check($config['field'])
+ && isset($config['type']) && StringHelper::check($config['type'])
+ && isset($config['id']) && is_numeric($config['id']))
+ {
+ // if we have a key we must get the ID
+ if (isset($config['key']) && StringHelper::check($config['key']) && $config['key'] !== 'id')
+ {
+ if (($id = GetHelper::var($config['table'], $config['id'], $config['key'], 'id')) !== false && is_numeric($id))
+ {
+ $config['id'] = $id;
+ }
+ else
+ {
+ // we must give a error message to inform the user of this issue. (should never happen)
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_ID_MISMATCH_WAS_DETECTED_WITH_THE_SSSS_GUI_CODE_FIELD_SO_THE_PLACEHOLDER_WAS_NOT_SET',
+ $config['table'], $config['field'],
+ $config['key'], $config['id']
+ ), 'Error'
+ );
+ // check some config
+ if (!isset($config['prefix']))
+ {
+ $config['prefix'] = '';
+ }
+
+ return $config['prefix'] . $string;
+ }
+ }
+ // check some config
+ if (!isset($config['prefix']))
+ {
+ $config['prefix'] = PHP_EOL;
+ }
+ // add placeholder based on type of code
+ switch (strtolower($config['type']))
+ {
+ // adding with html commenting
+ case 'html':
+ $front = $config['prefix'] . '' . PHP_EOL;
+ $back = ''
+ );
+
+ if (($guiCode = ArrayHelper::merge($guiCode)) !== false
+ && ArrayHelper::check($guiCode, true))
+ {
+ foreach ($guiCode as $code)
+ {
+ $first_line = strtok($code, PHP_EOL);
+ // get the GUI target details
+ $query = explode('.', trim($first_line, '.'));
+ // only continue if we have 3 values in the query
+ if (is_array($query) && count($query) >= 3)
+ {
+ // cleanup the newlines around the code
+ $code = trim(str_replace($first_line, '', $code), PHP_EOL)
+ . PHP_EOL;
+ // set the ID
+ $id = (int) $query[2];
+ // make the field name save
+ $field = FieldHelper::safe($query[1]);
+ // make the table name save
+ $table = StringHelper::safe($query[0]);
+ // reverse placeholder as much as we can
+ $code = $this->reverse->engine(
+ $code, $placeholders, $target, $id, $field, $table
+ );
+ // update the GUI/Tables/Database
+ $object = new \stdClass();
+ $object->id = $id;
+ $object->{$field} = base64_encode(
+ $code
+ ); // (TODO) this may not always work...
+ // update the value in GUI
+ $this->db->updateObject(
+ '#__componentbuilder_' . (string) $table, $object, 'id'
+ );
+ }
+ }
+ }
+ }
+
+ /**
+ * search a code to see if there is already any custom
+ * code or other reasons not to add the GUI code placeholders
+ *
+ * @param string $code The code to check
+ *
+ * @return bool true if GUI code placeholders can be added
+ * @since 3.2.0
+ */
+ protected function check(string &$code): bool
+ {
+ // check for customcode placeholders
+ if (strpos($code, '$$$$') !== false)
+ {
+ // we do not add GUI wrapper placeholder to code
+ // that already has any customcode placeholders
+ return false;
+ }
+
+ return true;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Factory/Compiler/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/index.html
similarity index 100%
rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Factory/Compiler/index.html
rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Customcode/index.html
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extension/InstallScript.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/InstallScript.php
similarity index 66%
rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extension/InstallScript.php
rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/InstallScript.php
index 0c72523fd..f2a3843f3 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Extension/InstallScript.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/InstallScript.php
@@ -9,41 +9,29 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Extension;
+namespace VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaThree;
+use VDM\Joomla\Componentbuilder\Compiler\Interfaces\InstallInterface;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper;
-use VDM\Joomla\Componentbuilder\Line;
-use VDM\Joomla\Componentbuilder\Tab;
+use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
+use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
+use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface;
/**
* Loading the Extension Installation Script Class
*
- * @since 3.1.5
+ * @since 3.2.0
*/
-class InstallScript
+class InstallScript implements GetScriptInterface
{
- /**
- * The Line numbering Methods
- *
- * @since 3.1.5
- */
- use Line;
-
- /**
- * The Tab Adding Method
- *
- * @since 3.1.5
- */
- use Tab;
-
/**
* The extension
*
- * @var object
- * @since 3.1.5
+ * @var InstallInterface|Object
+ * @since 3.2.0
*/
protected object $extension;
@@ -51,7 +39,7 @@ class InstallScript
* The methods
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $methods = ['php_script', 'php_preflight', 'php_postflight', 'php_method'];
@@ -59,7 +47,7 @@ class InstallScript
* The types
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $types = ['construct', 'install', 'update', 'uninstall', 'discover_install'];
@@ -67,7 +55,7 @@ class InstallScript
* The construct bucket
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $construct = [];
@@ -75,7 +63,7 @@ class InstallScript
* The install bucket
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $install = [];
@@ -83,7 +71,7 @@ class InstallScript
* The update bucket
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $update = [];
@@ -91,7 +79,7 @@ class InstallScript
* The uninstall bucket
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $uninstall = [];
@@ -99,7 +87,7 @@ class InstallScript
* The preflight switch
*
* @var bool
- * @since 3.1.5
+ * @since 3.2.0
*/
protected bool $preflightActive = false;
@@ -107,7 +95,7 @@ class InstallScript
* The preflight bucket
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $preflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
@@ -115,7 +103,7 @@ class InstallScript
* The postflight switch
*
* @var bool
- * @since 3.1.5
+ * @since 3.2.0
*/
protected bool $postflightActive = false;
@@ -123,15 +111,19 @@ class InstallScript
* The postflight bucket
*
* @var array
- * @since 3.1.5
+ * @since 3.2.0
*/
protected array $postflightBucket = ['install' => [], 'uninstall' => [], 'discover_install' => [], 'update' => []];
/**
- * Constructor
- * @since 3.1.5
+ * get install script
+ *
+ * @param Object $extension The extension object
+ *
+ * @return string
+ * @since 3.2.0
*/
- public function __construct(object $extension)
+ public function get(object $extension): string
{
// loop over methods and types
foreach ($this->methods as $method)
@@ -163,16 +155,7 @@ class InstallScript
}
$this->extension = $extension;
- }
- /**
- * get install script
- *
- * @return string
- * @since 3.1.5
- */
- public function get(): string
- {
// return the class
return $this->build();
}
@@ -181,7 +164,7 @@ class InstallScript
* build the install class
*
* @return string
- * @since 3.1.5
+ * @since 3.2.0
*/
protected function build(): string
{
@@ -216,12 +199,13 @@ class InstallScript
* get install script head
*
* @return string
- * @since 3.1.5
+ * @since 3.2.0
*/
protected function head(): string
{
// get the extension
$extension = $this->extension;
+
// start build
$script = PHP_EOL . '/**';
$script .= PHP_EOL . ' * ' . $extension->official_name
@@ -239,7 +223,7 @@ class InstallScript
* get constructor
*
* @return string
- * @since 3.1.5
+ * @since 3.2.0
*/
protected function construct(): string
{
@@ -250,18 +234,18 @@ class InstallScript
}
// the __construct script
- $script = PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
- $script .= PHP_EOL . $this->_t(1) . ' * Constructor';
- $script .= PHP_EOL . $this->_t(1) . ' *';
- $script .= PHP_EOL . $this->_t(1)
+ $script = PHP_EOL . PHP_EOL . Indent::_(1) . '/**';
+ $script .= PHP_EOL . Indent::_(1) . ' * Constructor';
+ $script .= PHP_EOL . Indent::_(1) . ' *';
+ $script .= PHP_EOL . Indent::_(1)
. ' * @param Joomla\CMS\Installer\InstallerAdapter $adapter The object responsible for running this script';
- $script .= PHP_EOL . $this->_t(1) . ' */';
- $script .= PHP_EOL . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . ' */';
+ $script .= PHP_EOL . Indent::_(1)
. 'public function __construct($adapter)';
- $script .= PHP_EOL . $this->_t(1) . '{';
+ $script .= PHP_EOL . Indent::_(1) . '{';
$script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $this->construct);
// close the function
- $script .= PHP_EOL . $this->_t(1) . '}';
+ $script .= PHP_EOL . Indent::_(1) . '}';
return $script;
}
@@ -272,7 +256,7 @@ class InstallScript
* @param string $name the method being called
*
* @return string
- * @since 3.1.5
+ * @since 3.2.0
*/
protected function main(string $name): string
{
@@ -282,26 +266,26 @@ class InstallScript
return '';
}
// load the install method
- $script = PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
- $script .= PHP_EOL . $this->_t(1) . " * Called on $name";
- $script .= PHP_EOL . $this->_t(1) . ' *';
- $script .= PHP_EOL . $this->_t(1)
+ $script = PHP_EOL . PHP_EOL . Indent::_(1) . '/**';
+ $script .= PHP_EOL . Indent::_(1) . " * Called on $name";
+ $script .= PHP_EOL . Indent::_(1) . ' *';
+ $script .= PHP_EOL . Indent::_(1)
. ' * @param Joomla\CMS\Installer\InstallerAdapter $adapter The object responsible for running this script';
- $script .= PHP_EOL . $this->_t(1) . ' *';
- $script .= PHP_EOL . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . ' *';
+ $script .= PHP_EOL . Indent::_(1)
. ' * @return boolean True on success';
- $script .= PHP_EOL . $this->_t(1) . ' */';
- $script .= PHP_EOL . $this->_t(1) . 'public function '
+ $script .= PHP_EOL . Indent::_(1) . ' */';
+ $script .= PHP_EOL . Indent::_(1) . 'public function '
. $name . '($adapter)';
- $script .= PHP_EOL . $this->_t(1) . '{';
+ $script .= PHP_EOL . Indent::_(1) . '{';
$script .= PHP_EOL . implode(PHP_EOL . PHP_EOL, $this->{$name});
// return true
if ('uninstall' !== $name)
{
- $script .= PHP_EOL . $this->_t(2) . 'return true;';
+ $script .= PHP_EOL . Indent::_(2) . 'return true;';
}
// close the function
- $script .= PHP_EOL . $this->_t(1) . '}';
+ $script .= PHP_EOL . Indent::_(1) . '}';
return $script;
}
@@ -312,7 +296,7 @@ class InstallScript
* @param string $name the method being called
*
* @return string
- * @since 3.1.5
+ * @since 3.2.0
*/
protected function flight(string $name): string
{
@@ -323,42 +307,40 @@ class InstallScript
}
// the pre/post function types
- $script = PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
- $script .= PHP_EOL . $this->_t(1)
+ $script = PHP_EOL . PHP_EOL . Indent::_(1) . '/**';
+ $script .= PHP_EOL . Indent::_(1)
. ' * Called before any type of action';
- $script .= PHP_EOL . $this->_t(1) . ' *';
- $script .= PHP_EOL . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . ' *';
+ $script .= PHP_EOL . Indent::_(1)
. ' * @param string $route Which action is happening (install|uninstall|discover_install|update)';
- $script .= PHP_EOL . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1)
. ' * @param Joomla\CMS\Installer\InstallerAdapter $adapter The object responsible for running this script';
- $script .= PHP_EOL . $this->_t(1) . ' *';
- $script .= PHP_EOL . $this->_t(1)
+ $script .= PHP_EOL . Indent::_(1) . ' *';
+ $script .= PHP_EOL . Indent::_(1)
. ' * @return boolean True on success';
- $script .= PHP_EOL . $this->_t(1) . ' */';
- $script .= PHP_EOL . $this->_t(1) . 'public function '
+ $script .= PHP_EOL . Indent::_(1) . ' */';
+ $script .= PHP_EOL . Indent::_(1) . 'public function '
. $name . '($route, $adapter)';
- $script .= PHP_EOL . $this->_t(1) . '{';
- $script .= PHP_EOL . $this->_t(2) . '//' . $this->setLine(
- __LINE__
- ) . ' get application';
- $script .= PHP_EOL . $this->_t(2)
+ $script .= PHP_EOL . Indent::_(1) . '{';
+ $script .= PHP_EOL . Indent::_(2) . '//' . Line::_(__Line__, __Class__)
+ . ' get application';
+ $script .= PHP_EOL . Indent::_(2)
. '$app = JFactory::getApplication();' . PHP_EOL;
// add the default version check (TODO) must make this dynamic
if ('preflight' === $name)
{
- $script .= PHP_EOL . $this->_t(2) . '//' . $this->setLine(
- __LINE__
- ) . ' the default for both install and update';
- $script .= PHP_EOL . $this->_t(2)
+ $script .= PHP_EOL . Indent::_(2) . '//' . Line::_(__Line__, __Class__)
+ .' the default for both install and update';
+ $script .= PHP_EOL . Indent::_(2)
. '$jversion = new JVersion();';
- $script .= PHP_EOL . $this->_t(2)
+ $script .= PHP_EOL . Indent::_(2)
. "if (!\$jversion->isCompatible('3.8.0'))";
- $script .= PHP_EOL . $this->_t(2) . '{';
- $script .= PHP_EOL . $this->_t(3)
+ $script .= PHP_EOL . Indent::_(2) . '{';
+ $script .= PHP_EOL . Indent::_(3)
. "\$app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error');";
- $script .= PHP_EOL . $this->_t(3) . 'return false;';
- $script .= PHP_EOL . $this->_t(2) . '}' . PHP_EOL;
+ $script .= PHP_EOL . Indent::_(3) . 'return false;';
+ $script .= PHP_EOL . Indent::_(2) . '}' . PHP_EOL;
}
// now add the scripts
@@ -367,22 +349,23 @@ class InstallScript
if (ArrayHelper::check($_script))
{
// set the if and script
- $script .= PHP_EOL . $this->_t(2) . "if ('" . $route
+ $script .= PHP_EOL . Indent::_(2) . "if ('" . $route
. "' === \$route)";
- $script .= PHP_EOL . $this->_t(2) . '{';
+ $script .= PHP_EOL . Indent::_(2) . '{';
$script .= PHP_EOL . implode(
PHP_EOL . PHP_EOL, $_script
);
- $script .= PHP_EOL . $this->_t(2) . '}' . PHP_EOL;
+ $script .= PHP_EOL . Indent::_(2) . '}' . PHP_EOL;
}
}
// return true
- $script .= PHP_EOL . $this->_t(2) . 'return true;';
+ $script .= PHP_EOL . Indent::_(2) . 'return true;';
// close the function
- $script .= PHP_EOL . $this->_t(1) . '}';
+ $script .= PHP_EOL . Indent::_(1) . '}';
return $script;
- }
+ }
+
}
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Extension/JoomlaThree/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php
new file mode 100644
index 000000000..28da40a9e
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php
@@ -0,0 +1,111 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler;
+
+
+use Joomla\DI\Container;
+
+
+/**
+ * Compiler Factory
+ *
+ * @since 3.2.0
+ */
+abstract class Factory
+{
+ /**
+ * Global Compiler Container
+ *
+ * @var Container
+ * @since 3.2.0
+ **/
+ protected static $container = null;
+
+ /**
+ * Current Joomla Version Being Build
+ *
+ * @var int
+ * @since 3.2.0
+ **/
+ protected static $JoomlaVersion;
+
+ /**
+ * Get any class from the compiler container
+ *
+ * @param string $key The container class key
+ *
+ * @return Mixed
+ * @since 3.2.0
+ */
+ public static function _($key)
+ {
+ return self::getContainer()->get($key);
+ }
+
+ /**
+ * Get version specific class from the compiler container
+ *
+ * @param string $key The container class key
+ *
+ * @return Mixed
+ * @since 3.2.0
+ */
+ public static function _J($key)
+ {
+ if (empty(self::$JoomlaVersion))
+ {
+ self::$JoomlaVersion = self::getContainer()->get('Config')->joomla_version;
+ }
+
+ return self::getContainer()->get('J' . self::$JoomlaVersion . '.' . $key);
+ }
+
+ /**
+ * Get a the global compiler container
+ *
+ * @return Container
+ * @since 3.2.0
+ */
+ public static function getContainer(): Container
+ {
+ if (!self::$container)
+ {
+ self::$container = self::createContainer();
+ }
+
+ return self::$container;
+ }
+
+ /**
+ * Create a container object
+ *
+ * @return Container
+ * @since 3.2.0
+ */
+ protected static function createContainer(): Container
+ {
+ $container = (new Container())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Config())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Event())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Language())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Placeholder())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Customcode())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Power())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Component())
+ ->registerServiceProvider(new \VDM\Joomla\Componentbuilder\Compiler\Service\Extension());
+
+ return $container;
+ }
+
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/EventInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/EventInterface.php
new file mode 100644
index 000000000..e9e67c911
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/EventInterface.php
@@ -0,0 +1,33 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Interfaces;
+
+
+/**
+ * Compiler Events Interface
+ *
+ * @since 3.2.0
+ */
+interface EventInterface
+{
+ /**
+ * Trigger an event
+ *
+ * @param string $event The event to trigger
+ * @param mix $data The values to pass to the event/plugin
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function trigger(string $event, $data);
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Line.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/GetScriptInterface.php
similarity index 51%
rename from libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Line.php
rename to libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/GetScriptInterface.php
index e4ae1c346..c41170ef8 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Line.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/GetScriptInterface.php
@@ -9,35 +9,24 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder;
-
-
-use VDM\Joomla\Componentbuilder\Factory\Compiler\Config;
+namespace VDM\Joomla\Componentbuilder\Compiler\Interfaces;
/**
- * Add line comment
+ * The functions a get script should have
*
- * @since 3.1.5
+ * @since 3.2.0
*/
-trait Line
+interface GetScriptInterface
{
/**
- * Set the line number in comments
+ * get code to use
*
- * @param int $nr The line number
+ * @param Object $code The code object
*
* @return string
- * @since 3.1.5
+ * @since 3.2.0
*/
- private function setLine(int $nr): string
- {
- if (Config::get('debug_line_nr', false))
- {
- return ' [' . get_called_class() . ' ' . $nr . ']';
- }
-
- return '';
- }
+ public function get(object $extension): string;
}
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/InstallInterface.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/InstallInterface.php
new file mode 100644
index 000000000..3b0528273
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/InstallInterface.php
@@ -0,0 +1,44 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Interfaces;
+
+
+/**
+ * The properties an extension should have to be passed to the InstallScript class
+ */
+interface InstallInterface
+{
+ /**
+ * The extension official name
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function getOfficialName(): string;
+
+ /**
+ * The extension class name
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function getClassName(): string;
+
+ /**
+ * The extension installer class name
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function getInstallerClassName(): string;
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Interfaces/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Event.php
new file mode 100644
index 000000000..8e1264f8c
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/Event.php
@@ -0,0 +1,98 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaThree;
+
+
+use VDM\Joomla\Utilities\Component\Helper;
+use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface;
+
+
+/**
+ * Compiler Events
+ *
+ * @since 3.2.0
+ */
+class Event implements EventInterface
+{
+ /**
+ * event plugin trigger switch
+ *
+ * @var boolean
+ * @since 3.2.0
+ */
+ protected $activePlugins = false;
+
+ /**
+ * Constructor
+ *
+ * @param Registry|null $params The component parameters
+ *
+ * @since 3.2.0
+ */
+ public function __construct(?Registry $params = null)
+ {
+ // Set the params
+ $params = $params ?: Helper::getParams('com_componentbuilder');
+ // get active plugins
+ if (($plugins = $params->get('compiler_plugin', false))
+ !== false)
+ {
+ foreach ($plugins as $plugin)
+ {
+ // get possible plugins
+ if (\JPluginHelper::isEnabled('extension', $plugin))
+ {
+ // Import the appropriate plugin group.
+ \JPluginHelper::importPlugin('extension', $plugin);
+ // activate events
+ $this->activePlugins = true;
+ }
+ }
+ }
+ }
+
+ /**
+ * Trigger and event
+ *
+ * @param string $event The event to trigger
+ * @param mix $data The values to pass to the event/plugin
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function trigger($event, $data)
+ {
+ // only execute if plugins were loaded (active)
+ if ($this->activePlugins)
+ {
+ // Get the dispatcher.
+ $dispatcher = \JEventDispatcher::getInstance();
+
+ // Trigger this compiler event.
+ $results = $dispatcher->trigger($event, $data);
+
+ // Check for errors encountered while trigger the event
+ if (count((array) $results) && in_array(false, $results, true))
+ {
+ // Get the last error.
+ $error = $dispatcher->getError();
+
+ if (!($error instanceof \Exception))
+ {
+ throw new \Exception($error);
+ }
+ }
+ }
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaThree/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language.php
new file mode 100644
index 000000000..fc604ea5d
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language.php
@@ -0,0 +1,201 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler;
+
+
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+
+
+/**
+ * Compiler Language Content
+ *
+ * @since 3.2.0
+ */
+class Language
+{
+ /**
+ * The language content
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ protected array $content = [];
+
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected Config $config;
+
+ /**
+ * Constructor.
+ *
+ * @param Config|null $config The compiler config object.
+ *
+ * @since 3.2.0
+ */
+ public function __construct(?Config $config = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ }
+
+ /**
+ * Get the language string key
+ *
+ * @param string $string The plan text string (English)
+ *
+ * @return string The key language string (all uppercase)
+ * @since 3.2.0
+ */
+ public function key($string): string
+ {
+ // this is there to insure we don't break already added Language strings
+ if (StringHelper::safe($string, 'U', '_', false, false)
+ === $string)
+ {
+ return false;
+ }
+
+ // build language key
+ $key_lang = $this->config->lang_prefix . '_' . StringHelper::safe(
+ $string, 'U'
+ );
+
+ // set the language string
+ $this->set($this->config->lang_target, $key_lang, $string);
+
+ return $key_lang;
+ }
+
+ /**
+ * check if the language string exist
+ *
+ * @param string $target The target area for the language string
+ * @param string|null $language The language key string
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ public function exist(string $target, ?string $language = null): bool
+ {
+ if ($language)
+ {
+ return isset($this->content[$target][$language]);
+ }
+
+ return isset($this->content[$target]);
+ }
+
+ /**
+ * get the language string
+ *
+ * @param string $target The target area for the language string
+ * @param string|null $language The language key string
+ *
+ * @return Mixed The language string found or empty string if none is found
+ * @since 3.2.0
+ */
+ public function get(string $target, string $language): string
+ {
+ if (isset($this->content[$target][$language]))
+ {
+ return $this->content[$target][$language];
+ }
+
+ return '';
+ }
+
+ /**
+ * get target array
+ *
+ * @param string $target The target area for the language string
+ *
+ * @return array The target array or empty array if none is found
+ * @since 3.2.0
+ */
+ public function getTarget(string $target): array
+ {
+ if (isset($this->content[$target]) && ArrayHelper::check($this->content[$target]))
+ {
+ return $this->content[$target];
+ }
+
+ return [];
+ }
+
+ /**
+ * set target array
+ *
+ * @param string $target The target area for the language string
+ * @param array|null $content The language content string
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function setTarget(string $target, ?array $content)
+ {
+ $this->content[$target] = $content;
+ }
+
+ /**
+ * set the language content values to language content array
+ *
+ * @param string $target The target area for the language string
+ * @param string $language The language key string
+ * @param string $string The language string
+ * @param bool $addPrefix The switch to add langPrefix
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function set(string $target, string $language, string $string, bool $addPrefix = false)
+ {
+ if ($addPrefix && empty(
+ $this->content[$target][$this->config->lang_prefix . '_' . $language]
+ ))
+ {
+ $this->content[$target][$this->config->lang_prefix . '_' . $language]
+ = $this->fix($string);
+ }
+ elseif (empty($this->content[$target][$language]))
+ {
+ $this->content[$target][$language] = $this->fix(
+ $string
+ );
+ }
+ }
+
+ /**
+ * We need to remove all text breaks from all language strings
+ *
+ * @param string $string The language string
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ protected function fix(string $string): string
+ {
+ if ($this->config->remove_line_breaks)
+ {
+ return trim(str_replace(array(PHP_EOL, "\r", "\n"), '', $string));
+ }
+
+ return trim($string);
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/Extractor.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/Extractor.php
new file mode 100644
index 000000000..7ab78f18d
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/Extractor.php
@@ -0,0 +1,254 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Language;
+
+
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\GetHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
+use VDM\Joomla\Componentbuilder\Compiler\Language;
+
+
+/**
+ * Compiler Language Extractor
+ *
+ * @since 3.2.0
+ */
+class Extractor
+{
+ /**
+ * The lang keys for extensions
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ public array $langKeys = [];
+
+ /**
+ * The Language JS matching check
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ public array $langMismatch = [];
+
+ /**
+ * The Language SC matching check
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ public array $langMatch = [];
+
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected Config $config;
+
+ /**
+ * Compiler Placeholder
+ *
+ * @var Placeholder
+ * @since 3.2.0
+ **/
+ protected Placeholder $placeholder;
+
+ /**
+ * Compiler Language
+ *
+ * @var Language
+ * @since 3.2.0
+ **/
+ protected Language $language;
+
+ /**
+ * Constructor.
+ *
+ * @param Config|null $config The compiler config object.
+ * @param Language|null $language The compiler Language object.
+ * @param Placeholder|null $placeholder The compiler placeholder object.
+ *
+ * @since 3.2.0
+ */
+ public function __construct(?Config $config = null, ?Language $language = null, ?Placeholder $placeholder = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ $this->language = $language ?: Compiler::_('Language');
+ $this->placeholder = $placeholder ?: Compiler::_('Placeholder');
+ }
+
+ /**
+ * Extract Language Strings
+ *
+ * @param string $content The content
+ *
+ * @return string The content with the updated Language place holder
+ * @since 3.2.0
+ */
+ public function engine(string $content): string
+ {
+ // get targets to search for
+ $lang_string_targets = array_filter(
+ $this->config->lang_string_targets, function ($get) use ($content) {
+ if (strpos($content, $get) !== false)
+ {
+ return true;
+ }
+
+ return false;
+ }
+ );
+ // check if we should continue
+ if (ArrayHelper::check($lang_string_targets))
+ {
+ // insure string is not broken
+ $content = $this->placeholder->update($content, $this->placeholder->active);
+ // reset some buckets
+ $lang_holders = array();
+ $lang_check = array();
+ $lang_only = array();
+ $js_text = array();
+ $sc_text = array();
+ // first get the Joomla .JText._()
+ if (in_array('Joomla' . '.JText._(', $lang_string_targets))
+ {
+ $js_text[] = GetHelper::allBetween(
+ $content, "Joomla" . ".JText._('", "'"
+ );
+ $js_text[] = GetHelper::allBetween(
+ $content, 'Joomla' . '.JText._("', '"'
+ );
+ // combine into one array
+ $js_text = ArrayHelper::merge($js_text);
+ // we need to add a check to insure these JavaScript lang matchup
+ if (ArrayHelper::check(
+ $js_text
+ )) //<-- not really needed hmmm
+ {
+ // load the JS text to mismatch array
+ $lang_check[] = $js_text;
+ $this->langMismatch = ArrayHelper::merge(
+ array($js_text, $this->langMismatch)
+ );
+ }
+ }
+ // now get the JText: :script()
+ if (in_array('JText:' . ':script(', $lang_string_targets))
+ {
+ $sc_text[] = GetHelper::allBetween(
+ $content, "JText:" . ":script('", "'"
+ );
+ $sc_text[] = GetHelper::allBetween(
+ $content, 'JText:' . ':script("', '"'
+ );
+ // combine into one array
+ $sc_text = ArrayHelper::merge($sc_text);
+ // we need to add a check to insure these JavaScript lang matchup
+ if (ArrayHelper::check($sc_text))
+ {
+ // load the Script text to match array
+ $lang_check[] = $sc_text;
+ $this->langMatch = ArrayHelper::merge(
+ array($sc_text, $this->langMatch)
+ );
+ }
+ }
+ // now do the little trick for JustTEXT: :_('Just uppercase text');
+ if (in_array('JustTEXT:' . ':_(', $lang_string_targets))
+ {
+ $lang_only[] = GetHelper::allBetween(
+ $content, "JustTEXT:" . ":_('", "')"
+ );
+ $lang_only[] = GetHelper::allBetween(
+ $content, 'JustTEXT:' . ':_("', '")'
+ );
+ // merge lang only
+ $lang_only = ArrayHelper::merge($lang_only);
+ }
+ // set language data
+ foreach ($lang_string_targets as $lang_string_target)
+ {
+ // need some special treatment here
+ if ($lang_string_target === 'Joomla' . '.JText._('
+ || $lang_string_target === 'JText:' . ':script('
+ || $lang_string_target === 'JustTEXT:' . ':_(')
+ {
+ continue;
+ }
+ $lang_check[] = GetHelper::allBetween(
+ $content, $lang_string_target . "'", "'"
+ );
+ $lang_check[] = GetHelper::allBetween(
+ $content, $lang_string_target . '"', '"'
+ );
+ }
+ // the normal loading of the language strings
+ $lang_check = ArrayHelper::merge($lang_check);
+ if (ArrayHelper::check(
+ $lang_check
+ )) //<-- not really needed hmmm
+ {
+ foreach ($lang_check as $string)
+ {
+ if ($key_lang = $this->language->key($string))
+ {
+ // load the language targets
+ foreach ($lang_string_targets as $lang_string_target)
+ {
+ // need some special treatment here
+ if ($lang_string_target === 'JustTEXT:' . ':_(')
+ {
+ continue;
+ }
+ $lang_holders[$lang_string_target . "'" . $string
+ . "'"]
+ = $lang_string_target . "'" . $key_lang . "'";
+ $lang_holders[$lang_string_target . '"' . $string
+ . '"']
+ = $lang_string_target . '"' . $key_lang . '"';
+ }
+ }
+ }
+ }
+ // the uppercase loading only (for arrays and other tricks)
+ if (ArrayHelper::check($lang_only))
+ {
+ foreach ($lang_only as $string)
+ {
+ if ($key_lang = $this->language->key($string))
+ {
+ // load the language targets
+ $lang_holders["JustTEXT:" . ":_('" . $string . "')"]
+ = "'" . $key_lang . "'";
+ $lang_holders['JustTEXT:' . ':_("' . $string . '")']
+ = '"' . $key_lang . '"';
+ }
+ }
+ }
+ // only continue if we have value to replace
+ if (ArrayHelper::check($lang_holders))
+ {
+ $content = $this->placeholder->update($content, $lang_holders);
+ }
+ }
+
+ return $content;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Language/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php
new file mode 100644
index 000000000..ff1120415
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder.php
@@ -0,0 +1,262 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler;
+
+
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\GetHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
+
+
+/**
+ * Compiler Placeholder
+ *
+ * @since 3.2.0
+ */
+class Placeholder
+{
+ /**
+ * The active placeholders
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ public array $active = [];
+
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected Config $config;
+
+ /**
+ * Constructor.
+ *
+ * @param Config|null $config The compiler config object.
+ *
+ * @since 3.2.0
+ */
+ public function __construct(?Config $config = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ }
+
+ /**
+ * Set a type of placeholder with set of values
+ *
+ * @param string $key The main string for placeholder key
+ * @param array $values The values to add
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function setType(string $key, array $values)
+ {
+ // always fist reset the type
+ $this->clearType($key);
+
+ // only add if there are values
+ if (ArrayHelper::check($values))
+ {
+ $number = 0;
+ foreach ($values as $value)
+ {
+ $this->active[Placefix::_($key . $number)]
+ = $value;
+ $number++;
+ }
+ }
+ }
+
+ /**
+ * Remove a type of placeholder by main key
+ *
+ * @param string $key The main string for placeholder key
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function clearType(string $key)
+ {
+ $key = Placefix::_($key);
+
+ $this->active = array_filter(
+ $this->active,
+ function(string $k) use($key){
+ return preg_replace('/\d/', '', $k) !== $key;
+ },
+ ARRAY_FILTER_USE_KEY
+ );
+ }
+
+ /**
+ * Update the data with the placeholders
+ *
+ * @param string $data The actual data
+ * @param array $placeholder The placeholders
+ * @param int $action The action to use
+ *
+ * THE ACTION OPTIONS ARE
+ * 1 -> Just replace (default)
+ * 2 -> Check if data string has placeholders
+ * 3 -> Remove placeholders not in data string
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function update(string $data, array &$placeholder, int $action = 1): string
+ {
+ // make sure the placeholders is an array
+ if (!ArrayHelper::check($placeholder))
+ {
+ // This is an error, (TODO) actualy we need to add a kind of log here to know that this happened
+ return $data;
+ }
+ // continue with the work of replacement
+ if (1 == $action) // <-- just replace (default)
+ {
+ return str_replace(
+ array_keys($placeholder), array_values($placeholder), $data
+ );
+ }
+ elseif (2 == $action) // <-- check if data string has placeholders
+ {
+ $replace = false;
+ foreach ($placeholder as $key => $val)
+ {
+ if (strpos($data, $key) !== false)
+ {
+ $replace = true;
+ break;
+ }
+ }
+ // only replace if the data has these placeholder values
+ if ($replace === true)
+ {
+
+ return str_replace(
+ array_keys($placeholder), array_values($placeholder), $data
+ );
+ }
+ }
+ elseif (3 == $action) // <-- remove placeholders not in data string
+ {
+ $replace = $placeholder;
+ foreach ($replace as $key => $val)
+ {
+ if (strpos($data, $key) === false)
+ {
+ unset($replace[$key]);
+ }
+ }
+ // only replace if the data has these placeholder values
+ if (ArrayHelper::check($replace))
+ {
+ return str_replace(
+ array_keys($replace), array_values($replace), $data
+ );
+ }
+ }
+
+ return $data;
+ }
+
+ /**
+ * return the placeholders for inserted and replaced code
+ *
+ * @param int $type The type of placement
+ * @param int|null $id The code id in the system
+ *
+ * @return array on success
+ * @since 3.2.0
+ */
+ public function keys(int $type, ?int $id = null)
+ {
+ switch ($type)
+ {
+ case 3:
+ return [ 'start' => "", 'end' => ""];
+ break;
+ case 11:
+ //***[REPLACED$$$$]***//**1**/
+ if ($this->config->get('add_placeholders', false) === true)
+ {
+ return [
+ 'start' => '/***[REPLACED$$$$]***//**' . $id . '**/',
+ 'end' => '/***[/REPLACED$$$$]***/'
+ ];
+ }
+ else
+ {
+ return [ 'start' => "", 'end' => ""];
+ }
+ break;
+ case 12:
+ //***[INSERTED$$$$]***//**1**/
+ if ($this->config->get('add_placeholders', false) === true)
+ {
+ return [
+ 'start' => '/***[INSERTED$$$$]***//**' . $id . '**/',
+ 'end' => '/***[/INSERTED$$$$]***/'
+ ];
+ }
+ else
+ {
+ return [ 'start' => "", 'end' => ""];
+ }
+ break;
+ case 21:
+ //
+ if ($this->config->get('add_placeholders', false) === true)
+ {
+ return [
+ 'start' => '',
+ 'end' => ''
+ ];
+ }
+ else
+ {
+ return [ 'start' => "", 'end' => ""];
+ }
+ break;
+ case 22:
+ //
+ if ($this->config->get('add_placeholders', false) === true)
+ {
+ return [
+ 'start' => '',
+ 'end' => ''
+ ];
+ }
+ else
+ {
+ return [ 'start' => "", 'end' => ""];
+ }
+ break;
+ case 33:
+ return ['start' => Placefix::h(), 'end' => Placefix::h()];
+ break;
+ case 66:
+ return ['start' => Placefix::b(), 'end' => Placefix::d()];
+ break;
+ }
+
+ return false;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/Reverse.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/Reverse.php
new file mode 100644
index 000000000..a41a4a98d
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/Reverse.php
@@ -0,0 +1,243 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Placeholder;
+
+
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\GetHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
+use VDM\Joomla\Componentbuilder\Compiler\Language;
+use VDM\Joomla\Componentbuilder\Compiler\Language\Extractor;
+
+
+/**
+ * Compiler Placeholder Reverse
+ *
+ * @since 3.2.0
+ */
+class Reverse
+{
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected Config $config;
+
+ /**
+ * Compiler Placeholder
+ *
+ * @var Placeholder
+ * @since 3.2.0
+ **/
+ protected Placeholder $placeholder;
+
+ /**
+ * Compiler Language
+ *
+ * @var Language
+ * @since 3.2.0
+ **/
+ protected Language $language;
+
+ /**
+ * Compiler Language Extractor
+ *
+ * @var Extractor
+ * @since 3.2.0
+ **/
+ protected Extractor $extractor;
+
+ /**
+ * Constructor.
+ *
+ * @param Config|null $config The compiler config object.
+ * @param Placeholder|null $placeholder The compiler placeholder object.
+ * @param Language|null $language The compiler language object.
+ * @param Extract|null $extractor The compiler language extractor object.
+ *
+ * @since 3.2.0
+ */
+ public function __construct(
+ ?Config $config = null, ?Placeholder $placeholder = null,
+ ?Language $language = null, ?Extractor $extractor = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ $this->placeholder = $placeholder ?: Compiler::_('Placeholder');
+ $this->language = $language ?: Compiler::_('Language');
+ $this->extractor = $extractor ?: Compiler::_('Language.Extractor');
+ }
+
+ /**
+ * Reverse Engineer the dynamic placeholders (TODO hmmmm this is not ideal)
+ *
+ * @param string $string The string to revers
+ * @param array $placeholders The values to search for
+ * @param string $target The target path type
+ * @param int|null $id The custom code id
+ * @param string $field The field name
+ * @param string $table The table name
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function engine(string $string, array &$placeholders,
+ string $target, ?int $id = null, $field = 'code', $table = 'custom_code'): string
+ {
+ // get local code if set
+ if ($id > 0 && $code = base64_decode(
+ GetHelper::var($table, $id, 'id', $field)
+ ))
+ {
+ $string = $this->setReverse(
+ $string, $code, $target
+ );
+ }
+
+ return $this->placeholder->update($string, $placeholders, 2);
+ }
+
+ /**
+ * Set the language strings for the reveres process
+ *
+ * @param string $updateString The string to update
+ * @param string $string The string to use language update
+ * @param string $target The target path type
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ protected function setReverse(string $updateString, string $string, string $target): string
+ {
+ // get targets to search for
+ $lang_string_targets = array_filter(
+ $this->config->lang_string_targets, function ($get) use ($string) {
+ if (strpos($string, $get) !== false)
+ {
+ return true;
+ }
+
+ return false;
+ }
+ );
+ // check if we should continue
+ if (ArrayHelper::check($lang_string_targets))
+ {
+ // start lang holder
+ $lang_holders = array();
+ // set the lang for both since we don't know what area is being targeted
+ $_tmp = $this->config->lang_target;
+ // set the lang based on target
+ if (strpos($target, 'module') !== false)
+ {
+ // backup lang prefix
+ $_tmp_lang_prefix = $this->config->lang_prefix;
+ // set the new lang prefix
+ $lang_prefix = strtoupper(
+ str_replace('module', 'mod', $target)
+ );
+ $this->config->set('lang_prefix', $lang_prefix);
+ // now set the lang
+ if (isset($this->extractor->langKeys[$this->config->lang_prefix]))
+ {
+ $this->config->lang_target = $this->extractor->langKeys[$this->config->lang_prefix];
+ }
+ else
+ {
+ $this->config->lang_target = 'module';
+ }
+ }
+ elseif (strpos($target, 'plugin') !== false)
+ {
+ // backup lang prefix
+ $_tmp_lang_prefix = $this->config->lang_prefix;
+ // set the new lang prefix
+ $lang_prefix = strtoupper(
+ str_replace('plugin', 'plg', $target)
+ );
+ $this->config->set('lang_prefix', $lang_prefix);
+ // now set the lang
+ if (isset($this->extractor->langKeys[$this->config->lang_prefix]))
+ {
+ $this->config->lang_target = $this->extractor->langKeys[$this->config->lang_prefix];
+ }
+ else
+ {
+ $this->config->lang_target = 'plugin';
+ }
+ }
+ else
+ {
+ $this->config->lang_target = 'both';
+ }
+ // set language data
+ foreach ($lang_string_targets as $lang_string_target)
+ {
+ $lang_check[] = GetHelper::allBetween(
+ $string, $lang_string_target . "'", "'"
+ );
+ $lang_check[] = GetHelper::allBetween(
+ $string, $lang_string_target . "'", "'"
+ );
+ }
+ // merge arrays
+ $lang_array = ArrayHelper::merge($lang_check);
+ // continue only if strings were found
+ if (ArrayHelper::check(
+ $lang_array
+ )) //<-- not really needed hmmm
+ {
+ foreach ($lang_array as $lang)
+ {
+ $_key_lang = StringHelper::safe($lang, 'U');
+ // this is there to insure we dont break already added Language strings
+ if ($_key_lang === $lang)
+ {
+ continue;
+ }
+ // build lang key
+ $key_lang = $this->config->lang_prefix . '_' . $_key_lang;
+ // set lang content string
+ $this->language->set($this->config->lang_target, $key_lang, $lang);
+ // reverse the placeholders
+ foreach ($lang_string_targets as $lang_string_target)
+ {
+ $lang_holders[$lang_string_target . "'" . $key_lang . "'"]
+ = $lang_string_target . "'" . $lang . "'";
+ $lang_holders[$lang_string_target . '"' . $key_lang . '"']
+ = $lang_string_target . '"' . $lang . '"';
+ }
+ }
+ // return the found placeholders
+ $updateString = $this->placeholder->replace(
+ $updateString, $lang_holders
+ );
+ }
+ // reset the lang
+ $this->config->lang_target = $_tmp;
+ // also rest the lang prefix if set
+ if (isset($_tmp_lang_prefix))
+ {
+ $lang_prefix = $_tmp_lang_prefix;
+ $this->config->set('lang_prefix', $_tmp_lang_prefix);
+ }
+ }
+
+ return $updateString;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Placeholder/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
new file mode 100644
index 000000000..3afc35771
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
@@ -0,0 +1,517 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler;
+
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Application\CMSApplication;
+use Joomla\CMS\Language\Text;
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+use VDM\Joomla\Utilities\JsonHelper;
+use VDM\Joomla\Utilities\GuidHelper;
+use VDM\Joomla\Utilities\String\ClassfunctionHelper;
+use VDM\Joomla\Utilities\String\NamespaceHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+use VDM\Joomla\Componentbuilder\Compiler\Config;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
+use VDM\Joomla\Componentbuilder\Compiler\Customcode;
+use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
+
+
+/**
+ * Compiler Power
+ *
+ * @since 3.2.0
+ */
+class Power
+{
+ /**
+ * All loaded powers
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ public array $active = [];
+
+ /**
+ * The state of all loaded powers
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ protected array $state = [];
+
+ /**
+ * Compiler Config
+ *
+ * @var Config
+ * @since 3.2.0
+ **/
+ protected Config $config;
+
+ /**
+ * Compiler Placeholder
+ *
+ * @var Placeholder
+ * @since 3.2.0
+ **/
+ protected Placeholder $placeholder;
+
+ /**
+ * Compiler Customcode
+ *
+ * @var Customcode
+ * @since 3.2.0
+ **/
+ protected Customcode $customcode;
+
+ /**
+ * Compiler Customcode in Gui
+ *
+ * @var Gui
+ * @since 3.2.0
+ **/
+ protected Gui $gui;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var \JDatabaseDriver
+ * @since 3.2.0
+ **/
+ protected \JDatabaseDriver $db;
+
+ /**
+ * Database object to query local DB
+ *
+ * @var CMSApplication
+ * @since 3.2.0
+ **/
+ protected CMSApplication $app;
+
+ /**
+ * Constructor.
+ *
+ * @param Config|null $config The compiler config object.
+ * @param Placeholder|null $placeholder The compiler placeholder object.
+ * @param Customcode|null $customcode The compiler customcode object.
+ * @param Gui|null $gui The compiler customcode gui object.
+ * @param \JDatabaseDriver|null $db The Database Driver object.
+ * @param CMSApplication|null $app The CMS Application object.
+ *
+ * @since 3.2.0
+ */
+ public function __construct(?Config $config = null, ?Placeholder $placeholder = null,
+ ?Customcode $customcode = null, ?Gui $gui = null,
+ ?\JDatabaseDriver $db = null, ?CMSApplication $app = null)
+ {
+ $this->config = $config ?: Compiler::_('Config');
+ $this->placeholder = $placeholder ?: Compiler::_('Placeholder');
+ $this->customcode = $customcode ?: Compiler::_('Customcode');
+ $this->gui = $gui ?: Compiler::_('Customcode.Gui');
+ $this->db = $db ?: Factory::getDbo();
+ $this->app = $app ?: Factory::getApplication();
+ }
+
+ /**
+ * load all the powers linked to this component
+ *
+ * @param array $guids The global unique ids of the linked powers
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function load(array $guids)
+ {
+ if (ArrayHelper::check($guids))
+ {
+ foreach ($guids as $guid => $build)
+ {
+ $this->get($guid, $build);
+ }
+ }
+ }
+
+ /**
+ * Get a power
+ *
+ * @param string $guid The global unique id of the power
+ * @param int $build Force build switch (to override global switch)
+ *
+ * @return mixed
+ * @since 3.2.0
+ */
+ public function get(string $guid, int $build = 0)
+ {
+ if (($this->config->get('add_power', true) || $build == 1) && $this->set($guid))
+ {
+ return $this->active[$guid];
+ }
+
+ return false;
+ }
+
+ /**
+ * Set a power
+ *
+ * @param string $guid The global unique id of the power
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ protected function set(string $guid): bool
+ {
+ // check if we have been here before
+ if (isset($this->state[$guid]))
+ {
+ return $this->state[$guid];
+ }
+ elseif (GuidHelper::valid($guid))
+ {
+ // Create a new query object.
+ $query = $this->db->getQuery(true);
+
+ $query->select('a.*');
+ // from these tables
+ $query->from('#__componentbuilder_power AS a');
+ $query->where($this->db->quoteName('a.guid') . ' = ' . $this->db->quote($guid));
+ $this->db->setQuery($query);
+ $this->db->execute();
+ if ($this->db->getNumRows())
+ {
+ // make sure that in recursion we
+ // don't try to load this power again
+ $this->state[$guid] = true;
+ // get the power data
+ $this->active[$guid] = $this->db->loadObject();
+ // make sure to add any language strings found to all language files
+ // since we can't know where this is used at this point
+ $tmp_lang_target = $this->config->lang_target;
+ $this->config->lang_target = 'both';
+ // we set the fix usr if needed
+ $fix_url
+ = '"index.php?option=com_componentbuilder&view=powers&task=power.edit&id='
+ . $this->active[$guid]->id . '" target="_blank"';
+ // set some keys
+ $this->active[$guid]->target_type = 'P0m3R!';
+ $this->active[$guid]->key = $this->active[$guid]->id . '_' . $this->active[$guid]->target_type;
+ // now set the name
+ $this->active[$guid]->name = $this->placeholder->update(
+ $this->customcode->add($this->active[$guid]->name),
+ $this->placeholder->active
+ );
+ // now set the code_name and class name
+ $this->active[$guid]->code_name = $this->active[$guid]->class_name = ClassfunctionHelper::safe(
+ $this->active[$guid]->name
+ );
+ // set official name
+ $this->active[$guid]->official_name = StringHelper::safe(
+ $this->active[$guid]->name, 'W'
+ );
+ // set namespace
+ $this->active[$guid]->namespace = $this->placeholder->update(
+ $this->active[$guid]->namespace, $this->placeholder->active
+ );
+ // validate namespace
+ if (strpos($this->active[$guid]->namespace, '\\') === false)
+ {
+ // we raise an error message
+ $this->app->enqueueMessage(
+ Text::sprintf('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',
+ ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->namespace,
+ '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $this->active[$guid]->type,
+ $fix_url),
+ 'Error'
+ );
+ $this->state[$guid] = false;
+ unset($this->active[$guid]);
+ // reset back to starting value
+ $this->config->lang_target = $tmp_lang_target;
+ // we break out here
+ return false;
+ }
+ else
+ {
+ // setup the path array
+ $path_array = (array) explode('\\', $this->active[$guid]->namespace);
+ // make sure all sub folders in src dir is set and remove all characters that will not work in folders naming
+ $this->active[$guid]->namespace = NamespaceHelper::safe(str_replace('.', '\\', $this->active[$guid]->namespace));
+ // make sure it has two or more
+ if (ArrayHelper::check($path_array) <= 1)
+ {
+ // we raise an error message
+ $this->app->enqueueMessage(
+ Text::sprintf('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',
+ ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->namespace,
+ '"https://www.php-fig.org/psr/psr-4/" target="_blank"', $this->active[$guid]->type,
+ $fix_url),
+ 'Error'
+ );
+ $this->state[$guid] = false;
+ unset($this->active[$guid]);
+ // reset back to starting value
+ $this->config->lang_target = $tmp_lang_target;
+ // we break out here
+ return false;
+ }
+ // get the file and class name (the last value in array)
+ $file_name = array_pop($path_array);
+ // src array bucket
+ $src_array = array();
+ // do we have src folders
+ if (strpos($file_name, '.') !== false)
+ {
+ // we have src folders in the namespace
+ $src_array = (array) explode('.', $file_name);
+ // get the file and class name (the last value in array)
+ $this->active[$guid]->file_name = array_pop($src_array);
+ // namespace array
+ $namespace_array = array_merge($path_array, $src_array);
+ }
+ else
+ {
+ // set the file name
+ $this->active[$guid]->file_name = $file_name;
+ // namespace array
+ $namespace_array = $path_array;
+ }
+ // the last value is the same as the class name
+ if ($this->active[$guid]->file_name !== $this->active[$guid]->class_name)
+ {
+ // we raise an error message
+ $this->app->enqueueMessage(
+ Text::sprintf('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',
+ ucfirst($this->active[$guid]->type), $this->active[$guid]->name, $this->active[$guid]->type, $this->active[$guid]->class_name, $this->active[$guid]->file_name,
+ '"https://www.php-fig.org/psr/psr-4/" target="_blank"',
+ $fix_url),
+ 'Error'
+ );
+ $this->state[$guid] = false;
+ unset($this->active[$guid]);
+ // reset back to starting value
+ $this->config->lang_target = $tmp_lang_target;
+ // we break out here
+ return false;
+ }
+ // make sure the arrays are namespace safe
+ $path_array = array_map(function ($val) {
+ return NamespaceHelper::safe($val);
+ }, $path_array);
+ $namespace_array = array_map(function ($val) {
+ return NamespaceHelper::safe($val);
+ }, $namespace_array);
+ // set the actual class namespace
+ $this->active[$guid]->_namespace = implode('\\', $namespace_array);
+ // prefix values
+ $this->active[$guid]->_namespace_prefix = $path_array;
+ // get the parent folder (the first value in array)
+ $prefix_folder = implode('.', $path_array);
+ // make sub folders if still found
+ $sub_folder = '';
+ if (ArrayHelper::check($src_array))
+ {
+ // make sure the arrays are namespace safe
+ $sub_folder = '/' . implode('/', array_map(function ($val) {
+ return NamespaceHelper::safe($val);
+ }, $src_array));
+ }
+ // now we set the paths
+ $this->active[$guid]->path_jcb = $this->config->get('jcb_powers_path', 'libraries/jcb_powers');
+ $this->active[$guid]->path_parent = $this->active[$guid]->path_jcb . '/' . $prefix_folder;
+ $this->active[$guid]->path = $this->active[$guid]->path_parent . '/src' . $sub_folder;
+ }
+ // load use ids
+ $use = array();
+ $as = array();
+ // check if we have use selection
+ $this->active[$guid]->use_selection = (isset($this->active[$guid]->use_selection)
+ && JsonHelper::check(
+ $this->active[$guid]->use_selection
+ )) ? json_decode($this->active[$guid]->use_selection, true) : null;
+ if ($this->active[$guid]->use_selection)
+ {
+ $use = array_values(array_map(function ($u) use(&$as) {
+ // track the AS options
+ if (empty($u['as']))
+ {
+ $as[$u['use']] = 'default';
+ }
+ else
+ {
+ $as[$u['use']] = (string) $u['as'];
+ }
+ // return the guid
+ return $u['use'];
+ }, $this->active[$guid]->use_selection));
+ }
+ // check if we have load selection
+ $this->active[$guid]->load_selection = (isset($this->active[$guid]->load_selection)
+ && JsonHelper::check(
+ $this->active[$guid]->load_selection
+ )) ? json_decode($this->active[$guid]->load_selection, true) : null;
+ if ($this->active[$guid]->load_selection)
+ {
+ // load use ids
+ array_map(function ($l) {
+ // just load it directly and be done with it
+ return $this->set($l['load']);
+ }, $this->active[$guid]->load_selection);
+ }
+ // see if we have implements
+ $this->active[$guid]->implement_names = array();
+ // does this implement
+ $this->active[$guid]->implements = (isset($this->active[$guid]->implements)
+ && JsonHelper::check(
+ $this->active[$guid]->implements
+ )) ? json_decode($this->active[$guid]->implements, true) : null;
+ if ($this->active[$guid]->implements)
+ {
+ foreach ($this->active[$guid]->implements as $implement)
+ {
+ if ($implement == -1
+ && StringHelper::check($this->active[$guid]->implements_custom))
+ {
+ $this->active[$guid]->implement_names[] = $this->placeholder->update(
+ $this->customcode->add($this->active[$guid]->implements_custom),
+ $this->placeholder->active
+ );
+ // just add this once
+ unset($this->active[$guid]->implements_custom);
+ }
+ // does this extend existing
+ elseif (GuidHelper::valid($implement))
+ {
+ // check if it was set
+ if ($this->set($implement))
+ {
+ // get the name
+ $this->active[$guid]->implement_names[] = $this->get($implement, 1)->class_name;
+ // add to use
+ $use[] = $implement;
+ }
+ }
+ }
+ }
+ // does this extend something
+ $this->active[$guid]->extends_name = null;
+ // we first check for custom extending options
+ if ($this->active[$guid]->extends == -1
+ && StringHelper::check($this->active[$guid]->extends_custom))
+ {
+ $this->active[$guid]->extends_name = $this->placeholder->update(
+ $this->customcode->add($this->active[$guid]->extends_custom),
+ $this->placeholder->active
+ );
+ // just add once
+ unset($this->active[$guid]->extends_custom);
+ }
+ // does this extend existing
+ elseif (GuidHelper::valid($this->active[$guid]->extends))
+ {
+ // check if it was set
+ if ($this->set($this->active[$guid]->extends))
+ {
+ // get the name
+ $this->active[$guid]->extends_name = $this->get($this->active[$guid]->extends, 1)->class_name;
+ // add to use
+ $use[] = $this->active[$guid]->extends;
+ }
+ }
+ // set GUI mapper
+ $guiMapper = array('table' => 'power', 'id' => (int) $this->active[$guid]->id, 'type' => 'php');
+ // add the header script
+ if ($this->active[$guid]->add_head == 1)
+ {
+ // set GUI mapper field
+ $guiMapper['field'] = 'head';
+ // base64 Decode code
+ $this->active[$guid]->head = $this->gui->set(
+ $this->placeholder->update(
+ $this->customcode->add(
+ base64_decode(
+ $this->active[$guid]->head
+ )
+ ), $this->placeholder->active
+ ),
+ $guiMapper
+ ) . PHP_EOL;
+ }
+ // now add all the extra use statements
+ if (ArrayHelper::check($use))
+ {
+ foreach (array_unique($use) as $u)
+ {
+ if ($this->set($u))
+ {
+ $add_use = $this->get($u, 1)->namespace;
+ // check if it is already added manually, you know how some people are
+ if (strpos($this->active[$guid]->head, $add_use) === false)
+ {
+ // check if it has an AS option
+ if (isset($as[$u]) && StringHelper::check($as[$u]) && $as[$u] !== 'default')
+ {
+ $this->active[$guid]->head .= 'use ' . $add_use . ' as ' . $as[$u] . ';' . PHP_EOL;
+ }
+ else
+ {
+ $this->active[$guid]->head .= 'use ' . $add_use . ';' . PHP_EOL;
+ }
+ }
+ }
+ }
+ }
+ // now set the description
+ $this->active[$guid]->description = (StringHelper::check($this->active[$guid]->description)) ? $this->placeholder->update(
+ $this->customcode->add($this->active[$guid]->description),
+ $this->placeholder->active
+ ) : '';
+ // add the main code if set
+ if (StringHelper::check($this->active[$guid]->main_class_code))
+ {
+ // set GUI mapper field
+ $guiMapper['field'] = 'main_class_code';
+ // base64 Decode code
+ $this->active[$guid]->main_class_code = $this->gui->set(
+ $this->placeholder->update(
+ $this->customcode->add(
+ base64_decode(
+ $this->active[$guid]->main_class_code
+ )
+ ), $this->placeholder->active
+ ),
+ $guiMapper
+ );
+ }
+ // reset back to starting value
+ $this->config->lang_target = $tmp_lang_target;
+
+ return true;
+ }
+ }
+ // we failed to get the power,
+ // so we raise an error message
+ // only if guid is valid
+ if (GuidHelper::valid($guid))
+ {
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP', $guid),
+ 'Error'
+ );
+ }
+ // let's not try again
+ $this->state[$guid] = false;
+
+ return false;
+ }
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php
new file mode 100644
index 000000000..9d7e52bf7
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Component.php
@@ -0,0 +1,56 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Component\Placeholder as ComponentPlaceholder;
+
+
+/**
+ * Component Service Provider
+ *
+ * @since 3.2.0
+ */
+class Component implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(ComponentPlaceholder::class, 'Component.Placeholder')
+ ->share('Component.Placeholder', [$this, 'getComponentPlaceholder'], true);
+ }
+
+ /**
+ * Get the Component Placeholders
+ *
+ * @param Container $container The DI container.
+ *
+ * @return ComponentPlaceholder
+ * @since 3.2.0
+ */
+ public function getComponentPlaceholder(Container $container): ComponentPlaceholder
+ {
+ return new ComponentPlaceholder(
+ $container->get('Config')
+ );
+ }
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Config.php
new file mode 100644
index 000000000..08372e34a
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Config.php
@@ -0,0 +1,54 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Config as CompilerConfig;
+
+
+/**
+ * Compiler Config Service Provider
+ *
+ * @since 3.2.0
+ */
+class Config implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(CompilerConfig::class, 'Config')
+ ->share('Config', [$this, 'getConfig'], true);
+ }
+
+ /**
+ * Get the Compiler Configurations
+ *
+ * @param Container $container The DI container.
+ *
+ * @return CompilerConfig
+ * @since 3.2.0
+ */
+ public function getConfig(Container $container): CompilerConfig
+ {
+ return new CompilerConfig();
+ }
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Customcode.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Customcode.php
new file mode 100644
index 000000000..ad55c797e
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Customcode.php
@@ -0,0 +1,99 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Customcode as CompilerCustomcode;
+use VDM\Joomla\Componentbuilder\Compiler\Customcode\External;
+use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
+
+
+/**
+ * Compiler Custom Code Service Provider
+ *
+ * @since 3.2.0
+ */
+class Customcode implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(CompilerCustomcode::class, 'Customcode')
+ ->share('Customcode', [$this, 'getCustomcode'], true);
+
+ $container->alias(External::class, 'Customcode.External')
+ ->share('Customcode.External', [$this, 'getExternal'], true);
+
+ $container->alias(Gui::class, 'Customcode.Gui')
+ ->share('Customcode.Gui', [$this, 'getGui'], true);
+ }
+
+ /**
+ * Get the Compiler Customcode
+ *
+ * @param Container $container The DI container.
+ *
+ * @return CompilerCustomcode
+ * @since 3.2.0
+ */
+ public function getCustomcode(Container $container): CompilerCustomcode
+ {
+ return new CompilerCustomcode(
+ $container->get('Config'),
+ $container->get('Placeholder'),
+ $container->get('Language.Extractor'),
+ $container->get('Customcode.External')
+ );
+ }
+
+ /**
+ * Get the Compiler Customcode External
+ *
+ * @param Container $container The DI container.
+ *
+ * @return External
+ * @since 3.2.0
+ */
+ public function getExternal(Container $container): External
+ {
+ return new External(
+ $container->get('Placeholder')
+ );
+ }
+
+ /**
+ * Get the Compiler Customcode Gui
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Gui
+ * @since 3.2.0
+ */
+ public function getGui(Container $container): Gui
+ {
+ return new Gui(
+ $container->get('Config'),
+ $container->get('Placeholder.Reverse')
+ );
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php
new file mode 100644
index 000000000..4f892f35d
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Event.php
@@ -0,0 +1,55 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface;
+use VDM\Joomla\Componentbuilder\Compiler\JoomlaThree\Event as J3Event;
+
+
+/**
+ * Event Service Provider
+ *
+ * @since 3.2.0
+ */
+class Event implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(J3Event::class, 'J3.Event')
+ ->share('J3.Event', [$this, 'getJ3Event'], true);
+ }
+
+ /**
+ * Get the Joomla 3 Event
+ *
+ * @param Container $container The DI container.
+ *
+ * @return EventInterface
+ * @since 3.2.0
+ */
+ public function getJ3Event(Container $container): EventInterface
+ {
+ return new J3Event();
+ }
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php
new file mode 100644
index 000000000..72b6c0445
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Extension.php
@@ -0,0 +1,55 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Interfaces\GetScriptInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Extension\JoomlaThree\InstallScript as J3InstallScript;
+
+
+/**
+ * Extension Script Service Provider
+ *
+ * @since 3.2.0
+ */
+class Extension implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(J3InstallScript::class, 'J3.Extension.InstallScript')
+ ->share('J3.Extension.InstallScript', [$this, 'getJ3ExtensionInstallScript'], true);
+ }
+
+ /**
+ * Get the Joomla 3 Extension Install Script
+ *
+ * @param Container $container The DI container.
+ *
+ * @return GetScriptInterface
+ * @since 3.2.0
+ */
+ public function getJ3ExtensionInstallScript(Container $container): GetScriptInterface
+ {
+ return new J3InstallScript();
+ }
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Language.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Language.php
new file mode 100644
index 000000000..786cb6138
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Language.php
@@ -0,0 +1,78 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Language as CompilerLanguage;
+use VDM\Joomla\Componentbuilder\Compiler\Language\Extractor;
+
+
+/**
+ * Compiler Language Service Provider
+ *
+ * @since 3.2.0
+ */
+class Language implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(CompilerLanguage::class, 'Language')
+ ->share('Language', [$this, 'getLanguage'], true);
+
+ $container->alias(Extractor::class, 'Language.Extractor')
+ ->share('Language.Extractor', [$this, 'getLanguageExtractor'], true);
+ }
+
+ /**
+ * Get the Compiler Language
+ *
+ * @param Container $container The DI container.
+ *
+ * @return CompilerLanguage
+ * @since 3.2.0
+ */
+ public function getLanguage(Container $container): CompilerLanguage
+ {
+ return new CompilerLanguage(
+ $container->get('Config')
+ );
+ }
+
+ /**
+ * Get the Compiler Language Extractor
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Extractor
+ * @since 3.2.0
+ */
+ public function getLanguageExtractor(Container $container): Extractor
+ {
+ return new Extractor(
+ $container->get('Config'),
+ $container->get('Language'),
+ $container->get('Placeholder')
+ );
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Placeholder.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Placeholder.php
new file mode 100644
index 000000000..844732cce
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Placeholder.php
@@ -0,0 +1,78 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder as CompilerPlaceholder;
+use VDM\Joomla\Componentbuilder\Compiler\Placeholder\Reverse;
+
+
+/**
+ * Compiler Placeholder Service Provider
+ *
+ * @since 3.2.0
+ */
+class Placeholder implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(CompilerPlaceholder::class, 'Placeholder')
+ ->share('Placeholder', [$this, 'getPlaceholder'], true);
+
+ $container->alias(Reverse::class, 'Placeholder.Reverse')
+ ->share('Placeholder.Reverse', [$this, 'getPlaceholderReverse'], true);
+ }
+
+ /**
+ * Get the Compiler Placeholder
+ *
+ * @param Container $container The DI container.
+ *
+ * @return CompilerPlaceholder
+ * @since 3.2.0
+ */
+ public function getPlaceholder(Container $container): CompilerPlaceholder
+ {
+ return new CompilerPlaceholder(
+ $container->get('Config')
+ );
+ }
+
+ /**
+ * Get the Compiler Placeholder Reverse
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Worker
+ * @since 3.2.0
+ */
+ public function getPlaceholderReverse(Container $container): Reverse
+ {
+ return new Reverse(
+ $container->get('Config'),
+ $container->get('Placeholder'),
+ $container->get('Language'),
+ $container->get('Language.Extractor')
+ );
+ }
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php
new file mode 100644
index 000000000..b13b3d4e4
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php
@@ -0,0 +1,59 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Componentbuilder\Compiler\Power as CompilerPower;
+
+
+/**
+ * Compiler Power Service Provider
+ *
+ * @since 3.2.0
+ */
+class Power implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(CompilerPower::class, 'Power')
+ ->share('Power', [$this, 'getPower'], true);
+ }
+
+ /**
+ * Get the Compiler Power
+ *
+ * @param Container $container The DI container.
+ *
+ * @return CompilerPower
+ * @since 3.2.0
+ */
+ public function getPower(Container $container): CompilerPower
+ {
+ return new CompilerPower(
+ $container->get('Config'),
+ $container->get('Placeholder'),
+ $container->get('Customcode'),
+ $container->get('Customcode.Gui')
+ );
+ }
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Service/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Indent.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Indent.php
new file mode 100644
index 000000000..ff3422f1b
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Indent.php
@@ -0,0 +1,90 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
+
+
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+
+
+/**
+ * The Indentation Factory
+ *
+ * @since 3.2.0
+ */
+abstract class Indent
+{
+ /**
+ * Spacer bucket (to speed-up the build)
+ *
+ * @var array
+ * @since 3.2.0
+ */
+ private static array $bucket = [];
+
+ /**
+ * The indentation string
+ *
+ * @var string
+ * @since 3.2.0
+ */
+ private static string $indent;
+
+ /**
+ * Set the space
+ *
+ * @param int $nr The number of spaces
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public function _(int $nr): string
+ {
+ // check if we already have the string
+ if (!isset(self::$bucket[$nr]))
+ {
+ // get the string
+ self::$bucket[$nr] = str_repeat(self::indent(), (int) $nr);
+ }
+ // return stored indentation
+ return self::$bucket[$nr];
+ }
+
+ /**
+ * Get the indentation string
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ private static function indent(): string
+ {
+ if (empty(self::$indent))
+ {
+ self::init();
+ }
+
+ return self::$indent;
+ }
+
+ /**
+ * The constructor for indent
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ private static function init()
+ {
+ // the default is TAB
+ self::$indent = Compiler::_('Config')->indentation_value;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Line.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Line.php
new file mode 100644
index 000000000..b000153c7
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Line.php
@@ -0,0 +1,79 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
+
+
+use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
+
+
+/**
+ * The Debug Line Number Factory
+ *
+ * @since 3.2.0
+ */
+abstract class Line
+{
+ /**
+ * Should we add debug lines
+ *
+ * @since 3.2.0
+ **/
+ private static $add = 'check';
+
+ /**
+ * Set the line number in comments
+ *
+ * @param int $nr The line number
+ * @param string $class The class name
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public static function _(int $nr, string $class): string
+ {
+ if (self::add())
+ {
+ return ' [' . $class . ' ' . $nr . ']';
+ }
+
+ return '';
+ }
+
+ /**
+ * Check if we should add the line number
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ private static function add(): bool
+ {
+ if (!is_bool(self::$add))
+ {
+ self::init();
+ }
+
+ return self::$add;
+ }
+
+ /**
+ * The constructor for add
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ private static function init()
+ {
+ self::$add = Compiler::_('Config')->debug_line_nr;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Placefix.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Placefix.php
new file mode 100644
index 000000000..db5c11214
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Placefix.php
@@ -0,0 +1,106 @@
+
+ * @git Joomla Component Builder
+ * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
+ */
+
+namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
+
+
+/**
+ * The Placeholder Prefix and Suffix Factory
+ *
+ * @since 3.2.0
+ */
+abstract class Placefix
+{
+ /**
+ * The hash prefix and suffix
+ *
+ * @var string
+ * @since 3.2.0
+ **/
+ private static $hhh = '#' . '#' . '#';
+
+ /**
+ * The open prefix
+ *
+ * @var string
+ * @since 3.2.0
+ **/
+ private static $bbb = '[' . '[' . '[';
+
+ /**
+ * The close suffix
+ *
+ * @var string
+ * @since 3.2.0
+ **/
+ private static $ddd = ']' . ']' . ']';
+
+ /**
+ * Get a prefix and suffix added to given string
+ *
+ * @param string $class The class name
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public static function _(string $string): string
+ {
+ return self::b() . $string . self::d();
+ }
+
+ /**
+ * Get a open prefix
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public static function b(): string
+ {
+ return self::$bbb;
+ }
+
+ /**
+ * Get a close suffix
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public static function d(): string
+ {
+ return self::$ddd;
+ }
+
+ /**
+ * Get a hash prefix and suffix added to given string
+ *
+ * @param string $class The class name
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public static function _h(string $string): string
+ {
+ return self::h() . $string . self::h();
+ }
+
+ /**
+ * Get a hash-fix
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ public static function h(): string
+ {
+ return self::$hhh;
+ }
+
+}
+
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/index.html b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Factory/Compiler/Config.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Factory/Compiler/Config.php
deleted file mode 100644
index 20fdeb033..000000000
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Factory/Compiler/Config.php
+++ /dev/null
@@ -1,257 +0,0 @@
-
- * @git Joomla Component Builder
- * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
- */
-
-namespace VDM\Joomla\Componentbuilder\Factory\Compiler;
-
-
-use Joomla\CMS\Factory;
-use Joomla\Registry\Registry;
-use VDM\Joomla\Componentbuilder\Compiler\Config as CompilerConfig;
-use VDM\Joomla\Utilities\ArrayHelper;
-
-
-/**
- * Factory to load the compiler config
- */
-abstract class Config
-{
- /**
- * Global Config object
- *
- * @var CompilerConfig
- * @since 3.1.6
- **/
- protected static $CompilerConfig = null;
-
- /**
- * Get a value.
- *
- * @param string $path Registry path (e.g. version)
- * @param mixed $default Optional default value, returned if the internal value is null.
- *
- * @return mixed Value of entry or null
- *
- * @since 3.1.6
- */
- public static function get(string $path, $default = null)
- {
- // check that if we already have config registry set
- if (!self::$CompilerConfig)
- {
- // create config registry
- self::$CompilerConfig = self::create();
- }
-
- // return the value or default if none is found
- return self::$CompilerConfig->get($path, $default);
- }
-
- /**
- * Check if a registry path exists.
- *
- * @param string $path Registry path (e.g. guid.main.0.path)
- *
- * @return boolean
- *
- * @since 3.1.6
- */
- public static function exists($path)
- {
- // check that if we already have config registry set
- if (!self::$CompilerConfig)
- {
- // create config registry
- self::$CompilerConfig = self::create();
- }
-
- // check if exists
- return self::$CompilerConfig->exists($path);
- }
-
- /**
- * Method to extract a sub-registry from path
- *
- * @param string $path Registry path (e.g. guid.main)
- *
- * @return Registry Registry object (empty if no data is present)
- *
- * @since 3.1.6
- */
- public function extract($path)
- {
- if (!self::exists($path))
- {
- // create config registry
- return new Registry();
- }
-
- return self::$CompilerConfig->extract($path);
- }
-
- /**
- * Gets this object represented as an ArrayIterator.
- *
- * This allows the data properties to be accessed via a foreach statement.
- *
- * @return \ArrayIterator This object represented as an ArrayIterator.
- *
- * @see IteratorAggregate::getIterator()
- * @since 3.1.6
- */
- #[\ReturnTypeWillChange]
- public static function getIterator()
- {
- // check that if we already have config registry set
- if (!self::$CompilerConfig)
- {
- // create config registry
- self::$CompilerConfig = self::create();
- }
-
- return self::$CompilerConfig->getIterator();
- }
-
- /**
- * Set a registry value.
- *
- * @param string $path Registry Path (e.g. guid.main.0.url)
- * @param mixed $value Value of entry
- * @param string $separator The key separator
- *
- * @return mixed The value of the that has been set.
- *
- * @since 3.1.6
- */
- public static function set($path, $value, $separator = null)
- {
- // check that if we already have config registry set
- if (!self::$CompilerConfig)
- {
- // create config registry
- self::$CompilerConfig = self::create();
- }
-
- self::$CompilerConfig->set($path, $value, $separator);
- }
-
- /**
- * Delete a registry value
- *
- * @param string $path Registry Path (e.g. guid.main.0.url)
- *
- * @return mixed The value of the removed node or null if not set
- *
- * @since 3.1.6
- */
- public static function remove($path)
- {
- // check that if we already have config registry set
- if (!self::$CompilerConfig)
- {
- // create config registry
- self::$CompilerConfig = self::create();
- }
-
- // remove the actual value
- return self::$CompilerConfig->remove($path);
- }
-
- /**
- * Transforms a namespace to an array
- *
- * @return array An associative array holding the namespace data
- *
- * @since 3.1.6
- */
- public static function toArray()
- {
- // check that if we already have config registry set
- if (!self::$CompilerConfig)
- {
- // create config registry
- self::$CompilerConfig = self::create();
- }
-
- return self::$CompilerConfig->toArray();
- }
-
- /**
- * Transforms a namespace to an object
- *
- * @return object An an object holding the namespace data
- *
- * @since 3.1.6
- */
- public static function toObject()
- {
- // check that if we already have config registry set
- if (!self::$CompilerConfig)
- {
- // create config registry
- self::$CompilerConfig = self::create();
- }
-
- return self::$CompilerConfig->toObject();
- }
-
- /**
- * Initialize a CompilerConfig object if id does not exist.
- *
- * Returns the global {@link CompilerConfig} object, only creating it if it doesn't already exist.
- *
- * @param array $config The data to bind to the new Config object.
- *
- *
- * @return CompilerConfig object
- *
- * @see Session
- * @since 3.1.6
- **/
- public static function init($config = null): CompilerConfig
- {
- if (!self::$CompilerConfig)
- {
- self::$CompilerConfig = self::create($config);
- }
-
- return self::$CompilerConfig;
- }
-
- /**
- * Create a CompilerConfig object
- *
- * @param array $config The data to bind to the new Config object.
- *
- * @return CompilerConfig object
- * @since 3.1.6
- * @throws \Exception
- **/
- protected static function create($config = null): CompilerConfig
- {
- // get the session
- $session = Factory::getSession();
-
- // check if we have config
- if (ArrayHelper::check($config))
- {
- // save for later should we call this out of scope
- $session->set('Componentbuilder.Compiler.Config', $config);
- }
- // if not found try loading it from the session
- elseif (($config = $session->get('Componentbuilder.Compiler.Config', false)) === false)
- {
- throw new \Exception('Compiler configuration not found.');
- }
-
- return new CompilerConfig($config);
- }
-}
-
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Tab.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Tab.php
deleted file mode 100644
index 070435503..000000000
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Tab.php
+++ /dev/null
@@ -1,58 +0,0 @@
-
- * @git Joomla Component Builder
- * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
- */
-
-namespace VDM\Joomla\Componentbuilder;
-
-
-/**
- * Adds Tabs
- *
- * @since 3.1.5
- */
-trait Tab
-{
- /**
- * Tab/spacer bucket (to speed-up the build)
- *
- * @var array
- * @since 3.1.5
- */
- protected $tabSpacerBucket = array();
-
- /**
- * Set tab/spacer
- *
- * @var string
- * @since 3.1.5
- */
- protected $tabSpacer = "\t";
-
- /**
- * Set the tab/space
- *
- * @param int $nr The number of tag/space
- *
- * @return string
- * @since 3.1.5
- */
- public function _t(int $nr) : string
- {
- // check if we already have the string
- if (!isset($this->tabSpacerBucket[$nr]))
- {
- // get the string
- $this->tabSpacerBucket[$nr] = str_repeat($this->tabSpacer, (int) $nr);
- }
- // return stored string
- return $this->tabSpacerBucket[$nr];
- }
-}
-
diff --git a/libraries/jcb_powers/VDM.Joomla/src/index.html b/libraries/jcb_powers/VDM.Joomla/src/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/jcb_powers/VDM.Joomla/src/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini
index 31d1c9ab4..7a37a2961 100644
--- a/site/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/site/language/en-GB/en-GB.com_componentbuilder.ini
@@ -41,9 +41,15 @@ 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_HTHREEEXTERNAL_CODE_ERRORHTHREE="External Code Error "
+COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE="External Code Notice "
+COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE="External Code Warning "
+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!
"
COM_COMPONENTBUILDER_IAUTHORI_BSB="Author: %s "
COM_COMPONENTBUILDER_ICOMPANYI_BSB="Company: %s "
+COM_COMPONENTBUILDER_ID_MISMATCH_WAS_DETECTED_WITH_THE_SSSS_GUI_CODE_FIELD_SO_THE_PLACEHOLDER_WAS_NOT_SET="ID mismatch was detected with the %s.%s.%s.%s GUI code field. So the placeholder was not set."
COM_COMPONENTBUILDER_IEMAILI_BSB="Email: %s "
COM_COMPONENTBUILDER_IWEBSITEI_BSB="Website: %s "
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key"
@@ -66,19 +72,28 @@ 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_PLUGIN="Plugin"
+COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="Power guid:%s not found!
"
COM_COMPONENTBUILDER_PROPERTY="Property"
+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_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 ."
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="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."
COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE="Sorry this placeholder is already in use!"
COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE_IN_THE_COMPILER="Sorry this placeholder is already in use in the compiler!"
+COM_COMPONENTBUILDER_S_WE_DETECTED_A_CHANGE_IN_BEXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_CHANGE_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected a change in EXTERNALCODE , but you do not have permission to allow this change so %s was removed from the compilation. Please contact your system administrator for more info!(admin access required) "
+COM_COMPONENTBUILDER_S_WE_DETECTED_BNEW_EXTERNALCODEB_BUT_YOU_DO_NOT_HAVE_PERMISSION_TO_ALLOW_THIS_NEW_CODESTRING_SO_BSB_WAS_REMOVED_FROM_THE_COMPILATION_PLEASE_CONTACT_YOU_SYSTEM_ADMINISTRATOR_FOR_MORE_INFOBR_SMALLADMIN_ACCESS_REQUIREDSMALL="%s, we detected NEW EXTERNALCODE , but you do not have permission to allow this new code/string so %s was removed from the compilation. Please contact you system administrator for more info!(admin access required) "
COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. 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_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="That means anyone who has this package can install it into JCB. 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_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The phpseclib\NET\SFTP library\class is not available! This library\class should have been added to your libraries/vdm_io/vendor folder. Please contact your system administrator for more info"
+COM_COMPONENTBUILDER_THE_BSB_CUT_SEQUENCE_FAILED_ON_THE_RETURNED_EXTERNAL_CODESTRING_AS_MORE_LINES_HAS_TO_BE_CUT_THEN_WAS_FOUND_IN_THE_CODESTRING_WE_HAVE_COMPLETELY_REMOVED_THE_CODE_PLEASE_CHECK_THIS_CODESTRING="The %s cut sequence failed on the returned external code/string as more lines has to be cut then was found in the code/string. We have completely removed the code. Please check this code/string!"
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The %s file could not be moved to %s path on %s server."
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The %s file could not be moved to %s server."
+COM_COMPONENTBUILDER_THE_BSB_IS_NOT_A_VALID_URLPATH="The %s is not a valid url/path!"
COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESPHPSECLIBVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The %s library\class is not available! This library\class should have been added to your libraries/phpseclib/vendor folder. Please contact your system administrator for more info!"
+COM_COMPONENTBUILDER_THE_BSB_RETURNED_AN_INVALID_STRING="The %s returned an invalid string!"
+COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_ADDED_FOR_THE_BFIRST_TIMEB_PLEASE_IINVESTIGATEI_TO_ENSURE_THE_CORRECT_CODESTRING_WAS_USED_BSHOULD_YOU_NOT_KNOW_ABOUT_THIS_NEW_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_DANGER_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB="The code/string from %s has been added for the first time . Please investigate to ensure the correct code/string was used! Should you not know about this NEW external code/string being added, then this is a serious danger! and requires immediate attention! Do not ignore this warning as it will only show once ."
+COM_COMPONENTBUILDER_THE_CODESTRING_FROM_BSB_HAS_BEEN_BCHANGEDB_SINCE_THE_LAST_COMPILATION_PLEASE_INVESTIGATE_TO_ENSURE_THE_CHANGES_ARE_SAFE_BSHOULD_YOU_NOT_EXPECT_THIS_CHANGE_TO_THE_EXTERNAL_CODESTRING_BEING_ADDED_THEN_THIS_IS_A_SERIOUS_ISSUE_AND_REQUIRES_IMMEDIATE_ATTENTIONB_DO_NOT_IGNORE_THIS_WARNING_AS_IT_WILL_ONLY_SHOW_BONCEB="The code/string from %s has been changed since the last compilation. Please investigate to ensure the changes are safe! Should you not expect this change to the external code/string being added, then this is a serious issue! and requires immediate attention! Do not ignore this warning as it will only show once ."
COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP connection for %s could not be made. Please check your signature details!"
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for %s was not well formed, please check your signature details!"
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_DETAILS_ARE_CORRECT="The login to %s has failed, please check that your details are correct!"
diff --git a/site/models/api.php b/site/models/api.php
index 3d3e30ac0..2e4c557b5 100644
--- a/site/models/api.php
+++ b/site/models/api.php
@@ -14,6 +14,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\ItemModel;
use Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
/**
* Componentbuilder Api Item Model
@@ -193,14 +194,14 @@ class ComponentbuilderModelApi extends ItemModel
public function compileInstall($component)
{
$values = array(
- 'version' => 3,
- 'install' => 1,
- 'component' => 0,
+ 'joomla_version' => 3,
+ 'install' => 0,
+ 'component_id' => 0,
'backup' => 0,
'repository' => 0,
- 'placeholders' => 2,
- 'debuglinenr' => 2,
- 'minify' => 2
+ 'add_placeholders' => 0,
+ 'debug_line_nr' => 0,
+ 'minify' => 0
);
// set the values
foreach ($values as $key => $val)
@@ -211,16 +212,18 @@ class ComponentbuilderModelApi extends ItemModel
}
}
// make sure we have a component
- if (isset($values['component']) && $values['component'] > 1)
+ if (isset($values['component_id']) && $values['component_id'] > 1)
{
// make sure the component is published
- $published = ComponentbuilderHelper::getVar('joomla_component', (int) $values['component'], 'id', 'published');
+ $published = ComponentbuilderHelper::getVar('joomla_component', (int) $values['component_id'], 'id', 'published');
// make sure the component is checked in
- $checked_out = ComponentbuilderHelper::getVar('joomla_component', (int) $values['component'], 'id', 'checked_out');
+ $checked_out = ComponentbuilderHelper::getVar('joomla_component', (int) $values['component_id'], 'id', 'checked_out');
if (1 == $published && $checked_out == 0)
{
+ // load the config values
+ CFactory::_('Config')->loadArray($values, true);
// start up Compiler
- $this->compiler = new Compiler($values);
+ $this->compiler = new Compiler();
if($this->compiler)
{
// component was compiled
@@ -228,12 +231,12 @@ class ComponentbuilderModelApi extends ItemModel
// get compiler model to run the installer
$model = ComponentbuilderHelper::getModel('compiler', JPATH_COMPONENT_ADMINISTRATOR);
// now install components
- if (1 == $values['install'] && $model->install($this->compiler->componentFolderName.'.zip'))
+ if (1 == CFactory::_('Config')->install && $model->install($this->compiler->componentFolderName.'.zip'))
{
// component was installed
$this->messages[] = JText::sprintf('COM_COMPONENTBUILDER_THE_S_WAS_SUCCESSFULLY_INSTALLED_AND_REMOVED_FROM_TEMP_FOLDER', $this->compiler->componentFolderName);
}
- elseif (1 != $values['install'])
+ elseif (1 != CFactory::_('Config')->install)
{
jimport('joomla.filesystem.file');
$config = JFactory::getConfig();