You are here

function views_export_xls_plugin_style_xls::attach_to in Views Excel Export 7

Same name and namespace in other branches
  1. 6 views_export_xls_plugin_style_xls.inc \views_export_xls_plugin_style_xls::attach_to()

Attach this view to another display as a feed.

Provide basic functionality for all export style views like attaching a feed image link.

File

views/views_export_xls_plugin_style_xls.inc, line 30
Plugin include file for export style plugin.

Class

views_export_xls_plugin_style_xls
Generalized style plugin for export plugins.

Code

function attach_to($display_id, $path, $title) {
  $url_options = array(
    'html' => TRUE,
  );
  $input = $this->view
    ->get_exposed_input();
  if ($input) {
    $url_options['query'] = $input;
  }
  $variables = array(
    'path' => $this->feed_image,
    'alt' => 'Icon for xls export',
    'title' => 'Export to xls',
  );
  $image = theme('image', $variables);
  $this->view->feed_icon .= l($image, $this->view
    ->get_url(NULL, $path), $url_options);
}