Skip to content
Snippets Groups Projects
Commit 1360038f authored by Alexandre Mallet's avatar Alexandre Mallet Committed by Alexandre Mallet
Browse files

Issue #2963743 by woprrr, vierlex: Visiting /admin/config causes endless loop

parent 8670a0ce
No related branches found
No related tags found
No related merge requests found
......@@ -177,13 +177,7 @@ abstract class EntityRoutingMapBase extends PluginBase implements EntityRoutingM
* {@inheritdoc}
*/
public function setEditFormClass() {
$edit_form_operation = $this->pluginDefinition['editFormClass'];
if (!$this->entityFormClassExist($edit_form_operation)) {
$edit_form_operation = $this->getDefaultFormClass();
}
$this->editFormClass = $edit_form_operation;
$this->editFormClass = $this->pluginDefinition['editFormClass'];
}
/**
......@@ -199,21 +193,6 @@ abstract class EntityRoutingMapBase extends PluginBase implements EntityRoutingM
}
}
/**
* Check if the entity have an edit operation handler.
*
* @param string $operation_name
* The name of form handler operation.
*
* @return bool
* True if generic `edit` form handler exist for this entity.
*/
public function entityFormClassExist($operation_name) {
$entity_definition = \Drupal::entityTypeManager()
->getDefinition($this->getTargetEntityType());
return !empty($entity_definition->getFormClass($operation_name));
}
/**
* {@inheritdoc}
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment