| 1 | <?php |
||
| 13 | abstract class AbstractTaggable implements TaggableInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var ArrayCollection |
||
| 17 | * |
||
| 18 | * Override this property in your Entity with definition of ManyToMany relation. |
||
| 19 | */ |
||
| 20 | protected $tags; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $tagsText; |
||
| 26 | |||
| 27 | public function __construct() |
||
| 31 | |||
| 32 | public function addTag(TagInterface $tag): void |
||
| 36 | |||
| 37 | public function removeTag(TagInterface $tag): void |
||
| 41 | |||
| 42 | public function getTags(): iterable |
||
| 46 | |||
| 47 | public function getTagNames(): array |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Override this method in your Entity and update a field here. |
||
| 54 | * |
||
| 55 | * @param string $tagsText |
||
| 56 | */ |
||
| 57 | public function setTagsText(?string $tagsText): void |
||
| 61 | |||
| 62 | public function getTagsText(): ?string |
||
| 68 | } |
||
| 69 |