protected function PageEditWizard::getPageActionLinks in Page Manager 8
Same name and namespace in other branches
- 8.4 page_manager_ui/src/Wizard/PageEditWizard.php \Drupal\page_manager_ui\Wizard\PageEditWizard::getPageActionLinks()
Get action links for the page.
Return value
array An array of associative arrays with the following keys:
- title: The link text
- url: A URL object
1 call to PageEditWizard::getPageActionLinks()
- PageEditWizard::customizeForm in page_manager_ui/
src/ Wizard/ PageEditWizard.php - Helper function for generating label and id form elements.
File
- page_manager_ui/
src/ Wizard/ PageEditWizard.php, line 118 - Contains \Drupal\page_manager_ui\Wizard\PageEditWizard.
Class
Namespace
Drupal\page_manager_ui\WizardCode
protected function getPageActionLinks(PageInterface $page) {
$links = [];
$links[] = [
'title' => $this
->t('Delete page'),
'url' => new Url('entity.page.delete_form', [
'page' => $this
->getMachineName(),
]),
];
$links[] = [
'title' => $this
->t('Add variant'),
'url' => new Url('entity.page_variant.add_form', [
'page' => $this
->getMachineName(),
]),
];
$links[] = [
'title' => $this
->t('Reorder variants'),
'url' => new Url('entity.page.reorder_variants_form', [
'machine_name' => $this
->getMachineName(),
]),
];
return $links;
}