class IdeLinkGenerator in Devel 8.2
Same name and namespace in other branches
- 8.3 webprofiler/src/Helper/IdeLinkGenerator.php \Drupal\webprofiler\Helper\IdeLinkGenerator
- 8 webprofiler/src/Helper/IdeLinkGenerator.php \Drupal\webprofiler\Helper\IdeLinkGenerator
- 4.x webprofiler/src/Helper/IdeLinkGenerator.php \Drupal\webprofiler\Helper\IdeLinkGenerator
Class IdeLinkGenerator.
Hierarchy
- class \Drupal\webprofiler\Helper\IdeLinkGenerator implements IdeLinkGeneratorInterface
Expanded class hierarchy of IdeLinkGenerator
1 string reference to 'IdeLinkGenerator'
- webprofiler.services.yml in webprofiler/
webprofiler.services.yml - webprofiler/webprofiler.services.yml
1 service uses IdeLinkGenerator
File
- webprofiler/
src/ Helper/ IdeLinkGenerator.php, line 11
Namespace
Drupal\webprofiler\HelperView source
class IdeLinkGenerator implements IdeLinkGeneratorInterface {
/**
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
private $config_factory;
/**
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
*/
public function __construct(ConfigFactoryInterface $config_factory) {
$this->config_factory = $config_factory;
}
/**
* {@inheritdoc}
*/
public function generateLink($file, $line) {
$ide_link = $this->config_factory
->get('webprofiler.config')
->get('ide_link');
$ide_link_remote = $this->config_factory
->get('webprofiler.config')
->get('ide_link_remote');
$ide_link_local = $this->config_factory
->get('webprofiler.config')
->get('ide_link_local');
$file = str_replace($ide_link_remote, $ide_link_local, $file);
return new FormattableMarkup($ide_link, [
'@file' => $file,
'@line' => $line,
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
IdeLinkGenerator:: |
private | property | ||
IdeLinkGenerator:: |
public | function |
Overrides IdeLinkGeneratorInterface:: |
|
IdeLinkGenerator:: |
public | function |