/**
  * @return \yii\db\ActiveQuery
  */
 public function getIdCarTrim()
 {
     return $this->hasOne(CarTrim::className(), ['id_car_trim' => 'id_car_trim']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCarTrims()
 {
     return $this->hasMany(CarTrim::className(), ['id_car_model' => 'id_car_model']);
 }
示例#3
0
 /**
  * Returns the array of possible user status values.
  *
  * @return array
  */
 public function getPassengerCarsTrimList()
 {
     $transport_operations = ArrayHelper::map(CarTrim::find()->where(['id_car_model' => $this->id_car_model])->all(), 'id_car_trim', 'name');
     $items = [];
     foreach ($transport_operations as $key => $value) {
         $items[$key] = Yii::t('transport', $value);
     }
     return $items;
 }