add api for getting goal and results by social action and goal

This commit is contained in:
2021-06-22 16:08:53 +02:00
parent 34d6452286
commit b53f6af8d8
14 changed files with 700 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
<?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);
}
}