src/Cms/WorkflowsBundle/Entity/WorkflowIdentity.php line 30

Open in your IDE?
  1. <?php
  2. namespace Cms\WorkflowsBundle\Entity;
  3. use Cms\TenantBundle\Entity\TenantedEntity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Platform\SecurityBundle\Entity\Identity\Account;
  6. use Platform\SecurityBundle\Entity\Identity\Group;
  7. /**
  8.  * Class WorkflowIdentity
  9.  * @package Cms\WorkflowsBundle\Entity
  10.  *
  11.  * @ORM\Entity(
  12.  *     repositoryClass = "Cms\WorkflowsBundle\Doctrine\WorkflowIdentityRepository"
  13.  * )
  14.  * @ORM\Table(
  15.  *     name = "cms__workflows_workflow_identity"
  16.  * )
  17.  *
  18.  * @ORM\InheritanceType("JOINED")
  19.  *
  20.  * @ORM\DiscriminatorColumn(name="identityType", type="string")
  21.  *
  22.  * @ORM\DiscriminatorMap({
  23.  *     WorkflowIdentity::IDENTITY_TYPES__GROUP = "Cms\WorkflowsBundle\Entity\Identity\WorkflowGroup",
  24.  *     WorkflowIdentity::IDENTITY_TYPES__INDIVIDUAL = "Cms\WorkflowsBundle\Entity\Identity\Individual"
  25.  *     })
  26.  */
  27. abstract class WorkflowIdentity extends TenantedEntity {
  28.     const IDENTITY_TYPES__GROUP "Group";
  29.     const IDENTITY_TYPES__INDIVIDUAL "Individual";
  30.     /**
  31.      * @var string
  32.      */
  33.     protected $identityType;
  34.     public function isGroupIdentity()
  35.     {
  36.         return $this->identityType == WorkflowIdentity::IDENTITY_TYPES__GROUP;
  37.     }
  38. }