Автор: Adam Piotrowski (adam@wellcommerce.org)
Наследование: extends WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface, extends WellCommerce\Bundle\CoreBundle\Entity\TimestampableInterface, extends WellCommerce\Bundle\CoreBundle\Entity\TranslatableInterface, extends WellCommerce\Bundle\CoreBundle\Entity\BlameableInterface
Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function resolveControllerService(LayoutBoxInterface $layoutBox)
 {
     $boxType = $layoutBox->getBoxType();
     $configurator = $this->layoutBoxConfiguratorCollection->get($boxType);
     $service = $configurator->getControllerService();
     if (!$this->container->has($service)) {
         throw new ServiceNotFoundException($service);
     }
     return $this->container->get($service);
 }
 private function makeSettingsCollection(LayoutBoxInterface $box, array $params = []) : LayoutBoxSettingsCollection
 {
     $defaultSettings = $box->getSettings();
     $settings = array_merge($defaultSettings, $params);
     $collection = new LayoutBoxSettingsCollection();
     foreach ($settings as $name => $value) {
         $collection->add($name, $value);
     }
     $collection->add('name', $box->translate()->getName());
     $collection->add('content', $box->translate()->getContent());
     return $collection;
 }