<?php
namespace Cms\WorkflowsBundle\Entity;
use Cms\TenantBundle\Entity\TenantedEntity;
use Doctrine\ORM\Mapping as ORM;
use Platform\SecurityBundle\Entity\Identity\Account;
use Platform\SecurityBundle\Entity\Identity\Group;
/**
* Class WorkflowIdentity
* @package Cms\WorkflowsBundle\Entity
*
* @ORM\Entity(
* repositoryClass = "Cms\WorkflowsBundle\Doctrine\WorkflowIdentityRepository"
* )
* @ORM\Table(
* name = "cms__workflows_workflow_identity"
* )
*
* @ORM\InheritanceType("JOINED")
*
* @ORM\DiscriminatorColumn(name="identityType", type="string")
*
* @ORM\DiscriminatorMap({
* WorkflowIdentity::IDENTITY_TYPES__GROUP = "Cms\WorkflowsBundle\Entity\Identity\WorkflowGroup",
* WorkflowIdentity::IDENTITY_TYPES__INDIVIDUAL = "Cms\WorkflowsBundle\Entity\Identity\Individual"
* })
*/
abstract class WorkflowIdentity extends TenantedEntity {
const IDENTITY_TYPES__GROUP = "Group";
const IDENTITY_TYPES__INDIVIDUAL = "Individual";
/**
* @var string
*/
protected $identityType;
public function isGroupIdentity()
{
return $this->identityType == WorkflowIdentity::IDENTITY_TYPES__GROUP;
}
}