You are here

protected function AddVariantSelectionForm::getOperationsRouteInfo in Page Manager 8.4

Same name and namespace in other branches
  1. 8 page_manager_ui/src/Form/AddVariantSelectionForm.php \Drupal\page_manager_ui\Form\AddVariantSelectionForm::getOperationsRouteInfo()

Document the route name and parameters for edit/delete context operations.

The route name returned from this method is used as a "base" to which ".edit" and ".delete" are appended in the getOperations() method. Subclassing '\Drupal\ctools\Form\ConditionConfigure' and '\Drupal\ctools\Form\ConditionDelete' should set you up for using this approach quite seamlessly.

Parameters

mixed $cached_values:

string $machine_name:

string $row:

Return value

array In the format of return ['route.base.name', ['machine_name' => $machine_name, 'context' => $row]];

Overrides ManageConditions::getOperationsRouteInfo

1 call to AddVariantSelectionForm::getOperationsRouteInfo()
AddVariantSelectionForm::add in page_manager_ui/src/Form/AddVariantSelectionForm.php

File

page_manager_ui/src/Form/AddVariantSelectionForm.php, line 38

Class

AddVariantSelectionForm

Namespace

Drupal\page_manager_ui\Form

Code

protected function getOperationsRouteInfo($cached_values, $machine_name, $row) {

  /** @var \Drupal\page_manager\PageVariantInterface $page_variant */
  $page_variant = $cached_values['page_variant'];
  return [
    'entity.page_variant.add_step_form.condition',
    [
      'page' => $page_variant
        ->getPage()
        ->id(),
      'machine_name' => $machine_name,
      'condition' => $row,
    ],
  ];
}