src/Cms/WorkflowsBundle/Entity/Publication/ScheduledPublication.php line 24

Open in your IDE?
  1. <?php
  2. namespace Cms\WorkflowsBundle\Entity\Publication;
  3. use App\Model\Async\StringSemaphoreInterface;
  4. use App\Model\Async\StringSemaphoreTrait;
  5. use Cms\TenantBundle\Entity\TenantedEntity;
  6. use Cms\WorkflowsBundle\Entity\WorkflowContent;
  7. use DateTime;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * Class ScheduledPublication
  11.  * @package Cms\WorkflowsBundle\Entity\Publication
  12.  *
  13.  * @ORM\Entity(
  14.  *     repositoryClass = "Cms\WorkflowsBundle\Doctrine\ScheduledPublicationRepository"
  15.  * )
  16.  *
  17.  * @ORM\Table(
  18.  *     name = "cms__workflows__scheduled_publication"
  19.  * )
  20.  */
  21. class ScheduledPublication extends TenantedEntity implements StringSemaphoreInterface
  22. {
  23.     const STATUSES__SCHEDULED 0;
  24.     const STATUSES__PUBLISHED 1;
  25.     const STATUSES__CANCELLED 2;
  26.     use StringSemaphoreTrait;
  27.     /**
  28.      * @var int
  29.      *
  30.      * @ORM\Column(
  31.      *     type = "integer",
  32.      *     nullable = false,
  33.      *     options = {
  34.      *         "default" = ScheduledPublication::STATUSES__SCHEDULED
  35.      *     }
  36.      * )
  37.      */
  38.     protected $status self::STATUSES__SCHEDULED;
  39.     /**
  40.      * @var DateTime
  41.      *
  42.      * @ORM\Column(
  43.      *     type = "datetime",
  44.      *     nullable = false
  45.      * )
  46.      */
  47.     protected $publishAt;
  48.     /**
  49.      * @var WorkflowContent
  50.      *
  51.      * @ORM\ManyToOne(
  52.      *     targetEntity = "Cms\WorkflowsBundle\Entity\WorkflowContent",
  53.      * )
  54.      * @ORM\JoinColumn(
  55.      *     name = "content",
  56.      *     referencedColumnName = "id",
  57.      *     onDelete = "CASCADE"
  58.      * )
  59.      */
  60.     protected $content;
  61.     /**
  62.      * @return int
  63.      */
  64.     public function getStatus()
  65.     {
  66.         return $this->status;
  67.     }
  68.     /**
  69.      * @param int $value
  70.      * @return $this
  71.      */
  72.     public function setStatus($value)
  73.     {
  74.         $this->status $value;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return DateTime
  79.      */
  80.     public function getPublishAt()
  81.     {
  82.         return $this->publishAt;
  83.     }
  84.     /**
  85.      * @param DateTime $value
  86.      * @return $this
  87.      */
  88.     public function setPublishAt(DateTime $value)
  89.     {
  90.         $this->publishAt $value;
  91.         return $this;
  92.     }
  93.     /**
  94.      * @return WorkflowContent
  95.      */
  96.     public function getContent()
  97.     {
  98.         return $this->content;
  99.     }
  100.     /**
  101.      * @param WorkflowContent $value
  102.      * @return $this
  103.      */
  104.     public function setContent(WorkflowContent $value)
  105.     {
  106.         $this->content $value;
  107.         return $this;
  108.     }
  109. }