src/Cms/ContainerBundle/Entity/Containers/StorageContainer.php line 16

Open in your IDE?
  1. <?php
  2. namespace Cms\ContainerBundle\Entity\Containers;
  3. use Cms\ContainerBundle\Entity\Container;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Class StorageContainer
  7.  * @package Cms\ContainerBundle\Entity\Containers
  8.  *
  9.  * @ORM\Entity(
  10.  *     repositoryClass = "Cms\ContainerBundle\Doctrine\Containers\StorageContainerRepository"
  11.  * )
  12.  */
  13. class StorageContainer extends Container
  14. {
  15.     const DISCR 'storage';
  16.     /**
  17.      * @var bool
  18.      *
  19.      * @ORM\Column(
  20.      *     type = "boolean",
  21.      *     nullable = false,
  22.      *     options = {
  23.      *         "default" = false
  24.      *     }
  25.      * )
  26.      */
  27.     protected $preferred false;
  28.     /**
  29.      * @return bool
  30.      */
  31.     public function isPreferred()
  32.     {
  33.         return ($this->preferred === true);
  34.     }
  35.     /**
  36.      * @param bool $value
  37.      * @return $this
  38.      */
  39.     public function setPreferred($value)
  40.     {
  41.         $this->preferred = ($value === true);
  42.         return $this;
  43.     }
  44. }