_prepareLayout

Posted . Visible to the public.

Add css

protected function _prepareLayout()
{
    $this->getLayout()->getBlock('head')->addCss('course/form.css');
    $this->setTitle('Course Eligibility Result');
    return parent::_prepareLayout();
}

Set Child Block

protected function _prepareLayout()
{       
    parent::_prepareLayout();
    $this->setChild('setForm', $this->getLayout()->createBlock('extendedcustomer/adminhtml_attribute_set_main_formset'));
    return $this;
}

Add Button

protected function _prepareLayout()
{
    $this->_addButton('save_and_continue', array(
        'label'     => Mage::helper('extendedcustomer')->__('Save and Continue Edit'),
        'onclick'   => 'saveAndContinueEdit(\''.$this->_getSaveAndContinueUrl().'\')',
        'class'     => 'save'
    ), 10);
    
    return parent::_prepareLayout();
}

protected function _getSaveAndContinueUrl()
{
    return $this->getUrl('*/*/save', array(
        '_current'  => true,
        'back'      => 'edit',
        'tab'       => '{{tab_id}}'
    ));
}
kiatng
Last edit
kiatng
Posted by kiatng to OpenMage (2020-07-06 05:51)