| Server IP : 54.36.91.62 / Your IP : 216.73.217.111 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/montpellier/plugins/system/rsformconsole/ |
Upload File : |
<?php
/**
* @package RSForm! Pro
* @copyright (C) 2022 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
defined('_JEXEC') or die;
use Joomla\Application\ApplicationEvents;
use Joomla\Application\Event\ApplicationEvent;
use Joomla\CMS\Console\Loader\WritableLoaderInterface;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Event\SubscriberInterface;
use Joomla\CMS\Factory;
use Joomla\DI\Container;
use Rsjoomla\Plugin\System\Rsformconsole\BackupformsCommand;
use Rsjoomla\Plugin\System\Rsformconsole\PurgesubmissionsCommand;
use Rsjoomla\Plugin\System\Rsformconsole\ExportcsvCommand;
class plgSystemRsformconsole extends CMSPlugin implements SubscriberInterface
{
protected $autoloadLanguage = true;
public static function getSubscribedEvents(): array
{
return [
ApplicationEvents::BEFORE_EXECUTE => 'registerCommand',
];
}
public function registerCommand(ApplicationEvent $event): void
{
$serviceId = 'rsform.backup-forms';
Factory::getContainer()->share(
$serviceId,
function (Container $container) {
// do stuff to create command class and return it
return new BackupformsCommand();
},
true
);
Factory::getContainer()->get(WritableLoaderInterface::class)->add(BackupformsCommand::getDefaultName(), $serviceId);
$serviceId = 'rsform.purge-submissions';
Factory::getContainer()->share(
$serviceId,
function (Container $container) {
// do stuff to create command class and return it
return new PurgesubmissionsCommand();
},
true
);
Factory::getContainer()->get(WritableLoaderInterface::class)->add(PurgesubmissionsCommand::getDefaultName(), $serviceId);
$serviceId = 'rsform.export-csv';
Factory::getContainer()->share(
$serviceId,
function (Container $container) {
// do stuff to create command class and return it
return new ExportcsvCommand();
},
true
);
Factory::getContainer()->get(WritableLoaderInterface::class)->add(ExportcsvCommand::getDefaultName(), $serviceId);
}
}