Ejemplo n.º 1
0
 /**
  * @param boolean $includeRegion Include or not Buryatia in resulting set
  * @return EntityQuery
  */
 public static function findBurRajon($includeRegion = false)
 {
     $burRegionId = ZnachenieIdentifikatora::get()->regionBuryatia;
     $where = ['and', ['roditel_urovnya_regiona' => $burRegionId], ['or', ['uroven' => UrovenAdresnogoObjekta::asSql(UrovenAdresnogoObjekta::RAJON)], ['uroven' => UrovenAdresnogoObjekta::asSql(UrovenAdresnogoObjekta::GOROD)]]];
     $query = static::find()->commonOnly()->where($where);
     return $includeRegion ? $query->orWhere(['id' => $burRegionId]) : $query;
 }
Ejemplo n.º 2
0
 public function setDefaultsIfEmpty()
 {
     if (array_filter($this->getAttributes())) {
         return;
     }
     $ids = ZnachenieIdentifikatora::get();
     $this->rabotaOrgAdres = $ids->gorodUlanUde;
     $this->rabotaOrgVedomstvo = $ids->vedomstvoMinobrnauki;
     $this->rabotaDolzhnostId = $ids->dolzhnostUchitel;
     $this->rabotaEtapObrazovaniya = EtapObrazovaniya::OSNOVNOE_OBSCHEE_OBRAZOVANIE;
 }
Ejemplo n.º 3
0
 public function getZnachenieIdentifikatoraDolzhnostiUchitelRel()
 {
     return $this->hasOne(ZnachenieIdentifikatora::className(), ['dolzhnost_uchitel' => 'id'])->inverseOf('dolzhnostUchitelRel');
 }