src/Entity/Calendar/CalendarEventCategory.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Calendar;
  3. use App\Annotation\SiteAware;
  4. use App\Entity\AbstractBase;
  5. use App\Entity\Interfaces\PublishedInterface;
  6. use App\Entity\Interfaces\SiteInterface;
  7. use App\Entity\MiniAbstractBase;
  8. use App\Entity\Traits\NameTrait;
  9. use App\Entity\Traits\PublishedTrait;
  10. use App\Entity\Traits\SiteTrait;
  11. use App\Repository\Calendar\CalendarEventCategoryRepository;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Gedmo\Mapping\Annotation as Gedmo;
  14. /**
  15.  * @ORM\Table(name="vulco_calendar_event_category", indexes={@ORM\Index(name="calendar_event_category_site_idx", columns={"site"})})
  16.  * @ORM\Entity(repositoryClass=CalendarEventCategoryRepository::class)
  17.  * @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
  18.  * @SiteAware(siteFieldName="site")
  19.  */
  20. class CalendarEventCategory extends AbstractBase implements SiteInterfacePublishedInterface
  21. {
  22.     use NameTrait;
  23.     use PublishedTrait;
  24.     use SiteTrait;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=false)
  27.      */
  28.     private string $name;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=false)
  31.      */
  32.     private string $color;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=false)
  35.      */
  36.     private string $textColor;
  37.     public function getColor(): string
  38.     {
  39.         return $this->color;
  40.     }
  41.     public function setColor(string $color): CalendarEventCategory
  42.     {
  43.         $this->color $color;
  44.         return $this;
  45.     }
  46.     public function getTextColor(): string
  47.     {
  48.         return $this->textColor;
  49.     }
  50.     public function setTextColor(string $textColor): CalendarEventCategory
  51.     {
  52.         $this->textColor $textColor;
  53.         return $this;
  54.     }
  55.     public function __construct()
  56.     {
  57.     }
  58.     public function __toString(): string
  59.     {
  60.         return $this->id $this->getName() : MiniAbstractBase::DEFAULT_EMPTY_STRING;
  61.     }
  62. }