Skip to content
Snippets Groups Projects
Commit 62463fd8 authored by Daniel Berthereau's avatar Daniel Berthereau
Browse files

Updated Generic module.

parent ca180609
No related branches found
No related tags found
No related merge requests found
......@@ -66,20 +66,20 @@ abstract class AbstractModule extends \Omeka\Module\AbstractModule
$translator->translate('This module requires the module "%s".'), // @translate
$this->dependency
);
throw new ModuleCannotInstallException($message);
throw new ModuleCannotInstallException((string) $message);
}
if (!$this->checkDependencies()) {
$message = new Message(
$translator->translate('This module requires modules "%s".'), // @translate
implode('", "', $this->dependencies)
);
throw new ModuleCannotInstallException($message);
throw new ModuleCannotInstallException((string) $message);
}
if (!$this->checkAllResourcesToInstall()) {
$message = new Message(
$translator->translate('This module has resources that connot be installed.') // @translate
);
throw new ModuleCannotInstallException($message);
throw new ModuleCannotInstallException((string) $message);
}
$this->execSqlFromFile($this->modulePath() . '/data/install/schema.sql');
$this
......@@ -184,6 +184,7 @@ abstract class AbstractModule extends \Omeka\Module\AbstractModule
$form = $services->get('FormElementManager')->get($formClass);
$form->init();
$form->setData($data);
$form->prepare();
return $renderer->formCollection($form);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment