Ejemplo n.º 1
0
 /**
  * Returns localized key/value array of visible reference types
  *
  * @return array
  */
 public function kvListOfVisible()
 {
     $models = ReferenceType::find()->select(['id', 'typeName'])->where('visible = 1')->all();
     $typeList = [];
     foreach ($models as $model) {
         $typeList[$model->id] = Yii::t('inlitteris', $model->typeName);
     }
     return $typeList;
 }
Ejemplo n.º 2
0
 /**
  * Returns ReferenceType of Reference
  *
  * @return \yii\db\ActiveQuery
  */
 public function getReferenceType()
 {
     return $this->hasOne(ReferenceType::className(), ['id' => 'referenceTypeId']);
 }