vendor/coreshop/core-shop/src/CoreShop/Component/Core/Model/Store.php line 28

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * CoreShop
  5.  *
  6.  * This source file is available under two different licenses:
  7.  *  - GNU General Public License version 3 (GPLv3)
  8.  *  - CoreShop Commercial License (CCL)
  9.  * Full copyright and license information is available in
  10.  * LICENSE.md which is distributed with this source code.
  11.  *
  12.  * @copyright  Copyright (c) CoreShop GmbH (https://www.coreshop.org)
  13.  * @license    https://www.coreshop.org/license     GPLv3 and CCL
  14.  *
  15.  */
  16. namespace CoreShop\Component\Core\Model;
  17. use CoreShop\Component\Address\Model\CountriesAwareTrait;
  18. use CoreShop\Component\Store\Model\Store as BaseStore;
  19. use Doctrine\Common\Collections\Collection;
  20. /**
  21.  * @psalm-suppress MissingConstructor
  22.  */
  23. class Store extends BaseStore implements StoreInterface
  24. {
  25.     use CountriesAwareTrait;
  26.     /**
  27.      * @var CountryInterface
  28.      */
  29.     private $baseCountry;
  30.     /**
  31.      * @var bool
  32.      */
  33.     protected $useGrossPrice false;
  34.     /**
  35.      * @var Collection|ConfigurationInterface[]
  36.      */
  37.     protected $configurations;
  38.     /**
  39.      * @var Collection|CountryInterface[]
  40.      */
  41.     protected $countries;
  42.     public function getConfigurations()
  43.     {
  44.         return $this->configurations;
  45.     }
  46.     public function hasConfigurations()
  47.     {
  48.         return !$this->configurations->isEmpty();
  49.     }
  50.     public function addConfiguration(ConfigurationInterface $configuration)
  51.     {
  52.         if (!$this->hasConfiguration($configuration)) {
  53.             $this->configurations->add($configuration);
  54.             $configuration->setStore($this);
  55.         }
  56.     }
  57.     public function removeConfiguration(ConfigurationInterface $configuration)
  58.     {
  59.         if ($this->hasConfiguration($configuration)) {
  60.             $this->configurations->removeElement($configuration);
  61.             $configuration->setStore(null);
  62.         }
  63.     }
  64.     public function hasConfiguration(ConfigurationInterface $configuration)
  65.     {
  66.         return $this->configurations->contains($configuration);
  67.     }
  68.     public function getBaseCountry()
  69.     {
  70.         return $this->baseCountry;
  71.     }
  72.     public function setBaseCountry(CountryInterface $baseCountry)
  73.     {
  74.         $this->baseCountry $baseCountry;
  75.     }
  76.     /**
  77.      * @return bool
  78.      */
  79.     public function getUseGrossPrice()
  80.     {
  81.         return $this->useGrossPrice;
  82.     }
  83.     /**
  84.      * @param bool $useGrossPrice
  85.      */
  86.     public function setUseGrossPrice($useGrossPrice)
  87.     {
  88.         $this->useGrossPrice $useGrossPrice;
  89.     }
  90. }