public function EntityFormModeBase::getFormModeOperationName in Form mode manager 8
Retrieve the operation (form mode) name in edit context.
In Form Mode Manager all edit routes use a contextual FormClass to provide, a FormClass handler different by context (add/edit).
Parameters
string $operation: The form mode id with contextual prefix.
Return value
string The form mode id without contextual prefix 'edit_'.
2 calls to EntityFormModeBase::getFormModeOperationName()
- EntityFormModeBase::checkAccess in src/
Controller/ EntityFormModeBase.php - Checks access for the Form Mode Manager routes.
- EntityFormModeBase::getForm in src/
Controller/ EntityFormModeBase.php - Gets the built and processed entity form for the given entity.
File
- src/
Controller/ EntityFormModeBase.php, line 293
Class
- EntityFormModeBase
- Controller for entity form mode support.
Namespace
Drupal\form_mode_manager\ControllerCode
public function getFormModeOperationName($operation) {
return preg_replace('/^(edit_)/', '', $operation);
}