[FLOW3-general] TYPO3.Form using RedirectFinisher with post

Robin Lehrmann role at vkf-renzel.de
Mon Aug 13 11:29:46 CEST 2012


> Could you provide more details, please?
> What kind of php syntax error do you get?

I sets the propertys like:

     /**
      * @FLOW3\Inject
      * @var \VKF\Info\Domain\Repository\ArticleRepository
      */
     protected $articleRepository;

I use $this->articleRepository not $articleRepository.
Why I cant use $this-> ?

$form->createFinisher('TYPO3.Form:Closure')->setOption('closure',
             function(\TYPO3\Form\Core\Model\FinisherContext $context) use
                 ($this->articleRepository) {
                     $formValues = $context->getFormValues();
                     $article = new \VKF\Info\Domain\Model\Article();
                     $article->setName($formValues['name'])
->setDescription($formValues['description'])
->setArticleGroup($this->articleGroupRepository->findByIdentifier($formValues['articleGroup']))
->setBranch($this->branchRepository->findByIdentifier($formValues['branch']))
->setContact($this->contactRepository->findByIdentifier($formValues['contact']))
->setCustomer($this->customerRepository->findByIdentifier($formValues['customer']))
->setDepartment($this->departmentRepository->findByIdentifier($formValues['department']));
                     $this->articleRepository->add($article);
                 });


More information about the FLOW3-general mailing list