You are here

class MiconMenuServiceProvider in Micon 8

Same name and namespace in other branches
  1. 2.x micon_menu/src/MiconMenuServiceProvider.php \Drupal\micon_menu\MiconMenuServiceProvider

Modifies the language manager service.

Hierarchy

Expanded class hierarchy of MiconMenuServiceProvider

File

micon_menu/src/MiconMenuServiceProvider.php, line 11

Namespace

Drupal\micon_menu
View 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

Namesort descending Modifiers Type Description Overrides
MiconMenuServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1