mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
NavigationItem: Provide a more sophisticated conflict detection
refs #5600
This commit is contained in:
parent
0feaec7af1
commit
bf2cb9ab7e
@ -596,11 +596,15 @@ class NavigationItem implements IteratorAggregate
|
|||||||
*/
|
*/
|
||||||
public function conflictsWith(NavigationItem $item)
|
public function conflictsWith(NavigationItem $item)
|
||||||
{
|
{
|
||||||
|
if (! $item instanceof $this) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->getUrl() === null || $item->getUrl() === null) {
|
if ($this->getUrl() === null || $item->getUrl() === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getUrl() !== $item->getUrl();
|
return !$this->getUrl()->matches($item->getUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user