public function FrxBean::view in Forena Reports 7.3
Same name and namespace in other branches
- 7.5 bean/FrxBean.inc \FrxBean::view()
- 7.4 bean/FrxBean.inc \FrxBean::view()
Return the block content.
Parameters
$bean: The bean object being viewed.
$content: The default content array created by Entity API. This will include any fields attached to the entity.
$view_mode: The view mode passed into $entity->view().
Return value
Return a renderable content array.
Overrides BeanPlugin::view
File
- bean/
FrxBean.inc, line 54 - bean plugin for with a forena report
Class
- FrxBean
- @file bean plugin for with a forena report
Code
public function view($bean, $content, $view_mode = 'default', $langcode = NULL) {
$parms = array();
parse_str($bean->settings['parms'], $parms);
if (!$parms) {
$parms = array();
}
$report = $bean->settings['selected_report'];
if ($bean->settings['include_url_parameters']) {
$query = $_GET;
unset($query['q']);
$parms = array_merge($parms, $query);
if (Frx::Data()
->contextExists('parm')) {
$parms = array_merge($parms, Frx::Data()
->getContext('parm'));
}
}
$output = forena_report_include($report, $parms);
return array(
'content' => array(
'#markup' => $output,
),
);
}