/** * Sync the current name wih the sidebar items. * * @return self */ private function syncCurrentName() { $this->items->setCurrent($this->currentName); return $this; }
/** * Set the current name. * * @param string $currentName * * @return self */ public function setCurrent($currentName) { $this->children->setCurrent($currentName); $this->active = $this->name === $currentName || $this->children->hasActiveItem(); return $this; }