class DrupalPage in Forena Reports 7.5
Hierarchy
- class \Drupal\forena\DocumentFormats\DocumentTypeBase
- class \Drupal\forena\DocumentFormats\DrupalPage
Expanded class hierarchy of DrupalPage
File
- src/
DocumentFormats/ DrupalPage.php, line 10 - DrupalPage.inc Standard web document manager @author metzlerd
Namespace
Drupal\forena\DocumentFormatsView source
class DrupalPage extends DocumentTypeBase {
private $title;
public function render($r, $format, $content = array()) {
// Set title based on report.
if ($r->title) {
$this->title = $r->title;
//drupal_set_title(filter_xss($r->title));
}
// Add Style attribute from header
// Add css files
foreach (Frx::Skin()->stylesheets as $type => $sheets) {
foreach ($sheets as $sheet) {
switch ($type) {
case 'all':
case 'print':
case 'screen':
$options = $type == 'all' ? array() : array(
'media' => $type,
);
if (strpos($sheet, 'http:') === 0 || strpos($sheet, 'https:') === 0) {
$options['type'] = 'external';
}
drupal_add_css($sheet, $options);
break;
}
}
}
// Add inline styles
if (isset($r->rpt_xml->head->style)) {
$sheet = (string) $r->rpt_xml->head->style;
drupal_add_css($sheet, array(
'type' => 'inline',
));
}
// Add javascript files
foreach (Frx::Skin()->scripts as $script) {
if (strpos($script, 'http:') === 0 || strpos($script, 'https:') === 0) {
drupal_add_js($script, 'external');
}
else {
drupal_add_js($script);
}
}
//$output = theme('forena_web_report', $variables);
return $content;
}
public function output(&$output) {
$desc = Frx::Data()
->getContext('report');
if ($this->title && $desc['print'] !== 'block') {
drupal_set_title(filter_xss($this->title), PASS_THROUGH);
}
return FALSE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | function | Wrapper function for check output to default the right type. | |
DocumentTypeBase:: |
public | function | ||
DocumentTypeBase:: |
public | function | 5 | |
DocumentTypeBase:: |
public | function | ||
DrupalPage:: |
private | property | ||
DrupalPage:: |
public | function |
Overrides DocumentTypeBase:: |
|
DrupalPage:: |
public | function |
Overrides DocumentTypeBase:: |