add onBeforeGetComponentData & onAfterGetComponentData events to compiler of JCB.

This commit is contained in:
Llewellyn van der Merwe 2019-08-28 15:07:18 +02:00
parent f168fb7363
commit 2a6e4b21e5
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
3 changed files with 10 additions and 4 deletions

View File

@ -150,7 +150,7 @@ TODO
+ *Version*: 2.10.0
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **248009**
+ *Line count*: **248128**
+ *Field count*: **1343**
+ *File count*: **1608**
+ *Folder count*: **253**

View File

@ -150,7 +150,7 @@ TODO
+ *Version*: 2.10.0
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **248009**
+ *Line count*: **248128**
+ *Field count*: **1343**
+ *File count*: **1608**
+ *Folder count*: **253**

View File

@ -846,8 +846,12 @@ class Get
// get the custom code from installed files
$this->customCodeFactory($paths, $today);
}
// Trigger Event: jcb_ce_onBeforeGetComponentData
$this->triggerEvent('jcb_ce_onBeforeGetComponentData', array(&$this->componentContext, $this));
// get the component data
$this->componentData = $this->getComponentData();
// Trigger Event: jcb_ce_onAfterGetComponentData
$this->triggerEvent('jcb_ce_onAfterGetComponentData', array(&$this->componentContext, $this));
// make sure we have a version
if (strpos($this->componentData->component_version, '.') === FALSE)
{
@ -986,6 +990,8 @@ class Get
$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] = $this->langPrefix;
$bucket[$this->bbb . 'LANG_PREFIX' . $this->ddd] = $bucket[$this->hhh . 'LANG_PREFIX' . $this->hhh];
// get the current components overides
if (($_placeholders = ComponentbuilderHelper::getVar('component_placeholders', $this->componentID, 'joomla_component', 'addplaceholders')) !== false
&& ComponentbuilderHelper::checkJson($_placeholders))
@ -4702,7 +4708,7 @@ class Get
// check if we should continue
if (ComponentbuilderHelper::checkArray($langStringTargets))
{
// test add an placeholder updater here
// insure string is not broken
$content = $this->setPlaceholders($content, $this->placeholders);
// reset some buckets
$langHolders = array();
@ -4733,7 +4739,7 @@ class Get
// combine into one array
$scTEXT = ComponentbuilderHelper::mergeArrays($scTEXT);
// we need to add a check to insure these JavaScript lang matchup
if (ComponentbuilderHelper::checkArray($scTEXT)) //<-- not really needed hmmm
if (ComponentbuilderHelper::checkArray($scTEXT))
{
// load the Script text to match array
$langCheck[] = $scTEXT;