Get rendered view within block controller
Permalink 1 user found helpful
Hi!
Is there any chance in my block controller save method, to get the rendered view back as string to work with? I first thought of the display method, but I can't call it from the block controller ...
Thanks
Marcus
Is there any chance in my block controller save method, to get the rendered view back as string to work with? I first thought of the display method, but I can't call it from the block controller ...
Thanks
Marcus
In concrete/src/Area/Area.php in the display method, you can see how it is used in the core. The render method.
Note that the renderViewContents does not return the content but uses echo.
concrete/src/Block/View/BlockView.php