load($params); if (!$form->validate()){ return $form; } $projects = Project::find()->where(['company_id' => $form->company_id])->all(); $personals = []; /** @var Project $project */ foreach ($projects as $project) { $personals += CompanyPersonnelMapper::mapAll($project->projectUsers); } return $personals; } }