52
0

Compare commits

..

39 Commits
4.x ... 5.x

Author SHA1 Message Date
ef57f8bd5f
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-11-07 10:55:30 +02:00
9d3a1f6ac6
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-10-13 22:54:01 +02:00
b6ad804633
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-10-08 00:33:55 +02:00
393b7b37c4
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-30 01:56:42 +02:00
899fcf304a
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-20 03:01:45 +02:00
9b36213aef
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-19 05:50:09 +02:00
8f2384a449
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-18 04:40:33 +02:00
c7338fe6af
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-08-21 21:38:38 +02:00
7d189ecc93
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-08-20 22:34:47 +02:00
92dfce2457
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-08-16 19:22:12 +02:00
e022c6d727
Release of v3.0.0 2024-08-15 01:35:23 +02:00
85ea763c3c
Release of v2.0.0 2024-07-27 23:01:47 +02:00
bb15917b42
Release of v2.0.0 2024-07-26 15:41:46 +02:00
2f564337cd
Release of v2.0.0 2024-07-20 22:46:52 +02:00
251ee285b4
Release of v2.0.0 2024-07-18 15:04:31 +02:00
163f8232a7
Release of v2.0.0 2024-07-17 02:37:06 +02:00
7242166e5b
Release of v2.0.0 2024-07-08 23:01:22 +02:00
3506fb1a3f
Release of v2.0.0 2024-06-28 03:57:03 +02:00
9f3aeff78a
Release of v2.0.0 2024-06-21 03:32:13 +02:00
e9fb7e4ce3
Release of v2.0.0 2024-06-07 23:27:38 +02:00
fb032a4f79
Release of v2.0.0 2024-06-05 17:15:46 +02:00
0af86a232c
Release of v2.0.0 2024-05-16 16:12:41 +02:00
3b9ef6cb5d
Release of v2.0.0 2024-05-13 12:26:41 +02:00
f0188d00cc
Release of v2.0.0 2024-05-10 18:20:26 +02:00
48eb235886
Release of v2.0.0 2024-05-06 07:54:17 +02:00
7a25e82631
Release of v2.0.0 2024-05-03 07:53:10 +02:00
6c084e1020
Release of v2.0.0 2024-04-30 12:35:09 +02:00
aa99a3424a
Release of v2.0.0 2024-04-27 16:06:02 +02:00
3b75db13cb
Release of v2.0.0 2024-04-24 21:43:39 +02:00
a71266e235
Release of v2.0.0 2024-04-22 01:20:29 +02:00
9db558acb7
Release of v2.0.0 2024-04-16 20:32:13 +02:00
519be7a111
Release of v2.0.0 2024-04-09 14:00:52 +02:00
11cc628e33
Release of v2.0.0 2024-04-07 12:06:55 +02:00
46a60d4d37
Release of v2.0.0 2024-04-06 23:47:21 +02:00
5344035c04
Release of v2.0.0 2024-03-26 22:38:08 +02:00
9488c95a3b
Release of v2.0.0 2024-03-20 14:27:40 +02:00
6f0c5ded1a
Release of v2.0.0 2024-03-15 12:32:05 +02:00
1a5583af29
Release of v2.0.0 2024-03-12 13:02:01 +02:00
1e8f174933
Release of v2.0.0 2024-03-11 18:36:21 +02:00
4 changed files with 117 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4.0" group="extension" method="upgrade">
<extension type="plugin" version="5.0" group="extension" method="upgrade">
<name>PLG_EXTENSION_COMPONENTBUILDEREXPORTCOMPILER</name>
<creationDate>7th November, 2024</creationDate>
<author>Llewellyn van der Merwe</author>

View File

@ -13,9 +13,11 @@
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Version;
use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
/**
* Extension - Componentbuilder Export Compiler script file.
@ -24,4 +26,116 @@ use Joomla\CMS\Filesystem\Folder;
*/
class plgExtensionComponentbuilderExportCompilerInstallerScript
{
/**
* 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/componentbuilderexportcompiler/componentbuilderexportcompiler.php'))
{
$this->deleteFiles[] = '/plugins/extension/componentbuilderexportcompiler/componentbuilderexportcompiler.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>';
}
}
}
}
}

View File

@ -18,7 +18,6 @@ use Joomla\CMS\Extension\PluginInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\DI\ServiceProviderInterface;
use Joomla\DI\Container;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Plugin\Extension\ComponentbuilderExportCompiler\Extension\ComponentbuilderExportCompiler;
return new class () implements ServiceProviderInterface {

View File

@ -10,7 +10,6 @@
*/
namespace VDM\Plugin\Extension\ComponentbuilderExportCompiler\Extension;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
use VDM\Joomla\Componentbuilder\Compiler\Factory;