MenuLinkContent::getUrlObject

public MenuLinkContent::getUrlObject()

Gets the url object pointing to the URL of the menu link content entity.

Return value

\Drupal\Core\Url A Url object instance.

Overrides MenuLinkContentInterface::getUrlObject

File

core/modules/menu_link_content/src/Entity/MenuLinkContent.php, line 77

Class

MenuLinkContent
Defines the menu link content entity class.

Namespace

Drupal\menu_link_content\Entity

Code

public function getUrlObject() {
  return $this->link->first()->getUrl();
}
doc_Drupal
2016-10-29 09:26:32
Comments
Leave a Comment

Please login to continue.