function page_manager_ui_entity_type_alter in Page Manager 8.4
Same name and namespace in other branches
- 8 page_manager_ui/page_manager_ui.module \page_manager_ui_entity_type_alter()
Implements hook_entity_type_alter().
File
- page_manager_ui/
page_manager_ui.module, line 51 - Provides a UI for Page Manager.
Code
function page_manager_ui_entity_type_alter(array &$entity_types) {
// Change the URL for page config translation overview to outside the wizard.
if ($entity_types['page']
->hasLinkTemplate('config-translation-overview')) {
$entity_types['page']
->setLinkTemplate('config-translation-overview', str_replace('manage/{machine_name}/{step}', '{page}', $entity_types['page']
->getLinkTemplate('config-translation-overview')));
}
// Change the URL for page variant config translation overview to outside the
// wizard.
if ($entity_types['page_variant']
->hasLinkTemplate('config-translation-overview')) {
$entity_types['page_variant']
->setLinkTemplate('config-translation-overview', str_replace('manage/{machine_name}/{step}', '{page}/{page_variant}', $entity_types['page_variant']
->getLinkTemplate('config-translation-overview')));
}
}