You are here

public function ConfigEntityMapper::getContextualLinkGroup in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::getContextualLinkGroup()

Returns the name of the contextual link group to add contextual links to.

Return value

string|null A contextual link group name or null if no link should be added.

Overrides ConfigNamesMapper::getContextualLinkGroup

File

core/modules/config_translation/src/ConfigEntityMapper.php, line 241
Contains \Drupal\config_translation\ConfigEntityMapper.

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;
  }
}