src/Cms/ContainerBundle/Entity/Containers/PersonalContainer.php line 21

Open in your IDE?
  1. <?php
  2. namespace Cms\ContainerBundle\Entity\Containers;
  3. use Cms\ContainerBundle\Entity\Container;
  4. use Cms\ImportBundle\Model\Interfaces\Importable\ImportableInterface;
  5. use Cms\ImportBundle\Model\Interfaces\Importable\ImportableTrait;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Platform\SecurityBundle\Entity\Identity\Account;
  8. /**
  9.  * Class PersonalContainer
  10.  * @package Cms\ContainerBundle\Entity\Containers
  11.  *
  12.  * @method PersonalContainer getParent();
  13.  *
  14.  * @ORM\Entity(
  15.  *     repositoryClass = "Cms\ContainerBundle\Doctrine\Containers\PersonalContainerRepository"
  16.  * )
  17.  */
  18. class PersonalContainer extends Container implements ImportableInterface
  19. {
  20.     const DISCR 'personal';
  21.     const ROUTING_SLUG 'personals';
  22.     use ImportableTrait;
  23.     /**
  24.      * @var Account
  25.      *
  26.      * @ORM\ManyToOne(
  27.      *     targetEntity = "Platform\SecurityBundle\Entity\Identity\Account"
  28.      * )
  29.      * @ORM\JoinColumn(
  30.      *     name = "account",
  31.      *     referencedColumnName = "id",
  32.      *     onDelete = "CASCADE",
  33.      * )
  34.      */
  35.     protected $account;
  36.     /**
  37.      * @var GenericContainer
  38.      *
  39.      * @ORM\ManyToOne(
  40.      *     targetEntity = "Cms\ContainerBundle\Entity\Containers\GenericContainer"
  41.      * )
  42.      * @ORM\JoinColumn(
  43.      *     name = "container",
  44.      *     referencedColumnName = "id",
  45.      *     onDelete = "SET NULL"
  46.      * )
  47.      */
  48.     protected $container;
  49.     /**
  50.      * @return Account
  51.      */
  52.     public function getAccount()
  53.     {
  54.         return $this->account;
  55.     }
  56.     /**
  57.      * @param Account $value
  58.      * @return $this
  59.      */
  60.     public function setAccount(Account $value)
  61.     {
  62.         $this->account $value;
  63.         return $this;
  64.     }
  65.     /**
  66.      * @return GenericContainer
  67.      */
  68.     public function getContainer()
  69.     {
  70.         return $this->container;
  71.     }
  72.     /**
  73.      * @param GenericContainer $value
  74.      * @return $this
  75.      */
  76.     public function setContainer(GenericContainer $value null)
  77.     {
  78.         $this->container $value;
  79.         return $this;
  80.     }
  81. }