I want to get parameter's data from widget configuration in Block class.


as we know from article, we can get parameter data in phtml file


but how we can get the parameter data in Block class?

Im looking for something like this :

namespace OrangeCompany\Learning\Block\Widget;

use Magento\Framework\View\Element\Template;
use Magento\Widget\Block\BlockInterface;

class Test extends Template implements BlockInterface
    protected $_template = "widget/test.phtml";
    $title = $this->getData('title'); // Im looking for something like this

is it possible?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.