/** * @param array $configs * * @return array */ private function validateMenuItemConfig(array $configs) { // Keep it static to prevent to many objects if (!self::$configTree) { $configTree = new TreeBuilder(); $node = $configTree->root('item'); $configuration = new Configuration($this->getAlias()); $configuration->addItemConfig($node); self::$configTree = $configTree; } $processor = new Processor(); return $processor->process(self::$configTree->buildTree(), array($configs)); }