true, 'targetClass' => EducationType::class, 'targetAttribute' => ['education_type_ref_id' => 'id'], 'except' => [static::$SCENARIO_WITHOUT_EXISTS_CHECK] ], [ ['entrance_test_set_ref_id'], 'exist', 'skipOnError' => true, 'targetClass' => StoredSubjectSetReferenceType::class, 'targetAttribute' => ['entrance_test_set_ref_id' => 'id'], 'except' => [static::$SCENARIO_WITHOUT_EXISTS_CHECK] ], [ ['dictionary_competitive_group_entrance_test_id'], 'exist', 'skipOnError' => true, 'targetClass' => DictionaryCompetitiveGroupEntranceTest::class, 'targetAttribute' => ['dictionary_competitive_group_entrance_test_id' => 'id'], 'except' => [static::$SCENARIO_WITHOUT_EXISTS_CHECK] ], [ ['profile_ref_id'], 'exist', 'skipOnError' => true, 'targetClass' => StoredProfileReferenceType::class, 'targetAttribute' => ['profile_ref_id' => 'id'], 'except' => [static::$SCENARIO_WITHOUT_EXISTS_CHECK] ], ]; } public function attributeLabels() { return [ 'id' => 'ID', 'dictionary_competitive_group_entrance_test_id' => 'Competitive Group Entrance Test ID', 'education_type_ref_id' => 'Education Type Ref ID', 'entrance_test_set_ref_id' => 'Entrance Test Set Ref ID', 'updated_at' => 'Updated At', 'created_at' => 'Created At', ]; } public function getCgetEntranceTests() { $tn = CgetEntranceTest::tableName(); return $this->getRawEntranceTests() ->andWhere(["{$tn}.archive" => false]) ->orderBy('cget_entrance_test.priority'); } public function getRawEntranceTests() { return $this->hasMany(CgetEntranceTest::class, ['cget_entrance_test_set_id' => 'id']); } public function getCgetConditionTypes() { $tn = CgetConditionType::tableName(); return $this->getRawConditionTypes() ->andWhere(["{$tn}.archive" => false]); } public function getRawConditionTypes() { return $this->hasMany(CgetConditionType::class, ['cget_entrance_test_set_id' => 'id']); } public function getCgetRequiredPreferences() { $tn = CgetRequiredPreference::tableName(); return $this->getRawEntranceTests() ->andOnCondition(["{$tn}.archive" => false]); } public function getRawCgetRequiredPreferences() { return $this->hasMany(CgetRequiredPreference::class, ['cget_entrance_test_set_id' => 'id']); } public function getDictionaryCompetitiveGroupEntranceTest() { return $this->hasOne(DictionaryCompetitiveGroupEntranceTest::class, ['id' => 'dictionary_competitive_group_entrance_test_id']); } public function getEducationTypeRef() { return $this->hasOne(EducationType::class, ['id' => 'education_type_ref_id']); } public function getEntranceTestSetRef() { return $this->hasOne(StoredSubjectSetReferenceType::class, ['id' => 'entrance_test_set_ref_id']); } public function getProfileRef() { return $this->hasOne(StoredProfileReferenceType::class, ['id' => 'profile_ref_id']); } public function getAllowMultiplyAlternativeSubjects(): bool { return ArrayHelper::getValue($this, 'dictionaryCompetitiveGroupEntranceTest.allow_multiply_alternative_subjects', false); } }