You are here

public function EntityRoutingMapBase::setContextualLinks in Form mode manager 8.2

Return contextual links route mapping.

Return value

array[] The mapping of each entity contextual links given by plugin annotation.

Overrides EntityRoutingMapInterface::setContextualLinks

1 call to EntityRoutingMapBase::setContextualLinks()
EntityRoutingMapBase::__construct in src/EntityRoutingMapBase.php
Constructs display plugin.

File

src/EntityRoutingMapBase.php, line 186

Class

EntityRoutingMapBase
Base class for form mode manager entity routing plugin.

Namespace

Drupal\form_mode_manager

Code

public function setContextualLinks() {
  if ($this
    ->doGenerateContextualLinks()) {
    $operations = [
      'edit' => "entity.{$this->targetEntityType}.edit_form",
    ];
    $this->pluginDefinition['contextualLinks'] += $operations;
  }
}