I'm trying to get registry value in my block. Here's how block looks like,
<?php
namespace Vendor\Dunning\Block\Adminhtml\Dunning\Edit\Tab;
class PartPayments extends \Magento\Backend\Block\Template
{
protected $_template = 'Vendor_Dunning::installments.phtml';
public function __construct(
\Magento\Framework\Registry $registry
) {
$this->registry = $registry;
}
}
Template is getting rendered but If I create constructor then it gives me error like below which looks dangerous to debug.
Fatal error: Method Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an exception, caught Error: Call to a member function dispatch() on null in /opt/lampp/htdocs/magento2/vendor/magento/module-ui/Component/Wrapper/UiComponent.php on line 0
Please help.