diff --git a/src/Bundle/ChillMainBundle/Controller/LocationTypeApiController.php b/src/Bundle/ChillMainBundle/Controller/LocationTypeApiController.php new file mode 100644 index 000000000..2a3a6cc59 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Controller/LocationTypeApiController.php @@ -0,0 +1,25 @@ +andWhere( + $query->expr()->andX( + $query->expr()->eq('e.availableForUsers', "'TRUE'"), + $query->expr()->eq('e.active', "'TRUE'"), + ) + ); + } +} \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 7b2f0a3a1..b35ca5004 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -526,6 +526,7 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface, ], [ 'class' => \Chill\MainBundle\Entity\LocationType::class, + 'controller' => \Chill\MainBundle\Controller\LocationTypeApiController::class, 'name' => 'location_type', 'base_path' => '/api/1.0/main/location-type', 'base_role' => 'ROLE_USER',