Skip to main content

I think that you should look class Magento\Backend\Block\Widget\Form\Element\DependenceMagento\Backend\Block\Widget\Form\Element\Dependence. You can create your own block inherited from this class and rewrite it how you want. In your code replaces block call:

$this->getLayout()->createBlock(
                'Magento\Backend\Block\Widget\Form\Element\Dependence'
            )

Toto:

this->getLayout()->createBlock(
                ’Siarhey\Test\Block\Widget\Form\Element\Dependence''Siarhey\Test\Block\Widget\Form\Element\Dependence'
            )

Create block

   Siarhey\Test\Block\Widget\Form\Element\Dependence

And and you can implement in it your logic of verification.

It is only advice. I hope that it helps you.

I think that you should look class Magento\Backend\Block\Widget\Form\Element\Dependence. You can create your own block inherited from this class and rewrite it how you want. In your code replaces block call:

$this->getLayout()->createBlock(
                'Magento\Backend\Block\Widget\Form\Element\Dependence'
            )

To

this->getLayout()->createBlock(
                ’Siarhey\Test\Block\Widget\Form\Element\Dependence'
            )

Create block

 Siarhey\Test\Block\Widget\Form\Element\Dependence

And you can implement in it your logic of verification.

It is only advice. I hope that it helps you.

I think that you should look class Magento\Backend\Block\Widget\Form\Element\Dependence. You can create your own block inherited from this class and rewrite it how you want. In your code replaces block call:

$this->getLayout()->createBlock(
    'Magento\Backend\Block\Widget\Form\Element\Dependence'
)

to:

this->getLayout()->createBlock(
    'Siarhey\Test\Block\Widget\Form\Element\Dependence'
)

Create block  Siarhey\Test\Block\Widget\Form\Element\Dependence and you can implement in it your logic of verification.

It is only advice. I hope that it helps you.

Source Link
Eugene
  • 111
  • 3

I think that you should look class Magento\Backend\Block\Widget\Form\Element\Dependence. You can create your own block inherited from this class and rewrite it how you want. In your code replaces block call:

$this->getLayout()->createBlock(
                'Magento\Backend\Block\Widget\Form\Element\Dependence'
            )

To

this->getLayout()->createBlock(
                ’Siarhey\Test\Block\Widget\Form\Element\Dependence'
            )

Create block

Siarhey\Test\Block\Widget\Form\Element\Dependence

And you can implement in it your logic of verification.

It is only advice. I hope that it helps you.