|
|
|
@ -154,13 +154,15 @@ class ResourceFile |
|
|
|
|
protected ?bool $video; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @ORM\Column(name="description", type="text", nullable=true) |
|
|
|
|
* @Groups({"resource_file:read", "resource_node:read", "document:read"}) |
|
|
|
|
*/ |
|
|
|
|
protected ?string $description; |
|
|
|
|
protected ?bool $text; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Constructor. |
|
|
|
|
* @ORM\Column(name="description", type="text", nullable=true) |
|
|
|
|
*/ |
|
|
|
|
protected ?string $description; |
|
|
|
|
|
|
|
|
|
public function __construct() |
|
|
|
|
{ |
|
|
|
|
$this->metadata = []; |
|
|
|
@ -173,6 +175,16 @@ class ResourceFile |
|
|
|
|
return $this->getOriginalName(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function isText(): bool |
|
|
|
|
{ |
|
|
|
|
$mimeType = $this->getMimeType(); |
|
|
|
|
if (false !== strpos($mimeType, 'text')) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function isImage(): bool |
|
|
|
|
{ |
|
|
|
|
$mimeType = $this->getMimeType(); |
|
|
|
|