update - v1.0.3
This commit is contained in:
parent
3b6ecbb1e1
commit
c37702781e
@ -22,7 +22,7 @@ JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/c
|
|||||||
* Extension - Componentbuilder Headers Compiler plugin.
|
* Extension - Componentbuilder Headers Compiler plugin.
|
||||||
*
|
*
|
||||||
* @package ComponentbuilderHeadersCompiler
|
* @package ComponentbuilderHeadersCompiler
|
||||||
* @since 1.0.2
|
* @since 1.0.3
|
||||||
*/
|
*/
|
||||||
class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
||||||
{
|
{
|
||||||
@ -46,7 +46,7 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
|||||||
* The Targets
|
* The Targets
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @since 1.0.0
|
* @since 1.0.3
|
||||||
*/
|
*/
|
||||||
protected $targets = array(
|
protected $targets = array(
|
||||||
'admin_view_headers' =>
|
'admin_view_headers' =>
|
||||||
@ -94,6 +94,29 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
|||||||
'context' => 'site.views.model',
|
'context' => 'site.views.model',
|
||||||
'view' => 'code'
|
'view' => 'code'
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
'custom_admin_view_headers' =>
|
||||||
|
array(
|
||||||
|
'add_custom_admin_view_controller' => array(
|
||||||
|
'field' => 'custom_admin_view_controller',
|
||||||
|
'context' => 'custom.admin.view.controller',
|
||||||
|
'view' => 'code'
|
||||||
|
),
|
||||||
|
'add_custom_admin_views_controller' => array(
|
||||||
|
'field' => 'custom_admin_views_controller',
|
||||||
|
'context' => 'custom.admin.views.controller',
|
||||||
|
'view' => 'code'
|
||||||
|
),
|
||||||
|
'add_custom_admin_view_model' => array(
|
||||||
|
'field' => 'custom_admin_view_model',
|
||||||
|
'context' => 'custom.admin.view.model',
|
||||||
|
'view' => 'code'
|
||||||
|
),
|
||||||
|
'add_custom_admin_views_model' => array(
|
||||||
|
'field' => 'custom_admin_views_model',
|
||||||
|
'context' => 'custom.admin.views.model',
|
||||||
|
'view' => 'code'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -152,6 +175,7 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
|||||||
&& ComponentbuilderHelper::checkJson($view->params)) ? json_decode(
|
&& ComponentbuilderHelper::checkJson($view->params)) ? json_decode(
|
||||||
$view->params, true
|
$view->params, true
|
||||||
) : $view->params;
|
) : $view->params;
|
||||||
|
// target site views
|
||||||
if (ComponentbuilderHelper::checkArray($view->params)
|
if (ComponentbuilderHelper::checkArray($view->params)
|
||||||
&& isset($view->params['site_view_headers'])
|
&& isset($view->params['site_view_headers'])
|
||||||
&& ComponentbuilderHelper::checkArray(
|
&& ComponentbuilderHelper::checkArray(
|
||||||
@ -175,6 +199,30 @@ class PlgExtensionComponentbuilderHeadersCompiler extends CMSPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// target custom admin veiws
|
||||||
|
if (ComponentbuilderHelper::checkArray($view->params)
|
||||||
|
&& isset($view->params['custom_admin_view_headers'])
|
||||||
|
&& ComponentbuilderHelper::checkArray(
|
||||||
|
$view->params['custom_admin_view_headers']
|
||||||
|
))
|
||||||
|
{
|
||||||
|
foreach ($this->targets['custom_admin_view_headers'] as $target => $event)
|
||||||
|
{
|
||||||
|
if (isset($view->params['custom_admin_view_headers'][$target])
|
||||||
|
&& $view->params['custom_admin_view_headers'][$target] == 1)
|
||||||
|
{
|
||||||
|
// activate the load of the privacy plugin
|
||||||
|
$this->loadClassHeaders = true;
|
||||||
|
// setup the view key name
|
||||||
|
$view_name = ComponentbuilderHelper::safeString(
|
||||||
|
$view->{$event['view']}
|
||||||
|
);
|
||||||
|
// load the admin view details
|
||||||
|
$this->activeViews[$view_name][$event['context']]
|
||||||
|
= $view->params['custom_admin_view_headers'][$event['field']];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||||
<copyright>Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.</copyright>
|
<copyright>Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.</copyright>
|
||||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||||
<version>1.0.2</version>
|
<version>1.0.3</version>
|
||||||
<description>PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION</description>
|
<description>PLG_EXTENSION_COMPONENTBUILDERHEADERSCOMPILER_XML_DESCRIPTION</description>
|
||||||
|
|
||||||
<!-- Scripts to run on installation -->
|
<!-- 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.
|
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."
|
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.2)</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.3)</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='http://www.joomlacomponentbuilder.com' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 24th May, 2020</small></p>"
|
Also be sure to set your code where you would like to set Custom Headers.</p><p>Created by <a href='http://www.joomlacomponentbuilder.com' 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.
|
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."
|
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.2)</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.3)</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='http://www.joomlacomponentbuilder.com' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 24th May, 2020</small></p>"
|
Also be sure to set your code where you would like to set Custom Headers.</p><p>Created by <a href='http://www.joomlacomponentbuilder.com' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 24th May, 2020</small></p>"
|
@ -60,8 +60,8 @@ class plgExtensionComponentbuilderHeadersCompilerInstallerScript
|
|||||||
{
|
{
|
||||||
// get the version
|
// get the version
|
||||||
$jcbVersion = explode('.', $manifest->version);
|
$jcbVersion = explode('.', $manifest->version);
|
||||||
// check that we have JCB 2.11.7 or higher installed
|
// check that we have JCB 2.12.1 or higher installed
|
||||||
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 2 && $jcbVersion[1] >= 11 && (($jcbVersion[1] == 11 && $jcbVersion[2] >= 7) || ($jcbVersion[1] > 11)))
|
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 2 && $jcbVersion[1] > 11)
|
||||||
{
|
{
|
||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user