You are here

function views_autorefresh_nodejs_refresh in Views Auto-Refresh 7.2

Same name and namespace in other branches
  1. 7 views_autorefresh.module \views_autorefresh_nodejs_refresh()

Refreshes a view through nodejs.

1 call to views_autorefresh_nodejs_refresh()
views_autorefresh_rules_process in ./views_autorefresh.rules.inc
Action: Process and send message to nodejs.

File

./views_autorefresh.module, line 146

Code

function views_autorefresh_nodejs_refresh($views, $context) {
  foreach ($views as $view_name) {
    $message = (object) array(
      'channel' => 'views_autorefresh_' . $view_name,
      'callback' => 'viewsAutoRefresh',
      'view_name' => $view_name,
    );
    drupal_alter('views_autorefresh_nodejs_message', $message, $context);
    nodejs_send_content_channel_message($message);
  }
}