Exemplo n.º 1
0
 /**
  * Parses the 'columns' preference.
  *
  * @return array  The list of columns to be displayed.
  */
 public static function getColumns($backend)
 {
     if (!isset(self::$_columns)) {
         self::$_columns = array();
         $sources = json_decode($GLOBALS['prefs']->getValue('columns'));
         foreach ($sources as $source) {
             self::$_columns[array_shift($source)] = $source;
         }
     }
     if (empty(self::$_columns[$backend])) {
         $info = Gollem_Auth::getBackend($backend);
         self::$_columns[$backend] = $info['attributes'];
     }
     return self::$_columns[$backend];
 }