<?php
namespace Cms\ContainerBundle\Entity\Containers;
use Cms\ContainerBundle\Entity\Container;
use Cms\ImportBundle\Model\Interfaces\Importable\ImportableInterface;
use Cms\ImportBundle\Model\Interfaces\Importable\ImportableTrait;
use Doctrine\ORM\Mapping as ORM;
use Platform\SecurityBundle\Entity\Identity\Account;
/**
* Class PersonalContainer
* @package Cms\ContainerBundle\Entity\Containers
*
* @method PersonalContainer getParent();
*
* @ORM\Entity(
* repositoryClass = "Cms\ContainerBundle\Doctrine\Containers\PersonalContainerRepository"
* )
*/
class PersonalContainer extends Container implements ImportableInterface
{
const DISCR = 'personal';
const ROUTING_SLUG = 'personals';
use ImportableTrait;
/**
* @var Account
*
* @ORM\ManyToOne(
* targetEntity = "Platform\SecurityBundle\Entity\Identity\Account"
* )
* @ORM\JoinColumn(
* name = "account",
* referencedColumnName = "id",
* onDelete = "CASCADE",
* )
*/
protected $account;
/**
* @var GenericContainer
*
* @ORM\ManyToOne(
* targetEntity = "Cms\ContainerBundle\Entity\Containers\GenericContainer"
* )
* @ORM\JoinColumn(
* name = "container",
* referencedColumnName = "id",
* onDelete = "SET NULL"
* )
*/
protected $container;
/**
* @return Account
*/
public function getAccount()
{
return $this->account;
}
/**
* @param Account $value
* @return $this
*/
public function setAccount(Account $value)
{
$this->account = $value;
return $this;
}
/**
* @return GenericContainer
*/
public function getContainer()
{
return $this->container;
}
/**
* @param GenericContainer $value
* @return $this
*/
public function setContainer(GenericContainer $value = null)
{
$this->container = $value;
return $this;
}
}