cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,26 +1,30 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\DocGeneratorBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
/**
* This is the class that loads and manages your bundle configuration.
*
* @link http://symfony.com/doc/current/cookbook/bundles/extension.html
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class ChillDocGeneratorExtension extends Extension implements PrependExtensionInterface
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../config'));
$loader->load('services.yaml');
$loader->load('services/controller.yaml');
$loader->load('services/fixtures.yaml');
@@ -33,20 +37,6 @@ class ChillDocGeneratorExtension extends Extension implements PrependExtensionIn
$this->prependCruds($container);
}
protected function preprendRoutes(ContainerBuilder $container)
{
$container->prependExtensionConfig('chill_main', array(
'routing' => array(
'resources' => array(
'@ChillDocGeneratorBundle/config/routes.yaml'
)
)
));
}
/**
* @param ContainerBuilder $container
*/
protected function prependCruds(ContainerBuilder $container)
{
$container->prependExtensionConfig('chill_main', [
@@ -60,19 +50,30 @@ class ChillDocGeneratorExtension extends Extension implements PrependExtensionIn
'actions' => [
'index' => [
'template' => '@ChillDocGenerator/Admin/DocGeneratorTemplate/index.html.twig',
'role' => 'ROLE_ADMIN'
'role' => 'ROLE_ADMIN',
],
'new' => [
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillDocGenerator/Admin/DocGeneratorTemplate/new.html.twig',
],
'edit' => [
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillDocGenerator/Admin/DocGeneratorTemplate/edit.html.twig',
]
]
]
]
],
],
],
],
]);
}
protected function preprendRoutes(ContainerBuilder $container)
{
$container->prependExtensionConfig('chill_main', [
'routing' => [
'resources' => [
'@ChillDocGeneratorBundle/config/routes.yaml',
],
],
]);
}
}