How to Create instance object for magento2 block:
This is script is as same as magento1.x. Some times we may want to create instance object for Magento2 block file. Using instance object we can use the block file method & functions. $blockObj= $block->getLayout()-> createBlock('Mypackage\mymodule\Block\MyBlock'); echo $blockObj->getMyBlockMethod();
CORNER OF BLOG: