diff --git a/componentbuilderactionlogcompiler.php b/componentbuilderactionlogcompiler.php index 1af5a6a..cebd6e0 100644 --- a/componentbuilderactionlogcompiler.php +++ b/componentbuilderactionlogcompiler.php @@ -28,7 +28,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line; * Extension - Componentbuilder ActionLog Compiler plugin. * * @package ComponentbuilderActionLogCompiler - * @since 1.1.1 + * @since 2.0.0 */ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin { @@ -45,14 +45,14 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * * @var array */ - protected $languageArray = array(); + protected $languageArray = []; /** * The Scripts * * @var array */ - protected $scriptsArray = array('POSTINSTALLSCRIPT' => array(), 'POSTUPDATESCRIPT' => array(), 'UNINSTALLSCRIPT' => array()); + protected $scriptsArray = ['POSTINSTALLSCRIPT' => [], 'POSTUPDATESCRIPT' => [], 'UNINSTALLSCRIPT' => []]; /** * Event Triggered in the compiler [on After Get Component Data] @@ -61,9 +61,9 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * * @since 1.0 */ - public function jcb_ce_onAfterGetComponentData(&$context, $compiler) + public function jcb_ce_onAfterGetComponentData() { - if ($this->componentActive($context) && ArrayHelper::check($this->languageArray)) + if ($this->componentActive() && ArrayHelper::check($this->languageArray)) { foreach($this->languageArray as $key => $string) { @@ -79,15 +79,20 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * * @since 1.0 */ - public function jcb_ce_onAfterBuildFilesContent(&$context, &$componentData, &$fileContentStatic, &$fileContentDynamic, &$placeholders, &$hhh) + public function jcb_ce_onAfterBuildFilesContent() { - if ($this->componentActive($context)) + if ($this->componentActive()) { + $function_name = 'getMainJ3'; + if (CFactory::_('Config')->get('joomla_version', 3) != 3) + { + $function_name = 'getMainJ4'; + } // now load the script strings to the component foreach ($this->scriptsArray as $target => &$bucket) { // add the component main target script - CFactory::_('Compiler.Builder.Content.One')->add($target, $this->{'getMain' . $target}()); + CFactory::_('Compiler.Builder.Content.One')->add($target, $this->{$function_name . $target}()); // add the component views target scripts if (ArrayHelper::check($bucket)) { @@ -104,10 +109,10 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * * @since 1.0 */ - public function jcb_ce_onAfterModelViewData(&$context, &$view, &$placeholders) + public function jcb_ce_onAfterModelViewData(&$view) { // add the better integration with action log - if ($this->componentActive($context) &&ArrayHelper::check($view->fields)) + if ($this->componentActive() &&ArrayHelper::check($view->fields)) { foreach ($view->fields as $field) { @@ -144,10 +149,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin CFactory::_('Placeholder')->set('<<>>', 'id', false); } + $function_name = 'getViewJ3'; + if (CFactory::_('Config')->get('joomla_version', 3) != 3) + { + $function_name = 'getViewJ4'; + } + // now load the script strings foreach ($this->scriptsArray as $target => &$bucket) { - $bucket[] = $this->{'getView' . $target}(); + $bucket[] = $this->{$function_name . $target}(); } // just remove it again @@ -164,16 +175,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * @return string * */ - protected function getMainPOSTINSTALLSCRIPT() + protected function getMainJ3POSTINSTALLSCRIPT() { $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already."; $script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))"; $script .= PHP_EOL . Indent::_(3) . "{"; - $script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();"; + $script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();"; $script .= PHP_EOL . Indent::_(3) . "}"; $script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("component") . " action logs extensions object."; - $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new stdClass();"; + $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new \stdClass();"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions->extension = 'com_" . Placefix::_("component") . "';"; $script .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set the object into the action logs extensions table."; @@ -188,16 +199,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * @return string * */ - protected function getViewPOSTINSTALLSCRIPT() + protected function getViewJ3POSTINSTALLSCRIPT() { $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already."; $script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))"; $script .= PHP_EOL . Indent::_(3) . "{"; - $script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();"; + $script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();"; $script .= PHP_EOL . Indent::_(3) . "}"; $script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("view") . " action log config object."; - $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new stdClass();"; + $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new \stdClass();"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_title = '" . Placefix::_("VIEW") . "';"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_alias = 'com_" . Placefix::_("component") . "." . Placefix::_("view") . "';"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->id_holder = 'id';"; @@ -217,16 +228,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * @return string * */ - protected function getMainPOSTUPDATESCRIPT() + protected function getMainJ3POSTUPDATESCRIPT() { $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already."; $script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))"; $script .= PHP_EOL . Indent::_(3) . "{"; - $script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();"; + $script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();"; $script .= PHP_EOL . Indent::_(3) . "}"; $script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("component") . " action logs extensions object."; - $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new stdClass();"; + $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions = new \stdClass();"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("component") . "_action_logs_extensions->extension = 'com_" . Placefix::_("component") . "';"; $script .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Check if " . Placefix::_("component") . " action log extension is already in action logs extensions DB."; @@ -252,16 +263,16 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * @return string * */ - protected function getViewPOSTUPDATESCRIPT() + protected function getViewJ3POSTUPDATESCRIPT() { $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already."; $script .= PHP_EOL . Indent::_(3) . "if (!isset(\$db))"; $script .= PHP_EOL . Indent::_(3) . "{"; - $script .= PHP_EOL . Indent::_(4) . "\$db = JFactory::getDbo();"; + $script .= PHP_EOL . Indent::_(4) . "\$db = Factory::getDbo();"; $script .= PHP_EOL . Indent::_(3) . "}"; $script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Create the " . Placefix::_("view") . " action log config object."; - $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new stdClass();"; + $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config = new \stdClass();"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->id = null;"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_title = '" . Placefix::_("VIEW") . "';"; $script .= PHP_EOL . Indent::_(3) . "\$" . Placefix::_("view") . "_action_log_config->type_alias = 'com_" . Placefix::_("component") . "." . Placefix::_("view") . "';"; @@ -298,17 +309,17 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * @return string * */ - protected function getMainUNINSTALLSCRIPT() + protected function getMainJ3UNINSTALLSCRIPT() { $script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already."; $script .= PHP_EOL . Indent::_(2) . "if (!isset(\$db))"; $script .= PHP_EOL . Indent::_(2) . "{"; - $script .= PHP_EOL . Indent::_(3) . "\$db = JFactory::getDbo();"; + $script .= PHP_EOL . Indent::_(3) . "\$db = Factory::getDbo();"; $script .= PHP_EOL . Indent::_(2) . "}"; $script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set app if not set already."; $script .= PHP_EOL . Indent::_(2) . "if (!isset(\$app))"; $script .= PHP_EOL . Indent::_(2) . "{"; - $script .= PHP_EOL . Indent::_(3) . "\$app = JFactory::getApplication();"; + $script .= PHP_EOL . Indent::_(3) . "\$app = Factory::getApplication();"; $script .= PHP_EOL . Indent::_(2) . "}"; $script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Remove " . Placefix::_("Component") . " from the action_logs_extensions table"; @@ -324,7 +335,7 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin $script .= PHP_EOL . Indent::_(2) . "if (\$" . Placefix::_("component") . "_removed_done)"; $script .= PHP_EOL . Indent::_(2) . "{"; $script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " If successfully remove " . Placefix::_("Component") . " add queued success message."; - $script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(JTe" . "xt::_('The com_" . Placefix::_("component") . " extension was removed from the #__action_logs_extensions table'));"; + $script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(Te" . "xt::_('The com_" . Placefix::_("component") . " extension was removed from the #__action_logs_extensions table'));"; $script .= PHP_EOL . Indent::_(2) . "}"; return CFactory::_('Placeholder')->update_($script); @@ -336,17 +347,17 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin * @return string * */ - protected function getViewUNINSTALLSCRIPT() + protected function getViewJ3UNINSTALLSCRIPT() { $script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set db if not set already."; $script .= PHP_EOL . Indent::_(2) . "if (!isset(\$db))"; $script .= PHP_EOL . Indent::_(2) . "{"; - $script .= PHP_EOL . Indent::_(3) . "\$db = JFactory::getDbo();"; + $script .= PHP_EOL . Indent::_(3) . "\$db = Factory::getDbo();"; $script .= PHP_EOL . Indent::_(2) . "}"; $script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Set app if not set already."; $script .= PHP_EOL . Indent::_(2) . "if (!isset(\$app))"; $script .= PHP_EOL . Indent::_(2) . "{"; - $script .= PHP_EOL . Indent::_(3) . "\$app = JFactory::getApplication();"; + $script .= PHP_EOL . Indent::_(3) . "\$app = Factory::getApplication();"; $script .= PHP_EOL . Indent::_(2) . "}"; $script .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Remove " . Placefix::_("Component") . " " . Placefix::_("View") . " from the action_log_config table"; @@ -361,12 +372,129 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin $script .= PHP_EOL . Indent::_(2) . "if (\$" . Placefix::_("view") . "_action_log_config_done)"; $script .= PHP_EOL . Indent::_(2) . "{"; $script .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " If successfully removed " . Placefix::_("Component") . " " . Placefix::_("View") . " add queued success message."; - $script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(JTe" . "xt::_('The com_" . Placefix::_("component") . "." . Placefix::_("view") . " type alias was removed from the #__action_log_config table'));"; + $script .= PHP_EOL . Indent::_(3) . "\$app->enqueueMessage(Te" . "xt::_('The com_" . Placefix::_("component") . "." . Placefix::_("view") . " type alias was removed from the #__action_log_config table'));"; $script .= PHP_EOL . Indent::_(2) . "}"; return CFactory::_('Placeholder')->update_($script); } + /** + * get the Main Post Install Script + * + * @return string + * + */ + protected function getMainJ4POSTINSTALLSCRIPT() + { + $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " Add component to the action logs extensions table."; + $script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogsExtensions();"; + + return $script; + } + + /** + * get the View Post Install Script + * + * @return string + * + */ + protected function getViewJ4POSTINSTALLSCRIPT() + { + $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " Add " . Placefix::_("View") . " to the action logs config table."; + $script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogConfig("; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeTitle"; + $script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("VIEW") . "',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeAlias"; + $script .= PHP_EOL . Indent::_(4) . "'com_" . Placefix::_("component") . "." . Placefix::_("view") . "',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " idHolder"; + $script .= PHP_EOL . Indent::_(4) . "'id',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " titleHolder"; + $script .= PHP_EOL . Indent::_(4) . "'<<>>',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " tableName"; + $script .= PHP_EOL . Indent::_(4) . "'#__" . Placefix::_("component") . "_" . Placefix::_("view") . "',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " textPrefix"; + $script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("LANG_PREFIX") . "'"; + $script .= PHP_EOL . Indent::_(3) . ");"; + + return CFactory::_('Placeholder')->update_($script); + } + + /** + * get the Main Post Update Script + * + * @return string + * + */ + protected function getMainJ4POSTUPDATESCRIPT() + { + $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " Add/Update component in the action logs extensions table."; + $script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogsExtensions();"; + + return $script; + } + + /** + * get the View Post Update Script + * + * @return string + * + */ + protected function getViewJ4POSTUPDATESCRIPT() + { + $script = PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) + . " Add/Update " . Placefix::_("View") . " in the action logs config table."; + $script .= PHP_EOL . Indent::_(3) . "\$this->setActionLogConfig("; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeTitle"; + $script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("VIEW") . "',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " typeAlias"; + $script .= PHP_EOL . Indent::_(4) . "'com_" . Placefix::_("component") . "." . Placefix::_("view") . "',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " idHolder"; + $script .= PHP_EOL . Indent::_(4) . "'id',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " titleHolder"; + $script .= PHP_EOL . Indent::_(4) . "'<<>>',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " tableName"; + $script .= PHP_EOL . Indent::_(4) . "'#__" . Placefix::_("component") . "_" . Placefix::_("view") . "',"; + $script .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " textPrefix"; + $script .= PHP_EOL . Indent::_(4) . "'" . Placefix::_("LANG_PREFIX") . "'"; + $script .= PHP_EOL . Indent::_(3) . ");"; + + return CFactory::_('Placeholder')->update_($script); + } + + /** + * get the Main Uninstall Script + * + * @return string + * + */ + protected function getMainJ4UNINSTALLSCRIPT() + { + $script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Remove component from action logs extensions table."; + $script .= PHP_EOL . Indent::_(2) . "\$this->removeActionLogsExtensions();"; + + return $script; + } + + /** + * get the View Uninstall Script + * + * @return string + * + */ + protected function getViewJ4UNINSTALLSCRIPT() + { + $script = PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) + . " Remove " . Placefix::_("View") . " from action logs config table."; + $script .= PHP_EOL . Indent::_(2) . "\$this->removeActionLogConfig('com_" + . Placefix::_("component") . "." . Placefix::_("view") . "');"; + + return CFactory::_('Placeholder')->update_($script); + } + /** * The array of active components @@ -385,12 +513,10 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin /** * Set the line number in comments * - * @param string $context The context of the current executing component - * * @return bool * */ - protected function componentActive(&$context) + protected function componentActive() { // check the active option if (!$this->activateOption) @@ -410,7 +536,7 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin // only check if there are active if (ArrayHelper::check($this->componentsActive)) { - return in_array((int) filter_var($context, FILTER_SANITIZE_NUMBER_INT), $this->componentsActive); + return in_array((int) CFactory::_('Config')->component_id, $this->componentsActive); } return false; } diff --git a/componentbuilderactionlogcompiler.xml b/componentbuilderactionlogcompiler.xml index 6827ea5..9d0b76d 100644 --- a/componentbuilderactionlogcompiler.xml +++ b/componentbuilderactionlogcompiler.xml @@ -1,13 +1,13 @@ - + PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER - 24th October, 2023 + 2nd March, 2024 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 1.1.1 + 2.0.0 PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.ini b/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.ini index c779716..370bd7a 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.ini @@ -1,6 +1,6 @@ PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER="Extension - Componentbuilder ActionLog Compiler" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_DESCRIPTION="This plugin is used to improve your action log integration with Joomla for your component 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_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder ActionLog Compiler (v.1.1.1)

This plugin is used to improve your action log integration with Joomla for your component 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.

Created by Llewellyn van der Merwe
Development started 27th August, 2019

" +PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder ActionLog Compiler (v.2.0.0)

This plugin is used to improve your action log integration with Joomla for your component 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.

Created by Llewellyn van der Merwe
Development started 27th August, 2019

" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_COMPONENT_ACTIVATION="Component Activation" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. All will target all components, and Selected will let you select only those you want to be active." diff --git a/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.sys.ini b/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.sys.ini index c779716..370bd7a 100644 --- a/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.sys.ini +++ b/language/en-GB/en-GB.plg_extension_componentbuilderactionlogcompiler.sys.ini @@ -1,6 +1,6 @@ PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER="Extension - Componentbuilder ActionLog Compiler" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_DESCRIPTION="This plugin is used to improve your action log integration with Joomla for your component 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_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder ActionLog Compiler (v.1.1.1)

This plugin is used to improve your action log integration with Joomla for your component 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.

Created by Llewellyn van der Merwe
Development started 27th August, 2019

" +PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_XML_DESCRIPTION="

Extension - Componentbuilder ActionLog Compiler (v.2.0.0)

This plugin is used to improve your action log integration with Joomla for your component 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.

Created by Llewellyn van der Merwe
Development started 27th August, 2019

" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_COMPONENT_ACTIVATION="Component Activation" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_LABEL="Activate Options" PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER_ACTIVATE_OPTION_DESCRIPTION="You can select the kind of activation control you would like to use. All will target all components, and Selected will let you select only those you want to be active." diff --git a/script.php b/script.php index 9b6f3de..04b51aa 100644 --- a/script.php +++ b/script.php @@ -12,6 +12,11 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filesystem\File; +use Joomla\CMS\Filesystem\Folder; + /** * Extension - Componentbuilder ActionLog Compiler script file. * @@ -31,7 +36,7 @@ class plgExtensionComponentbuilderActionLogCompilerInstallerScript public function preflight($route, $adapter) { // get application - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // the default for both install and update $jversion = new JVersion();