drowl_paragraphs_bs-1.x-dev/modules/drowl_paragraphs_bs_type_block_content/drowl_paragraphs_bs_type_block_content.install
modules/drowl_paragraphs_bs_type_block_content/drowl_paragraphs_bs_type_block_content.install
<?php
/**
* @file
* DROWL Paragraphs for Bootstrap Type: Block Content Reference install hooks.
*/
use Symfony\Component\Yaml\Yaml;
/**
* Add "preview" entity view display for block_content paragraph type.
*/
function drowl_paragraphs_bs_type_block_content_update_9000(&$sandbox) {
$config_id = 'core.entity_view_display.paragraph.block_content.preview';
$config_path = \Drupal::service('extension.list.module')->getPath('drowl_paragraphs_bs_type_block_content') . '/config/install/' . $config_id . '.yml';
$data = Yaml::parseFile($config_path);
\Drupal::configFactory()->getEditable($config_id)->setData($data)->save(TRUE);
}
