Created
March 27, 2018 08:56
-
-
Save evgeniy1204/e215dcbe1cadebdf2368346dbdebb5c7 to your computer and use it in GitHub Desktop.
ride
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->add('ride', 'filter_collection_adapter', array( | |
'type' => new BookingOptionalRideToFilterType(), | |
'label' => 'Corsa', | |
'add_shared' => function (FilterBuilderExecuterInterface $qbe) { | |
$closure = function (QueryBuilder $filterBuilder, $alias, $joinAlias, Expr $expr) { | |
$filterBuilder->leftJoin('AppBundle:RideSelector', 'rideSelector', 'WITH rideSelector.object_class = \'AppBundle\Entity\BookingOptional\''); | |
//$filterBuilder->leftJoin('AppBundle:Ride', 'ride', 'ON ride.id IN (rideSelector.ride_tags)'); | |
}; | |
// then use the query builder executor to define the join, the join's alias and things to do on the doctrine query builder. | |
$qbe->addOnce($qbe->getAlias().'.ride', 'ride', $closure); | |
}, | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment