|
|
|
|
@ -20,11 +20,6 @@ use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
|
/** |
|
|
|
|
* Course groups. |
|
|
|
|
* |
|
|
|
|
* @ApiResource( |
|
|
|
|
* attributes={"security"="is_granted('ROLE_ADMIN')"}, |
|
|
|
|
* normalizationContext={"groups"={"group:read"}}, |
|
|
|
|
* ) |
|
|
|
|
* |
|
|
|
|
* @ORM\Table( |
|
|
|
|
* name="c_group_info", |
|
|
|
|
* indexes={ |
|
|
|
|
@ -33,6 +28,14 @@ use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
|
* |
|
|
|
|
* @ORM\Entity(repositoryClass="Chamilo\CourseBundle\Repository\CGroupRepository") |
|
|
|
|
*/ |
|
|
|
|
#[ApiResource( |
|
|
|
|
attributes: [ |
|
|
|
|
'security' => "is_granted('ROLE_ADMIN')", |
|
|
|
|
], |
|
|
|
|
normalizationContext: [ |
|
|
|
|
'groups' => ['group:read'], |
|
|
|
|
], |
|
|
|
|
)] |
|
|
|
|
class CGroup extends AbstractResource implements ResourceInterface |
|
|
|
|
{ |
|
|
|
|
public const TOOL_NOT_AVAILABLE = 0; |
|
|
|
|
|