Open Data Catalog v2.0.0
ConfigurationOverrider.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Drupal\dkan_data;
4 
5 use Drupal\Core\Config\ConfigFactoryOverrideInterface;
6 use Drupal\Core\Config\StorageInterface;
7 
11 class ConfigurationOverrider implements ConfigFactoryOverrideInterface {
12 
18  public function loadOverrides($names) {
19  if (in_array("core.entity_form_display.node.data.default", $names)) {
20 
21  $schema = $this->getSchema();
22  return [
23  "core.entity_form_display.node.data.default" =>
24  [
25  'content' =>
26  [
27  'field_json_metadata' =>
28  [
29  'settings' =>
30  [
31  'json_form' => $schema,
32  ],
33  ],
34  ],
35  ],
36  ];
37  }
38  return [];
39  }
40 
47  protected function getSchema() {
49  $schemaRetriever = \Drupal::service('dkan_schema.schema_retriever');
50  return $schemaRetriever->retrieve("dataset");
51  }
52 
58  public function getCacheSuffix() {
59  }
60 
66  public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
67  }
68 
74  public function getCacheableMetadata($name) {
75  }
76 
77 }
Drupal\dkan_data\ConfigurationOverrider\loadOverrides
loadOverrides($names)
Definition: ConfigurationOverrider.php:18
Drupal\dkan_data\ConfigurationOverrider\getCacheableMetadata
getCacheableMetadata($name)
Definition: ConfigurationOverrider.php:74
Drupal\dkan_data
Definition: ConfigurationOverrider.php:3
Drupal\dkan_data\ConfigurationOverrider
Definition: ConfigurationOverrider.php:11
Drupal\dkan_data\ConfigurationOverrider\getCacheSuffix
getCacheSuffix()
Definition: ConfigurationOverrider.php:58
Drupal\dkan_data\ConfigurationOverrider\createConfigObject
createConfigObject($name, $collection=StorageInterface::DEFAULT_COLLECTION)
Definition: ConfigurationOverrider.php:66