mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
apply timelineSingleQuery on events
This commit is contained in:
parent
75c586fbf8
commit
cad8174333
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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' }
|
||||
|
Loading…
x
Reference in New Issue
Block a user