/** * @param CurriculumInventoryReportInterface $report * @param Router $router */ public function __construct(CurriculumInventoryReportInterface $report, Router $router) { $this->absoluteFileUri = $router->generate('ilios_core_downloadcurriculuminventoryreport', ['token' => $report->getToken()], UrlGenerator::ABSOLUTE_URL); $this->id = $report->getId(); $this->name = $report->getName(); $this->description = $report->getDescription(); $this->year = $report->getYear(); $this->startDate = $report->getStartDate(); $this->endDate = $report->getEndDate(); $this->export = (string) $report->getExport(); $this->sequence = (string) $report->getSequence(); $this->program = (string) $report->getProgram(); $sequenceBlockIds = $report->getSequenceBlocks()->map(function (CurriculumInventorySequenceBlockInterface $block) { return (string) $block; }); $this->sequenceBlocks = $sequenceBlockIds->toArray(); $academicLevelIds = $report->getAcademicLevels()->map(function (CurriculumInventoryAcademicLevelInterface $level) { return (string) $level; }); $this->academicLevels = $academicLevelIds->toArray(); }