Release of v3.0.0
This commit is contained in:
parent
052d51263e
commit
aa37b1961e
@ -1,13 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="plugin" version="5.0" group="extension" method="upgrade">
|
<extension type="plugin" version="5.0" group="extension" method="upgrade">
|
||||||
<name>PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER</name>
|
<name>PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER</name>
|
||||||
<creationDate>27th July, 2024</creationDate>
|
<creationDate>14th August, 2024</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>joomla@vdm.io</authorEmail>
|
<authorEmail>joomla@vdm.io</authorEmail>
|
||||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
<copyright>Copyright (C) 2015 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>2.0.1</version>
|
<version>3.0.0</version>
|
||||||
|
<namespace path="src">VDM\Plugin\Extension\ComponentbuilderPrivacyCompiler</namespace>
|
||||||
<description>PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION</description>
|
<description>PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION</description>
|
||||||
|
|
||||||
<!-- Scripts to run on installation -->
|
<!-- Scripts to run on installation -->
|
||||||
@ -15,14 +16,17 @@
|
|||||||
|
|
||||||
<!-- Language files -->
|
<!-- Language files -->
|
||||||
<languages folder="language">
|
<languages folder="language">
|
||||||
<language tag="en-GB">en-GB/en-GB.plg_extension_componentbuilderprivacycompiler.ini</language>
|
<language tag="en-GB">en-GB/plg_extension_componentbuilderprivacycompiler.ini</language>
|
||||||
<language tag="en-GB">en-GB/en-GB.plg_extension_componentbuilderprivacycompiler.sys.ini</language>
|
<language tag="en-GB">en-GB/plg_extension_componentbuilderprivacycompiler.sys.ini</language>
|
||||||
|
<language tag="af-ZA">af-ZA/plg_extension_componentbuilderprivacycompiler.ini</language>
|
||||||
|
<language tag="af-ZA">af-ZA/plg_extension_componentbuilderprivacycompiler.sys.ini</language>
|
||||||
</languages>
|
</languages>
|
||||||
|
|
||||||
<!-- Plugin files -->
|
<!-- Plugin files -->
|
||||||
<files>
|
<files>
|
||||||
<filename plugin="componentbuilderprivacycompiler">componentbuilderprivacycompiler.php</filename>
|
<folder plugin="componentbuilderprivacycompiler">services</folder>
|
||||||
<filename>index.html</filename>
|
<filename>index.html</filename>
|
||||||
<folder>language</folder>
|
<folder>services</folder>
|
||||||
|
<folder>src</folder>
|
||||||
</files>
|
</files>
|
||||||
</extension>
|
</extension>
|
@ -0,0 +1,2 @@
|
|||||||
|
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_YES="Ja"
|
||||||
|
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NO="Nee"
|
@ -0,0 +1,2 @@
|
|||||||
|
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_YES="Ja"
|
||||||
|
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NO="Nee"
|
@ -1,4 +1,4 @@
|
|||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER="Extension - Componentbuilder Privacy Compiler"
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER="Extension - Componentbuilder Privacy Compiler"
|
||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_DESCRIPTION="This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin."
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_DESCRIPTION="This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin."
|
||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.2.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 10th March, 2024</small></p>"
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.3.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 10th March, 2024</small></p>"
|
||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD="You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build."
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD="You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build."
|
@ -1,4 +1,4 @@
|
|||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER="Extension - Componentbuilder Privacy Compiler"
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER="Extension - Componentbuilder Privacy Compiler"
|
||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_DESCRIPTION="This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin."
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_DESCRIPTION="This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin."
|
||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.2.0.1)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 10th March, 2024</small></p>"
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.3.0.0)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin 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.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 10th March, 2024</small></p>"
|
||||||
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD="You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build."
|
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD="You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build."
|
120
script.php
120
script.php
@ -13,15 +13,129 @@
|
|||||||
defined('_JEXEC') or die('Restricted access');
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
use Joomla\CMS\Factory;
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Version;
|
||||||
|
use Joomla\CMS\Installer\InstallerAdapter;
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\Filesystem\File;
|
use Joomla\Filesystem\File;
|
||||||
use Joomla\CMS\Filesystem\Folder;
|
use Joomla\Filesystem\Folder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension - Componentbuilder Privacy Compiler script file.
|
* Extension - Componentbuilder Privacy Compiler script file.
|
||||||
*
|
*
|
||||||
* @package PlgExtensionComponentbuilderPrivacyCompiler
|
* @package ComponentbuilderPrivacyCompiler
|
||||||
*/
|
*/
|
||||||
class plgExtensionComponentbuilderPrivacyCompilerInstallerScript
|
class plgExtensionComponentbuilderPrivacyCompilerInstallerScript
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The CMS Application.
|
||||||
|
*
|
||||||
|
* @since 4.4.2
|
||||||
|
*/
|
||||||
|
protected $app;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of files to be deleted
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.6
|
||||||
|
*/
|
||||||
|
protected array $deleteFiles = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of folders to be deleted
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.6
|
||||||
|
*/
|
||||||
|
protected array $deleteFolders = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param InstallerAdapter $adapter The object responsible for running this script
|
||||||
|
*/
|
||||||
|
public function __construct($adapter)
|
||||||
|
{
|
||||||
|
// get application
|
||||||
|
$this->app = Factory::getApplication();
|
||||||
|
|
||||||
|
if (is_file(JPATH_ROOT . '/plugins/extension/componentbuilderprivacycompiler/componentbuilderprivacycompiler.php'))
|
||||||
|
{
|
||||||
|
$this->deleteFiles[] = '/plugins/extension/componentbuilderprivacycompiler/componentbuilderprivacycompiler.php';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before any type of action
|
||||||
|
*
|
||||||
|
* @param string $route Which action is happening (install|uninstall|discover_install|update)
|
||||||
|
* @param InstallerAdapter $adapter The object responsible for running this script
|
||||||
|
*
|
||||||
|
* @return boolean True on success
|
||||||
|
*/
|
||||||
|
public function preflight($route, $adapter)
|
||||||
|
{
|
||||||
|
// set application to local method var, just use $this->app in future [we will drop $app in J6]
|
||||||
|
$app = $this->app;
|
||||||
|
|
||||||
|
// the default for both install and update
|
||||||
|
$jversion = new Version();
|
||||||
|
if (!$jversion->isCompatible('5.0.0'))
|
||||||
|
{
|
||||||
|
$app->enqueueMessage('Please upgrade to at least Joomla! 5.0.0 before continuing!', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove old files and folders
|
||||||
|
$this->removeFiles();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before any type of action
|
||||||
|
*
|
||||||
|
* @param string $route Which action is happening (install|uninstall|discover_install|update)
|
||||||
|
* @param InstallerAdapter $adapter The object responsible for running this script
|
||||||
|
*
|
||||||
|
* @return boolean True on success
|
||||||
|
*/
|
||||||
|
public function postflight($route, $adapter)
|
||||||
|
{
|
||||||
|
// set application to local method var, just use $this->app in future [we will drop $app in J6]
|
||||||
|
$app = $this->app;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the files and folders in the given array from
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 5.0.2
|
||||||
|
*/
|
||||||
|
protected function removeFiles()
|
||||||
|
{
|
||||||
|
if (!empty($this->deleteFiles))
|
||||||
|
{
|
||||||
|
foreach ($this->deleteFiles as $file)
|
||||||
|
{
|
||||||
|
if (is_file(JPATH_ROOT . $file) && !File::delete(JPATH_ROOT . $file))
|
||||||
|
{
|
||||||
|
echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $file) . '<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($this->deleteFolders))
|
||||||
|
{
|
||||||
|
foreach ($this->deleteFolders as $folder)
|
||||||
|
{
|
||||||
|
if (is_dir(JPATH_ROOT . $folder) && !Folder::delete(JPATH_ROOT . $folder))
|
||||||
|
{
|
||||||
|
echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $folder) . '<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
1
services/index.html
Normal file
1
services/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
47
services/provider.php
Normal file
47
services/provider.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Component.Builder
|
||||||
|
*
|
||||||
|
* @created 30th April, 2015
|
||||||
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||||
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||||
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Plugin\PluginHelper;
|
||||||
|
use Joomla\CMS\Extension\PluginInterface;
|
||||||
|
use Joomla\Event\DispatcherInterface;
|
||||||
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use VDM\Plugin\Extension\ComponentbuilderPrivacyCompiler\Extension\ComponentbuilderPrivacyCompiler;
|
||||||
|
|
||||||
|
return new class () implements ServiceProviderInterface {
|
||||||
|
/**
|
||||||
|
* Registers the service provider with a DI container.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 4.3.0
|
||||||
|
*/
|
||||||
|
public function register(Container $container)
|
||||||
|
{
|
||||||
|
$container->set(
|
||||||
|
PluginInterface::class,
|
||||||
|
function (Container $container) {
|
||||||
|
$plugin = new ComponentbuilderPrivacyCompiler(
|
||||||
|
$container->get(DispatcherInterface::class),
|
||||||
|
(array) PluginHelper::getPlugin('extension', 'componentbuilderprivacycompiler')
|
||||||
|
);
|
||||||
|
$plugin->setApplication(Factory::getApplication());
|
||||||
|
|
||||||
|
return $plugin;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
@ -8,9 +8,7 @@
|
|||||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
*/
|
*/
|
||||||
|
namespace VDM\Plugin\Extension\ComponentbuilderPrivacyCompiler\Extension;
|
||||||
// No direct access to this file
|
|
||||||
defined('_JEXEC') or die('Restricted access');
|
|
||||||
|
|
||||||
use Joomla\CMS\Factory;
|
use Joomla\CMS\Factory;
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
@ -24,14 +22,19 @@ use VDM\Joomla\Utilities\StringHelper;
|
|||||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
|
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
|
||||||
use Joomla\CMS\Component\ComponentHelper;
|
use Joomla\Event\SubscriberInterface;
|
||||||
|
use Joomla\CMS\Plugin\PluginHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
defined('_JEXEC') or die('Restricted access');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension - Componentbuilder Privacy Compiler plugin.
|
* Extension - Componentbuilder Privacy Compiler plugin.
|
||||||
*
|
*
|
||||||
* @package ComponentbuilderPrivacyCompiler
|
* @package ComponentbuilderPrivacyCompiler
|
||||||
* @since 2.0.1
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
final class ComponentbuilderPrivacyCompiler extends CMSPlugin implements SubscriberInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Affects constructor behavior. If true, language files will be loaded automatically.
|
* Affects constructor behavior. If true, language files will be loaded automatically.
|
||||||
@ -131,7 +134,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
// check if this component needs a privacy plugin loaded
|
// check if this component needs a privacy plugin loaded
|
||||||
if ($this->loadPrivacy)
|
if ($this->loadPrivacy)
|
||||||
{
|
{
|
||||||
$plugin = \JPluginHelper::getPlugin('content', 'componentbuilderprivacytabs');
|
$plugin = PluginHelper::getPlugin('content', 'componentbuilderprivacytabs');
|
||||||
// check if this is json
|
// check if this is json
|
||||||
if (isset($plugin->params) && JsonHelper::check($plugin->params))
|
if (isset($plugin->params) && JsonHelper::check($plugin->params))
|
||||||
{
|
{
|
||||||
@ -148,7 +151,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Factory::getApplication()->enqueueMessage(Text::_('PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD'), 'Warning');
|
$this->getApplication()->enqueueMessage(Text::_('PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD'), 'Warning');
|
||||||
$this->loadPrivacy= false;
|
$this->loadPrivacy= false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -306,7 +309,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyPlugin \$plugin The plugin being processed";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyPlugin \$plugin The plugin being processed";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyRemovalStatus \$status The status being set";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyRemovalStatus \$status The status being set";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyTableRequest \$request The request record being processed";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyTableRequest \$request The request record being processed";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param JUser \$user The user account associated with this request if available";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param Joomla__"."_effdaf6d_2275_425d_9f52_d4952e564d34___Power \$user The user account associated with this request if available";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @return PrivacyRemovalStatus";
|
$methods .= PHP_EOL . Indent::_(1) . " * @return PrivacyRemovalStatus";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " */";
|
$methods .= PHP_EOL . Indent::_(1) . " */";
|
||||||
@ -332,18 +335,18 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$lang_key = $view->placeholders[Placefix::_("LANG_PREFIX")] . '_PRIVACY_CANT_REMOVE_' . $view->placeholders[Placefix::_("VIEWS")];
|
$lang_key = $view->placeholders[Placefix::_("LANG_PREFIX")] . '_PRIVACY_CANT_REMOVE_' . $view->placeholders[Placefix::_("VIEWS")];
|
||||||
// set language string
|
// set language string
|
||||||
$this->languageArray[$lang_key] = "You do not have permission to remove/delete ". $view->name_list . ".";
|
$this->languageArray[$lang_key] = "You do not have permission to remove/delete ". $view->name_list . ".";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "\$reasons[] = JTe" . "xt::_('" . $lang_key . "');";
|
$methods .= PHP_EOL . Indent::_(3) . "\$reasons[] = Joomla__" . "_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('" . $lang_key . "');";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "}";
|
$methods .= PHP_EOL . Indent::_(2) . "}";
|
||||||
// set language key
|
// set language key
|
||||||
$lang_key = $view->placeholders[Placefix::_("LANG_PREFIX")] . '_PRIVACY_CANT_REMOVE_CONTACT_SUPPORT';
|
$lang_key = $view->placeholders[Placefix::_("LANG_PREFIX")] . '_PRIVACY_CANT_REMOVE_CONTACT_SUPPORT';
|
||||||
}
|
}
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if any reasons were found not to allow removal";
|
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if any reasons were found not to allow removal";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "if (ArrayHelper::check(\$reasons))";
|
$methods .= PHP_EOL . Indent::_(2) . "if (Super__" . "_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$reasons))";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "{";
|
$methods .= PHP_EOL . Indent::_(2) . "{";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "\$status->canRemove = false;";
|
$methods .= PHP_EOL . Indent::_(3) . "\$status->canRemove = false;";
|
||||||
// set language string
|
// set language string
|
||||||
$this->languageArray[$lang_key] = 'Please contact support for more details.';
|
$this->languageArray[$lang_key] = 'Please contact support for more details.';
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "\$status->reason = implode(' ' . PHP_EOL, \$reasons) . ' ' . PHP_EOL . JTe" . "xt::_('" . $lang_key . "');";
|
$methods .= PHP_EOL . Indent::_(3) . "\$status->reason = implode(' ' . PHP_EOL, \$reasons) . ' ' . PHP_EOL . Joomla__" . "_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('" . $lang_key . "');";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "}";
|
$methods .= PHP_EOL . Indent::_(2) . "}";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "return \$status;";
|
$methods .= PHP_EOL . Indent::_(2) . "return \$status;";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . "}" . PHP_EOL;
|
$methods .= PHP_EOL . Indent::_(1) . "}" . PHP_EOL;
|
||||||
@ -365,7 +368,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyPlugin \$plugin The plugin being processed";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyPlugin \$plugin The plugin being processed";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param DomainArray \$domains The array of domains";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param DomainArray \$domains The array of domains";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyTableRequest \$request The request record being processed";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyTableRequest \$request The request record being processed";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param JUser \$user The user account associated with this request if available";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param Joomla__"."_effdaf6d_2275_425d_9f52_d4952e564d34___Power \$user The user account associated with this request if available";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @return PrivacyExportDomain[]";
|
$methods .= PHP_EOL . Indent::_(1) . " * @return PrivacyExportDomain[]";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " */";
|
$methods .= PHP_EOL . Indent::_(1) . " */";
|
||||||
@ -403,7 +406,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(1) . "/**";
|
$methods .= PHP_EOL . Indent::_(1) . "/**";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * Create the domain for the " . $view->name_single;
|
$methods .= PHP_EOL . Indent::_(1) . " * Create the domain for the " . $view->name_single;
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param JTableUser \$user The JTableUser object to process";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param Joomla__"."_11accf54_fcb9_4ba0_a645_7c80ce14e224___Power \$user The Joomla__"."_11accf54_fcb9_4ba0_a645_7c80ce14e224___Power object to process";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @return PrivacyExportDomain";
|
$methods .= PHP_EOL . Indent::_(1) . " * @return PrivacyExportDomain";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " */";
|
$methods .= PHP_EOL . Indent::_(1) . " */";
|
||||||
@ -451,7 +454,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Get all item details of " . $view->name_list . " that belong to this user";
|
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Get all item details of " . $view->name_list . " that belong to this user";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "\$items = \$model->getPrivacyExport(\$pks, \$user);";
|
$methods .= PHP_EOL . Indent::_(2) . "\$items = \$model->getPrivacyExport(\$pks, \$user);";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " check if we have items since permissions could block the request";
|
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " check if we have items since permissions could block the request";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "if (ArrayHelper::check(\$items))";
|
$methods .= PHP_EOL . Indent::_(2) . "if (Super__" . "_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "{";
|
$methods .= PHP_EOL . Indent::_(2) . "{";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Remove " . $view->name_single . " default columns";
|
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Remove " . $view->name_single . " default columns";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "foreach (array('params', 'asset_id', 'checked_out', 'checked_out_time', 'created', 'created_by', 'modified', 'modified_by', 'published', 'ordering', 'access', 'version', 'hits') as \$column)";
|
$methods .= PHP_EOL . Indent::_(3) . "foreach (array('params', 'asset_id', 'checked_out', 'checked_out_time', 'created', 'created_by', 'modified', 'modified_by', 'published', 'ordering', 'access', 'version', 'hits') as \$column)";
|
||||||
@ -560,7 +563,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(1) . " * Removes the data associated with a remove information request";
|
$methods .= PHP_EOL . Indent::_(1) . " * Removes the data associated with a remove information request";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyTableRequest \$request The request record being processed";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param PrivacyTableRequest \$request The request record being processed";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param JUser \$user The user account associated with this request if available";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param Joomla__"."_effdaf6d_2275_425d_9f52_d4952e564d34___Power \$user The user account associated with this request if available";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @return void";
|
$methods .= PHP_EOL . Indent::_(1) . " * @return void";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " */";
|
$methods .= PHP_EOL . Indent::_(1) . " */";
|
||||||
@ -634,7 +637,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @param JTableUser \$user The JTableUser object to process";
|
$methods .= PHP_EOL . Indent::_(1) . " * @param Joomla__"."_11accf54_fcb9_4ba0_a645_7c80ce14e224___Power \$user The Joomla__"."_11accf54_fcb9_4ba0_a645_7c80ce14e224___Power object to process";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " *";
|
$methods .= PHP_EOL . Indent::_(1) . " *";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " * @return void";
|
$methods .= PHP_EOL . Indent::_(1) . " * @return void";
|
||||||
$methods .= PHP_EOL . Indent::_(1) . " */";
|
$methods .= PHP_EOL . Indent::_(1) . " */";
|
||||||
@ -688,7 +691,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " get all items for the " . $view->name_list . " table that belong to this user";
|
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " get all items for the " . $view->name_list . " table that belong to this user";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "\$pks = \$db->setQuery(\$query)->loadColumn();";
|
$methods .= PHP_EOL . Indent::_(2) . "\$pks = \$db->setQuery(\$query)->loadColumn();";
|
||||||
|
|
||||||
$methods .= PHP_EOL .PHP_EOL . Indent::_(2) . "if (ArrayHelper::check(\$pks))";
|
$methods .= PHP_EOL .PHP_EOL . Indent::_(2) . "if (Super__" . "_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$pks))";
|
||||||
$methods .= PHP_EOL . Indent::_(2) . "{";
|
$methods .= PHP_EOL . Indent::_(2) . "{";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the " . $viewName_single . " model";
|
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the " . $viewName_single . " model";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "\$model = self::getModel('" . $viewName_single . "', JPATH_ADMINISTRATOR . '/components/com_" . Placefix::_("component") . "');";
|
$methods .= PHP_EOL . Indent::_(3) . "\$model = self::getModel('" . $viewName_single . "', JPATH_ADMINISTRATOR . '/components/com_" . Placefix::_("component") . "');";
|
||||||
@ -745,7 +748,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
if ($hasPermissional)
|
if ($hasPermissional)
|
||||||
{
|
{
|
||||||
$methods .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Get global permissional control activation. (default is inactive)";
|
$methods .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Get global permissional control activation. (default is inactive)";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "\$strict_permission_per_field = ComponentHelper::getParams('com_" . Placefix::_("component") . "')->get('strict_permission_per_field', 0);";
|
$methods .= PHP_EOL . Indent::_(3) . "\$strict_permission_per_field = Joomla__" . "_aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_" . Placefix::_("component") . "')->get('strict_permission_per_field', 0);";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "if(\$strict_permission_per_field)";
|
$methods .= PHP_EOL . Indent::_(3) . "if(\$strict_permission_per_field)";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "{";
|
$methods .= PHP_EOL . Indent::_(3) . "{";
|
||||||
$methods .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " remove all fields that is not permitted to be changed";
|
$methods .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " remove all fields that is not permitted to be changed";
|
||||||
@ -775,7 +778,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(3) . "\$table = \$model->getTable();";
|
$methods .= PHP_EOL . Indent::_(3) . "\$table = \$model->getTable();";
|
||||||
|
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " check that we still have pseudoanonymised data for " . $view->name_list . " set";
|
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " check that we still have pseudoanonymised data for " . $view->name_list . " set";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "if (!ArrayHelper::check(\$pseudoanonymisedData))";
|
$methods .= PHP_EOL . Indent::_(3) . "if (!Super__" . "_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$pseudoanonymisedData))";
|
||||||
$methods .= PHP_EOL . Indent::_(3) . "{";
|
$methods .= PHP_EOL . Indent::_(3) . "{";
|
||||||
$methods .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " still archive all items";
|
$methods .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " still archive all items";
|
||||||
$methods .= PHP_EOL . Indent::_(4) . "\$table->publish(\$pks, 2);";
|
$methods .= PHP_EOL . Indent::_(4) . "\$table->publish(\$pks, 2);";
|
||||||
@ -826,4 +829,21 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
|
|||||||
$methods .= PHP_EOL . Indent::_(1) . "}" . PHP_EOL;
|
$methods .= PHP_EOL . Indent::_(1) . "}" . PHP_EOL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of events this subscriber will listen to.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 5.0.0
|
||||||
|
*/
|
||||||
|
public static function getSubscribedEvents(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'jcb_ce_onBeforeModelViewData' => 'jcb_ce_onBeforeModelViewData',
|
||||||
|
'jcb_ce_onAfterGet' => 'jcb_ce_onAfterGet',
|
||||||
|
'jcb_ce_onBeforeUpdateFiles' => 'jcb_ce_onBeforeUpdateFiles',
|
||||||
|
'jcb_ce_onBeforeSetLangFileData' => 'jcb_ce_onBeforeSetLangFileData'
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
1
src/Extension/index.html
Normal file
1
src/Extension/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
Loading…
Reference in New Issue
Block a user