public static function returnOnlyKafedraFacult() { $id = Pracivnuku::getUserIdGroupa(); $fak_id = Group::getIdFacultWherePracivnuk($id); $model = new Kafedra(); $arr = $model->model()->findAll("fak_id='{$fak_id}'"); $arrayKafedra = array(); foreach ($arr as $array) { $arrayKafedra[$array->id] = $array->name; } return $arrayKafedra; }
public function getDataProviderCloseKafedra() { $criteria = new CDbCriteria(); $kaf_id = Kafedra::getIdKafedra(); $criteria->compare('t.kaf_id', $this->kaf_id, true); $criteria->condition = "data_paper!='0' and t.kaf_id='{$kaf_id}'"; $criteria->with = array("kaf", "fnav0", "nazva_dis0", "fkon0", "fkon20", "vikl10", "vikl20", "grupa0"); return new CActiveDataProvider("Vidomist", array('criteria' => $criteria)); }