public function subscribeAction(Block $block)
    {
        $response = $this->execute($block);
        $properties = $block->getProperties();

        if ($this->subscribed && isset($properties['responseType']) && $properties['responseType'] == 'redirect') {
            $content = $this->contentManager->getRepository()->find($properties['responseContent']);
            $response = new RedirectResponse($this->router->generate('_content', ['slug' => $content->getSlug()]));
        }
        
        return $response;
    }
public function subscribeAction(Block $block)
    {
        $response = $this->execute($block);
        $properties = $block->getProperties();

        if ($this->subscribed && isset($properties['responseType']) && $properties['responseType'] == 'redirect') {
            $content = $this->contentManager->getRepository()->find($properties['responseContent']);
            $response = new RedirectResponse($this->router->generate('_content', ['slug' => $content->getSlug()]));
        }
        
        return $response;
    }
public function subscribeAction ( Block $ block ) { $ response = $ this -> execute ( $ block ) ; $ properties = $ block -> getProperties ( ) ; if ( $ this -> subscribed && isset ( $ properties [ 'responseType' ] ) && $ properties [ 'responseType' ] == 'redirect' ) { $ content = $ this -> contentManager -> getRepository ( ) -> find ( $ properties [ 'responseContent' ] ) ; $ response = new RedirectResponse ( $ this -> router -> generate ( '_content' , [ 'slug' => $ content -> getSlug ( ) ] ) ) ; } return $ response ; }
Processes a POST request to subscribe.

@param Block $block

@return Response
Processes a POST request to subscribe .