public function Report::link in Forena Reports 7.5
Convert a relative link to appropriately rendered html return html A properly formatted anchor tag
1 call to Report::link()
- Report::format in src/
Report.php
File
- src/
Report.php, line 290 - Basic report provider. Controls the rendering of the report.
Class
Namespace
Drupal\forenaCode
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;
}