protected function injectContent(SlotContent $slotContent, $content)
    {
        $regex = $this->getPattern($slotContent->getSlotName());
        if (false == preg_match($regex, $content, $match)) {
            return;
        }
        $newContent = $match[1] . PHP_EOL . $slotContent->getContent();

        return preg_replace($regex, $newContent, $content);
    }
protected function injectContent(SlotContent $slotContent, $content)
    {
        $regex = $this->getPattern($slotContent->getSlotName());
        if (false == preg_match($regex, $content, $match)) {
            return;
        }
        $newContent = $match[1] . PHP_EOL . $slotContent->getContent();

        return preg_replace($regex, $newContent, $content);
    }
protected function injectContent ( SlotContent $ slotContent , $ content ) { $ regex = $ this -> getPattern ( $ slotContent -> getSlotName ( ) ) ; if ( false == preg_match ( $ regex , $ content , $ match ) ) { return ; } $ newContent = $ match [ 1 ] . PHP_EOL . $ slotContent -> getContent ( ) ; return preg_replace ( $ regex , $ newContent , $ content ) ; }
Injects the content at the end of the given content

@param  SlotContent $slotContent
@param  string        $content     The content to inject
@return string
Injects the content at the end of the given content