Refactor && Typo && Use plain objects as function parameters instead of ids

This commit is contained in:
Nicolas Le Goff
2014-02-06 12:42:47 +01:00
parent c98fe4c23d
commit 2ec4ffdbcc
39 changed files with 909 additions and 692 deletions

View File

@@ -72,16 +72,15 @@ class PhraseaRegisterForm extends AbstractType
$builder->add('provider-id', 'hidden');
$choices = [];
$baseIds = [];
$choices = $baseIds = [];
foreach ($this->app['manipulator.registration']->getRegistrationSummary() as $baseInfo) {
foreach ($this->app['registration.manager']->getRegistrationSummary() as $baseInfo) {
$dbName = $baseInfo['config']['db-name'];
foreach ($baseInfo['config']['collections'] as $baseId => $collInfo) {
if (false === $collInfo['can-register']) {
continue;
}
$choices[$dbName][$baseId] = \phrasea::bas_labels($baseId, $this->app);
$choices[$dbName][$baseId] = $collInfo['coll-name'];
$baseIds[] = $baseId;
}
}