Esempio n. 1
0
 /**
  * Handles the submitted admin options form.
  * Note that there is no need to handle saving the options, that is done
  * by the VBO views field handler, which also injects the options into the
  * operation object upon instantiation.
  *
  * @param $form
  *   The admin options form.
  * @param $form_state
  *   An array containing the current state of the form. Note that this array
  *   is constructed by the VBO views field handler, so it's not a real form
  *   state, it contains only the 'values' key.
  */
 public function adminOptionsFormSubmit($form, &$form_state)
 {
     parent::adminOptionsFormSubmit($form, $form_state);
     if (!empty($form['settings'])) {
         $settings_submit_callback = $this->operationInfo['callback'] . '_views_bulk_operations_form_submit';
         if (function_exists($settings_submit_callback)) {
             $fake_form = $form['settings'];
             $fake_form_state = array('values' => &$form_state['values']['settings']);
             $settings_submit_callback($form, $form_state);
         }
     }
 }
 /**
  * Constructs an operation object.
  */
 public function __construct($operationId, $entityType, array $operationInfo, array $adminOptions)
 {
     parent::__construct($operationId, $entityType, $operationInfo, $adminOptions);
     list(, , $this->entityOperationKey) = explode('::', $operationId);
 }