You are here

function views_autorefresh_get_settings in Views Auto-Refresh 7

Helper function to get autorefresh settings.

2 calls to views_autorefresh_get_settings()
views_autorefresh_get_timestamp in ./views_autorefresh.module
Helper function to return a view timestamp.
views_autorefresh_views_ajax_data_alter in ./views_autorefresh.module
Implementation of hook_views_ajax_data_alter().

File

./views_autorefresh.module, line 135

Code

function views_autorefresh_get_settings($view) {
  if (isset($view->display_handler->handlers['header']['autorefresh'])) {
    return $view->display_handler->handlers['header']['autorefresh']->options;
  }
  if ($view->display) {
    foreach ($view->display as $id => $display) {
      if (isset($display->display_options['header']['autorefresh'])) {
        return $display->display_options['header']['autorefresh'];
      }
    }
  }
  return NULL;
}