protected function SelectionConfigure::getParentRouteInfo in Page Manager 8.4
Same name and namespace in other branches
- 8 page_manager_ui/src/Form/SelectionConfigure.php \Drupal\page_manager_ui\Form\SelectionConfigure::getParentRouteInfo()
Document the route name and parameters for redirect after submission.
Parameters
$cached_values:
Return value
array In the format of return ['route.name', ['machine_name' => $this->machine_name, 'step' => 'step_name']];
Overrides ConditionConfigure::getParentRouteInfo
File
- page_manager_ui/
src/ Form/ SelectionConfigure.php, line 38
Class
Namespace
Drupal\page_manager_ui\FormCode
protected function getParentRouteInfo($cached_values) {
/** @var $page \Drupal\page_manager\PageInterface */
$page = $cached_values['page'];
if ($page
->isNew()) {
return [
'entity.page.add_step_form',
[
'machine_name' => $this->machine_name,
'step' => 'selection',
],
];
}
else {
$page_variant = $this
->getPageVariant($cached_values);
return [
'entity.page.edit_form',
[
'machine_name' => $this->machine_name,
'step' => 'page_variant__' . $page_variant
->id() . '__selection',
],
];
}
}