getList($this->getId(), $need_deleted); foreach ($faculties as $faculty) { $response = $faculty; if ($simplified) $response = $response->getSimplified(); yield $response; } } }