update - v1.0.10
This commit is contained in:
parent
b85a18f32b
commit
95c30c1414
|
@ -22,7 +22,7 @@ JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/c
|
|||
* Extension - Componentbuilder Headers Compiler plugin.
|
||||
*
|
||||
* @package ComponentbuilderHeadersCompiler
|
||||
* @since 1.0.9
|
||||
* @since 1.0.10
|
||||
*/
|
||||
class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
||||
{
|
||||
|
@ -391,6 +391,23 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event Triggered in the compiler [on Before Model Dynamic Get Data]
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.10
|
||||
*/
|
||||
public function jcb_ce_onBeforeModelDynamicGetData(&$context, &$dynamicGet, &$id, &$code, &$area)
|
||||
{
|
||||
// check that the params are set
|
||||
if (isset($dynamicGet->params))
|
||||
{
|
||||
// add the headers for the Site Views
|
||||
$this->setDynamicHeaders($dynamicGet->params, $code, 'dynamic_get_headers');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event Triggered in the compiler [on Before Model Component Data]
|
||||
*
|
||||
|
@ -512,6 +529,37 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set the dynamic get headers
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.10
|
||||
*/
|
||||
protected function setDynamicHeaders($params, $code, $key)
|
||||
{
|
||||
// add the headers
|
||||
$params = (ComponentbuilderHelper::checkJson($params)) ? json_decode($params, true) : $params;
|
||||
// make sure we have the keys values in the params area
|
||||
if (ComponentbuilderHelper::checkArray($params) && isset($params[$key])
|
||||
&& ComponentbuilderHelper::checkArray($params[$key]))
|
||||
{
|
||||
foreach ($this->targets[$key] as $target => $event)
|
||||
{
|
||||
if (isset($params[$key][$target])
|
||||
&& $params[$key][$target] == 1)
|
||||
{
|
||||
// get the header string if set
|
||||
$this->getHeaders(
|
||||
$params[$key],
|
||||
$event,
|
||||
$code
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get the headers
|
||||
*
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>1.0.9</version>
|
||||
<version>1.0.10</version>
|
||||
<description>PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION</description>
|
||||
|
||||
<!-- Scripts to run on installation -->
|
||||
|
|
|
@ -2,6 +2,6 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER="Extension - Componentbuilder Head
|
|||
PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_DESCRIPTION="This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.
|
||||
|
||||
Also be sure to set your code where you would like to set Custom Headers."
|
||||
PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Headers Compiler (v.1.0.9)</h1> <div style='clear: both;'></div><p>This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.
|
||||
PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Headers Compiler (v.1.0.10)</h1> <div style='clear: both;'></div><p>This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.
|
||||
|
||||
Also be sure to set your code where you would like to set Custom Headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 24th May, 2020</small></p>"
|
|
@ -2,6 +2,6 @@ PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER="Extension - Componentbuilder Head
|
|||
PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_DESCRIPTION="This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.
|
||||
|
||||
Also be sure to set your code where you would like to set Custom Headers."
|
||||
PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Headers Compiler (v.1.0.9)</h1> <div style='clear: both;'></div><p>This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.
|
||||
PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Headers Compiler (v.1.0.10)</h1> <div style='clear: both;'></div><p>This plugin is used to set the custom headers for your classes during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.
|
||||
|
||||
Also be sure to set your code where you would like to set Custom Headers.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 24th May, 2020</small></p>"
|
Loading…
Reference in New Issue