*/ class Mage_Currencysymbol_Block_Adminhtml_System_Currencysymbol extends Mage_Adminhtml_Block_Widget_Form { /** * Constructor. Initialization required variables for class instance. */ public function __construct() { $this->_blockGroup = 'currencysymbol_system'; $this->_controller = 'adminhtml_system_currencysymbol'; parent::__construct(); } /** * Custom currency symbol properties * * @var array */ protected $_symbolsData = array(); /** * Prepares layout * * @return Mage_Core_Block_Abstract */ protected function _prepareLayout() { return parent::_prepareLayout(); } /** * Returns page header * * @return bool|string */ public function getHeader() { return Mage::helper('adminhtml')->__('Manage Currency Symbols'); } /** * Returns 'Save Currency Symbol' button's HTML code * * @return string */ public function getSaveButtonHtml() { /** @var $block Mage_Core_Block_Abstract */ $block = $this->getLayout()->createBlock('adminhtml/widget_button'); $block->setData(array( 'label' => Mage::helper('currencysymbol')->__('Save Currency Symbols'), 'onclick' => 'currencySymbolsForm.submit();', 'class' => 'save' )); return $block->toHtml(); } /** * Returns URL for save action * * @return string */ public function getFormActionUrl() { return $this->getUrl('*/*/save'); } /** * Returns website id * * @return int */ public function getWebsiteId() { return $this->getRequest()->getParam('website'); } /** * Returns store id * * @return int */ public function getStoreId() { return $this->getRequest()->getParam('store'); } /** * Returns Custom currency symbol properties * * @return array */ public function getCurrencySymbolsData() { if(!$this->_symbolsData) { $this->_symbolsData = Mage::getModel('currencysymbol/system_currencysymbol') ->getCurrencySymbolsData(); } return $this->_symbolsData; } /** * Returns inheritance text * * @return string */ public function getInheritText() { return Mage::helper('currencysymbol')->__('Use Standard'); } }