function setParent($parent) { if ($parent != null && is_object($parent) && $parent instanceof AbstractNavEntry) { $this->parent = $parent; } }