public function ViewsBulkOperationExampleAction::buildPreConfigurationForm in Views Bulk Operations (VBO) 4.0.x
Same name and namespace in other branches
- 8.3 modules/views_bulk_operations_example/src/Plugin/Action/ViewsBulkOperationExampleAction.php \Drupal\views_bulk_operations_example\Plugin\Action\ViewsBulkOperationExampleAction::buildPreConfigurationForm()
- 8 modules/views_bulk_operations_example/src/Plugin/Action/ViewsBulkOperationExampleAction.php \Drupal\views_bulk_operations_example\Plugin\Action\ViewsBulkOperationExampleAction::buildPreConfigurationForm()
- 8.2 modules/views_bulk_operations_example/src/Plugin/Action/ViewsBulkOperationExampleAction.php \Drupal\views_bulk_operations_example\Plugin\Action\ViewsBulkOperationExampleAction::buildPreConfigurationForm()
Build preconfigure action form elements.
Parameters
array $element: Element of the views API form where configuration resides.
array $values: Current values of the plugin pre-configuration.
\Drupal\Core\Form\FormStateInterface $form_state: Form state interface object.
Return value
array The action configuration form element.
Overrides ViewsBulkOperationsPreconfigurationInterface::buildPreConfigurationForm
File
- modules/
views_bulk_operations_example/ src/ Plugin/ Action/ ViewsBulkOperationExampleAction.php, line 50
Class
- ViewsBulkOperationExampleAction
- An example action covering most of the possible options.
Namespace
Drupal\views_bulk_operations_example\Plugin\ActionCode
public function buildPreConfigurationForm(array $form, array $values, FormStateInterface $form_state) {
$form['example_preconfig_setting'] = [
'#title' => $this
->t('Example setting'),
'#type' => 'textfield',
'#default_value' => isset($values['example_preconfig_setting']) ? $values['example_preconfig_setting'] : '',
];
return $form;
}