Move the whole compiler GET of the component object to now use the container->component object/class.

This commit is contained in:
2023-01-22 02:38:21 +02:00
parent f44f385159
commit e6c02a29f6
115 changed files with 13148 additions and 6292 deletions

View File

@ -140,14 +140,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 15th January, 2023
+ *Last Build*: 22nd January, 2023
+ *Version*: 3.1.13
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **345248**
+ *Line count*: **357633**
+ *Field count*: **2009**
+ *File count*: **2240**
+ *Folder count*: **399**
+ *File count*: **2304**
+ *Folder count*: **408**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -171,19 +171,19 @@ class ComponentbuilderControllerCompiler extends AdminController
}
$message[] = '<h2>Total time saved</h2>';
$message[] = '<ul>';
$message[] = '<li>Total folders created: <b>'.$model->compiler->folderCount.'</b></li>';
$message[] = '<li>Total files created: <b>'.$model->compiler->fileCount.'</b></li>';
$message[] = '<li>Total fields created: <b>'.$model->compiler->fieldCount.'</b></li>';
$message[] = '<li>Total lines written: <b>'.$model->compiler->lineCount.'</b></li>';
$message[] = '<li>A4 Book of: <b>'.$model->compiler->pageCount.' pages</b></li>';
$message[] = '<li>Total folders created: <b>#'.'##FOLDER_COUNT##'.'#</b></li>';
$message[] = '<li>Total files created: <b>#'.'##FILE_COUNT##'.'#</b></li>';
$message[] = '<li>Total fields created: <b>#'.'##FIELD_COUNT##'.'#</b></li>';
$message[] = '<li>Total lines written: <b>#'.'##LINE_COUNT##'.'#</b></li>';
$message[] = '<li>A4 Book of: <b>#'.'##PAGE_COUNT##'.'# pages</b></li>';
$message[] = '</ul>';
$message[] = '<p><b>'.$model->compiler->totalHours.' Hours</b> or <b>'.$model->compiler->totalDays.' Eight Hour Days</b> <em>(actual time you saved)</em><br />';
$message[] = '<p><b>#'.'##totalHours##'.'# Hours</b> or <b>#'.'##totalDays##'.'# Eight Hour Days</b> <em>(actual time you saved)</em><br />';
$message[] = '<small>(if creating a folder and file took <b>5 seconds</b> and writing one line of code took <b>10 seconds</b>, never making one mistake or taking any coffee break.)</small><br />';
$message[] = '<b>'.$model->compiler->actualHoursSpent.' Hours</b> or <b>'.$model->compiler->actualDaysSpent.' Eight Hour Days</b> <em>(the actual time you spent)</em><br />';
$message[] = '<small>(with the following break down: <b>debugging @'.$model->compiler->debuggingHours.'hours</b> = codingtime / 4; <b>planning @'.$model->compiler->planningHours.'hours</b> = codingtime / 7; <b>mapping @'.$model->compiler->mappingHours.'hours</b> = codingtime / 10; <b>office @'.$model->compiler->officeHours.'hours</b> = codingtime / 6;)</small></p>';
$message[] = '<p><b>'.$model->compiler->actualTotalHours.' Hours</b> or <b>'.$model->compiler->actualTotalDays.' Eight Hour Days</b> <em>(a total of the realistic time frame for this project)</em><br />';
$message[] = '<b>#'.'##actualHoursSpent##'.'# Hours</b> or <b>#'.'##actualDaysSpent##'.'# Eight Hour Days</b> <em>(the actual time you spent)</em><br />';
$message[] = '<small>(with the following break down: <b>debugging @#'.'##debuggingHours##'.'#hours</b> = codingtime / 4; <b>planning @#'.'##planningHours##'.'#hours</b> = codingtime / 7; <b>mapping @#'.'##mappingHours##'.'#hours</b> = codingtime / 10; <b>office @#'.'##officeHours##'.'#hours</b> = codingtime / 6;)</small></p>';
$message[] = '<p><b>#'.'##actualTotalHours##'.'# Hours</b> or <b>#'.'##actualTotalDays##'.'# Eight Hour Days</b> <em>(a total of the realistic time frame for this project)</em><br />';
$message[] = '<small>(if creating a folder and file took <b>5 seconds</b> and writing one line of code took <b>10 seconds</b>, with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)</small></p>';
$message[] = '<p>Project duration: <b>'.$model->compiler->projectWeekTime. ' weeks</b> or <b>'.$model->compiler->projectMonthTime.' months</b></p>';
$message[] = '<p>Project duration: <b>'.$model->compiler->projectWeekTime. ' weeks</b> or <b>#'.'##projectMonthTime##'.'# months</b></p>';
// check if we have modules or plugins
if ($add_multi_install)
{
@ -254,9 +254,14 @@ class ComponentbuilderControllerCompiler extends AdminController
$message[] = '<a class="btn btn-success" href="' . $url . '" ><span class="icon-download icon-white"></span>Download</a></p>';
$message[] = '<p><small><b>Remember!</b> This zip file is in your tmp folder and therefore publicly accessible until you click [Clear tmp]!</small> </p>';
}
$message[] = '<p><small>Compilation took <b>'.$model->compiler->secondsCompiled.'</b> seconds to complete.</small> </p>';
$message[] = '<p><small>Compilation took <b>#'.'##COMPILER_TIMER##'.'#</b> seconds to complete.</small> </p>';
// pass the message via the user state... wow this is painful
$app->setUserState('com_componentbuilder.success_message', implode(PHP_EOL, $message));
$app->setUserState('com_componentbuilder.success_message',
CFactory::_('Placeholder')->update(
implode(PHP_EOL, $message),
CFactory::_('Content')->active
)
);
// set redirect
$this->setRedirect($redirect_url, '<h2>Successful Build!</h2>', 'message');
$app->setUserState('com_componentbuilder.component_folder_name', $model->compiler->filepath['component-folder']);

View File

