module/Paragraph/src/Grid/Paragraph/View/Helper/MetaContent.php
public function renderMetaContent( $name, $content = '' )
    {
        $view       = $this->getView();
        $middle     = $this->getMiddleLayoutModel();
        $paragraph  = $middle->getParagraphModel();
        $renderList = $paragraph->findRenderList( $name );

        if ( empty( $renderList ) )
        {
            return $content;
        }

        $meta = reset( $renderList )[1];

        if ( empty( $meta ) )
        {
            return $content;
        }

        $appService     = $view->plugin( 'appService' );
        $serviceManager = $appService();
        $allowOverride  = $serviceManager->getAllowOverride();

        if ( ! $allowOverride )
        {
            $serviceManager->setAllowOverride( true );
        }

        $serviceManager->setService( 'RenderedContent', $meta );

        if ( ! $allowOverride )
        {
            $serviceManager->setAllowOverride( false );
        }

        if ( $meta instanceof LayoutAwareInterface )
        {
            $view->plugin( 'layout' )
                 ->setMiddleLayout(
                     $middle->findMiddleParagraphLayoutById(
                         $meta->getLayoutId()
                     )
                 );
        }

        return $view->render( 'grid/paragraph/render/paragraph', array(
            'paragraphRenderList'  => $renderList,
            'content'              => $content,
        ) );
    }
public function renderMetaContent( $name, $content = '' )
    {
        $view       = $this->getView();
        $middle     = $this->getMiddleLayoutModel();
        $paragraph  = $middle->getParagraphModel();
        $renderList = $paragraph->findRenderList( $name );

        if ( empty( $renderList ) )
        {
            return $content;
        }

        $meta = reset( $renderList )[1];

        if ( empty( $meta ) )
        {
            return $content;
        }

        $appService     = $view->plugin( 'appService' );
        $serviceManager = $appService();
        $allowOverride  = $serviceManager->getAllowOverride();

        if ( ! $allowOverride )
        {
            $serviceManager->setAllowOverride( true );
        }

        $serviceManager->setService( 'RenderedContent', $meta );

        if ( ! $allowOverride )
        {
            $serviceManager->setAllowOverride( false );
        }

        if ( $meta instanceof LayoutAwareInterface )
        {
            $view->plugin( 'layout' )
                 ->setMiddleLayout(
                     $middle->findMiddleParagraphLayoutById(
                         $meta->getLayoutId()
                     )
                 );
        }

        return $view->render( 'grid/paragraph/render/paragraph', array(
            'paragraphRenderList'  => $renderList,
            'content'              => $content,
        ) );
    }
public function renderMetaContent ( $ name , $ content = '' ) { $ view = $ this -> getView ( ) ; $ middle = $ this -> getMiddleLayoutModel ( ) ; $ paragraph = $ middle -> getParagraphModel ( ) ; $ renderList = $ paragraph -> findRenderList ( $ name ) ; if ( empty ( $ renderList ) ) { return $ content ; } $ meta = reset ( $ renderList ) [ 1 ] ; if ( empty ( $ meta ) ) { return $ content ; } $ appService = $ view -> plugin ( 'appService' ) ; $ serviceManager = $ appService ( ) ; $ allowOverride = $ serviceManager -> getAllowOverride ( ) ; if ( ! $ allowOverride ) { $ serviceManager -> setAllowOverride ( true ) ; } $ serviceManager -> setService ( 'RenderedContent' , $ meta ) ; if ( ! $ allowOverride ) { $ serviceManager -> setAllowOverride ( false ) ; } if ( $ meta instanceof LayoutAwareInterface ) { $ view -> plugin ( 'layout' ) -> setMiddleLayout ( $ middle -> findMiddleParagraphLayoutById ( $ meta -> getLayoutId ( ) ) ) ; } return $ view -> render ( 'grid/paragraph/render/paragraph' , array ( 'paragraphRenderList' => $ renderList , 'content' => $ content , ) ) ; }
Set meta-content

@param   string $name
@param   string $content
@return  string
Set meta - content