mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 07:44:24 +00:00
24 lines
697 B
PHP
24 lines
697 B
PHP
<?php
|
|
|
|
namespace Chill\PersonBundle\Controller;
|
|
|
|
use Chill\MainBundle\CRUD\Controller\ApiController;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
class AccompanyingCourseWorkApiController extends ApiController
|
|
{
|
|
protected function getContextForSerialization(string $action, Request $request, string $_format, $entity): array
|
|
{
|
|
switch($action) {
|
|
case '_entity':
|
|
switch ($request->getMethod()) {
|
|
case Request::METHOD_PUT:
|
|
return [ 'groups' => [ 'accompanying_period_work:edit' ] ];
|
|
}
|
|
}
|
|
|
|
return parent::getContextForSerialization($action, $request, $_format, $entity);
|
|
}
|
|
|
|
}
|