private function XHProfController::abbrClass in XHProf 8
Parameters
string $class:
Return value
\Drupal\Component\Render\FormattableMarkup
File
- src/
Controller/ XHProfController.php, line 220
Class
- XHProfController
- Displays profiling results.
Namespace
Drupal\xhprof\ControllerCode
private function abbrClass($class) {
$parts = explode('\\', $class);
$short = array_pop($parts);
if (strlen($short) >= 40) {
$short = substr($short, 0, 30) . " … " . substr($short, -5);
}
return new FormattableMarkup('<abbr title="@class">@short</abbr>', [
'@class' => $class,
'@short' => $short,
]);
}