public function createService(ServiceLocatorInterface $controllerManager) { $serviceManager = $controllerManager->getServiceLocator(); $listingsTable = $serviceManager->get('listings-table'); $indexController = new IndexController(); $indexController->setListingsTable($listingsTable); return $indexController; }
public function createService(ServiceLocatorInterface $controllerManager) { $allServices = $controllerManager->getServiceLocator(); //$categories = $allServices->get('categories'); $indexController = new IndexController(); //$indexController->setCategories($categories); //$indexController->setIndexForm($allServices->get('market-post-form')); $indexController->setListingsTable($allServices->get('listings-table')); return $indexController; }