You are here

public function ViewsBulkOperationsBaseOperation::adminOptionsForm in Views Bulk Operations (VBO) 7.3

Returns the admin options form for the operation.

The admin options form is embedded into the VBO field settings and used to configure operation behavior. The options can later be fetched through the getAdminOption() method.

Parameters

$dom_id: The dom path to the level where the admin options form is embedded. Needed for #dependency.

$field_handler: The Views field handler object for the VBO field.

1 call to ViewsBulkOperationsBaseOperation::adminOptionsForm()
ViewsBulkOperationsAction::adminOptionsForm in plugins/operation_types/action.class.php
Returns the admin options form for the operation.
1 method overrides ViewsBulkOperationsBaseOperation::adminOptionsForm()
ViewsBulkOperationsAction::adminOptionsForm in plugins/operation_types/action.class.php
Returns the admin options form for the operation.

File

plugins/operation_types/base.class.php, line 179
Defines the base class for operations.

Class

ViewsBulkOperationsBaseOperation
@file Defines the base class for operations.

Code

public function adminOptionsForm($dom_id, $field_handler) {
  $label = $this
    ->getAdminOption('label', '');
  $form = array();
  $form['override_label'] = array(
    '#type' => 'checkbox',
    '#title' => t('Override label'),
    '#default_value' => $label !== '',
    '#dependency' => array(
      $dom_id . '-selected' => array(
        1,
      ),
    ),
  );
  $form['label'] = array(
    '#type' => 'textfield',
    '#title' => t('Provide label'),
    '#title_display' => 'invisible',
    '#default_value' => $label,
    '#dependency' => array(
      $dom_id . '-selected' => array(
        1,
      ),
      $dom_id . '-override-label' => array(
        1,
      ),
    ),
    '#dependency_count' => 2,
  );
  return $form;
}