class MiconMenuServiceProvider in Micon 8
Same name and namespace in other branches
- 2.x micon_menu/src/MiconMenuServiceProvider.php \Drupal\micon_menu\MiconMenuServiceProvider
Modifies the language manager service.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\micon_menu\MiconMenuServiceProvider
Expanded class hierarchy of MiconMenuServiceProvider
File
- micon_menu/
src/ MiconMenuServiceProvider.php, line 11
Namespace
Drupal\micon_menuView source
class MiconMenuServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
// Overrides plugin.manager.menu.link class so that we can save the icon
// to the menu item options.
$definition = $container
->getDefinition('plugin.manager.menu.link');
$definition
->setClass('Drupal\\micon_menu\\MiconMenuLinkManager');
// Overrides menu_link.static.overrides service so that we can save
// options statically.
$definition = $container
->getDefinition('menu_link.static.overrides');
$definition
->setClass('Drupal\\micon_menu\\MiconStaticMenuLinkOverrides');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MiconMenuServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |