WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface::initResource PHP Method

initResource() public method

Initializes new resource object
public initResource ( ) : WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface
return WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface
    public function initResource() : EntityInterface;

Usage Example

コード例 #1
0
 private function createLocale(string $localeCode, string $targetLocaleCurrency) : LocaleInterface
 {
     $currency = $this->getTargetCurrency($targetLocaleCurrency);
     /** @var LocaleInterface $locale */
     $locale = $this->localeManager->initResource();
     $locale->setCode($localeCode);
     $locale->setEnabled(true);
     $locale->setCurrency($currency);
     $this->localeManager->createResource($locale);
     return $locale;
 }
All Usage Examples Of WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface::initResource