class My_Module_Block_Adminhtml_Template extends Mage_Adminhtml_Block_Template { protected function _prepareLayout() { $this->setTemplate('my_module/template.phtml'); parent::_prepareLayout(); } }
class My_Module_Block_Adminhtml_List extends Mage_Adminhtml_Block_Widget_Grid_Container { protected function _prepareLayout() { parent::_prepareLayout(); $this->removeButton('add'); } }In this example, the My_Module_Block_Adminhtml_List class inherits from the Mage_Adminhtml_Block_Widget_Grid_Container class, which is a container for a grid of data in the adminhtml interface. The _prepareLayout method is overridden to call the parent method and then remove the 'add' button from the container. The package library for this class is Magento.