You are here

function vvf_features_pipe_views_view_alter in Views Variable Field 7

Implements hook_features_pipe_COMPONENT_alter() for views_view component.

File

./vvf.module, line 34
API and main hooks for Views Variable Field module.

Code

function vvf_features_pipe_views_view_alter(&$pipe, $data, $export) {
  if (!empty($data)) {
    foreach ($data as $view_name) {
      $view = views_get_view($view_name);
      foreach ($view->display as $display) {
        if (isset($display->display_options['fields'])) {
          foreach ($display->display_options['fields'] as $field) {
            if ($field['id'] == 'variable') {
              $pipe['dependencies'][] = 'vvf';
              return;
            }
          }
        }
      }
    }
  }
}