src/Platform/SecurityBundle/Entity/Access/RoleAssociation/AccountRoleAssociation.php line 19

Open in your IDE?
  1. <?php
  2. namespace Platform\SecurityBundle\Entity\Access\RoleAssociation;
  3. use Cms\ImportBundle\Model\Interfaces\Importable\ImportableInterface;
  4. use Cms\ImportBundle\Model\Interfaces\Importable\ImportableTrait;
  5. use Platform\SecurityBundle\Entity\Identity\Account;
  6. use Platform\SecurityBundle\Entity\Access\RoleAssociation;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Class AccountRoleAssociation
  10.  * @package Platform\SecurityBundle\Entity\Access\RoleAssociation
  11.  *
  12.  * @ORM\Entity(
  13.  *  repositoryClass = "Platform\SecurityBundle\Doctrine\Access\RoleAssociation\AccountRoleAssociationRepository"
  14.  * )
  15.  */
  16. class AccountRoleAssociation extends RoleAssociation implements ImportableInterface
  17. {
  18.     use ImportableTrait;
  19.     /**
  20.      * @var Account
  21.      *
  22.      * @ORM\ManyToOne(targetEntity = "Platform\SecurityBundle\Entity\Identity\Account", inversedBy = "accountRoles")
  23.      * @ORM\JoinColumn(name = "account", referencedColumnName = "id", onDelete = "CASCADE")
  24.      */
  25.     protected $account;
  26.     /**
  27.      * @return Account
  28.      */
  29.     public function getAccount()
  30.     {
  31.         return $this->account;
  32.     }
  33.     /**
  34.      * @param Account $value
  35.      * @return $this
  36.      */
  37.     public function setAccount(Account $value)
  38.     {
  39.         $this->account $value;
  40.         return $this;
  41.     }
  42. }