You are here

public function Generic::setOperations in Form mode manager 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/EntityRoutingMap/Generic.php \Drupal\form_mode_manager\Plugin\EntityRoutingMap\Generic::setOperations()

Set a mapping of operations for Generic plugin.

Overrides EntityRoutingMapBase::setOperations

File

src/Plugin/EntityRoutingMap/Generic.php, line 20

Class

Generic
Class Generic routing entity mapper.

Namespace

Drupal\form_mode_manager\Plugin\EntityRoutingMap

Code

public function setOperations() {
  $operations = [
    'add_form' => "entity.{$this->targetEntityType}.add_form",
    'edit_form' => "entity.{$this->targetEntityType}.edit_form",
    'add_page' => "{$this->targetEntityType}.add_page",
  ];
  $this->pluginDefinition['operations'] += $operations;
}