> */ public function getAllTemplates(): array { return TemplateMapper::getAllTemplates(); } /** * Get predefined form template by ID * * @param string $templateId * @return array|null */ public function getTemplateById(string $templateId): ?array { return TemplateMapper::getTemplate($templateId); } /** * Get form data from template by ID * * @param string $templateId * @return array * @throws InvalidArgumentException */ public function getFormDataFromTemplate(string $templateId): array { $template = $this->getTemplateById($templateId); if (!$template) { throw new InvalidArgumentException( BackendStrings::getTemplateStrings()['template_not_found'] ); } return $template['form_data']; } /** * Get template categories * * @return array> */ public function getTemplateCategories(): array { return [ // 'basic' => [ // 'name' => '', // 'description' => '' // ] ]; } }