@ -31,6 +31,7 @@ ComponentbuilderHelper::autoLoader();
/**
* Compiler class
* @deprecated 3.3
*/
class Compiler extends Infusion
{
@ -79,7 +80,8 @@ class Compiler extends Infusion
{
// to check the compiler speed
$this->time_start = microtime(true);
// first we run the perent constructors
CFactory::_('Counter')->start();
// first we run the parent constructors
if (parent::__construct())
{
// set temp directory
@ -271,8 +273,6 @@ class Compiler extends Infusion
}
// move the update server into place
$this->setUpdateServer();
// set the global counters
$this->setCountingStuff();
// build read me
$this->buildReadMe();
// set local repos
@ -363,6 +363,7 @@ class Compiler extends Infusion
// end the timer here
$this->time_end = microtime(true);
$this->secondsCompiled = $this->time_end - $this->time_start;
CFactory::_('Counter')->end();
// completed the compilation
return true;
@ -424,9 +425,9 @@ class Compiler extends Infusion
// free up some memory
unset($this->newFiles['dynamic']);
// do modules if found
if (ArrayHelper::check($this->joomlaModules))
if (CFactory::_('Joomlamodule.Data')->exists())
{
foreach ($this->joomlaModules as $module)
foreach (CFactory::_('Joomlamodule.Data')->get() as $module)
{
if (ObjectHelper::check($module)
&& isset($this->newFiles[$module->key])
@ -505,9 +506,9 @@ class Compiler extends Infusion
}
}
// do plugins if found
if (ArrayHelper::check($this->joomlaPlugins))
if (CFactory::_('Joomlaplugin.Data')->exists())
{
foreach ($this->joomlaPlugins as $plugin)
foreach (CFactory::_('Joomlaplugin.Data')->get() as $plugin)
{
if (ObjectHelper::check($plugin)
&& isset($this->newFiles[$plugin->key])
@ -682,7 +683,7 @@ class Compiler extends Infusion
// add answer back to file
$this->writeFile($path, $answer);
// count the file lines
$this->lineCount = $this->lineCount + substr_count((string) $answer, PHP_EOL);
CFactory::_('Counter')->line += substr_count((string) $answer, PHP_EOL);
}
/**
@ -694,8 +695,7 @@ class Compiler extends Infusion
protected function setUpdateServer()
{
// move the component update server to host
if ($this->componentData->add_update_server == 1
&& $this->componentData->update_server_target == 1
if (CFactory::_('Component')->get('add_update_server', 0) == 1
&& isset($this->updateServerFileName)
&& $this->dynamicIntegration)
{
@ -703,23 +703,23 @@ class Compiler extends Infusion
. $this->updateServerFileName . '.xml';
// make sure we have the correct file
if (File::exists($update_server_xml_path)
&& isset($this->componentData->update_server))
&& ($update_server = CFactory::_('Component')->get('update_server')) !== null)
{
// move to server
ComponentbuilderHelper::moveToServer(
$update_server_xml_path,
$this->updateServerFileName . '.xml',
(int) $this->componentData->update_server,
$this->componentData->update_server_protocol
(int) $update_server,
CFactory::_('Component')->get('update_server_protocol')
);
// remove the local file
File::delete($update_server_xml_path);
}
}
// move the modules update server to host
if (ArrayHelper::check($this->joomlaModules))
if (CFactory::_('Joomlamodule.Data')->exists())
{
foreach ($this->joomlaModules as $module)
foreach (CFactory::_('Joomlamodule.Data')->get() as $module)
{
if (ObjectHelper::check($module)
&& isset($module->add_update_server)
@ -750,9 +750,9 @@ class Compiler extends Infusion
}
}
// move the plugins update server to host
if (ArrayHelper::check($this->joomlaPlugins))
if (CFactory::_('Joomlaplugin.Data')->exists())
{
foreach ($this->joomlaPlugins as $plugin)
foreach (CFactory::_('Joomlaplugin.Data')->get() as $plugin)
{
if (ObjectHelper::check($plugin)
&& isset($plugin->add_update_server)
@ -791,7 +791,7 @@ class Compiler extends Infusion
&& ArrayHelper::check(
$data['config']
)
&& $this->componentData->mvc_versiondate == 1)
&& CFactory::_('Component')->get('mvc_versiondate', 0) == 1)
{
foreach ($data['config'] as $key => $value)
{
@ -820,40 +820,23 @@ class Compiler extends Infusion
CFactory::_('Content')->set('VERSION', CFactory::_('Content')->get('GLOBALVERSION'));
}
// set all global numbers
/**
* Set all global numbers
*
* @return void
* @deprecated 3.3
*/
protected function setCountingStuff()
{
// what is the size in terms of an A4 book
$this->pageCount = round($this->lineCount / 56);
// setup the unrealistic numbers
$this->folderSeconds = $this->folderCount * 5;
$this->fileSeconds = $this->fileCount * 5;
$this->lineSeconds = $this->lineCount * 10;
$this->seconds = $this->folderSeconds + $this->fileSeconds
+ $this->lineSeconds;
$this->totalHours = round($this->seconds / 3600);
$this->totalDays = round($this->totalHours / 8);
// setup the more realistic numbers
$this->secondsDebugging = $this->seconds / 4;
$this->secondsPlanning = $this->seconds / 7;
$this->secondsMapping = $this->seconds / 10;
$this->secondsOffice = $this->seconds / 6;
$this->actualSeconds = $this->folderSeconds + $this->fileSeconds
+ $this->lineSeconds + $this->secondsDebugging
+ $this->secondsPlanning + $this->secondsMapping
+ $this->secondsOffice;
$this->actualTotalHours = round($this->actualSeconds / 3600);
$this->actualTotalDays = round($this->actualTotalHours / 8);
$this->debuggingHours = round($this->secondsDebugging / 3600);
$this->planningHours = round($this->secondsPlanning / 3600);
$this->mappingHours = round($this->secondsMapping / 3600);
$this->officeHours = round($this->secondsOffice / 3600);
// the actual time spent
$this->actualHoursSpent = $this->actualTotalHours - $this->totalHours;
$this->actualDaysSpent = $this->actualTotalDays - $this->totalDays;
// calculate the projects actual time frame of completion
$this->projectWeekTime = round($this->actualTotalDays / 5, 1);
$this->projectMonthTime = round($this->actualTotalDays / 24, 1);
// set notice that we could not get a valid string from the target
$this->app->enqueueMessage(
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
);
$this->app->enqueueMessage(
JText::sprintf(
'Use of a deprecated method (%s)!', __METHOD__
), 'Error'
);
}
private function buildReadMe()
@ -864,7 +847,7 @@ class Compiler extends Infusion
{
if (('README.md' === $static['name']
|| 'README.txt' === $static['name'])
&& $this->componentData->addreadme
&& CFactory::_('Component')->get('addreadme')
&& File::exists($static['path']))
{
$this->setReadMe($static['path']);
@ -882,10 +865,9 @@ class Compiler extends Infusion
{
// set readme data if not set already
if (!CFactory::_('Content')->exist('LINE_COUNT')
|| CFactory::_('Content')->get('LINE_COUNT')
!= $this->lineCount)
|| CFactory::_('Content')->get('LINE_COUNT') != CFactory::_('Counter')->line)
{
$this->buildReadMeData();
CFactory::_('Counter')->set();
}
// get the file
$string = FileHelper::getContent($path);
@ -895,42 +877,23 @@ class Compiler extends Infusion
$this->writeFile($path, $answer);
}
/**
* Build README data
*
* @return void
* @deprecated 3.3
*/
private function buildReadMeData()
{
// set some defaults
CFactory::_('Content')->set('LINE_COUNT', $this->lineCount);
CFactory::_('Content')->set('FIELD_COUNT', $this->fieldCount);
CFactory::_('Content')->set('FILE_COUNT', $this->fileCount);
CFactory::_('Content')->set('FOLDER_COUNT', $this->folderCount);
CFactory::_('Content')->set('PAGE_COUNT', $this->pageCount);
CFactory::_('Content')->set('folders', $this->folderSeconds);
CFactory::_('Content')->set('foldersSeconds', $this->folderSeconds);
CFactory::_('Content')->set('files', $this->fileSeconds);
CFactory::_('Content')->set('filesSeconds', $this->fileSeconds);
CFactory::_('Content')->set('lines', $this->lineSeconds);
CFactory::_('Content')->set('linesSeconds', $this->lineSeconds);
CFactory::_('Content')->set('seconds', $this->actualSeconds);
CFactory::_('Content')->set('actualSeconds', $this->actualSeconds);
CFactory::_('Content')->set('totalHours', $this->totalHours);
CFactory::_('Content')->set('totalDays', $this->totalDays);
CFactory::_('Content')->set('debugging', $this->secondsDebugging);
CFactory::_('Content')->set('secondsDebugging', $this->secondsDebugging);
CFactory::_('Content')->set('planning', $this->secondsPlanning);
CFactory::_('Content')->set('secondsPlanning', $this->secondsPlanning);
CFactory::_('Content')->set('mapping', $this->secondsMapping);
CFactory::_('Content')->set('secondsMapping', $this->secondsMapping);
CFactory::_('Content')->set('office', $this->secondsOffice);
CFactory::_('Content')->set('secondsOffice', $this->secondsOffice);
CFactory::_('Content')->set('actualTotalHours', $this->actualTotalHours);
CFactory::_('Content')->set('actualTotalDays', $this->actualTotalDays);
CFactory::_('Content')->set('debuggingHours', $this->debuggingHours);
CFactory::_('Content')->set('planningHours', $this->planningHours);
CFactory::_('Content')->set('mappingHours', $this->mappingHours);
CFactory::_('Content')->set('officeHours', $this->officeHours);
CFactory::_('Content')->set('actualHoursSpent', $this->actualHoursSpent);
CFactory::_('Content')->set('actualDaysSpent', $this->actualDaysSpent);
CFactory::_('Content')->set('projectWeekTime', $this->projectWeekTime);
CFactory::_('Content')->set('projectMonthTime', $this->projectMonthTime);
// set notice that we could not get a valid string from the target
$this->app->enqueueMessage(
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
);
$this->app->enqueueMessage(
JText::sprintf(
'Use of a deprecated method (%s)!', __METHOD__
), 'Error'
);
}
private function setLocalRepos()
@ -943,7 +906,7 @@ class Compiler extends Infusion
{
// set the repo path
$repoFullPath = $this->repoPath . '/com_'
. $this->componentData->sales_name . '__joomla_'
. CFactory::_('Component')->get('sales_name') . '__joomla_'
. CFactory::_('Config')->get('version', 3);
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
@ -954,7 +917,7 @@ class Compiler extends Infusion
&$repoFullPath, &$this->componentData)
);
// remove old data
$this->removeFolder($repoFullPath, $this->componentData->toignore);
$this->removeFolder($repoFullPath, CFactory::_('Component')->get('toignore'));
// set the new data
Folder::copy($this->componentPath, $repoFullPath, '', true);
// Trigger Event: jcb_ce_onAfterUpdateRepo
@ -965,9 +928,9 @@ class Compiler extends Infusion
);
// move the modules to local folder repos
if (ArrayHelper::check($this->joomlaModules))
if (CFactory::_('Joomlamodule.Data')->exists())
{
foreach ($this->joomlaModules as $module)
foreach (CFactory::_('Joomlamodule.Data')->get() as $module)
{
if (ObjectHelper::check($module)
&& isset($module->file_name))
@ -986,7 +949,7 @@ class Compiler extends Infusion
);
// remove old data
$this->removeFolder(
$repoFullPath, $this->componentData->toignore
$repoFullPath, CFactory::_('Component')->get('toignore')
);
// set the new data
Folder::copy(
@ -1002,9 +965,9 @@ class Compiler extends Infusion
}
}
// move the plugins to local folder repos
if (ArrayHelper::check($this->joomlaPlugins))
if (CFactory::_('Joomlaplugin.Data')->exists())
{
foreach ($this->joomlaPlugins as $plugin)
foreach (CFactory::_('Joomlaplugin.Data')->get() as $plugin)
{
if (ObjectHelper::check($plugin)
&& isset($plugin->file_name))
@ -1023,7 +986,7 @@ class Compiler extends Infusion
);
// remove old data
$this->removeFolder(
$repoFullPath, $this->componentData->toignore
$repoFullPath, CFactory::_('Component')->get('toignore')
);
// set the new data
Folder::copy(
@ -1081,11 +1044,11 @@ class Compiler extends Infusion
);
}
// move to sales server host
if ($this->componentData->add_sales_server == 1
if (CFactory::_('Component')->get('add_sales_server', 0) == 1
&& $this->dynamicIntegration)
{
// make sure we have the correct file
if (isset($this->componentData->sales_server))
if (CFactory::_('Component')->get('sales_server'))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
CFactory::_('Event')->trigger(
@ -1098,8 +1061,8 @@ class Compiler extends Infusion
ComponentbuilderHelper::moveToServer(
$this->filepath['component'],
$this->componentSalesName . '.zip',
(int) $this->componentData->sales_server,
$this->componentData->sales_server_protocol
(int) CFactory::_('Component')->get('sales_server'),
CFactory::_('Component')->get('sales_server_protocol')
);
}
}
@ -1122,9 +1085,9 @@ class Compiler extends Infusion
private function zipModules()
{
if (ArrayHelper::check($this->joomlaModules))
if (CFactory::_('Joomlamodule.Data')->exists())
{
foreach ($this->joomlaModules as $module)
foreach (CFactory::_('Joomlamodule.Data')->get() as $module)
{
if (ObjectHelper::check($module)
&& isset($module->zip_name)
@ -1216,9 +1179,9 @@ class Compiler extends Infusion
private function zipPlugins()
{
if (ArrayHelper::check($this->joomlaPlugins))
if (CFactory::_('Joomlaplugin.Data')->exists())
{
foreach ($this->joomlaPlugins as $plugin)
foreach (CFactory::_('Joomlaplugin.Data')->get() as $plugin)
{
if (ObjectHelper::check($plugin)
&& isset($plugin->zip_name)

File diff suppressed because it is too large Load Diff

View File

@ -28,15 +28,16 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
/**
* Structure class
* @deprecated 3.3
*/
class Structure extends Get
{
/**
* The folder counter
*
* @var int
* @deprecated 3.3 Use CFactory::_('Counter')->folder;
*/
public $folderCount = 0;
@ -44,6 +45,7 @@ class Structure extends Get
* The file counter
*
* @var int
* @deprecated 3.3 Use CFactory::_('Counter')->file;
*/
public $fileCount = 0;
@ -51,6 +53,7 @@ class Structure extends Get
* The page counter
*
* @var int
* @deprecated 3.3
*/
public $pageCount = 0;
@ -58,6 +61,8 @@ class Structure extends Get
* The line counter
*
* @var int
* @deprecated 3.3
* @deprecated 3.3 Use CFactory::_('Counter')->line;
*/
public $lineCount = 0;
@ -65,6 +70,7 @@ class Structure extends Get
* The field counter
*
* @var int
* @deprecated 3.3
*/
public $fieldCount = 0;
@ -72,6 +78,7 @@ class Structure extends Get
* The seconds counter
*
* @var int
* @deprecated 3.3
*/
public $seconds = 0;
@ -79,6 +86,7 @@ class Structure extends Get
* The actual seconds counter
*
* @var int
* @deprecated 3.3
*/
public $actualSeconds = 0;
@ -86,6 +94,7 @@ class Structure extends Get
* The folder seconds counter
*
* @var int
* @deprecated 3.3
*/
public $folderSeconds = 0;
@ -93,6 +102,7 @@ class Structure extends Get
* The file seconds counter
*
* @var int
* @deprecated 3.3
*/
public $fileSeconds = 0;
@ -100,6 +110,7 @@ class Structure extends Get
* The line seconds counter
*
* @var int
* @deprecated 3.3
*/
public $lineSeconds = 0;
@ -107,6 +118,7 @@ class Structure extends Get
* The seconds debugging counter
*
* @var int
* @deprecated 3.3
*/
public $secondsDebugging = 0;
@ -114,6 +126,7 @@ class Structure extends Get
* The seconds planning counter
*
* @var int
* @deprecated 3.3
*/
public $secondsPlanning = 0;
@ -121,6 +134,7 @@ class Structure extends Get
* The seconds mapping counter
*
* @var int
* @deprecated 3.3
*/
public $secondsMapping = 0;
@ -128,6 +142,7 @@ class Structure extends Get
* The seconds office counter
*
* @var int
* @deprecated 3.3
*/
public $secondsOffice = 0;
@ -135,6 +150,7 @@ class Structure extends Get
* The total hours counter
*
* @var int
* @deprecated 3.3
*/
public $totalHours = 0;
@ -142,6 +158,7 @@ class Structure extends Get
* The debugging hours counter
*
* @var int
* @deprecated 3.3
*/
public $debuggingHours = 0;
@ -149,6 +166,7 @@ class Structure extends Get
* The planning hours counter
*
* @var int
* @deprecated 3.3
*/
public $planningHours = 0;
@ -156,6 +174,7 @@ class Structure extends Get
* The mapping hours counter
*
* @var int
* @deprecated 3.3
*/
public $mappingHours = 0;
@ -163,6 +182,7 @@ class Structure extends Get
* The office hours counter
*
* @var int
* @deprecated 3.3
*/
public $officeHours = 0;
@ -170,6 +190,7 @@ class Structure extends Get
* The actual Total Hours counter
*
* @var int
* @deprecated 3.3
*/
public $actualTotalHours = 0;
@ -177,6 +198,7 @@ class Structure extends Get
* The actual hours spent counter
*
* @var int
* @deprecated 3.3
*/
public $actualHoursSpent = 0;
@ -184,6 +206,7 @@ class Structure extends Get
* The actual days spent counter
*
* @var int
* @deprecated 3.3
*/
public $actualDaysSpent = 0;
@ -191,6 +214,7 @@ class Structure extends Get
* The total days counter
*
* @var int
* @deprecated 3.3
*/
public $totalDays = 0;
@ -198,6 +222,7 @@ class Structure extends Get
* The actual Total Days counter
*
* @var int
* @deprecated 3.3
*/
public $actualTotalDays = 0;
@ -205,6 +230,7 @@ class Structure extends Get
* The project week time counter
*
* @var int
* @deprecated 3.3
*/
public $projectWeekTime = 0;
@ -212,6 +238,7 @@ class Structure extends Get
* The project month time counter
*
* @var int
* @deprecated 3.3
*/
public $projectMonthTime = 0;
@ -378,11 +405,11 @@ class Structure extends Get
*/
public function __construct()
{
// first we run the perent constructor
// first we run the parent constructor
if (parent::__construct())
{
// set the standard admin file
$this->stdRootFiles[] = $this->componentData->name_code . '.php';
$this->stdRootFiles[] = CFactory::_('Component')->get('name_code') . '.php';
// set incase no extra admin folder are loaded
CFactory::_('Content')->set('EXSTRA_ADMIN_FOLDERS', '');
// set incase no extra site folder are loaded
@ -395,22 +422,20 @@ class Structure extends Get
CFactory::_('Content')->set('EXSTRA_SITE_FILES', '');
// set incase no extra media files are loaded
CFactory::_('Content')->set('EXSTRA_MEDIA_FILES', '');
// run global updater
ComponentbuilderHelper::runGlobalUpdater();
// set the template path
$this->templatePath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/joomla_'
. $this->joomlaVersions[CFactory::_('Config')->joomla_version]['folder_key'];
. CFactory::_('Config')->joomla_versions[CFactory::_('Config')->joomla_version]['folder_key'];
// set some default names
$this->componentSalesName = 'com_'
. $this->componentData->sales_name . '__J'
. CFactory::_('Component')->get('sales_name') . '__J'
. CFactory::_('Config')->joomla_version;
$this->componentBackupName = 'com_'
. $this->componentData->sales_name . '_v' . str_replace(
'.', '_', (string) $this->componentData->component_version
. CFactory::_('Component')->get('sales_name') . '_v' . str_replace(
'.', '_', (string) CFactory::_('Component')->get('component_version')
) . '__J' . CFactory::_('Config')->joomla_version;
$this->componentFolderName = 'com_'
. $this->componentData->name_code . '_v' . str_replace(
'.', '_', (string) $this->componentData->component_version
. CFactory::_('Component')->get('name_code') . '_v' . str_replace(
'.', '_', (string) CFactory::_('Component')->get('component_version')
) . '__J' . CFactory::_('Config')->joomla_version;
// set component folder path
$this->componentPath = CFactory::_('Config')->get('compiler_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler') . '/'
@ -526,7 +551,7 @@ class Structure extends Get
);
$this->newFiles[$power->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
if (!isset($htaccess[$power->path_jcb]))
{
// set the htaccess data
@ -547,7 +572,7 @@ class Structure extends Get
);
$this->newFiles[$power->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// now we must add the htaccess.txt file where the zip package my not get the [.] files
$fileDetails = array('path' => $power->full_path_jcb . '/htaccess.txt',
'name' => 'htaccess.txt',
@ -557,7 +582,7 @@ class Structure extends Get
);
$this->newFiles[$power->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// now we must add the web.config file
$fileDetails = array('path' => $power->full_path_jcb . '/web.config',
'name' => 'web.config',
@ -574,7 +599,7 @@ class Structure extends Get
);
$this->newFiles[$power->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// we set these files only once
$htaccess[$power->path_jcb] = true;
}
@ -591,16 +616,17 @@ class Structure extends Get
*/
private function buildModules()
{
if (ArrayHelper::check($this->joomlaModules))
if (CFactory::_('Joomlamodule.Data')->exists())
{
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
$modules = CFactory::_('Joomlamodule.Data')->get();
// Trigger Event: jcb_ce_onBeforeSetModules
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildModules',
array(&$component_context, &$this->joomlaModules)
array(&$component_context, &$modules)
);
foreach ($this->joomlaModules as $module)
foreach ($modules as $module)
{
if (ObjectHelper::check($module)
&& isset($module->folder_name)
@ -633,7 +659,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// set custom_get
if ($module->custom_get)
{
@ -661,7 +687,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// set helper file
if ($module->add_class_helper >= 1)
@ -683,7 +709,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// set main xml file
$fileDetails = array('path' => $module->folder_path . '/'
@ -696,7 +722,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// set tmpl folder
$this->createFolder($module->folder_path . '/tmpl');
// set default file
@ -715,7 +741,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// set install script if needed
if ($module->add_install_script)
{
@ -736,7 +762,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// set readme if found
if ($module->addreadme)
@ -748,7 +774,7 @@ class Structure extends Get
$this->writeFile($fileDetails['path'], $module->readme);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// set the folders target path
$target_path = '';
@ -784,7 +810,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// add the field script
$field_script_bucket[] = Indent::_(2) . "//"
. Line::_(__Line__, __Class__) . " Custom CSS";
@ -819,7 +845,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// add the field script
$field_script_bucket[] = Indent::_(2) . "//"
. Line::_(__Line__, __Class__) . " Custom JS";
@ -851,7 +877,7 @@ class Structure extends Get
);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
// set rules folders if needed
@ -1048,7 +1074,7 @@ class Structure extends Get
$this->writeFile($fileDetails['path'], $xml);
$this->newFiles[$module->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
// set SQL stuff if needed
@ -1068,7 +1094,7 @@ class Structure extends Get
$module->sql
);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// now set the uninstall file
if ($module->add_sql_uninstall)
@ -1079,7 +1105,7 @@ class Structure extends Get
$module->sql_uninstall
);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
// creat the language folder
@ -1095,10 +1121,10 @@ class Structure extends Get
// add to component files
foreach ($module->files as $file)
{
// set the path finder
// set the pathfinder
$file['target_type'] = $module->target_type;
$file['target_id'] = $module->id;
$this->componentData->files[] = $file;
CFactory::_('Component')->appendArray('files', $file);
}
}
// check if this lib has folders
@ -1108,10 +1134,10 @@ class Structure extends Get
// add to component folders
foreach ($module->folders as $folder)
{
// set the path finder
// set the pathfinder
$folder['target_type'] = $module->target_type;
$folder['target_id'] = $module->id;
$this->componentData->folders[] = $folder;
CFactory::_('Component')->appendArray('folders', $folder);
}
}
// check if this module has urls
@ -1157,7 +1183,7 @@ class Structure extends Get
// write data to path
$this->writeFile($url['path'], $data);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
}
@ -1174,16 +1200,17 @@ class Structure extends Get
*/
private function buildPlugins()
{
if (ArrayHelper::check($this->joomlaPlugins))
if (CFactory::_('Joomlaplugin.Data')->exists())
{
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
$plugins = CFactory::_('Joomlaplugin.Data')->get();
// Trigger Event: jcb_ce_onBeforeSetPlugins
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeBuildPlugins',
array(&$component_context, &$this->joomlaPlugins)
array(&$component_context, &$plugins)
);
foreach ($this->joomlaPlugins as $plugin)
foreach ($plugins as $plugin)
{
if (ObjectHelper::check($plugin)
&& isset($plugin->folder_name)
@ -1216,7 +1243,7 @@ class Structure extends Get
);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// set main xml file
$fileDetails = array('path' => $plugin->folder_path . '/'
. $plugin->file_name . '.xml',
@ -1228,7 +1255,7 @@ class Structure extends Get
);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// set install script if needed
if ($plugin->add_install_script)
{
@ -1249,7 +1276,7 @@ class Structure extends Get
);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// set readme if found
if ($plugin->addreadme)
@ -1261,7 +1288,7 @@ class Structure extends Get
$this->writeFile($fileDetails['path'], $plugin->readme);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// set fields & rules folders if needed
if (isset($plugin->fields_rules_paths)
@ -1441,7 +1468,7 @@ class Structure extends Get
$this->writeFile($fileDetails['path'], $xml);
$this->newFiles[$plugin->key][] = $fileDetails;
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
// set SQL stuff if needed
@ -1461,7 +1488,7 @@ class Structure extends Get
$plugin->sql
);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// now set the uninstall file
if ($plugin->add_sql_uninstall)
@ -1472,7 +1499,7 @@ class Structure extends Get
$plugin->sql_uninstall
);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
// creat the language folder path
@ -1491,7 +1518,7 @@ class Structure extends Get
// set the path finder
$file['target_type'] = $plugin->target_type;
$file['target_id'] = $plugin->id;
$this->componentData->files[] = $file;
CFactory::_('Component')->appendArray('files', $file);
}
}
// check if this lib has folders
@ -1504,7 +1531,7 @@ class Structure extends Get
// set the path finder
$folder['target_type'] = $plugin->target_type;
$folder['target_id'] = $plugin->id;
$this->componentData->folders[] = $folder;
CFactory::_('Component')->appendArray('folders', $folder);
}
}
// check if this plugin has urls
@ -1550,7 +1577,7 @@ class Structure extends Get
// write data to path
$this->writeFile($url['path'], $data);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
}
@ -1576,7 +1603,7 @@ class Structure extends Get
$path
);
// count the folder created
$this->folderCount++;
CFactory::_('Counter')->folder++;
// add index.html (boring I know)
$this->indexHTML(
$path, ''
@ -1592,7 +1619,7 @@ class Structure extends Get
*/
private function setLibraries()
{
if (($libraries_ = CFactory::_('Registry')->extract('builder.libraries')) !== null)
if (($libraries_ = CFactory::_('Registry')->get('builder.libraries')) !== null)
{
// for plugin event TODO change event api signatures
$component_context = CFactory::_('Config')->component_context;
@ -1606,7 +1633,7 @@ class Structure extends Get
{
Folder::create($this->componentPath);
// count the folder created
$this->folderCount++;
CFactory::_('Counter')->folder++;
$this->indexHTML('');
}
// create media path if not set
@ -1622,7 +1649,7 @@ class Structure extends Get
// add to component files
foreach ($library->files as $file)
{
$this->componentData->files[] = $file;
CFactory::_('Component')->appendArray('files', $file);
}
}
// check if this lib has folders
@ -1634,7 +1661,7 @@ class Structure extends Get
// add to component folders
foreach ($library->folders as $folder)
{
$this->componentData->folders[] = $folder;
CFactory::_('Component')->appendArray('folders', $folder);
}
}
// check if this lib has urls
@ -1699,7 +1726,7 @@ class Structure extends Get
// write data to path
$this->writeFile($path, $data);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}
// only add if local
@ -1719,15 +1746,13 @@ class Structure extends Get
foreach ($library->config as $cofig)
{
$found = array_filter(
$this->componentData->config,
function ($item) use ($cofig) {
return $item['field'] == $cofig['field'];
}
CFactory::_('Component')->get('config'),
fn($item) => $item['field'] == $cofig['field']
);
// set the config data if not found
if (!ArrayHelper::check($found))
{
$this->componentData->config[] = $cofig;
CFactory::_('Component')->appendArray('config', $cofig);
}
}
}
@ -1747,16 +1772,13 @@ class Structure extends Get
private function setDynamicDashboard()
{
// only add the dynamic dashboard if all checks out
if (isset($this->componentData->dashboard_type)
&& 2 == $this->componentData->dashboard_type
&& isset($this->componentData->dashboard)
&& StringHelper::check(
$this->componentData->dashboard
)
&& strpos((string) $this->componentData->dashboard, '_') !== false)
if (CFactory::_('Component')->get('dashboard_type', 0) == 2
&& ($dashboard_ = CFactory::_('Component')->get('dashboard')) !== null
&& StringHelper::check($dashboard_)
&& strpos((string) $dashboard_, '_') !== false)
{
// set the default view
$getter = explode('_', (string) $this->componentData->dashboard);
$getter = explode('_', (string) $dashboard_);
if (count((array) $getter) == 2 && is_numeric($getter[1]))
{
// the pointers
@ -1777,14 +1799,12 @@ class Structure extends Get
$targets[$t], 'w'
);
// set the dynamic dash
if (isset($this->componentData->{$targets[$t]})
&& ArrayHelper::check(
$this->componentData->{$targets[$t]}
))
if (($target_ = CFactory::_('Component')->get($targets[$t])) !== null
&& ArrayHelper::check($target_))
{
// search the target views
$dashboard = (array) array_filter(
$this->componentData->{$targets[$t]},
$target_,
function ($view) use ($id, $t, $types) {
if (isset($view[$types[$t]])
&& $id == $view[$types[$t]])
@ -1821,7 +1841,7 @@ class Structure extends Get
$this->app->enqueueMessage(
JText::sprintf(
'The <b>%s</b> (<b>%s</b>) is not available in your component! Please insure to only used %s, for a dynamic dashboard, that are still linked to your component.',
$names[$t], $this->componentData->dashboard,
$names[$t], $dashboard_,
$type_names
), 'Error'
);
@ -1836,7 +1856,7 @@ class Structure extends Get
$this->app->enqueueMessage(
JText::sprintf(
'The <b>%s</b> (<b>%s</b>) is not available in your component! Please insure to only used %s, for a dynamic dashboard, that are still linked to your component.',
$names[$t], $this->componentData->dashboard,
$names[$t], $dashboard_,
$type_names
), 'Error'
);
@ -1851,7 +1871,7 @@ class Structure extends Get
$this->app->enqueueMessage(
JText::sprintf(
'The <b>%s</b> value for the dynamic dashboard is invalid.',
$this->componentData->dashboard
$dashboard_
), 'Error'
);
}
@ -1865,7 +1885,7 @@ class Structure extends Get
$this->app->enqueueMessage(
JText::sprintf(
'The <b>%s</b> value for the dynamic dashboard is invalid.',
$this->componentData->dashboard
$dashboard_
), 'Error'
);
}
@ -1873,8 +1893,8 @@ class Structure extends Get
if (StringHelper::check($this->dynamicDashboard))
{
// dynamic dashboard is used
$this->componentData->dashboard_tab = '';
$this->componentData->php_dashboard_methods = '';
CFactory::_('Component')->remove('dashboard_tab');
CFactory::_('Component')->remove('php_dashboard_methods');
}
}
}
@ -1907,7 +1927,7 @@ class Structure extends Get
{
Folder::create($this->componentPath);
// count the folder created
$this->folderCount++;
CFactory::_('Counter')->folder++;
$this->indexHTML('');
}
// now build all folders needed for this component
@ -2072,7 +2092,7 @@ class Structure extends Get
$this->notNew[] = 'LICENSE.txt';
// do license check
$LICENSE = false;
$licenseChecker = strtolower((string) $this->componentData->license);
$licenseChecker = strtolower((string) CFactory::_('Component')->get('license', ''));
if (strpos($licenseChecker, 'gnu') !== false
&& strpos(
$licenseChecker, '2'
@ -2088,7 +2108,7 @@ class Structure extends Get
// do README check
$README = false;
// add the README file if needed
if ($this->componentData->addreadme)
if (CFactory::_('Component')->get('addreadme', false))
{
$README = true;
}
@ -2188,7 +2208,7 @@ class Structure extends Get
// move the file to its place
File::copy($currentFullPath, $packageFullPath);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// store the new files
if (!in_array($ftem, $this->notNew))
{
@ -2241,7 +2261,7 @@ class Structure extends Get
$currentFullPath, $packageFullPath, '', true
);
// count the folder created
$this->folderCount++;
CFactory::_('Counter')->folder++;
}
}
// only add if no target found since those belong to plugins and modules
@ -2322,19 +2342,16 @@ class Structure extends Get
&& ObjectHelper::check(
$this->joomlaVersionData->move->dynamic
))
&& (isset($this->componentData->admin_views)
&& ArrayHelper::check(
$this->componentData->admin_views
)))
&& CFactory::_('Component')->isArray('admin_views'))
{
if (!StringHelper::check($this->dynamicDashboard))
{
// setup dashboard
$target = array('admin' => $this->componentData->name_code);
$target = array('admin' => CFactory::_('Component')->get('name_code'));
$this->buildDynamique($target, 'dashboard');
}
// now the rest of the views
foreach ($this->componentData->admin_views as $nr => $view)
foreach (CFactory::_('Component')->get('admin_views') as $nr => $view)
{
if (ObjectHelper::check($view['settings']))
{
@ -2389,13 +2406,10 @@ class Structure extends Get
&& ObjectHelper::check(
$this->joomlaVersionData->move->dynamic
))
&& (isset($this->componentData->site_views)
&& ArrayHelper::check(
$this->componentData->site_views
)))
&& CFactory::_('Component')->isArray('site_views'))
{
foreach ($this->componentData->site_views as $nr => $view)
foreach (CFactory::_('Component')->get('site_views') as $nr => $view)
{
$created = $this->getCreatedDate($view);
$modified = $this->getLastModifiedDate($view);
@ -2424,12 +2438,9 @@ class Structure extends Get
&& ObjectHelper::check(
$this->joomlaVersionData->move->dynamic
))
&& (isset($this->componentData->custom_admin_views)
&& ArrayHelper::check(
$this->componentData->custom_admin_views
)))
&& CFactory::_('Component')->isArray('custom_admin_views'))
{
foreach ($this->componentData->custom_admin_views as $nr => $view)
foreach (CFactory::_('Component')->get('custom_admin_views') as $nr => $view)
{
$created = $this->getCreatedDate($view);
$modified = $this->getLastModifiedDate($view);
@ -2789,7 +2800,7 @@ class Structure extends Get
Folder::create($path);
$this->indexHTML($zipPath);
// count the folder created
$this->folderCount++;
CFactory::_('Counter')->folder++;
}
// do the file renaming
if ($details->rename)
@ -2824,7 +2835,7 @@ class Structure extends Get
$path . '/' . $new
);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
// setup array for new file
$newFIle = array('path' => $path . '/' . $new,
@ -2878,37 +2889,35 @@ class Structure extends Get
$footable = CFactory::_('Config')->get('footable', false);
$add_eximport = CFactory::_('Config')->get('add_eximport', false);
// add custom folders
if ((isset($this->componentData->folders)
&& ArrayHelper::check(
$this->componentData->folders
)) || $add_eximport || $uikit || $footable)
if (CFactory::_('Component')->isArray('folders')
|| $add_eximport || $uikit || $footable)
{
if ($add_eximport)
{
// move the import view folder in place
$this->componentData->folders[] = array('folder' => 'importViews',
CFactory::_('Component')->appendArray('folders', array('folder' => 'importViews',
'path' => 'admin/views/import',
'rename' => 1);
'rename' => 1));
// move the phpspreadsheet Folder (TODO we must move this to a library package)
$this->componentData->folders[] = array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor',
CFactory::_('Component')->appendArray('folders', array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor',
'path' => '/libraries/phpspreadsheet/',
'rename' => 0);
'rename' => 0));
}
// set uikit
if (2 == $uikit || 1 == $uikit)
{
// move the UIKIT Folder into place
$this->componentData->folders[] = array('folder' => 'uikit-v2',
CFactory::_('Component')->appendArray('folders', array('folder' => 'uikit-v2',
'path' => 'media',
'rename' => 0);
'rename' => 0));
}
if (2 == $uikit || 3 == $uikit)
{
// move the UIKIT-3 Folder into place
$this->componentData->folders[] = array('folder' => 'uikit-v3',
CFactory::_('Component')->appendArray('folders', array('folder' => 'uikit-v3',
'path' => 'media',
'rename' => 0);
'rename' => 0));
}
// set footable
@ -2916,21 +2925,21 @@ class Structure extends Get
if ($footable && 2 == $footable_version)
{
// move the footable folder into place
$this->componentData->folders[] = array('folder' => 'footable-v2',
CFactory::_('Component')->appendArray('folders', array('folder' => 'footable-v2',
'path' => 'media',
'rename' => 0);
'rename' => 0));
}
elseif ($footable && 3 == $footable_version)
{
// move the footable folder into place
$this->componentData->folders[] = array('folder' => 'footable-v3',
CFactory::_('Component')->appendArray('folders', array('folder' => 'footable-v3',
'path' => 'media',
'rename' => 0);
'rename' => 0));
}
// pointer tracker
$pointer_tracker = 'h';
foreach ($this->componentData->folders as $custom)
foreach (CFactory::_('Component')->get('folders') as $custom)
{
// check type of target type
$_target_type = 'c0mp0n3nt';
@ -3026,31 +3035,29 @@ class Structure extends Get
'type' => $custom['target_type']);
}
}
unset($this->componentData->folders);
CFactory::_('Component')->remove('folders');
unset($custom);
}
// get the google chart switch
$google_chart = CFactory::_('Config')->get('google_chart', false);
// add custom files
if ((isset($this->componentData->files)
&& ArrayHelper::check(
$this->componentData->files
)) || $google_chart)
if (CFactory::_('Component')->isArray('files')
|| $google_chart)
{
if ($google_chart)
{
// move the google chart files
$this->componentData->files[] = array('file' => 'google.jsapi.js',
CFactory::_('Component')->appendArray('files', array('file' => 'google.jsapi.js',
'path' => 'media/js',
'rename' => 0);
$this->componentData->files[] = array('file' => 'chartbuilder.php',
'rename' => 0));
CFactory::_('Component')->appendArray('files', array('file' => 'chartbuilder.php',
'path' => 'admin/helpers',
'rename' => 0);
'rename' => 0));
}
// pointer tracker
$pointer_tracker = 'h';
foreach ($this->componentData->files as $custom)
foreach (CFactory::_('Component')->get('files') as $custom)
{
// check type of target type
$_target_type = 'c0mp0n3nt';
@ -3158,7 +3165,7 @@ class Structure extends Get
$this->updateFileContent[$key_pointer] = true;
}
}
unset($this->componentData->files);
CFactory::_('Component')->remove('files');
unset($custom);
}
@ -3211,7 +3218,7 @@ class Structure extends Get
$root . $path . '/index.html'
);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
else
{
@ -3219,7 +3226,7 @@ class Structure extends Get
$this->templatePath . '/index.html', $root . '/index.html'
);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
}
}

View File

@ -25,6 +25,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
/**
* Compiler class
* @deprecated 3.3
*/
class Fields extends Structure
{
@ -657,7 +658,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . 'readonly="true"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if created is not set
if (!isset($this->fieldsNames[$nameSingleCode]['created']))
@ -680,7 +681,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . "filter=" . '"user_utc"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if created_by is not set
if (!isset($this->fieldsNames[$nameSingleCode]['created_by']))
@ -700,7 +701,7 @@ class Fields extends Structure
. '_CREATED_BY_DESC"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if published is not set
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
@ -727,7 +728,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(4) . "JTRASHED</option>";
$fieldSet[] = Indent::_(2) . "</field>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if modified is not set
if (!isset($this->fieldsNames[$nameSingleCode]['modified']))
@ -742,7 +743,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3)
. 'size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />';
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if modified_by is not set
if (!isset($this->fieldsNames[$nameSingleCode]['modified_by']))
@ -760,7 +761,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . 'filter="unset"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// check if view has access
if (isset($this->accessBuilder[$nameSingleCode])
@ -783,7 +784,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . 'required="false"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if ordering is not set
if (!isset($this->fieldsNames[$nameSingleCode]['ordering']))
@ -806,7 +807,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . 'required="false"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if version is not set
if (!isset($this->fieldsNames[$nameSingleCode]['version']))
@ -826,7 +827,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . 'filter="unset"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// check if metadata is added to this view
if (isset($this->metadataBuilder[$nameSingleCode])
@ -850,7 +851,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . 'cols="30"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// metadesc
if (!isset($this->fieldsNames[$nameSingleCode]['metadesc']))
@ -868,7 +869,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(3) . 'cols="30"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
}
// fix the permissions field "title" issue gh-629
@ -895,7 +896,7 @@ class Fields extends Structure
. $nameSingleCode . '"';
$fieldSet[] = Indent::_(2) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
// setup needed field values for layout
$field_array = array();
$field_array['order_edit'] = 0;
@ -956,7 +957,7 @@ class Fields extends Structure
. '<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>';
$fieldSet[] = Indent::_(3) . '</field>';
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// author
if (!isset($this->fieldsNames[$nameSingleCode]['author']))
@ -971,7 +972,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(4) . 'size="20"';
$fieldSet[] = Indent::_(3) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// rights
if (!isset($this->fieldsNames[$nameSingleCode]['rights']))
@ -986,7 +987,7 @@ class Fields extends Structure
$fieldSet[] = Indent::_(4) . 'cols="30" rows="2"';
$fieldSet[] = Indent::_(3) . "/>";
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
$fieldSet[] = Indent::_(2) . "</fieldset>";
$fieldSet[] = Indent::_(1) . "</fields>";
@ -1083,7 +1084,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if created is not set
if (!isset($this->fieldsNames[$nameSingleCode]['created']))
@ -1105,7 +1106,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if created_by is not set
if (!isset($this->fieldsNames[$nameSingleCode]['created_by']))
@ -1124,7 +1125,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if published is not set
if (!isset($this->fieldsNames[$nameSingleCode]['published']))
@ -1142,7 +1143,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
foreach (
array('JPUBLISHED' => 1, 'JUNPUBLISHED' => 0, 'JARCHIVED' => 2,
'JTRASHED' => -2) as $text => $value
@ -1174,7 +1175,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if modified_by is not set
if (!isset($this->fieldsNames[$nameSingleCode]['modified_by']))
@ -1195,7 +1196,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// check if view has access
if (isset($this->accessBuilder[$nameSingleCode])
@ -1220,7 +1221,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if ordering is not set
if (!isset($this->fieldsNames[$nameSingleCode]['ordering']))
@ -1243,7 +1244,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// if version is not set
if (!isset($this->fieldsNames[$nameSingleCode]['version']))
@ -1265,7 +1266,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// check if metadata is added to this view
if (isset($this->metadataBuilder[$nameSingleCode])
@ -1293,7 +1294,7 @@ class Fields extends Structure
$fieldXML, $attributes
);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// metadesc
if (!isset($this->fieldsNames[$nameSingleCode]['metadesc']))
@ -1310,7 +1311,7 @@ class Fields extends Structure
$fieldXML, $attributes
);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
}
// fix the permissions field "title" issue gh-629
@ -1345,7 +1346,7 @@ class Fields extends Structure
$fieldXML = $fieldSetXML->addChild('field');
ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
// setup needed field values for layout
$field_array = array();
$field_array['order_edit'] = 0;
@ -1408,7 +1409,7 @@ class Fields extends Structure
$robots, $attributes
);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
$options = array(
'JGLOBAL_USE_GLOBAL' => '',
'JGLOBAL_INDEX_FOLLOW' => 'index, follow',
@ -1442,7 +1443,7 @@ class Fields extends Structure
$author, $attributes
);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
// rights
if (!isset($this->fieldsNames[$nameSingleCode]['rights']))
@ -1466,7 +1467,7 @@ class Fields extends Structure
$rights, $attributes
);
// count the static field created
$this->fieldCount++;
CFactory::_('Counter')->field++;
}
}
}
@ -1890,7 +1891,7 @@ class Fields extends Structure
&$optionArray, $custom = null, $taber = ''
) {
// count the dynamic fields created
$this->fieldCount++;
CFactory::_('Counter')->field++;
// check what type of field builder to use
if (CFactory::_('Config')->get('field_builder_type', 2) == 1)
{
@ -4780,13 +4781,8 @@ class Fields extends Structure
// load to list builder
if ($listSwitch)
{
// check if it does not exists
if (!CFactory::_('Registry')->exists('builder.list.' . $nameListCode))
{
CFactory::_('Registry')->set('builder.list.' . $nameListCode, []);
}
// append values
CFactory::_('Registry')->append('builder.list.' . $nameListCode, [
CFactory::_('Registry')->appendArray('builder.list.' . $nameListCode, [
'id' => (int) $field['field'],
'type' => $typeName,
'code' => $name,

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Minify;
/**
* Infusion class
* @deprecated 3.3
*/
class Infusion extends Interpretation
{
@ -73,10 +74,7 @@ class Infusion extends Interpretation
*/
protected function buildFileContent()
{
if (isset($this->componentData->admin_views)
&& ArrayHelper::check(
$this->componentData->admin_views
))
if (CFactory::_('Component')->isArray('admin_views'))
{
// for plugin event TODO change event api signatures
$placeholders = CFactory::_('Placeholder')->active;
@ -104,13 +102,14 @@ class Infusion extends Interpretation
CFactory::_('Content')->set('component', CFactory::_('Placeholder')->get('component'));
// COMPANYNAME
$companyname = CFactory::_('Component')->get('companyname');
CFactory::_('Content')->set('COMPANYNAME', trim(
(string) JFilterOutput::cleanText($this->componentData->companyname)
(string) JFilterOutput::cleanText($companyname)
));
// CREATIONDATE
CFactory::_('Content')->set('CREATIONDATE',
JFactory::getDate($this->componentData->created)->format(
JFactory::getDate(CFactory::_('Component')->get('created'))->format(
'jS F, Y'
));
CFactory::_('Content')->set('GLOBALCREATIONDATE',
@ -122,24 +121,25 @@ class Infusion extends Interpretation
CFactory::_('Content')->get('BUILDDATE'));
// AUTHOR
$author = CFactory::_('Component')->get('author');
CFactory::_('Content')->set('AUTHOR', trim(
(string) JFilterOutput::cleanText($this->componentData->author)
(string) JFilterOutput::cleanText($author)
));
// AUTHOREMAIL
CFactory::_('Content')->set('AUTHOREMAIL', trim((string) $this->componentData->email));
CFactory::_('Content')->set('AUTHOREMAIL', trim((string) CFactory::_('Component')->get('email', '')));
// AUTHORWEBSITE
CFactory::_('Content')->set('AUTHORWEBSITE', trim((string) $this->componentData->website));
CFactory::_('Content')->set('AUTHORWEBSITE', trim((string) CFactory::_('Component')->get('website', '')));
// COPYRIGHT
CFactory::_('Content')->set('COPYRIGHT', trim((string) $this->componentData->copyright));
CFactory::_('Content')->set('COPYRIGHT', trim((string) CFactory::_('Component')->get('copyright', '')));
// LICENSE
CFactory::_('Content')->set('LICENSE', trim((string) $this->componentData->license));
CFactory::_('Content')->set('LICENSE', trim((string) CFactory::_('Component')->get('license', '')));
// VERSION
CFactory::_('Content')->set('VERSION', trim((string) $this->componentData->component_version));
CFactory::_('Content')->set('VERSION', trim((string) CFactory::_('Component')->get('component_version', '')));
// set the actual global version
CFactory::_('Content')->set('ACTUALVERSION', CFactory::_('Content')->get('VERSION'));
@ -154,7 +154,7 @@ class Infusion extends Interpretation
if (isset($versionArray)
&& ArrayHelper::check(
$versionArray
) && $this->componentData->mvc_versiondate == 2)
) && CFactory::_('Component')->get('mvc_versiondate', 0) == 2)
{
CFactory::_('Content')->set('VERSION', $versionArray[0] . '.' . $versionArray[1] . '.x');
}
@ -162,7 +162,7 @@ class Infusion extends Interpretation
elseif (isset($versionArray)
&& ArrayHelper::check(
$versionArray
) && $this->componentData->mvc_versiondate == 3)
) && CFactory::_('Component')->get('mvc_versiondate', 0) == 3)
{
CFactory::_('Content')->set('VERSION', $versionArray[0] . '.x.x');
}
@ -175,20 +175,22 @@ class Infusion extends Interpretation
CFactory::_('Content')->set('XMLVERSION', $this->joomlaVersions[CFactory::_('Config')->joomla_version]['xml_version']);
// Component_name
CFactory::_('Content')->set('Component_name', JFilterOutput::cleanText($this->componentData->name));
$name = CFactory::_('Component')->get('name');
CFactory::_('Content')->set('Component_name', JFilterOutput::cleanText($name));
// SHORT_DISCRIPTION
$short_description = CFactory::_('Component')->get('short_description');
CFactory::_('Content')->set('SHORT_DESCRIPTION', trim(
(string) JFilterOutput::cleanText(
$this->componentData->short_description
$short_description
)
));
// DESCRIPTION
CFactory::_('Content')->set('DESCRIPTION', trim((string) $this->componentData->description));
CFactory::_('Content')->set('DESCRIPTION', trim((string) CFactory::_('Component')->get('description')));
// COMP_IMAGE_TYPE
CFactory::_('Content')->set('COMP_IMAGE_TYPE', $this->setComponentImageType($this->componentData->image));
CFactory::_('Content')->set('COMP_IMAGE_TYPE', $this->setComponentImageType(CFactory::_('Component')->get('image')));
// ACCESS_SECTIONS
CFactory::_('Content')->set('ACCESS_SECTIONS', $this->setAccessSections());
@ -247,7 +249,7 @@ class Infusion extends Interpretation
CFactory::_('Content')->set('ADMIN_GLOBAL_EVENT_HELPER', '');
}
// now load the data for the global event if needed
if ($this->componentData->add_admin_event == 1)
if (CFactory::_('Component')->get('add_admin_event', 0) == 1)
{
// ADMIN_GLOBAL_EVENT
CFactory::_('Content')->add('ADMIN_GLOBAL_EVENT', PHP_EOL . PHP_EOL . '// Trigger the Global Admin Event');
@ -272,7 +274,7 @@ class Infusion extends Interpretation
}
// now load the readme file if needed
if ($this->componentData->addreadme == 1)
if (CFactory::_('Component')->get('addreadme', 0) == 1)
{
CFactory::_('Content')->add('EXSTRA_ADMIN_FILES',
PHP_EOL . Indent::_(3)
@ -282,7 +284,7 @@ class Infusion extends Interpretation
// HELPER_CREATEUSER
CFactory::_('Content')->add('HELPER_CREATEUSER',
$this->setCreateUserHelperMethod(
$this->componentData->creatuserhelper
CFactory::_('Component')->get('creatuserhelper')
));
// HELP
@ -310,7 +312,7 @@ class Infusion extends Interpretation
$viewarray = array();
$site_edit_view_array = array();
// start dynamic build
foreach ($this->componentData->admin_views as $view)
foreach (CFactory::_('Component')->get('admin_views') as $view)
{
// set the target
CFactory::_('Config')->build_target = 'admin';
@ -1041,15 +1043,12 @@ class Infusion extends Interpretation
$this->setCustomViewLayouts();
// setup custom_admin_views and all needed stuff for the site
if (isset($this->componentData->custom_admin_views)
&& ArrayHelper::check(
$this->componentData->custom_admin_views
))
if (CFactory::_('Component')->isArray('custom_admin_views'))
{
CFactory::_('Config')->build_target = 'custom_admin';
CFactory::_('Config')->lang_target = 'admin';
// start dynamic build
foreach ($this->componentData->custom_admin_views as $view)
foreach (CFactory::_('Component')->get('custom_admin_views') as $view)
{
// for single views
CFactory::_('Content')->set_($view['settings']->code, 'SView', $view['settings']->Code);
@ -1455,14 +1454,11 @@ class Infusion extends Interpretation
CFactory::_('Config')->lang_target = $keepLang;
// setup front-views and all needed stuff for the site
if (isset($this->componentData->site_views)
&& ArrayHelper::check(
$this->componentData->site_views
))
if (CFactory::_('Component')->isArray('site_views'))
{
CFactory::_('Config')->build_target = 'site';
// start dynamic build
foreach ($this->componentData->site_views as $view)
foreach (CFactory::_('Component')->get('site_views') as $view)
{
// for list views
CFactory::_('Content')->set_($view['settings']->code, 'SViews', $view['settings']->Code);
@ -1725,7 +1721,7 @@ class Infusion extends Interpretation
CFactory::_('Content')->set('SITE_GLOBAL_EVENT_HELPER', '');
}
// now load the data for the global event if needed
if ($this->componentData->add_site_event == 1)
if (CFactory::_('Component')->get('add_site_event', 0) == 1)
{
CFactory::_('Content')->add('SITE_GLOBAL_EVENT', PHP_EOL . PHP_EOL . '// Trigger the Global Site Event');
CFactory::_('Content')->add('SITE_GLOBAL_EVENT',
@ -1796,9 +1792,9 @@ class Infusion extends Interpretation
}
// README
if ($this->componentData->addreadme)
if (CFactory::_('Component')->get('addreadme'))
{
CFactory::_('Content')->set('README', $this->componentData->readme);
CFactory::_('Content')->set('README', CFactory::_('Component')->get('readme'));
}
// Infuse POWERS
@ -1809,9 +1805,9 @@ class Infusion extends Interpretation
$_backup_lang = CFactory::_('Config')->lang_target;
$_backup_langPrefix = CFactory::_('Config')->lang_prefix;
// infuse module data if set
if (ArrayHelper::check($this->joomlaModules))
if (CFactory::_('Joomlamodule.Data')->exists())
{
foreach ($this->joomlaModules as $module)
foreach (CFactory::_('Joomlamodule.Data')->get() as $module)
{
if (ObjectHelper::check($module))
{
@ -1877,9 +1873,9 @@ class Infusion extends Interpretation
}
}
// infuse plugin data if set
if (ArrayHelper::check($this->joomlaPlugins))
if (CFactory::_('Joomlaplugin.Data')->exists())
{
foreach ($this->joomlaPlugins as $plugin)
foreach (CFactory::_('Joomlaplugin.Data')->get() as $plugin)
{
if (ObjectHelper::check($plugin))
{
@ -1946,7 +1942,7 @@ class Infusion extends Interpretation
CFactory::_('Event')->trigger(
'jcb_ce_onAfterBuildFilesContent',
array(&$component_context, &$this->componentData,
&$fileContentStatic, &$this->fileContentDynamic,
&$fileContentStatic, &$fileContentDynamic,
&$placeholders, &$this->hhh)
);
unset($fileContentStatic);
@ -2153,17 +2149,16 @@ class Infusion extends Interpretation
{
Folder::create($path);
// count the folder created
$this->folderCount++;
CFactory::_('Counter')->folder++;
}
// move the file to its place
File::copy($getPAth, $path . $file_name);
// count the file created
$this->fileCount++;
CFactory::_('Counter')->file++;
// add content to it
$lang = array_map(
function ($langstring, $placeholder) {
return $placeholder . '="' . $langstring . '"';
}, array_values($languageStrings),
fn($langstring, $placeholder) => $placeholder . '="' . $langstring . '"',
array_values($languageStrings),
array_keys($languageStrings)
);
// add to language file
@ -2171,7 +2166,7 @@ class Infusion extends Interpretation
$path . $file_name, implode(PHP_EOL, $lang)
);
// set the line counter
$this->lineCount = $this->lineCount + count(
CFactory::_('Counter')->line += count(
(array) $lang
);
unset($lang);

View File

@ -5605,6 +5605,7 @@ COM_COMPONENTBUILDER_HR_HTHREECUSTOM_CODES_WARNINGHTHREE="<hr /><h3>Custom Codes
COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_ERRORHTHREE="<hr /><h3>External Code Error</h3>"
COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_NOTICEHTHREE="<hr /><h3>External Code Notice</h3>"
COM_COMPONENTBUILDER_HR_HTHREEEXTERNAL_CODE_WARNINGHTHREE="<hr /><h3>External Code Warning</h3>"
COM_COMPONENTBUILDER_HR_HTHREEFIELD_NOTICEHTHREE="<hr /><h3>Field Notice</h3>"
COM_COMPONENTBUILDER_HTHREEPLACEHOLDER_REMOVEDHTHREEPBTHISB_CUSTOM_CODE_CAN_ONLY_BE_USED_IN_BOTHERB_CUSTOM_CODE_NOT_IN_IT_SELF_SINCE_THAT_WILL_CAUSE_A_INFINITE_LOOP_IN_THE_COMPILERP="<h3>Placeholder Removed!</h3><p><b>This</b> custom code can only be used in <b>other</b> custom code, not in it self! Since that will cause a infinite loop in the compiler.</p>"
COM_COMPONENTBUILDER_HTHREESHTHREEPCUSTOM_CODE_CAN_ONLY_BE_USED_IN_OTHER_CUSTOM_CODE_IF_SET_AS_BJCB_MANUALB_YOU_CAN_NOT_ADD_THEM_TO_EMHASH_AUTOMATIONEM_CODE_AT_THIS_POINTP="<h3>%s</h3><p>Custom code can only be used in other custom code if set as <b>JCB (manual)</b>, you can not add them to <em>Hash (Automation)</em> code at this point.</p>"
COM_COMPONENTBUILDER_HTHREES_NAMESPACE_ERROR_SHTHREEPYOU_MUST_ATLEAST_HAVE_TWO_SECTIONS_IN_YOUR_NAMESPACE_YOU_JUST_HAVE_ONE_S_THIS_IS_AN_UNACCEPTABLE_ACTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPTHIS_S_WAS_THEREFORE_REMOVED_A_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP="<h3>%s namespace error (%s)</h3><p>You must at-least have two sections in your namespace, you just have one (%s). This is an unacceptable action, please see <a href=%s >psr-4</a> for more info.</p><p>This %s was therefore removed, <a href=%s>click here</a> to fix this issue.</p>"

View File

@ -425,9 +425,8 @@
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_POWER_USE_SELECTION_DESCRIPTION"
icon="list"
max="30"
min="0"
showon="type!:interface">
max="100"
min="0">
<form hidden="true" name="list_use_selection_modal" repeat="true">
<!-- Use Field. Type: Namespaces. (custom) -->
<field

File diff suppressed because one or more lines are too long

View File

@ -92,7 +92,6 @@ class ComponentbuilderViewGet_snippets extends HtmlView
{
// Set the default uikit components in this view.
$uikitComp = array();
$uikitComp[] = 'UIkit.notify';
$uikitComp[] = 'data-uk-grid';
}