protected function createLayout(array $config)
    {
        $layout = $this->newLayoutInstance();

        $layout->setName(ConfigUtil::getValue($config, 'name'));
        $layout->setLabel(ConfigUtil::getValue($config, 'label'));
        $layout->setDescription(ConfigUtil::getValue($config, 'description'));
        $layout->setEnabled(ConfigUtil::getValue($config, 'enabled', true));
        $layout->setBody(ConfigUtil::getValue($config, 'body'));
        $layout->setTranslationDomain(ConfigUtil::getValue($config, 'translation_domain'));

        if (isset($config['translations']) && \is_array($config['translations'])) {
            foreach ($config['translations'] as $translation) {
                $layout->addTranslation($this->createLayoutTranslation($layout, $translation));
            }
        }

        return $layout;
    }
protected function createLayout(array $config)
    {
        $layout = $this->newLayoutInstance();

        $layout->setName(ConfigUtil::getValue($config, 'name'));
        $layout->setLabel(ConfigUtil::getValue($config, 'label'));
        $layout->setDescription(ConfigUtil::getValue($config, 'description'));
        $layout->setEnabled(ConfigUtil::getValue($config, 'enabled', true));
        $layout->setBody(ConfigUtil::getValue($config, 'body'));
        $layout->setTranslationDomain(ConfigUtil::getValue($config, 'translation_domain'));

        if (isset($config['translations']) && \is_array($config['translations'])) {
            foreach ($config['translations'] as $translation) {
                $layout->addTranslation($this->createLayoutTranslation($layout, $translation));
            }
        }

        return $layout;
    }
protected function createLayout ( array $ config ) { $ layout = $ this -> newLayoutInstance ( ) ; $ layout -> setName ( ConfigUtil :: getValue ( $ config , 'name' ) ) ; $ layout -> setLabel ( ConfigUtil :: getValue ( $ config , 'label' ) ) ; $ layout -> setDescription ( ConfigUtil :: getValue ( $ config , 'description' ) ) ; $ layout -> setEnabled ( ConfigUtil :: getValue ( $ config , 'enabled' , true ) ) ; $ layout -> setBody ( ConfigUtil :: getValue ( $ config , 'body' ) ) ; $ layout -> setTranslationDomain ( ConfigUtil :: getValue ( $ config , 'translation_domain' ) ) ; if ( isset ( $ config [ 'translations' ] ) && \ is_array ( $ config [ 'translations' ] ) ) { foreach ( $ config [ 'translations' ] as $ translation ) { $ layout -> addTranslation ( $ this -> createLayoutTranslation ( $ layout , $ translation ) ) ; } } return $ layout ; }
Create the layout.

@param array $config The config of layout

@return LayoutInterface
Create the layout .