コード例 #1
0
 /**
  * Initialize configuration
  *
  * @see Hackathon_MageMonitoring_Model_Widget::initConfig()
  */
 public function initConfig()
 {
     parent::initConfig();
     // add config for required extensions filter
     $this->addConfig(self::CONFIG_ONLY_REQUIRED, 'Only show required extensions:', $this->_defOnlyRequired, 'widget', 'checkbox', false, 'Only show extensions required by Magento.');
     return $this->_config;
 }
コード例 #2
0
 /**
  * Initializes configuration
  *
  * @see Hackathon_MageMonitoring_Model_Widget::initConfig()
  */
 public function initConfig()
 {
     parent::initConfig();
     // add config for code pool filter
     $this->addConfig(self::CONFIG_CODE_POOL, 'Filter by code pool:', $this->_defCodePool, 'widget', 'text', true, 'all | community | core | local');
     return $this->_config;
 }
コード例 #3
0
 /**
  * Init Config
  *
  * @return array Configuration of the Widget
  */
 public function initConfig()
 {
     parent::initConfig();
     if ($this->_defaultConfig) {
         $helper = Mage::helper('magemonitoring');
         // override watch dog default mail_to if global config is found
         $id = 'Hackathon_MageMonitoring_Model_Widget_System_Watchdog';
         $confKey = $helper->getConfigKeyById(self::CONFIG_DOGS_MAILTO, $id);
         $defMail = Mage::getStoreConfig($confKey);
         if (!$defMail) {
             $defMail = self::DEFAULT_MAILTO;
         }
         $this->_defWatchdogMailto = $defMail;
         $this->addConfigHeader('Watch Dog Settings');
         $this->addConfig(self::CONFIG_WATCHDOG_ACTIVE, 'Dog is on duty:', $this->_defWatchdogActive, 'global', 'checkbox', false);
         $this->addConfig(self::CONFIG_WATCHDOG_CRON, 'Schedule:', $this->_defWatchdogCron, 'global', 'text', false);
         $this->addConfig(self::CONFIG_WATCHDOG_BARKON, 'Minimum bark level (warning|error):', $this->_defWatchdogBarkon, 'global', 'text', false);
         $this->addConfig(self::CONFIG_WATCHDOG_MAILTO, 'Barks at:', $this->_defWatchdogMailto, 'global', 'text', false, $helper->__('Magento mail id (general, sales, etc) or valid email address.'));
     }
     return $this->_config;
 }