src/Cms/WorkflowsBundle/Entity/Workflow.php line 22

Open in your IDE?
  1. <?php
  2. namespace Cms\WorkflowsBundle\Entity;
  3. use Cms\TenantBundle\Entity\TenantedEntity;
  4. use DateTime;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Platform\SecurityBundle\Entity\Identity\Account;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * Class Workflow
  11.  * @package Cms\WorkflowsBundle\Entity
  12.  *
  13.  * @ORM\Entity(
  14.  *     repositoryClass = "Cms\WorkflowsBundle\Doctrine\WorkflowRepository"
  15.  * )
  16.  * @ORM\Table(
  17.  *     name = "cms__workflows_workflow"
  18.  * )
  19.  */
  20. class Workflow extends TenantedEntity {
  21.     /**
  22.      * @var string
  23.      *
  24.      * @ORM\Column(
  25.      *     type = "string",
  26.      *     nullable = true
  27.      * )
  28.      */
  29.     protected $workflowName;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(
  34.      *     type = "string",
  35.      *     nullable = true
  36.      * )
  37.      */
  38.     protected $workflowDescription;
  39.     /**
  40.      * @var boolean
  41.      *
  42.      * @ORM\Column(
  43.      *     type = "boolean",
  44.      *     nullable = false
  45.      * )
  46.      */
  47.     protected $isActive false;
  48.     /**
  49.      * @var Datetime
  50.      *
  51.      * @ORM\Column(
  52.      *     type = "datetime",
  53.      *     nullable = true
  54.      * )
  55.      */
  56.     protected $originalActivationDate;
  57.     /**
  58.      * @var Datetime
  59.      *
  60.      * @ORM\Column(
  61.      *     type = "datetime",
  62.      *     nullable = true
  63.      * )
  64.      */
  65.     protected $activationLastChangedDate;
  66.     /**
  67.      * @param bool $value
  68.      * @return $this
  69.      */
  70.     public function setEnabled($value)
  71.     {
  72.         $this->isActive = (bool) $value;
  73.         return $this;
  74.     }
  75.     public function getDescription() {
  76.         return $this->workflowDescription;
  77.     }
  78.     public function getName() {
  79.         return $this->workflowName;
  80.     }
  81.     /**
  82.      * @param string $title
  83.      * @return Workflow
  84.      */
  85.     public function setName($title) {
  86.         $this->workflowName $title;
  87.         return $this;
  88.     }
  89.     /**
  90.      * @param string $description
  91.      * @return Workflow
  92.      */
  93.     public function setDescription($description) {
  94.         $this->workflowDescription $description;
  95.         return $this;
  96.     }
  97.     /**
  98.      * @return Boolean
  99.      */
  100.     public function isActive() {
  101.         return $this->isActive == 1;
  102.     }
  103. }