* refactored with entity service, so the code can be tested

This commit is contained in:
Danyi Dávid
2016-08-01 17:30:43 +02:00
parent f3939bbd13
commit 2de0bf8add
35 changed files with 359 additions and 215 deletions

View File

@@ -2,16 +2,16 @@
namespace App\Action\Article;
use App\Action\AbstractFactory;
use App\Action\Article\ListAction;
use App\Service\Article\ArticleService;
use Interop\Container\ContainerInterface;
class ListFactory extends AbstractFactory
class ListFactory
{
public function __invoke(ContainerInterface $container)
{
$em = $this->getEntityManager($container);
return new ListAction($em);
$entityService = $container->get(ArticleService::class);
return new ListAction($entityService);
}
}
}