/
githubmirror
/
joomla-cms
Обзор
Документация
Войти
/
githubmirror
/
joomla-cms
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
5.4-dev
plugins/task/globalcheckin/services/provider.php
43 строки
1 KB
Fedir Zinchuk
[5.4] Remove use of deprecated dispatcher from the plugin constructors (#45644)
22 авг 2025, 16:16
Не верифицирован
22 авг 2025, 16:16
f778b19
Код
Авторство
О чём код?
<?php /** * @package Joomla.Plugin * @subpackage Task.Globalcheckin * * @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\Plugin\PluginHelper; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Plugin\Task\Globalcheckin\Extension\Globalcheckin; return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * @since 5.0.0 */ public function register(Container $container) { $container->set( PluginInterface::class, function (Container $container) { $checkin = new Globalcheckin( (array) PluginHelper::getPlugin('task', 'globalcheckin') ); $checkin->setDatabase($container->get(DatabaseInterface::class)); return $checkin; } ); } };