Skip to content
Snippets Groups Projects
Verified Commit a795a06b authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Format and fix services.php

parent af021011
No related branches found
No related tags found
No related merge requests found
...@@ -22,21 +22,29 @@ ...@@ -22,21 +22,29 @@
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/ ***************************************************************/
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator): void { use SGalinski\SgYoutube\Form\Element\LicenceStatus;
use SGalinski\SgYoutube\Preview\PreviewRenderer;
use SGalinski\SgYoutube\Service\YoutubeService;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use TYPO3\CMS\Core\Cache\CacheManager;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services(); $services = $containerConfigurator->services();
$services->defaults() $services->defaults()
->private() ->private()
->autowire() ->autowire()
->autoconfigure(); ->autoconfigure();
$services->load('SGalinski\\SgYoutube\\', __DIR__ . '/../Classes/'); $services->load('SGalinski\\SgYoutube\\', __DIR__ . '/../Classes/');
$services->set(\SGalinski\SgYoutube\Preview\PreviewRenderer::class)->public(); $services->set(PreviewRenderer::class)->public();
$services->set(\SGalinski\SgYoutube\Service\YoutubeService::class) $services->set(YoutubeService::class)
->args(['$cache' => '@cache.sgyoutube_cache'])->public()->autowire(FALSE); ->args(['$cache' => service('cache.sgyoutube_cache')])->public()->autowire(FALSE);
$services->set('cache.sgyoutube_cache') $services->set('cache.sgyoutube_cache')
->class(\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface::class) ->class(FrontendInterface::class)
->factory(['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']) ->factory([service(CacheManager::class), 'getCache'])
->args(['sgyoutube_cache']); ->args(['sgyoutube_cache']);
$services->set(\SGalinski\SgYoutube\Form\Element\LicenceStatus::class) $services->set(LicenceStatus::class)
->autowire(FALSE) ->autowire(FALSE)
->autoconfigure(FALSE); ->autoconfigure(FALSE);
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment