mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,42 +1,47 @@
|
||||
<?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\MyBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
|
||||
class ItemController extends Controller {
|
||||
|
||||
public function yourAction()
|
||||
class ItemController extends Controller
|
||||
{
|
||||
public function yourAction()
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
// first, get the number of total item are available
|
||||
$total = $em
|
||||
->createQuery("SELECT COUNT (item.id) FROM ChillMyBundle:Item item")
|
||||
->getSingleScalarResult();
|
||||
|
||||
->createQuery('SELECT COUNT (item.id) FROM ChillMyBundle:Item item')
|
||||
->getSingleScalarResult();
|
||||
|
||||
// get the PaginatorFactory
|
||||
$paginatorFactory = $this->get('chill_main.paginator_factory');
|
||||
|
||||
// create a pagination instance. This instance is only valid for
|
||||
|
||||
// create a pagination instance. This instance is only valid for
|
||||
// the current route and parameters
|
||||
$paginator = $paginatorFactory->create($total);
|
||||
|
||||
|
||||
// launch your query on item. Limit the query to the results
|
||||
// for the current page using the paginator
|
||||
$items = $em->createQuery("SELECT item FROM ChillMyBundle:Item item WHERE <your clause>")
|
||||
$items = $em->createQuery('SELECT item FROM ChillMyBundle:Item item WHERE <your clause>')
|
||||
// use the paginator to get the first item number
|
||||
->setFirstResult($paginator->getCurrentPage()->getFirstItemNumber())
|
||||
// use the paginator to get the number of items to display
|
||||
->setMaxResults($paginator->getItemsPerPage());
|
||||
|
||||
return $this->render('ChillMyBundle:Item:list.html.twig', array(
|
||||
|
||||
return $this->render(
|
||||
'ChillMyBundle:Item:list.html.twig',
|
||||
[
|
||||
'items' => $items,
|
||||
'paginator' => $paginator
|
||||
);
|
||||
|
||||
'paginator' => $paginator,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,43 +1,51 @@
|
||||
<?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\HealthBundle\Controller;
|
||||
|
||||
use Chill\HealthBundle\Security\Authorization\ConsultationVoter;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class ConsultationController extends Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param int $id personId
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @throws type
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function listAction($id)
|
||||
{
|
||||
/* @var $person \Chill\PersonBundle\Entity\Person */
|
||||
$person = $this->get('chill.person.repository.person')
|
||||
->find($id);
|
||||
|
||||
if ($person === null) {
|
||||
throw $this->createNotFoundException("The person is not found");
|
||||
|
||||
if (null === $person) {
|
||||
throw $this->createNotFoundException('The person is not found');
|
||||
}
|
||||
|
||||
|
||||
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person);
|
||||
|
||||
|
||||
/* @var $authorizationHelper \Chill\MainBundle\Security\Authorization\AuthorizationHelper */
|
||||
$authorizationHelper = $this->get('chill.main.security.'
|
||||
. 'authorization.helper');
|
||||
|
||||
|
||||
$circles = $authorizationHelper->getReachableCircles(
|
||||
$this->getUser(),
|
||||
new Role(ConsultationVoter::SEE),
|
||||
$this->getUser(),
|
||||
new Role(ConsultationVoter::SEE),
|
||||
$person->getCenter()
|
||||
);
|
||||
|
||||
// create a query which take circles into account
|
||||
);
|
||||
|
||||
// create a query which take circles into account
|
||||
$consultations = $this->getDoctrine()->getManager()
|
||||
->createQuery('SELECT c FROM ChillHealthBundle:Consultation c '
|
||||
. 'WHERE c.patient = :person AND c.circle IN(:circles) '
|
||||
@@ -45,11 +53,10 @@ class ConsultationController extends Controller
|
||||
->setParameter('person', $person)
|
||||
->setParameter('circles', $circles)
|
||||
->getResult();
|
||||
|
||||
return $this->render('ChillHealthBundle:Consultation:list.html.twig', array(
|
||||
'person' => $person,
|
||||
'consultations' => $consultations
|
||||
));
|
||||
|
||||
return $this->render('ChillHealthBundle:Consultation:list.html.twig', [
|
||||
'person' => $person,
|
||||
'consultations' => $consultations,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,64 +1,62 @@
|
||||
<?php
|
||||
# Chill\MainBundle\DependencyInjection\Configuration.php
|
||||
|
||||
namespace Chill\MainBundle\DependencyInjection;
|
||||
|
||||
/**
|
||||
* 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\MainBundle\DependencyInjection;
|
||||
|
||||
use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait;
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
/**
|
||||
* Configure the main bundle
|
||||
* Configure the main bundle.
|
||||
*/
|
||||
class Configuration implements ConfigurationInterface
|
||||
{
|
||||
|
||||
use AddWidgetConfigurationTrait;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @var ContainerBuilder
|
||||
*/
|
||||
* @var ContainerBuilder
|
||||
*/
|
||||
private $containerBuilder;
|
||||
|
||||
|
||||
public function __construct(array $widgetFactories = array(),
|
||||
ContainerBuilder $containerBuilder)
|
||||
public function __construct(
|
||||
array $widgetFactories = [],
|
||||
ContainerBuilder $containerBuilder
|
||||
)
|
||||
{
|
||||
// we register here widget factories (see below)
|
||||
$this->setWidgetFactories($widgetFactories);
|
||||
$this->setWidgetFactories($widgetFactories);
|
||||
// we will need the container builder later...
|
||||
$this->containerBuilder = $containerBuilder;
|
||||
$this->containerBuilder = $containerBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('chill_main');
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('chill_main');
|
||||
|
||||
$rootNode
|
||||
->children()
|
||||
$rootNode
|
||||
->children()
|
||||
|
||||
// ...
|
||||
|
||||
->arrayNode('widgets')
|
||||
->canBeDisabled()
|
||||
->children()
|
||||
->arrayNode('widgets')
|
||||
->canBeDisabled()
|
||||
->children()
|
||||
// we declare here all configuration for homepage place
|
||||
->append($this->addWidgetsConfiguration('homepage', $this->containerBuilder))
|
||||
->end() // end of widgets/children
|
||||
->end() // end of widgets
|
||||
->end() // end of root/children
|
||||
->end() // end of root
|
||||
;
|
||||
->append($this->addWidgetsConfiguration('homepage', $this->containerBuilder))
|
||||
->end() // end of widgets/children
|
||||
->end() // end of widgets
|
||||
->end() // end of root/children
|
||||
->end() // end of root
|
||||
;
|
||||
|
||||
|
||||
return $treeBuilder;
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
#Chill\MainBundle\DependencyInjection\ChillMainExtension.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\MainBundle\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\Extension\PrependExtensionInterface;
|
||||
use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface;
|
||||
use Chill\MainBundle\DependencyInjection\Configuration;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
/**
|
||||
* This class load config for chillMainExtension.
|
||||
@@ -18,42 +19,42 @@ use Chill\MainBundle\DependencyInjection\Configuration;
|
||||
class ChillMainExtension extends Extension implements Widget\HasWidgetFactoriesExtensionInterface
|
||||
{
|
||||
/**
|
||||
* widget factory
|
||||
*
|
||||
* widget factory.
|
||||
*
|
||||
* @var WidgetFactoryInterface[]
|
||||
*/
|
||||
protected $widgetFactories = array();
|
||||
|
||||
protected $widgetFactories = [];
|
||||
|
||||
public function addWidgetFactory(WidgetFactoryInterface $factory)
|
||||
{
|
||||
$this->widgetFactories[] = $factory;
|
||||
}
|
||||
|
||||
|
||||
public function getConfiguration(array $config, ContainerBuilder $container)
|
||||
{
|
||||
return new Configuration($this->widgetFactories, $container);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return WidgetFactoryInterface[]
|
||||
*/
|
||||
public function getWidgetFactories()
|
||||
{
|
||||
return $this->widgetFactories;
|
||||
}
|
||||
|
||||
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
// configuration for main bundle
|
||||
$configuration = $this->getConfiguration($configs, $container);
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
// add the key 'widget' without the key 'enable'
|
||||
$container->setParameter('chill_main.widgets',
|
||||
array('homepage' => $config['widgets']['homepage']));
|
||||
|
||||
// ...
|
||||
// add the key 'widget' without the key 'enable'
|
||||
$container->setParameter(
|
||||
'chill_main.widgets',
|
||||
['homepage' => $config['widgets']['homepage']]
|
||||
);
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
public function getConfiguration(array $config, ContainerBuilder $container)
|
||||
{
|
||||
return new Configuration($this->widgetFactories, $container);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,69 +1,71 @@
|
||||
<?php
|
||||
|
||||
# Chill/PersonBundle/Widget/PersonListWidgetFactory
|
||||
/**
|
||||
* 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\PersonBundle\Widget;
|
||||
|
||||
use Chill\MainBundle\DependencyInjection\Widget\Factory\AbstractWidgetFactory;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Config\Definition\Builder\NodeBuilder;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
/**
|
||||
* add configuration for the person_list widget.
|
||||
*/
|
||||
class PersonListWidgetFactory extends AbstractWidgetFactory
|
||||
{
|
||||
/*
|
||||
* append the option to the configuration
|
||||
* see http://symfony.com/doc/current/components/config/definition.html
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* append the option to the configuration
|
||||
* see http://symfony.com/doc/current/components/config/definition.html
|
||||
*
|
||||
*/
|
||||
public function configureOptions($place, NodeBuilder $node)
|
||||
{
|
||||
$node->booleanNode('only_active')
|
||||
->defaultTrue()
|
||||
->end();
|
||||
->defaultTrue()
|
||||
->end();
|
||||
$node->integerNode('number_of_items')
|
||||
->defaultValue(50)
|
||||
->end();
|
||||
$node->scalarNode('filtering_class')
|
||||
->defaultNull()
|
||||
->end();
|
||||
|
||||
->defaultNull()
|
||||
->end();
|
||||
}
|
||||
|
||||
/*
|
||||
* return an array with the allowed places where the widget can be rendered
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
|
||||
/*
|
||||
* return an array with the allowed places where the widget can be rendered
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedPlaces()
|
||||
{
|
||||
return array('homepage');
|
||||
return ['homepage'];
|
||||
}
|
||||
|
||||
/*
|
||||
* return the widget alias
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getWidgetAlias()
|
||||
{
|
||||
return 'person_list';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* return the service id for the service which will render the widget.
|
||||
*
|
||||
* this service must implements `Chill\MainBundle\Templating\Widget\WidgetInterface`
|
||||
*
|
||||
* the service must exists in the container, and it is not required that the service
|
||||
*
|
||||
* the service must exists in the container, and it is not required that the service
|
||||
* has the `chill_main` tag.
|
||||
*/
|
||||
public function getServiceId(ContainerBuilder $containerBuilder, $place, $order, array $config)
|
||||
{
|
||||
return 'chill_person.widget.person_list';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* return the widget alias
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getWidgetAlias()
|
||||
{
|
||||
return 'person_list';
|
||||
}
|
||||
}
|
||||
|
@@ -1,66 +1,71 @@
|
||||
<?php
|
||||
# Chill/PersonBundle/Widget/PersonListWidget.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\PersonBundle\Widget;
|
||||
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Templating\Widget\WidgetInterface;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use DateTime;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Twig_Environment;
|
||||
|
||||
/**
|
||||
* add a widget with person list.
|
||||
*
|
||||
* add a widget with person list.
|
||||
*
|
||||
* The configuration is defined by `PersonListWidgetFactory`
|
||||
*/
|
||||
class PersonListWidget implements WidgetInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Repository for persons
|
||||
*
|
||||
* @var EntityRepository
|
||||
* the authorization helper.
|
||||
*
|
||||
* @var AuthorizationHelper;
|
||||
*/
|
||||
protected $personRepository;
|
||||
|
||||
protected $authorizationHelper;
|
||||
|
||||
/**
|
||||
* The entity manager
|
||||
* The entity manager.
|
||||
*
|
||||
* @var EntityManager
|
||||
*/
|
||||
protected $entityManager;
|
||||
|
||||
/**
|
||||
* the authorization helper
|
||||
*
|
||||
* @var AuthorizationHelper;
|
||||
*/
|
||||
protected $authorizationHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Repository for persons.
|
||||
*
|
||||
* @var EntityRepository
|
||||
*/
|
||||
protected $personRepository;
|
||||
|
||||
/**
|
||||
* @var TokenStorage
|
||||
*/
|
||||
protected $tokenStorage;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @var UserInterface
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
|
||||
public function __construct(
|
||||
EntityRepository $personRepostory,
|
||||
EntityManager $em,
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
TokenStorage $tokenStorage
|
||||
) {
|
||||
EntityRepository $personRepostory,
|
||||
EntityManager $em,
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
TokenStorage $tokenStorage
|
||||
) {
|
||||
$this->personRepository = $personRepostory;
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
@@ -68,27 +73,24 @@ class PersonListWidget implements WidgetInterface
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $place
|
||||
* @param array $context
|
||||
* @param array $config
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render(\Twig_Environment $env, $place, array $context, array $config)
|
||||
{
|
||||
public function render(Twig_Environment $env, $place, array $context, array $config)
|
||||
{
|
||||
$qb = $this->personRepository
|
||||
->createQueryBuilder('person');
|
||||
|
||||
->createQueryBuilder('person');
|
||||
|
||||
// show only the person from the authorized centers
|
||||
$and = $qb->expr()->andX();
|
||||
$centers = $this->authorizationHelper
|
||||
->getReachableCenters($this->getUser(), new Role(PersonVoter::SEE));
|
||||
->getReachableCenters($this->getUser(), new Role(PersonVoter::SEE));
|
||||
$and->add($qb->expr()->in('person.center', ':centers'));
|
||||
$qb->setParameter('centers', $centers);
|
||||
|
||||
|
||||
// add the "only active" where clause
|
||||
if ($config['only_active'] === true) {
|
||||
if (true === $config['only_active']) {
|
||||
$qb->join('person.accompanyingPeriods', 'ap');
|
||||
$or = new Expr\Orx();
|
||||
// add the case where closingDate IS NULL
|
||||
@@ -98,32 +100,30 @@ class PersonListWidget implements WidgetInterface
|
||||
$or->add($andWhenClosingDateIsNull);
|
||||
// add the case when now is between opening date and closing date
|
||||
$or->add(
|
||||
(new Expr())->between(':now', 'ap.openingDate', 'ap.closingDate')
|
||||
);
|
||||
(new Expr())->between(':now', 'ap.openingDate', 'ap.closingDate')
|
||||
);
|
||||
$and->add($or);
|
||||
$qb->setParameter('now', new \DateTime(), Type::DATE);
|
||||
$qb->setParameter('now', new DateTime(), Type::DATE);
|
||||
}
|
||||
|
||||
|
||||
// adding the where clause to the query
|
||||
$qb->where($and);
|
||||
|
||||
|
||||
$qb->setFirstResult(0)->setMaxResults($config['number_of_items']);
|
||||
|
||||
|
||||
$persons = $qb->getQuery()->getResult();
|
||||
|
||||
|
||||
return $env->render(
|
||||
'ChillPersonBundle:Widget:homepage_person_list.html.twig',
|
||||
array('persons' => $persons)
|
||||
);
|
||||
['persons' => $persons]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return UserInterface
|
||||
*/
|
||||
private function getUser()
|
||||
{
|
||||
// return a user
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,51 +1,46 @@
|
||||
<?php
|
||||
|
||||
# Chill/PersonBundle/DependencyInjection/ChillPersonExtension.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\PersonBundle\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\Extension\PrependExtensionInterface;
|
||||
use Chill\MainBundle\DependencyInjection\MissingBundleException;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
/**
|
||||
* This is the class that loads and manages your bundle configuration
|
||||
* This is the class that loads and manages your bundle configuration.
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
|
||||
*/
|
||||
class ChillPersonExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
// ...
|
||||
// ...
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Add a widget "add a person" on the homepage, automatically
|
||||
*
|
||||
* Add a widget "add a person" on the homepage, automatically.
|
||||
*
|
||||
* @param \Chill\PersonBundle\DependencyInjection\containerBuilder $container
|
||||
*/
|
||||
public function prepend(ContainerBuilder $container)
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', array(
|
||||
'widgets' => array(
|
||||
'homepage' => array(
|
||||
array(
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'widgets' => [
|
||||
'homepage' => [
|
||||
[
|
||||
'widget_alias' => 'add_person',
|
||||
'order' => 2
|
||||
)
|
||||
)
|
||||
)
|
||||
));
|
||||
'order' => 2,
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user