/** * Prepare component configuration * * @return void */ public function prepare() { $this->wrappedComponent = $this->uiComponentFactory->create( $this->getName(), static::COMPONENT, ['context' => $this->getContext()] ); $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(); }
/** * Get JS config * * @return array */ public function getJsConfig() { return array_replace_recursive((array) $this->wrappedComponent->getData('config'), (array) $this->getData('config')); }