public function MicrositeMenuItem::getUrlObject in Entity Reference Hierarchy 8.2
Same name and namespace in other branches
- 3.x modules/entity_hierarchy_microsite/src/Plugin/Menu/MicrositeMenuItem.php \Drupal\entity_hierarchy_microsite\Plugin\Menu\MicrositeMenuItem::getUrlObject()
Returns a URL object containing either the external path or route.
Parameters
bool $title_attribute: (optional) If TRUE, add the link description as the title attribute if the description is not empty.
Return value
\Drupal\Core\Url A URL object containing either the external path or route.
Overrides MenuLinkBase::getUrlObject
File
- modules/
entity_hierarchy_microsite/ src/ Plugin/ Menu/ MicrositeMenuItem.php, line 210
Class
- MicrositeMenuItem
- Defines a class for a menu item based on hierarchy.
Namespace
Drupal\entity_hierarchy_microsite\Plugin\MenuCode
public function getUrlObject($title_attribute = TRUE) {
$url = parent::getUrlObject($title_attribute);
$override_entity = $this
->getOverrideEntity();
$this->moduleHandler
->alter('entity_hierarchy_microsite_menu_item_url', $url, $override_entity, $this);
return $url;
}