Added new filters to Summit Events
* added filter by speaker_id * added filter by location_id Change-Id: Idfc7167c49d4460c6fa08dacb8edf9906b228408
This commit is contained in:
parent
536b81e77d
commit
bc5084d1db
|
@ -122,6 +122,8 @@ abstract class RetrieveSummitEventsStrategy
|
|||
'summit_type_id' => ['=='],
|
||||
'event_type_id' => ['=='],
|
||||
'track_id' => ['=='],
|
||||
'speaker_id' => ['=='],
|
||||
'location_id' => ['=='],
|
||||
'speaker' => ['=@', '=='],
|
||||
'speaker_email' => ['=@', '=='],
|
||||
'selection_status' => ['=='],
|
||||
|
|
|
@ -106,6 +106,12 @@ final class DoctrineSummitEventRepository
|
|||
'c',
|
||||
"c.id :operator :value"
|
||||
),
|
||||
'location_id' => new DoctrineJoinFilterMapping
|
||||
(
|
||||
'e.location',
|
||||
'l',
|
||||
"l.id :operator :value"
|
||||
),
|
||||
'speaker' => new DoctrineFilterMapping
|
||||
(
|
||||
"( concat(sp.first_name, ' ', sp.last_name) :operator ':value' ".
|
||||
|
@ -122,6 +128,10 @@ final class DoctrineSummitEventRepository
|
|||
(
|
||||
"(sprr.email :operator ':value' OR spmm.email :operator ':value')"
|
||||
),
|
||||
'speaker_id' => new DoctrineFilterMapping
|
||||
(
|
||||
"(sp.id :operator :value OR spm.id :operator :value)"
|
||||
),
|
||||
'selection_status' => new DoctrineSwitchFilterMapping([
|
||||
'selected' => new DoctrineCaseFilterMapping(
|
||||
'selected',
|
||||
|
@ -194,6 +204,7 @@ final class DoctrineSummitEventRepository
|
|||
|
||||
if($class == \models\summit\Presentation::class) {
|
||||
$query = $query->innerJoin("e.category", "cc", Join::WITH);
|
||||
$query = $query->innerJoin("e.location", "loc", Join::WITH);
|
||||
$query = $query->leftJoin("e.speakers", "sp", Join::WITH);
|
||||
$query = $query->leftJoin('e.selected_presentations', "ssp", Join::LEFT_JOIN);
|
||||
$query = $query->leftJoin('ssp.list', "sspl", Join::LEFT_JOIN);
|
||||
|
|
Loading…
Reference in New Issue