public function createService(ServiceLocatorInterface $serviceManager)
 {
     $form = new PostForm();
     $form->setCategories($serviceManager->get('categories'));
     $form->setExpireDays($serviceManager->get('market-expire-days'));
     $form->setCaptchaOptions($serviceManager->get('market-captcha-options'));
     $form->setInputFilter($serviceManager->get('market-post-filter'));
     $form->buildForm();
     return $form;
 }
 public function createService(ServiceLocatorInterface $serviceManager)
 {
     $categories = $serviceManager->get('categories');
     $dateExpires = $serviceManager->get('date-expires');
     $cities = $serviceManager->get('area-codes-table');
     $postFormFilter = $serviceManager->get('market-post-filter');
     $postForm = new PostForm();
     $postForm->setCategories($categories);
     $postForm->setDateExpires($dateExpires);
     $postForm->setCities($cities->getCodesForFrom());
     $postForm->buildForm();
     $postForm->setInputFilter($postFormFilter);
     return $postForm;
 }