src/Cms/WorkflowsBundle/Entity/WorkflowReviewer.php line 21

Open in your IDE?
  1. <?php
  2. namespace Cms\WorkflowsBundle\Entity;
  3. use Cms\TenantBundle\Entity\TenantedEntity;
  4. use DateTime;
  5. use Platform\SecurityBundle\Entity\Identity\Account;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Platform\SecurityBundle\Entity\Identity\Group;
  8. /**
  9.  * Class WorkflowReviewer
  10.  * @package Cms\WorkflowsBundle\Entity
  11.  *
  12.  * @ORM\Entity(
  13.  *     repositoryClass = "Cms\WorkflowsBundle\Doctrine\WorkflowReviewerRepository"
  14.  * )
  15.  * @ORM\Table(
  16.  *     name = "cms__workflows_workflow_reviewer"
  17.  * )
  18.  */
  19. class WorkflowReviewer extends TenantedEntity {
  20.     /**
  21.      * @var WorkflowStage
  22.      *
  23.      * @ORM\ManyToOne(
  24.      *     targetEntity = "Cms\WorkflowsBundle\Entity\WorkflowStage",
  25.      * )
  26.      * @ORM\JoinColumn(
  27.      *     name = "stage",
  28.      *     referencedColumnName = "id",
  29.      *     onDelete = "CASCADE"
  30.      * )
  31.      */
  32.     protected $workflowStage;
  33.     /**
  34.      * @var WorkflowIdentity
  35.      *
  36.      * @ORM\ManyToOne(
  37.      *     targetEntity = "Cms\WorkflowsBundle\Entity\WorkflowIdentity",
  38.      * )
  39.      * @ORM\JoinColumn(
  40.      *     name = "workflowIdentity",
  41.      *     referencedColumnName = "id",
  42.      *     onDelete = "CASCADE"
  43.      * )
  44.      */
  45.     protected $workflowIdentity;
  46.     public function isGroup()
  47.     {
  48.         return $this->workflowIdentity->isGroupIdentity();
  49.     }
  50.     public function getIdentity()
  51.     {
  52.         return $this->workflowIdentity;
  53.     }
  54.     public function setIdentity($identity)
  55.     {
  56.         $this->workflowIdentity $identity;
  57.         return $this;
  58.     }
  59.     public function setStage($stage)
  60.     {
  61.         $this->workflowStage $stage;
  62.         return $this;
  63.     }
  64. }