Minor - Update entities

pull/3984/head
Julio 4 years ago
parent cff05c77bd
commit f87f9cdfc4
  1. 5
      src/CoreBundle/Entity/Asset.php
  2. 2
      src/CoreBundle/Entity/Illustration.php
  3. 8
      src/CoreBundle/Entity/ResourceInterface.php

@ -169,10 +169,7 @@ class Asset
return str_contains($mimeType, 'video'); return str_contains($mimeType, 'video');
} }
/** public function getCrop(): ?string
* @return string
*/
public function getCrop()
{ {
return $this->crop; return $this->crop;
} }

@ -68,7 +68,7 @@ class Illustration extends AbstractResource implements ResourceInterface
return $this; return $this;
} }
public function getResourceIdentifier(): int public function getResourceIdentifier(): Uuid
{ {
return $this->getId(); return $this->getId();
} }

@ -6,6 +6,8 @@ declare(strict_types=1);
namespace Chamilo\CoreBundle\Entity; namespace Chamilo\CoreBundle\Entity;
use Symfony\Component\Uid\Uuid;
interface ResourceInterface interface ResourceInterface
{ {
public function __toString(): string; public function __toString(): string;
@ -13,7 +15,7 @@ interface ResourceInterface
/** /**
* Returns the resource id identifier. Example for CDocument it will be the value of the field iid. * Returns the resource id identifier. Example for CDocument it will be the value of the field iid.
*/ */
public function getResourceIdentifier(): int; public function getResourceIdentifier(): int|Uuid;
/** /**
* Returns the resource name. Example for CDocument it will be the field "title". * Returns the resource name. Example for CDocument it will be the field "title".
@ -25,8 +27,4 @@ interface ResourceInterface
public function getResourceNode(): ?ResourceNode; public function getResourceNode(): ?ResourceNode;
public function setResourceNode(ResourceNode $resourceNode); public function setResourceNode(ResourceNode $resourceNode);
//public function setParent(AbstractResource $parent);
//public function addCourseLink(Course $course, Session $session = null, CGroup $group = null, int $visibility);
} }

Loading…
Cancel
Save