public function FrxReport::link in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 FrxReport.inc \FrxReport::link()
Convert a relative link to appropriately rendered html return html A properly formatted anchor tag
1 call to FrxReport::link()
File
- ./
FrxReport.inc, line 349 - Basic report provider. Controls the rendering of the report.
Class
Code
public function link($title, $path, $options = array()) {
// check if we have
$l = '';
if (strpos($path, ':') === FALSE) {
switch ($this->link_mode) {
case 'remove':
$l = '';
break;
case 'no-link':
case 'text':
$valid = drupal_valid_path($path, FALSE);
$l = $valid ? l($title, $path, $options) : $title;
break;
case 'disable':
$valid = drupal_valid_path($path, FALSE);
if (!$valid) {
$options['attributes']['class'][] = 'disabled';
$l = '<a ' . drupal_attributes($options['attributes']) . '>' . check_plain($title) . '</a>';
}
else {
$l = l($title, $path, $options);
}
break;
default:
$l = l($title, $path, $options);
}
}
else {
$l = l($title, $path, $options);
}
return $l;
}