You are here

function views_form_views_form_submit in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 6.3 views.module \views_form_views_form_submit()
  2. 7.3 views.module \views_form_views_form_submit()

Submit handler for the first step of the views form. Calls any existing views_form_submit functions located on the views fields.

1 string reference to 'views_form_views_form_submit'
views_form_views_form in ./views.module
Callback for the main step of a Views form. Invoked by views_form().

File

./views.module, line 1861
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_form_views_form_submit($form, &$form_state) {
  $view = $form_state['build_info']['args'][0];

  // Call the submit method on every field handler that has it.
  foreach ($view->field as $field_name => $field) {
    if (method_exists($field, 'views_form_submit')) {
      $field
        ->views_form_submit($form, $form_state);
    }
  }

  // Call the submit method on every area handler that has it.
  foreach (array(
    'header',
    'footer',
  ) as $area) {
    foreach ($view->{$area} as $area_name => $area_handler) {
      if (method_exists($area_handler, 'views_form_submit')) {
        $area_handler
          ->views_form_submit($form, $form_state);
      }
    }
  }
}