You are here

public function pdf_export_views_handler_area::render in PDF Export 7

Render the area.

Overrides views_handler_area::render

File

pdf_export_views/pdf_export_views_handler_area.inc, line 89
Definition of pdf_export_views_handler_area.

Class

pdf_export_views_handler_area
PDF export area text handler.

Code

public function render($empty = FALSE) {

  // Don't show export button when view is empty and "Display even if view has
  // no result" is unchecked
  if ($empty && !$this->options['empty']) {
    return '';
  }
  $button_classes = explode(' ', $this->options['button_classes']);
  $pdf_name = $this->view->name . '.pdf';
  if (!empty($this->options['pdf_name'])) {
    $pdf_name = $this->options['pdf_name'];
  }
  return theme('pdf_export_button', array(
    'attributes' => array(
      'class' => $button_classes,
    ),
    'label' => $this->options['button_label'],
    'file_name' => $pdf_name,
    'css_paths' => $this->options['css_files'],
    'theme_name' => $this->options['css_theme'],
    'css_selector' => $this->options['pdf_content_selector'],
  ));
}