I have form declared as uiComponent(custom module). I have to disable top menu button based on some status. The button is in structure
<form>
<argument name="data" xsi:type="array">
<item name="buttons" xsi:type="array">
<item name="save_and_continue" xsi:type="array">
<item name="name" xsi:type="string">save_and_continue</item>
<item name="label" xsi:type="string" translate="true">Save and Continue Edit</item>
<item name="class" xsi:type="string">save_and_continue</item>
</item>
....
</item>
....
</form>
I try to create observer to remove element from view but using $layout->unsetElement('save_and_continue') not work. I found that there is some think like PHP modifiers in UI components but i cant get this right from tutorial provided in doc.
How can i remove remove such item ? It can`t be static xml to override this one because i have some dynamic parameters.
I end up doing is to override with my own class.