-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
QuestionFurther information is requestedFurther information is requested
Description
Hi,
is there a way to add custom properties to the asset view and make them editable?
I'm extending the Assets with a trait and need to make the properties changeable through the backend.
<?php
use Doctrine\ORM\Mapping as ORM;
trait AssetTrait
{
/**
* @var string|null
* @ORM\Column(nullable=TRUE)
*/
protected ?string $someProperty = null;
/**
* @return string|null
*/
public function getSomeProperty(): ?string
{
return $this->ePaperUri;
}
/**
* @param string|null $someProperty
* @return Audio|AssetTrait|Document|Image|Video
*/
public function setSomeProperty(?string $someProperty): self
{
$this->someProperty = $someProperty;
return $this;
}
}and the asset models
<?php
/** @Flow\Entity */
class Image extends \Neos\Media\Domain\Model\Image
{
use AssetTrait;
}<?php
/** @Flow\Entity */
class Audio extends \Neos\Media\Domain\Model\Audio
{
use AssetTrait;
}<?php
/** @Flow\Entity */
class Document extends \Neos\Media\Domain\Model\Document
{
use AssetTrait;
}<?php
/** @Flow\Entity */
class Video extends \Neos\Media\Domain\Model\Video
{
use AssetTrait;
}Metadata
Metadata
Assignees
Labels
QuestionFurther information is requestedFurther information is requested