mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 10:05:03 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,71 +1,46 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015 Champs-Libres Coopérative <info@champs-libres.coop>
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Timeline;
|
||||
|
||||
use Chill\MainBundle\Timeline\TimelineProviderInterface;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
|
||||
/**
|
||||
* Provide information for opening periods to timeline
|
||||
* Provide information for opening periods to timeline.
|
||||
*/
|
||||
class TimelineAccompanyingPeriodOpening extends AbstractTimelineAccompanyingPeriod
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function supportsType($type)
|
||||
{
|
||||
return $type === 'accompanying_period_opening';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function fetchQuery($context, array $args)
|
||||
{
|
||||
$metadata = $this->em
|
||||
->getClassMetadata(AccompanyingPeriod::class);
|
||||
|
||||
->getClassMetadata(AccompanyingPeriod::class);
|
||||
|
||||
$query = $this->basicFetchQuery($context, $args);
|
||||
|
||||
|
||||
$query->setKey('accompanying_period_opening')
|
||||
->setDate($metadata->getColumnName('openingDate'));
|
||||
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getEntityTemplate($entity, $context, array $args)
|
||||
{
|
||||
return $this->getBasicEntityTemplate(
|
||||
'ChillPersonBundle:Timeline:opening_period.html.twig',
|
||||
$entity,
|
||||
$context,
|
||||
$args
|
||||
);
|
||||
'ChillPersonBundle:Timeline:opening_period.html.twig',
|
||||
$entity,
|
||||
$context,
|
||||
$args
|
||||
);
|
||||
}
|
||||
|
||||
public function supportsType($type)
|
||||
{
|
||||
return 'accompanying_period_opening' === $type;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user