/** * Inits configuration * * @see Hackathon_MageMonitoring_Model_Widget::initConfig() */ public function initConfig() { $helper = Mage::helper('magemonitoring'); parent::initConfig(); // add config for slow mode $this->addConfig(self::CONFIG_ALLOW_SLOW_MODE, $helper->__('Enable slower php methods to collect dir size?'), $this->_defAllowSlowMode, 'widget', 'checkbox', false, $helper->__('Warning! Depending on the size of your media directory this might take a very long time.')); return $this->_config; }
/** * Init Config * * @see Hackathon_MageMonitoring_Model_Widget::initConfig() */ public function initConfig() { parent::initConfig(); $configOrg = $this->getConfig(); $configNew = array(); $configNew[] = reset($configOrg); // "reset" config $this->_config = $configNew; // add title config $this->addConfig(self::CONFIG_WIDGET_TITLE, 'Widget Title:', $this->_defWidgetTitle, 'widget', 'text', true); // append old config $this->_config += $configOrg; return $this->_config; }