/**
  * Check whether button rendering is allowed in current context
  *
  * @param \Magento\Backend\Block\Widget\Button\Item $item
  * @return bool
  */
 public function canRender(Button\Item $item)
 {
     return !$item->isDeleted();
 }
Beispiel #2
0
 /**
  * {$@inheritdoc}
  */
 public function canRender(\Magento\Backend\Block\Widget\Button\Item $item)
 {
     return !$item->isDeleted();
 }
 public function testCanRender()
 {
     $this->buttonMock->expects($this->once())->method('isDeleted')->willReturn(false);
     $this->assertTrue($this->template->canRender($this->buttonMock));
 }