|
|
@ -22,22 +22,22 @@ use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @ApiResource( |
|
|
|
* @ApiResource( |
|
|
|
* shortName="Documents", |
|
|
|
* shortName="Documents", |
|
|
|
* normalizationContext={"groups"={"document:read", "resource_node:read"}}, |
|
|
|
* normalizationContext={"groups"={"document:read", "resource_node:read"}}, |
|
|
|
* denormalizationContext={"groups"={"document:write"}}, |
|
|
|
* denormalizationContext={"groups"={"document:write"}}, |
|
|
|
* itemOperations={ |
|
|
|
* itemOperations={ |
|
|
|
* "put" ={ |
|
|
|
* "put" ={ |
|
|
|
* "controller"=UpdateResourceNodeFileAction::class, |
|
|
|
* "controller"=UpdateResourceNodeFileAction::class, |
|
|
|
* "deserialize"=false, |
|
|
|
* "deserialize"=false, |
|
|
|
* "security" = "is_granted('EDIT', object.resourceNode)", |
|
|
|
* "security" = "is_granted('EDIT', object.resourceNode)", |
|
|
|
* "validation_groups"={"media_object_create", "document:write"}, |
|
|
|
* "validation_groups"={"media_object_create", "document:write"}, |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* "get" = { |
|
|
|
* "get" = { |
|
|
|
* "security" = "is_granted('VIEW', object.resourceNode)", |
|
|
|
* "security" = "is_granted('VIEW', object.resourceNode)", |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* "delete" = { |
|
|
|
* "delete" = { |
|
|
|
* "security" = "is_granted('DELETE', object.resourceNode)", |
|
|
|
* "security" = "is_granted('DELETE', object.resourceNode)", |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* collectionOperations={ |
|
|
|
* collectionOperations={ |
|
|
|
* "post"={ |
|
|
|
* "post"={ |
|
|
@ -75,18 +75,18 @@ use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
* "resourceLinkList"={ |
|
|
|
* "resourceLinkList"={ |
|
|
|
* "type"="array", |
|
|
|
* "type"="array", |
|
|
|
* "items": { |
|
|
|
* "items": { |
|
|
|
* "type": "object", |
|
|
|
* "type": "object", |
|
|
|
* "properties"={ |
|
|
|
* "properties"={ |
|
|
|
* "visibility"={ |
|
|
|
* "visibility"={ |
|
|
|
* "type"="integer", |
|
|
|
* "type"="integer", |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* "c_id"={ |
|
|
|
* "c_id"={ |
|
|
|
* "type"="integer", |
|
|
|
* "type"="integer", |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* "session_id"={ |
|
|
|
* "session_id"={ |
|
|
|
* "type"="integer", |
|
|
|
* "type"="integer", |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* } |
|
|
|
* } |
|
|
|
* } |
|
|
|
* } |
|
|
|
* }, |
|
|
|
* }, |
|
|
|
* } |
|
|
|
* } |
|
|
@ -104,20 +104,20 @@ use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
* @ApiFilter( |
|
|
|
* @ApiFilter( |
|
|
|
* OrderFilter::class, |
|
|
|
* OrderFilter::class, |
|
|
|
* properties={ |
|
|
|
* properties={ |
|
|
|
* "id", |
|
|
|
* "id", |
|
|
|
* "filetype", |
|
|
|
* "filetype", |
|
|
|
* "resourceNode.title", |
|
|
|
* "resourceNode.title", |
|
|
|
* "resourceNode.createdAt", |
|
|
|
* "resourceNode.createdAt", |
|
|
|
* "resourceNode.resourceFile.size", |
|
|
|
* "resourceNode.resourceFile.size", |
|
|
|
* "resourceNode.updatedAt" |
|
|
|
* "resourceNode.updatedAt" |
|
|
|
* } |
|
|
|
* } |
|
|
|
* ) |
|
|
|
* ) |
|
|
|
* |
|
|
|
* |
|
|
|
* @ORM\Table( |
|
|
|
* @ORM\Table( |
|
|
|
* name="c_document", |
|
|
|
* name="c_document", |
|
|
|
* indexes={ |
|
|
|
* indexes={ |
|
|
|
* @ORM\Index(name="idx_cdoc_type", columns={"filetype"}), |
|
|
|
* @ORM\Index(name="idx_cdoc_type", columns={"filetype"}), |
|
|
|
* } |
|
|
|
* } |
|
|
|
* ) |
|
|
|
* ) |
|
|
|
* @ORM\EntityListeners({"Chamilo\CoreBundle\Entity\Listener\ResourceListener"}) |
|
|
|
* @ORM\EntityListeners({"Chamilo\CoreBundle\Entity\Listener\ResourceListener"}) |
|
|
|
* @ORM\Entity |
|
|
|
* @ORM\Entity |
|
|
|