function xhprof_xhprof_render_link in XHProf 6
Same name and namespace in other branches
- 7 xhprof.inc \xhprof_xhprof_render_link()
Parameters
html-str $content the text/image/innerhtml/whatever for the link:
raw-str $href:
raw-str $class:
raw-str $id:
raw-str $title:
raw-str $target:
raw-str $onclick:
raw-str $style:
raw-str $access:
raw-str $onmouseover:
raw-str $onmouseout:
raw-str $onmousedown:
raw-str $dir:
raw-str $rel:
3 calls to xhprof_xhprof_render_link()
- xhprof_full_report in ./
xhprof.inc - Generates a tabular report for all functions. This is the top-level report.
- xhprof_print_flat_data in ./
xhprof.inc - Print non-hierarchical (flat-view) of profiler data.
- xhprof_profiler_report in ./
xhprof.inc - Analyze raw data & generate the profiler report (common for both single run mode and diff mode).
File
- ./
xhprof.inc, line 305
Code
function xhprof_xhprof_render_link($content, $href, $class = '', $id = '', $title = '', $target = '', $onclick = '', $style = '', $access = '', $onmouseover = '', $onmouseout = '', $onmousedown = '') {
if (!$content) {
return '';
}
if ($href) {
$link = '<a href="' . $href . '"';
}
else {
$link = '<span';
}
if ($class) {
$link .= ' class="' . $class . '"';
}
if ($id) {
$link .= ' id="' . $id . '"';
}
if ($title) {
$link .= ' title="' . $title . '"';
}
if ($target) {
$link .= ' target="' . $target . '"';
}
if ($onclick && $href) {
$link .= ' onclick="' . $onclick . '"';
}
if ($style && $href) {
$link .= ' style="' . $style . '"';
}
if ($access && $href) {
$link .= ' accesskey="' . $access . '"';
}
if ($onmouseover) {
$link .= ' onmouseover="' . $onmouseover . '"';
}
if ($onmouseout) {
$link .= ' onmouseout="' . $onmouseout . '"';
}
if ($onmousedown) {
$link .= ' onmousedown="' . $onmousedown . '"';
}
$link .= '>';
$link .= $content;
if ($href) {
$link .= '</a>';
}
else {
$link .= '</span>';
}
return $link;
}