예제 #1
0
파일: Base.php 프로젝트: sebbie42/casebox
 /**
  * get display columns for last node in active path
  * @return array
  */
 public function getDC()
 {
     $rez = array();
     $p =& $this->params;
     $ip =& $p['inputParams'];
     if (!empty($ip['query'])) {
         $dc = Config::get('search_DC');
         //its a config reference, get it from config
         if (!empty($dc) && is_scalar($dc)) {
             $dc = Config::getDCConfig($dc);
         }
         $rez['data'] = $dc;
     }
     if (empty($rez['data'])) {
         $path = Cache::get('current_path');
         if (!empty($path)) {
             $node = $path[sizeof($path) - 1];
             $rez = $node->getDC();
         }
     }
     if (!empty($ip['query'])) {
         $rez['from'] = 'search';
     }
     //apply properties for default casebox columns
     if (!empty($rez['data'])) {
         $defaults = Config::getDefaultGridColumnConfigs();
         foreach ($rez['data'] as $k => $v) {
             if (!empty($defaults[$k])) {
                 $rez['data'][$k] = array_merge($defaults[$k], $v);
             }
         }
     }
     return $rez;
 }
예제 #2
0
파일: Base.php 프로젝트: youprofit/casebox
 /**
  * get displaycolumns config
  * @return json
  */
 public function getDC()
 {
     $rez = $this->getNodeParam('DC');
     //its a config reference, get it from config
     if (!empty($rez['data']) && is_scalar($rez['data'])) {
         $rez['data'] = \CB\Config::getDCConfig($rez['data']);
     }
     return $rez;
 }