You are here

public function ViewsBulkOperationsAdvancedTestAction::buildPreConfigurationForm in Views Bulk Operations (VBO) 8.3

Same name and namespace in other branches
  1. 8 tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsAdvancedTestAction.php \Drupal\views_bulk_operations_test\Plugin\Action\ViewsBulkOperationsAdvancedTestAction::buildPreConfigurationForm()
  2. 8.2 tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsAdvancedTestAction.php \Drupal\views_bulk_operations_test\Plugin\Action\ViewsBulkOperationsAdvancedTestAction::buildPreConfigurationForm()
  3. 4.0.x tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsAdvancedTestAction.php \Drupal\views_bulk_operations_test\Plugin\Action\ViewsBulkOperationsAdvancedTestAction::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

tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsAdvancedTestAction.php, line 65

Class

ViewsBulkOperationsAdvancedTestAction
Action for test purposes only.

Namespace

Drupal\views_bulk_operations_test\Plugin\Action

Code

public function buildPreConfigurationForm(array $element, array $values, FormStateInterface $form_state) {
  $element['test_preconfig'] = [
    '#title' => $this
      ->t('Preliminary configuration'),
    '#type' => 'textfield',
    '#default_value' => isset($values['preconfig']) ? $values['preconfig'] : '',
  ];
  return $element;
}