Your IP : 216.73.216.85


Current Path : /home/smartconb/www/armencom33/plugins/system/eventgalleryconsole/services/
Upload File :
Current File : /home/smartconb/www/armencom33/plugins/system/eventgalleryconsole/services/provider.php

<?php
/**
 * @package     Sven.Bluege
 * @subpackage  com_eventgallery
 *
 * @copyright   Copyright (C) 2005 - 2019 Sven Bluege All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') || die;

use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Svenbluege\Plugin\System\EventgalleryConsole\Extension\EventgalleryConsole;

return new class implements ServiceProviderInterface {

    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $subject = $container->get(DispatcherInterface::class);
                $config = (array)PluginHelper::getPlugin('system', 'eventgalleryconsole');

                $plugin = new EventgalleryConsole($subject, $config);

                $plugin->setApplication(\Joomla\CMS\Factory::getApplication());

                $plugin->init();

                return $plugin;
            }
        );
    }
};