Beispiel #1
0
 public static function getLookupURL($field_name)
 {
     $c = static::getModel();
     if ($c::ISLOOKUPFIELD($field_name)) {
         $tbrelation = $c::getTableRelation($field_name);
         $clkp = $c::getLookupPage($field_name);
         if (!Qdmvc_Helper::isNullOrEmpty($tbrelation)) {
             $tbfilter = $tbrelation['TableFilter'];
             $filter_arr = array();
             if ($clkp === '') {
                 $df_lk_page = static::getDefaultLookupPage($tbrelation['Table']);
             } else {
                 $df_lk_page = $clkp;
             }
             $getfield = $tbrelation['Field'];
             foreach ($tbfilter as $item) {
                 $filter_arr[$item['Field']] = $item['Value'];
             }
             return Qdmvc_Helper::getLookupPath($df_lk_page, $field_name, $filter_arr, $getfield);
         }
     }
     return '';
 }