Example #1
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     $attributeLabels = parent::attributeLabels();
     $attributeLabels['variable_group_i18n_title'] = Yii::t('kalibao', 'variable:variable_group_id');
     $attributeLabels['variable_i18n_description'] = Yii::t('kalibao', 'model:description');
     return $attributeLabels;
 }
Example #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVariable()
 {
     return $this->hasOne(Variable::className(), ['id' => 'variable_id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVariables()
 {
     return $this->hasMany(Variable::className(), ['variable_group_id' => 'id']);
 }