src/Eccube/Repository/PluginRepository.php line 29

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  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 Eccube\Repository;
  13. use Eccube\Entity\Plugin;
  14. use Symfony\Bridge\Doctrine\RegistryInterface;
  15. /**
  16.  * PluginRepository
  17.  *
  18.  * This class was generated by the Doctrine ORM. Add your own custom
  19.  * repository methods below.
  20.  */
  21. class PluginRepository extends AbstractRepository
  22. {
  23.     public function __construct(RegistryInterface $registry)
  24.     {
  25.         parent::__construct($registryPlugin::class);
  26.     }
  27.     public function findAllEnabled()
  28.     {
  29.         return $this->findBy(['enabled' => '1']);
  30.     }
  31.     /**
  32.      * @param $code string プラグインコード
  33.      *
  34.      * @return Plugin
  35.      */
  36.     public function findByCode($code)
  37.     {
  38.         return $this->findOneBy(['code' => $code]);
  39.     }
  40. }