function views_pdf_plugin_row_fields::render in Views PDF 7.3
Same name and namespace in other branches
- 6 views_pdf_plugin_row_fields.inc \views_pdf_plugin_row_fields::render()
- 7 views_pdf_plugin_row_fields.inc \views_pdf_plugin_row_fields::render()
- 7.2 plugins/views_pdf_plugin_row_fields.inc \views_pdf_plugin_row_fields::render()
Renders the rows.
Overrides views_plugin_row::render
File
- ./
views_pdf_plugin_row_fields.inc, line 16 - PDF row fields plugin provides the the fields plugin for unformatted style.
Class
- views_pdf_plugin_row_fields
- This class contains all the functionality of the field PDF style.
Code
function render($row) {
// Due of limitations of field renderer, we invoke them
// here and not in the field render function.
foreach ($this->view->field as $id => $field) {
if (empty($field->options['exclude'])) {
if (isset($this->options['formats'][$id])) {
$options = $this->options['formats'][$id];
}
else {
$options = array();
}
switch ($this->display->display_options['style_plugin']) {
case 'pdf_unformatted':
// Register the row for header & footer on the current page before writing
// each field. This is necessary in case the fields for one record span
// multiple pages, or there is a page break. Otherwise there can be pages
// with missing headers and footers.
$this->view->pdf
->setHeaderFooter($row, $this->options, $this->view);
$this->view->pdf
->drawContent($row, $options, $this->view, $id);
break;
case 'pdf_grid':
$options['grid'] = $this->options['grid'];
$this->view->pdf
->drawContent($row, $options, $this->view, $id);
$this->options['grid']['new_cell'] = FALSE;
break;
}
}
}
// Reset the row page number.
$this->view->pdf
->resetRowPageNumber();
}