Пример #1
0
 public static function getDesc($id)
 {
     $tmp = OpenFormatType::find()->where(array('id' => $id, 'type' => 'INI'))->one();
     if ($tmp) {
         return $tmp->description;
     } else {
         return '';
     }
 }
Пример #2
0
 public function docsTable()
 {
     $array = array();
     if (isset($this->docArr)) {
         foreach ($this->docArr as $key => $value) {
             $tmp = OpenFormatType::findOne(array('id' => $key, 'type' => 'INI'));
             //echo OpenFormatType::findOne($key)->description;
             if ($tmp) {
                 print_r($tmp);
             }
             $array[] = array('id' => $key, 'name' => Doctype::getOpenType($key), 'count' => $value, 'sum' => $this->docSumArr[$key]);
         }
     }
     return new \yii\data\ArrayDataProvider(array('allModels' => $array, 'pagination' => array('pageSize' => 100)));
 }