diff --git a/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php b/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php index 3e7c67562..ffb068d70 100644 --- a/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php +++ b/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php @@ -23,6 +23,7 @@ namespace Chill\EventBundle\Timeline; use Chill\EventBundle\Entity\Event; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Timeline\TimelineProviderInterface; +use Chill\MainBundle\Timeline\TimelineSingleQuery; use Doctrine\ORM\EntityManager; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; @@ -88,13 +89,14 @@ class TimelineEventProvider implements TimelineProviderInterface $metadataParticipation = $this->em->getClassMetadata('ChillEventBundle:Participation'); $metadataPerson = $this->em->getClassMetadata('ChillPersonBundle:Person'); - $query = array( + $query = TimelineSingleQuery::fromArray([ 'id' => $metadataEvent->getTableName().'.'.$metadataEvent->getColumnName('id'), 'type' => 'event', 'date' => $metadataEvent->getTableName().'.'.$metadataEvent->getColumnName('date'), 'FROM' => $this->getFromClause($metadataEvent, $metadataParticipation, $metadataPerson), - 'WHERE' => $this->getWhereClause($metadataEvent, $metadataParticipation, $metadataPerson, $args['person']) - ); + 'WHERE' => $this->getWhereClause($metadataEvent, $metadataParticipation, $metadataPerson, $args['person']), + 'parameters' => [] + ]); return $query; } @@ -238,4 +240,4 @@ class TimelineEventProvider implements TimelineProviderInterface ); } -} \ No newline at end of file +} diff --git a/src/Bundle/ChillEventBundle/config/services/timeline.yaml b/src/Bundle/ChillEventBundle/config/services/timeline.yaml index 82f758d15..7a8eb366d 100644 --- a/src/Bundle/ChillEventBundle/config/services/timeline.yaml +++ b/src/Bundle/ChillEventBundle/config/services/timeline.yaml @@ -6,5 +6,5 @@ services: - '@chill.main.security.authorization.helper' - '@security.token_storage' public: true - # tags: - # - { name: chill.timeline, context: 'person' } + tags: + - { name: chill.timeline, context: 'person' }