prepareLink example

$query = $this->connection->select($this->table, NULL, $this->options);
    $query->fields($this->table, $this->definitionFields());
    foreach ($properties as $name => $value) {
      if (!in_array($name$this->definitionFields(), TRUE)) {
        $fields = implode(', ', $this->definitionFields());
        throw new \InvalidArgumentException("An invalid property name, $name was specified. Allowed property names are: $fields.");
      }
      $query->condition($name$value);
    }
    $loaded = $this->safeExecuteSelect($query)->fetchAllAssoc('id', \PDO::FETCH_ASSOC);
    foreach ($loaded as $id => $link) {
      $loaded[$id] = $this->prepareLink($link);
    }
    return $loaded;
  }

  /** * {@inheritdoc} */
  public function loadByRoute($route_name, array $route_parameters = []$menu_name = NULL) {
    // Sort the route parameters so that the query string will be the same.     asort($route_parameters);
    // Since this will be urlencoded, it's safe to store and match against a
Home | Imprint | This part of the site doesn't use cookies.