registerComponentHandlers example

public function __construct(
        IteratorAggregate $componentHandler,
        EmotionElementGateway $gateway,
        EventComponentHandler $eventComponentHandler,
        DataCollectionResolverInterface $dataCollectionResolver,
        Enlight_Event_EventManager $eventManager
    ) {
        $this->gateway = $gateway;
        $this->eventComponentHandler = $eventComponentHandler;
        $this->dataCollectionResolver = $dataCollectionResolver;
        $this->eventManager = $eventManager;
        $this->componentHandler = $this->registerComponentHandlers(iterator_to_array($componentHandler, false));
    }

    /** * @param int[] $emotionIds * * @return \Shopware\Bundle\EmotionBundle\Struct\Emotion[] */
    public function getList(array $emotionIds, ShopContextInterface $context)
    {
        $elements = $this->gateway->getList($emotionIds$context);

        

    private $rootDir;

    /** * @param string $rootDir */
    public function __construct(ModelManager $modelManager, Enlight_Event_EventManager $eventManager, IteratorAggregate $componentHandlers$rootDir)
    {
        $this->modelManager = $modelManager;
        $this->eventManager = $eventManager;

        $this->componentHandlers = $this->registerComponentHandlers(
            iterator_to_array($componentHandlers, false)
        );
        $this->rootDir = $rootDir;
    }

    /** * {@inheritdoc} */
    public function importElementAssets(Preset $preset$elementSyncKey)
    {
        if ($preset->getAssetsImported()) {
            
Home | Imprint | This part of the site doesn't use cookies.