i search around a lot about references of this function. but the documentation have a big lack. does somebody explain me this part of code (deeply) ?

            ['data' => ['is_render_to_js_template' => true]]

i don't understand this solution. i find this everywhere but nobody explain why you set that argument (is_render_to_js_template for example) .


the createBlock is definite with block Factory and are inside these classes



1 Answer 1


This is only used in a couple of places


     * Block Factory
     * @param string $type
     * @param string $name
     * @param array $arguments
     * @return \Magento\Framework\View\Element\AbstractBlock
    public function createBlock($type, $name = '', array $arguments = [])

So it's arguments that you are passing to block.

As to why. I'm baffled. Other than online tutorials and the two references above I can't find anything.

You can echo out blocks. Sometimes useful for debugging. See if it makes a difference to output?

echo $this->getLayout()
  • thank you man probably i have found the answer i put under the question. but you help me a lot really thanks
    – Pavel
    Jun 14, 2019 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.