You are here

function theme_views_pdf_icon in Views PDF 7.2

Same name and namespace in other branches
  1. 6 views_pdf.module \theme_views_pdf_icon()
  2. 7.3 views_pdf.module \theme_views_pdf_icon()
  3. 7 views_pdf.module \theme_views_pdf_icon()

Theme function for the PDF icon of appended PDFs.

2 theme calls to theme_views_pdf_icon()
views_pdf_plugin_style_table::attach_to in plugins/views_pdf_plugin_style_table.inc
Attach this view to another display as a feed.
views_pdf_plugin_style_unformatted::attach_to in plugins/views_pdf_plugin_style_unformatted.inc
Attach this view to another display as a feed.

File

./views_pdf.module, line 44
PDF Views allows the creation of PDF's directly from a view. Without the creation of HTML first.

Code

function theme_views_pdf_icon($vars) {
  $title = $vars['title'];
  $path = $vars['path'];
  $options = $vars['options'];
  $options['html'] = TRUE;
  $options['attributes']['class'] = 'pdf-icon';
  $image_path = drupal_get_path('module', 'views_pdf') . '/images/pdf.png';
  $image = theme('image', array(
    'path' => $image_path,
    'title' => $title,
    'alt' => $titl,
  ));
  if ($image) {
    return l($image, $path, $options);
  }
}