function ConfigEntityMapper::getContextualLinkGroup

Same name and namespace in other branches
  1. 9 core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::getContextualLinkGroup()
  2. 8.9.x core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::getContextualLinkGroup()
  3. 11.x core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::getContextualLinkGroup()

Overrides ConfigNamesMapper::getContextualLinkGroup

File

core/modules/config_translation/src/ConfigEntityMapper.php, line 211

Class

ConfigEntityMapper
Configuration mapper for configuration entities.

Namespace

Drupal\config_translation

Code

public function getContextualLinkGroup() {
  // @todo Contextual groups do not map to entity types in a predictable
  //   way. See https://www.drupal.org/node/2134841 to make them predictable.
  switch ($this->entityType) {
    case 'menu':
    case 'block':
      return $this->entityType;
    case 'view':
      return 'entity.view.edit_form';
    default:
      return NULL;
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.