public function collect() { $templates = $this->templates; return ['nb_templates' => count($templates), 'templates' => $templates]; }