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;
    }