255], [['field_id'], 'exist', 'skipOnError' => true, 'targetClass' => AdditionalFields::class, 'targetAttribute' => ['field_id' => 'id']], [['company_id'], 'exist', 'skipOnError' => true, 'targetClass' => Company::class, 'targetAttribute' => ['company_id' => 'id']], [['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::class, 'targetAttribute' => ['project_id' => 'id']], [['card_id'], 'exist', 'skipOnError' => true, 'targetClass' => UserCard::class, 'targetAttribute' => ['card_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'card_id' => 'Card ID', 'field_id' => 'Field ID', 'value' => 'Value', 'project_id' => 'Project ID', 'company_id' => 'Company ID', ]; } /** * @return \yii\db\ActiveQuery */ public function getField() { return $this->hasOne(AdditionalFields::class, ['id' => 'field_id']); } /** * @return \yii\db\ActiveQuery */ public function getCompany() { return $this->hasOne(Company::className(), ['id' => 'company_id']); } /** * @return \yii\db\ActiveQuery */ public function getProject() { return $this->hasOne(Project::class, ['id' => 'project_id']); } /** * @return \yii\db\ActiveQuery */ public function getCard() { return $this->hasOne(UserCard::class, ['id' => 'card_id']); } }