255], [['profile_id'], 'exist', 'skipOnError' => true, 'targetClass' => Profile::class, 'targetAttribute' => ['profile_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'profile_id' => 'Profile ID', 'title' => 'Title', 'text' => 'Text', 'language' => 'Language', ]; } public function extraFields() { return ['text[]', 'title[]']; } /** * Gets query for [[Profile]]. * * @return \yii\db\ActiveQuery */ public function getProfile() { return $this->hasOne(Profile::class, ['id' => 'profile_id']); } public static function getLanguages() { return [self::LANG_RU, self::LANG_IT, self::LANG_FR, self::LANG_EN, self::LANG_ES]; } }