public function addItem($linkName, $target = null)
    {
        if (is_array($target)) {
            $target = isset($target['params']) ? $this->urlGen->generate(
                $target['route'],
                $target['params']
            ) : $this->urlGen->generate($target['route']);
        }
        $this->items[] = ["linkName" => $linkName, "target" => $target];
    }