You are here

class MiconMenuLinkManager in Micon 8

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

Modifies the language manager service.

Hierarchy

Expanded class hierarchy of MiconMenuLinkManager

File

micon_menu/src/MiconMenuLinkManager.php, line 10

Namespace

Drupal\micon_menu
View source
class MiconMenuLinkManager extends MenuLinkManager {

  /**
   * Performs extra processing on plugin definitions.
   *
   * By default we add defaults for the type to the definition. If a type has
   * additional processing logic, the logic can be added by replacing or
   * extending this method.
   *
   * @param array $definition
   *   The definition to be processed and modified by reference.
   * @param $plugin_id
   *   The ID of the plugin this definition is being used for.
   */
  protected function processDefinition(array &$definition, $plugin_id) {

    // Use the micon link class override.
    $this->defaults['class'] = 'Drupal\\micon_menu\\MiconMenuLinkDefault';
    parent::processDefinition($definition, $plugin_id);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MenuLinkManager::$defaults protected property Provides some default values for the definition of all menu link plugins.
MenuLinkManager::$discovery protected property The object that discovers plugins managed by this manager.
MenuLinkManager::$factory protected property The object that instantiates plugins managed by this manager.
MenuLinkManager::$moduleHandler protected property The module handler.
MenuLinkManager::$overrides protected property Service providing overrides for static links.
MenuLinkManager::$treeStorage protected property The menu link tree storage.
MenuLinkManager::addDefinition public function Adds a new menu link definition to the menu tree storage. Overrides MenuLinkManagerInterface::addDefinition
MenuLinkManager::countMenuLinks public function Counts the total number of menu links. Overrides MenuLinkManagerInterface::countMenuLinks
MenuLinkManager::createInstance public function Returns a pre-configured menu link plugin instance. Overrides FactoryInterface::createInstance
MenuLinkManager::deleteInstance protected function Deletes a specific instance.
MenuLinkManager::deleteLinksInMenu public function Deletes all links having a certain menu name. Overrides MenuLinkManagerInterface::deleteLinksInMenu
MenuLinkManager::getChildIds public function Loads all child link IDs of a given menu link, regardless of visibility. Overrides MenuLinkManagerInterface::getChildIds
MenuLinkManager::getDefinition public function Gets a specific plugin definition. Overrides DiscoveryInterface::getDefinition
MenuLinkManager::getDefinitions public function Gets the definition of all plugins for this type. Overrides DiscoveryInterface::getDefinitions
MenuLinkManager::getDiscovery protected function Gets the plugin discovery.
MenuLinkManager::getFactory protected function Gets the plugin factory.
MenuLinkManager::getInstance public function Gets a preconfigured instance of a plugin. Overrides MapperInterface::getInstance
MenuLinkManager::getParentIds public function Loads all parent link IDs of a given menu link. Overrides MenuLinkManagerInterface::getParentIds
MenuLinkManager::hasDefinition public function Indicates if a specific plugin definition exists. Overrides DiscoveryInterface::hasDefinition
MenuLinkManager::loadLinksByRoute public function Loads multiple plugin instances based on route. Overrides MenuLinkManagerInterface::loadLinksByRoute
MenuLinkManager::menuNameInUse public function Determines if any links use a given menu name. Overrides MenuLinkManagerInterface::menuNameInUse
MenuLinkManager::rebuild public function Triggers discovery, save, and cleanup of discovered links. Overrides MenuLinkManagerInterface::rebuild
MenuLinkManager::removeDefinition public function Removes a single link definition from the menu tree storage. Overrides MenuLinkManagerInterface::removeDefinition
MenuLinkManager::resetDefinitions public function Resets any local definition cache. Used for testing. Overrides MenuLinkManagerInterface::resetDefinitions
MenuLinkManager::resetInstance protected function Resets the menu link to its default settings.
MenuLinkManager::resetLink public function Resets the values for a menu link based on the values found by discovery. Overrides MenuLinkManagerInterface::resetLink
MenuLinkManager::updateDefinition public function Updates the values for a menu link definition in the menu tree storage. Overrides MenuLinkManagerInterface::updateDefinition
MenuLinkManager::__construct public function Constructs a \Drupal\Core\Menu\MenuLinkManager object.
MiconMenuLinkManager::processDefinition protected function Performs extra processing on plugin definitions. Overrides MenuLinkManager::processDefinition