class BibciteRisServiceProvider in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_ris/src/BibciteRisServiceProvider.php \Drupal\bibcite_ris\BibciteRisServiceProvider
Adds RIS as known format.
Hierarchy
- class \Drupal\bibcite_ris\BibciteRisServiceProvider implements ServiceModifierInterface
Expanded class hierarchy of BibciteRisServiceProvider
File
- modules/
bibcite_ris/ src/ BibciteRisServiceProvider.php, line 11
Namespace
Drupal\bibcite_risView source
class BibciteRisServiceProvider implements ServiceModifierInterface {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
if ($container
->has('http_middleware.negotiation')) {
$definition = $container
->getDefinition('http_middleware.negotiation');
if (is_a($definition
->getClass(), '\\Drupal\\Core\\StackMiddleware\\NegotiationMiddleware', TRUE)) {
$definition
->addMethodCall('registerFormat', [
'ris',
[
'text/plain',
'application/x-research-info-systems',
],
]);
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BibciteRisServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceModifierInterface:: |