Ejemplo n.º 1
0
 /**
  * Prepare component configuration
  *
  * @return void
  */
 public function prepare()
 {
     $this->wrappedComponent = $this->uiComponentFactory->create($this->getName(), static::COMPONENT, ['context' => $this->getContext(), 'options' => $this->optionsProvider]);
     $this->wrappedComponent->prepare();
     // Merge JS configuration with wrapped component configuration
     $jsConfig = array_replace_recursive($this->getJsConfig($this->wrappedComponent), $this->getJsConfig($this));
     $this->setData('js_config', $jsConfig);
     $this->setData('config', array_replace_recursive((array) $this->wrappedComponent->getData('config'), (array) $this->getData('config')));
     $this->applyFilter();
     parent::prepare();
 }
Ejemplo n.º 2
0
 /**
  * Get JS config
  *
  * @return array
  */
 public function getJsConfig()
 {
     return array_replace_recursive((array) $this->wrappedComponent->getData('config'), (array) $this->getData('config'));
 }