protected function renderSlot(Response $response, SlotContent $slotContent)
    {
        if (null === $slotContent->getSlotName()) {
           throw new \RuntimeException('No slot has been defined for the event ' . get_class($this));
        }

        $isReplacing = $slotContent->isReplacing();
        if (null === $isReplacing) {
           throw new \RuntimeException('No action has been specified for the event ' . get_class($this));
        }

        if (null === $slotContent->getContent()) {
           return null;
        }

        $content = $response->getContent();
        $content = ($isReplacing) ? $this->replaceContent($slotContent, $content) : $this->injectContent($slotContent, $content);
        if (null !== $content) {
            $response->setContent($content);
        }

        return $response;
    }
protected function renderSlot(Response $response, SlotContent $slotContent)
    {
        if (null === $slotContent->getSlotName()) {
           throw new \RuntimeException('No slot has been defined for the event ' . get_class($this));
        }

        $isReplacing = $slotContent->isReplacing();
        if (null === $isReplacing) {
           throw new \RuntimeException('No action has been specified for the event ' . get_class($this));
        }

        if (null === $slotContent->getContent()) {
           return null;
        }

        $content = $response->getContent();
        $content = ($isReplacing) ? $this->replaceContent($slotContent, $content) : $this->injectContent($slotContent, $content);
        if (null !== $content) {
            $response->setContent($content);
        }

        return $response;
    }
protected function renderSlot ( Response $ response , SlotContent $ slotContent ) { if ( null === $ slotContent -> getSlotName ( ) ) { throw new \ RuntimeException ( 'No slot has been defined for the event ' . get_class ( $ this ) ) ; } $ isReplacing = $ slotContent -> isReplacing ( ) ; if ( null === $ isReplacing ) { throw new \ RuntimeException ( 'No action has been specified for the event ' . get_class ( $ this ) ) ; } if ( null === $ slotContent -> getContent ( ) ) { return null ; } $ content = $ response -> getContent ( ) ; $ content = ( $ isReplacing ) ? $ this -> replaceContent ( $ slotContent , $ content ) : $ this -> injectContent ( $ slotContent , $ content ) ; if ( null !== $ content ) { $ response -> setContent ( $ content ) ; } return $ response ; }
Renders the current slot

@param  Response                                   $response
@param  SlotContent                              $slotContent
@return \Symfony\Component\HttpFoundation\Response
@throws \RuntimeException
Renders the current slot