public function process(Request $request, FormInterface $form)
    {
        if ($request->isMethod('POST')) {
            $form->submit($request);
            if ($form->isValid()) {
                /** @var TextInterface $text */
                $text = $form->getData();
                foreach ($text->getTranslations() as $translation) {
                    $translation->setText($text);
                }
                $this->textManager->add($form->getData());

                return true;
            }
        }

        return false;
    }
public function process(Request $request, FormInterface $form)
    {
        if ($request->isMethod('POST')) {
            $form->submit($request);
            if ($form->isValid()) {
                /** @var TextInterface $text */
                $text = $form->getData();
                foreach ($text->getTranslations() as $translation) {
                    $translation->setText($text);
                }
                $this->textManager->add($form->getData());

                return true;
            }
        }

        return false;
    }
public function process ( Request $ request , FormInterface $ form ) { if ( $ request -> isMethod ( 'POST' ) ) { $ form -> submit ( $ request ) ; if ( $ form -> isValid ( ) ) { /** @var TextInterface $text */ $ text = $ form -> getData ( ) ; foreach ( $ text -> getTranslations ( ) as $ translation ) { $ translation -> setText ( $ text ) ; } $ this -> textManager -> add ( $ form -> getData ( ) ) ; return true ; } } return false ; }
Process text.

@param Request $request
@param FormInterface $form

@return bool
Process text .