You are here

protected function PhpNoticesSensorPlugin::shortenFilename in Monitoring 8

Removes the root path from a filename.

Parameters

string $filename: Name of the file.

Return value

string The shortened filename.

2 calls to PhpNoticesSensorPlugin::shortenFilename()
PhpNoticesSensorPlugin::runSensor in src/Plugin/monitoring/SensorPlugin/PhpNoticesSensorPlugin.php
Runs the sensor, updating $sensor_result.
PhpNoticesSensorPlugin::verboseResultUnaggregated in src/Plugin/monitoring/SensorPlugin/PhpNoticesSensorPlugin.php
Adds unaggregated verbose output to the render array $output.

File

src/Plugin/monitoring/SensorPlugin/PhpNoticesSensorPlugin.php, line 107
Contains \Drupal\monitoring\Plugin\monitoring\SensorPlugin\PhpNoticesSensorPlugin.

Class

PhpNoticesSensorPlugin
Displays the most frequent PHP notices and errors.

Namespace

Drupal\monitoring\Plugin\monitoring\SensorPlugin

Code

protected function shortenFilename($filename) {
  return str_replace(DRUPAL_ROOT . '/', '', $filename);
}