mappers = $mappers; } /** * Get Search Engine dynamic templates. * * @return array * @throws InvalidArgumentException */ public function getTemplates(): array { $templates = []; foreach ($this->mappers as $mapper) { if (!$mapper instanceof MapperInterface) { throw new InvalidArgumentException( __('Mapper %1 should implement %2', get_class($mapper), MapperInterface::class) ); } $templates = $mapper->processTemplates($templates); } return $templates; } }