app/Plugin/ProductSort42/Entity/Config.php line 26

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of ProductSort
  4.  *
  5.  * Copyright(c) Akira Kurozumi <info@a-zumi.net>
  6.  *
  7.  * https://a-zumi.net
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Plugin\ProductSort42\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. if (!class_exists(Config::class)) {
  15.     /**
  16.      * @ORM\Table(name="plg_product_sort4_config")
  17.      *
  18.      * @ORM\HasLifecycleCallbacks()
  19.      *
  20.      * @ORM\Entity(repositoryClass="Plugin\ProductSort42\Repository\ConfigRepository")
  21.      */
  22.     class Config
  23.     {
  24.         public const ID 1;
  25.         /**
  26.          * @var int
  27.          *
  28.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  29.          *
  30.          * @ORM\Id
  31.          *
  32.          * @ORM\GeneratedValue(strategy="IDENTITY")
  33.          */
  34.         private $id;
  35.         /**
  36.          * @var booloan
  37.          *
  38.          * @ORM\Column(name="status", type="boolean", options={"default":false})
  39.          */
  40.         private $status false;
  41.         /**
  42.          * @return int
  43.          */
  44.         public function getId(): int
  45.         {
  46.             return $this->id;
  47.         }
  48.         /**
  49.          * @return bool
  50.          */
  51.         public function getStatus(): bool
  52.         {
  53.             return $this->status;
  54.         }
  55.         /**
  56.          * @param bool $status
  57.          *
  58.          * @return $this
  59.          */
  60.         public function setStatus(bool $status): self
  61.         {
  62.             $this->status $status;
  63.             return $this;
  64.         }
  65.         /**
  66.          * @return bool
  67.          */
  68.         public function isEnable(): bool
  69.         {
  70.             return $this->getStatus();
  71.         }
  72.     }
  73. }