/**
* {@inheritdoc}
*/
public function generate()
{
foreach ($this->elementStorage->getNamespaces() as $name => $namespace) {
$template = $this->templateFactory->createNamedForElement(TemplateFactory::ELEMENT_NAMESPACE, $name);
$template = $this->namespaceAndPackageLoader->loadTemplateWithNamespace($template, $name, $namespace);
$template->save();
$this->eventDispatcher->dispatch(new GenerateProgressEvent(GeneratorEvents::ON_GENERATE_PROGRESS));
}
}