Adds power infusion class.

This commit is contained in:
2022-12-18 10:16:43 +02:00
parent a2ec013566
commit d28e4c74af
7 changed files with 252 additions and 38 deletions

View File

@ -140,13 +140,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 11th December, 2022
+ *Last Build*: 18th December, 2022
+ *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*: **337314**
+ *Line count*: **337557**
+ *Field count*: **2009**
+ *File count*: **2206**
+ *File count*: **2207**
+ *Folder count*: **388**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).

View File

@ -1802,37 +1802,10 @@ class Infusion extends Interpretation
{
CFactory::_('Content')->set('README', $this->componentData->readme);
}
// remove all the power placeholders
CFactory::_('Content')->set('ADMIN_POWER_HELPER', '');
CFactory::_('Content')->set('SITE_POWER_HELPER', '');
CFactory::_('Content')->set('CUSTOM_POWER_AUTOLOADER', '');
// infuse powers data if set
if (ArrayHelper::check(CFactory::_('Power')->active))
{
// start the autoloader
$autoloader = array();
foreach (CFactory::_('Power')->active as $power)
{
if (ObjectHelper::check($power))
{
// Trigger Event: jcb_ce_onBeforeInfusePowerData
CFactory::_('Event')->trigger(
'jcb_ce_onBeforeInfusePowerData',
array(&$this->componentContext, &$power, &$this)
);
// POWERCODE
CFactory::_('Content')->set_($power->key, 'POWERCODE', $this->getPowerCode($power));
// Trigger Event: jcb_ce_onAfterInfusePowerData
CFactory::_('Event')->trigger(
'jcb_ce_onAfterInfusePowerData',
array(&$this->componentContext, &$power, &$this)
);
}
}
// now set the power autoloader
CFactory::_('Power.Autoloader')->set((!CFactory::_('Config')->remove_site_folder || !CFactory::_('Config')->remove_site_edit_folder));
}
// Infuse POWERS
CFactory::_('Power.Infusion')->set();
// tweak system to set stuff to the module domain
$_backup_target = CFactory::_('Config')->build_target;
$_backup_lang = CFactory::_('Config')->lang_target;