コード例 #1
0
ファイル: OrderRecord.php プロジェクト: lebeddima/booking2
 /**
  * @return array
  */
 public function attributeLabels()
 {
     return parent::attributeLabels() + ['first_name' => 'Имя', 'second_name' => 'Фамилия', 'email' => 'Email', 'country_id' => 'Страна', 'fullName' => 'Полное имя', 'tour.name' => 'Название тура', 'tour.hotel.name' => 'Название отеля', 'tour.hotel.country.name' => 'Название страны'];
 }
コード例 #2
0
ファイル: CountryRecord.php プロジェクト: lebeddima/booking2
 /**
  * @return array
  */
 public function attributeLabels()
 {
     return parent::attributeLabels() + ['name' => 'Название'];
 }
コード例 #3
0
ファイル: TourRecord.php プロジェクト: lebeddima/booking2
 /**
  * @param bool $insert
  * @return bool
  */
 public function beforeSave($insert)
 {
     if ($this->scenario === 'update') {
         $flyAt = $this->getOldAttribute('fly_at');
         $this->fly_at = $this->fly_at !== '' ? \Yii::$app->formatter->asTimestamp($this->fly_at) : $flyAt;
     } else {
         $this->fly_at = \Yii::$app->formatter->asTimestamp($this->fly_at);
     }
     return parent::beforeSave($insert);
 }