Skip to content
Snippets Groups Projects
uw_cfg_common.install 29.9 KiB
Newer Older
    $name = 'field.field.node.' . $content_type . '.field_path';

    // Get the config from the yml into an array.
    $config_record = $config_dir->read($name);

    if ($config_record) {
      // If the field config is not install, install it.
      if (!FieldConfig::loadByName(
        $config_record['entity_type'],
        $config_record['bundle'],
        $config_record['field_name'])
      ) {
        FieldConfig::create($config_record)->save();