src/Sulu/Bundle/SnippetBundle/Controller/SnippetController.php
public function postAction(Request $request)
    {
        $document = $this->documentManager->create(Structure::TYPE_SNIPPET);
        $form = $this->processForm($request, $document);

        return $this->handleView($form->getData());
    }
public function postAction(Request $request)
    {
        $document = $this->documentManager->create(Structure::TYPE_SNIPPET);
        $form = $this->processForm($request, $document);

        return $this->handleView($form->getData());
    }
public function postAction ( Request $ request ) { $ document = $ this -> documentManager -> create ( Structure :: TYPE_SNIPPET ) ; $ form = $ this -> processForm ( $ request , $ document ) ; return $ this -> handleView ( $ form -> getData ( ) ) ; }
Saves a new snippet.

@param Request $request

@return \Symfony\Component\HttpFoundation\Response
Saves a new snippet .