| 1 |
<?php
|
| 2 |
// $Id:
|
| 3 |
/**
|
| 4 |
* @file
|
| 5 |
* Plugin include file for export style plugin.
|
| 6 |
*/
|
| 7 |
|
| 8 |
/**
|
| 9 |
* Generalized style plugin for export plugins.
|
| 10 |
*
|
| 11 |
* @ingroup views_style_plugins
|
| 12 |
*/
|
| 13 |
class dompdf_plugin_style_export_pdf extends views_bonus_plugin_style_export {
|
| 14 |
/**
|
| 15 |
* Initialize plugin.
|
| 16 |
*
|
| 17 |
* Set feed image for shared rendering later.
|
| 18 |
*/
|
| 19 |
function init(&$view, &$display, $options = NULL) {
|
| 20 |
parent::init($view, $display, $options = NULL);
|
| 21 |
$this->feed_image = drupal_get_path('module', 'dompdf') . '/images/pdf.png';
|
| 22 |
}
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Set options fields and default values.
|
| 26 |
*
|
| 27 |
* @return
|
| 28 |
* An array of options information.
|
| 29 |
*/
|
| 30 |
function option_definition() {
|
| 31 |
$options = parent::option_definition();
|
| 32 |
|
| 33 |
$options['filename'] = array(
|
| 34 |
'default' => 'view-%view.pdf',
|
| 35 |
'translatable' => FALSE,
|
| 36 |
);
|
| 37 |
|
| 38 |
return $options;
|
| 39 |
}
|
| 40 |
|
| 41 |
/**
|
| 42 |
* Options form mini callback.
|
| 43 |
*
|
| 44 |
* @param $form
|
| 45 |
* Form array to add additional fields to.
|
| 46 |
* @param $form_state
|
| 47 |
* State of the form.
|
| 48 |
* @return
|
| 49 |
* None.
|
| 50 |
*/
|
| 51 |
/*
|
| 52 |
function options_form(&$form, &$form_state) {
|
| 53 |
$form['filename'] = array(
|
| 54 |
'#type' => 'textfield',
|
| 55 |
'#title' => t('CSV filename'),
|
| 56 |
'#default_value' => $this->options['filename'],
|
| 57 |
'#description' => t('The filename that will be suggested to the browser for downloading purposes. %view will be replaced with the view name.'),
|
| 58 |
'#process' => array('views_process_dependency'),
|
| 59 |
'#dependency' => array('edit-style-options-override' => array(FALSE)),
|
| 60 |
);
|
| 61 |
}
|
| 62 |
*/
|
| 63 |
}
|
| 64 |
|