Tag.php 1.13 KB
Newer Older
1
<?php
2 3
namespace T3o\TerFe2\Domain\Model;

4 5
/*
 * This file is part of the TYPO3 CMS project.
6
 *
7 8 9
 * It is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, either version 2
 * of the License, or any later version.
10
 *
11 12
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
13
 *
14 15
 * The TYPO3 project - inspiring people to share!
 */
16

17 18 19
/**
 * Tag for the extension
 */
20
class Tag extends \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
21
{
22

23 24
    /**
     * Title of the tag
25
     *
26 27 28
     * @var string
     * @validate NotEmpty
     */
29
    protected $title = '';
30

31 32 33 34 35 36 37
    /**
     * @return string
     */
    public function __toString(): string
    {
        return $this->title;
    }
38

39 40 41 42 43
    /**
     * Setter for title
     *
     * @param string $title Title of the tag
     */
44
    public function setTitle(string $title)
45 46 47
    {
        $this->title = $title;
    }
48

49 50 51 52 53
    /**
     * Getter for title
     *
     * @return string Title of the tag
     */
54
    public function getTitle(): string
55 56 57 58
    {
        return $this->title;
    }
}