You are here

protected static function ConfigBit::supportedConfigTypes in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x

Same name and namespace in other branches
  1. 8.8 src/Config/ConfigBit.php \Drupal\varbase\Config\ConfigBit::supportedConfigTypes()

Get list of supported config types.

1 call to ConfigBit::supportedConfigTypes()
ConfigBit::configSave in src/Config/ConfigBit.php
React to a config object being saved.

File

src/Config/ConfigBit.php, line 108

Class

ConfigBit
Class ConfigBit.

Namespace

Drupal\varbase\Config

Code

protected static function supportedConfigTypes() {
  return [
    // ----------------------------------------------------------------------.
    // When content type config had been saved.
    // ----------------------------------------------------------------------.
    'node.type' => [
      'config_name_match' => "/^node.type.*\$/",
      'token' => 'CONTENT_TYPE',
      'token_variant' => 'type',
      'config_template_file' => 'node.type.CONTENT_TYPE.bit.yml',
      'targetEntityType' => 'node',
      'plugin.cache_clearer' => TRUE,
    ],
    // ----------------------------------------------------------------------.
    // When a form display for a content type config had been saved.
    // ----------------------------------------------------------------------.
    'core.entity_form_display.node.CONTENT_TYPE.default' => [
      'config_name_match' => "/^core.entity_form_display.node.*.default\$/",
      'token' => 'CONTENT_TYPE',
      'token_variant' => 'bundle',
      'config_template_file' => 'core.entity_form_display.node.CONTENT_TYPE.default.bit.yml',
      'targetEntityType' => 'node',
      'mode' => 'default',
      'plugin.cache_clearer' => TRUE,
    ],
    // ----------------------------------------------------------------------.
    // When an entityqueue config had been saved.
    // ----------------------------------------------------------------------.
    'entityqueue.entity_queue.ENTITYQUEUE_NAME' => [
      'config_name_match' => "/^entityqueue.entity_queue.*\$/",
      'token' => 'ENTITYQUEUE_NAME',
      'token_variant' => 'id',
      'config_template_file' => 'entityqueue.entity_queue.ENTITYQUEUE_NAME.bit.yml',
      'targetEntityType' => 'entity_subqueue',
    ],
    // ----------------------------------------------------------------------.
    // When a form display for an entityqueue config had been saved.
    // ----------------------------------------------------------------------.
    'core.entity_form_display.entityqueue.entity_queue.ENTITYQUEUE_NAME.default' => [
      'config_name_match' => "/^core.entity_form_display.entityqueue.entity_queue.*.default\$/",
      'token' => 'ENTITYQUEUE_NAME',
      'token_variant' => 'id',
      'config_template_file' => 'core.entity_form_display.entityqueue.entity_queue.ENTITYQUEUE_NAME.default.bit.yml',
      'targetEntityType' => 'entity_subqueue',
      'mode' => 'default',
    ],
  ];
}