You are here

public function Link::getRouteParameters in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Entity/Link.php \Drupal\colossal_menu\Entity\Link::getRouteParameters()

Returns the route parameters, if available.

Return value

array An array of parameter names and values.

Overrides MenuLinkInterface::getRouteParameters

File

src/Entity/Link.php, line 415

Class

Link
Defines the Link entity.

Namespace

Drupal\colossal_menu\Entity

Code

public function getRouteParameters() {
  if ($this
    ->getUrlObject()
    ->isRouted()) {
    return $this
      ->getUrlObject()
      ->getRouteParameters();
  }
  return [];
}