/**
  *
  * @param string $position
  * @param mixed $items
  * @param string $as
  * @return string Rendered string
  * @author Marc Neuhaus <*****@*****.**>
  * @api
  */
 public function render($position, $items = false, $as = "navBar")
 {
     if ($items == false) {
         #			$items = $this->configurationManager->getConfiguration(\TYPO3\FLOW3\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $namespace);
         $items = \Admin\Core\API::getNagigationItems($position);
     }
     $content = "";
     foreach ($items as $name => $arguments) {
         $arguments["arguments"] = array_merge($this->defaults, $arguments);
         $arguments = array_merge($this->defaults, $arguments);
         $variables = array("link" => $this->getLink($arguments["action"], $arguments["arguments"], $arguments["controller"], $arguments["package"], $arguments["subpackage"]), "name" => $name, "hasChildren" => false, "arguments" => $arguments, "children" => array());
         if (count($arguments["children"]) > 0) {
             $variables["children"] = $this->render($position, $arguments["children"], $as);
             $variables["hasChildren"] = true;
         }
         $this->templateVariableContainer->add($as, $variables);
         $content .= $this->renderChildren();
         $this->templateVariableContainer->remove($as);
     }
     return $content;
 }