/** * {@inheritdoc} */ public function getUrl() { $url = parent::getUrl(); if (!$this->resolved && $url !== null) { $this->setUrl(Macro::resolveMacros($url->getAbsoluteUrl(), $this->getObject())); $this->resolved = true; } return $url; }
/** * Return whether it's possible to merge this item with the given one * * @param NavigationItem $item * * @return bool */ public function conflictsWith(NavigationItem $item) { if (!$item instanceof $this) { return true; } if ($this->getUrl() === null || $item->getUrl() === null) { return false; } return !$this->getUrl()->matches($item->getUrl()); }