function hook_default_admin_content_form_routes_alter
Same name and namespace in other branches
- main core/themes/default_admin/default_admin.api.php \hook_default_admin_content_form_routes_alter()
Alter the registered routes to enable or disable admin’s edit form layout.
Parameters
array $routes: The list of routes.
See also
Helper::isContentForm()
hook_default_admin_content_form_routes()
Related topics
1 invocation of hook_default_admin_content_form_routes_alter()
- Helper::isContentForm in core/
themes/ default_admin/ src/ Helper.php - Check if we´re on a content edit form.
File
-
core/
themes/ default_admin/ default_admin.api.php, line 48
Code
function hook_default_admin_content_form_routes_alter(array &$routes) : void {
// Example: disable admin edit form layout customizations for an entity type.
$routes = array_diff($routes, [
'entity.my_type.edit_form',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.