hotfix : restrict other "in db" modules to be download-able

currently, list module that can be downloaded comes from ApplicationConfig which should be avoided and should use in db modules instead.
I don't see any problem

--
Alejandro Celaya Alastrué
http://www.alejandrocelaya.com
El 27/12/2014 03:26, "Abdul Malik Ikhsan" <notifications@github.com>
escribió:

> In
> module/Application/src/Application/Factory/Controller/DownloadControllerFactory.php
> <https://github.com/sitrunlab/LearnZF2/pull/90#discussion-diff-22290687>:
>
> > @@ -14,7 +14,13 @@ class DownloadControllerFactory implements FactoryInterface
> >      public function createService(ServiceLocatorInterface $serviceLocator)
> >      {
> >          $services = $serviceLocator->getServiceLocator();
> > +        $moduleList = [];
> > +        foreach ($services->get('Doctrine\ORM\EntityManager')
> > +                               ->getRepository('Application\Entity\ModuleList')
> > +                               ->findAll() as $module) {
> > +            $moduleList[] = $module->getModuleName();
> > +        }
>
> is loop in factory ok ? or create new service just to collect array of
> moduleName ? or use loop in controller instead ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/sitrunlab/LearnZF2/pull/90/files#r22290687>.
>