DigiComp.AssetAttributes/Classes/AssetAttributeTrait.php
Ferdinand Kuhl f35695268f
All checks were successful
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests Pipeline was successful
First working version
2023-02-09 13:05:32 +01:00

29 lines
672 B
PHP

<?php
namespace DigiComp\AssetAttributes;
use DigiComp\AssetAttributes\Domain\Model\AssetAttribute;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
trait AssetAttributeTrait
{
/**
* @return Collection<AssetAttribute>
*/
public function getAttributes(): Collection
{
if ($this->attributes === null) {
$this->attributes = new ArrayCollection();
}
return $this->attributes;
}
/**
* @param Collection<AssetAttribute> $attributes
*/
public function setAttributes(Collection $attributes): void
{
$this->attributes = $attributes;
}
}