public function viewMenu($params)
 {
     $data = array();
     foreach ($GLOBALS['config']['Admin'] as $key => $value) {
         $tab = FoxFWFile::readJson($value);
         $data[$key] = FoxFWFile::readJson($value);
     }
     return $GLOBALS['Twig']->render(FoxFWKernel::getView('pattern_admin_menu'), array('menu' => $data));
 }
示例#2
0
 public static function ObjJsonFileBuild($tab, $file_output)
 {
     $ret = array();
     $url = _CACHE . $file_output;
     //si le fichier n'existe pas ont le construit
     if (!file_exists($url)) {
         foreach ($tab as $key => $value) {
             $data = FoxFWFile::readJson($value);
             foreach ($data as $_key => $_value) {
                 $ret[$_key] = $_value;
             }
         }
         //creation d'un fichier unique
         if ($GLOBALS['Config']['FoxFW']['cache']) {
             FoxFWFile::writeJson($url, $ret);
         }
         return $ret;
     }
     //lire le fichier car il existe
     return FoxFWFile::readJson($url);
 }