loadByRoute example

if ($this->getDefinition($id, FALSE)) {
      return $this->treeStorage->getAllChildIds($id);
    }
    return NULL;
  }

  /** * {@inheritdoc} */
  public function loadLinksByRoute($route_name, array $route_parameters = []$menu_name = NULL) {
    $instances = [];
    $loaded = $this->treeStorage->loadByRoute($route_name$route_parameters$menu_name);
    foreach ($loaded as $plugin_id => $definition) {
      $instances[$plugin_id] = $this->createInstance($plugin_id);
    }
    return $instances;
  }

  /** * {@inheritdoc} */
  public function addDefinition($id, array $definition) {
    if ($this->treeStorage->load($id)) {
      
Home | Imprint | This part of the site doesn't use cookies.