CoreFiles by mySites.guru
provider.php44 lines, 1,222 bytes, from Joomla_6.1.2-Stable-Full_Package.zip
Raw History Compare with 6.1.1
md5
592e41b66f09c607b53b302e8650e073
sha1
175e2b401ae51f53addc0e5ed3e26c37c1d8c2ec
sha256
262eef4dd33b2805893a1db65cefca8b7c6dbec40ec4c2e697e129de1a23f4ad
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Media-Action.resize
 *
 * @copyright   (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\MediaAction\Resize\Extension\Resize;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.4.0
     */
    public function register(Container $container): void
    {
        $container->set(
            PluginInterface::class,
            $container->lazy(Resize::class, function (Container $container) {
                $plugin     = new Resize(
                    (array) PluginHelper::getPlugin('media-action', 'resize')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 29 releases, Joomla 6.1.0-beta1 to 6.2.1. See them all, or every version of this file.