function ManageConditions::getOperations
Same name in other branches
- 8.x-3.x src/Form/ManageConditions.php \Drupal\ctools\Form\ManageConditions::getOperations()
1 call to ManageConditions::getOperations()
- ManageConditions::renderRows in src/
Form/ ManageConditions.php
File
-
src/
Form/ ManageConditions.php, line 162
Class
Namespace
Drupal\ctools\FormCode
protected function getOperations($route_name_base, array $route_parameters = []) {
$operations['edit'] = [
'title' => $this->t('Edit'),
'url' => new Url($route_name_base . '.edit', $route_parameters),
'weight' => 10,
'attributes' => [
'class' => [
'use-ajax',
],
'data-dialog-type' => 'modal',
'data-dialog-options' => Json::encode([
'width' => 700,
]),
],
];
$route_parameters['id'] = $route_parameters['condition'];
$operations['delete'] = [
'title' => $this->t('Delete'),
'url' => new Url($route_name_base . '.delete', $route_parameters),
'weight' => 100,
'attributes' => [
'class' => [
'use-ajax',
],
'data-dialog-type' => 'modal',
'data-dialog-options' => Json::encode([
'width' => 700,
]),
],
];
return $operations;
}