コード例 #1
0
ファイル: Abstract.php プロジェクト: lmcro/magecache
 /**
  * Get config valude
  *
  * @param string $path config path
  *
  * @return Varien_Simplexml_Element
  */
 public function getConfing($path)
 {
     if (is_null($this->_config) || !$this->_config->hasChildren()) {
         return null;
     }
     return $this->_config->descend($path);
 }
コード例 #2
0
 /**
  * Processes the node 'command'.
  *
  * @param Mage_Core_Model_Config_Element $config
  * @param array $result
  * @param string $stage Command stage/phase
  * @return array
  */
 protected function _getCustomCommands(Mage_Core_Model_Config_Element $config, array $result, $stage = 'commands')
 {
     $commands = $config->descend($stage);
     if ($commands === false) {
         return $result;
     }
     // get commands
     foreach ($commands->children() as $key => $value) {
         $result[$key] = $value;
     }
     return $result;
 }
コード例 #3
0
 /**
  * @return array
  */
 public function initFieldsDataProvider()
 {
     $xmlConfig = new Mage_Core_Model_Config_Element('
         <default>
             <some>
                 <config>
                     <path>Config Value</path>
                 </config>
             </some>
         </default>
     ');
     return array(array(array('section1/group1/field1' => 'some_value'), false, null, false, 'some_value'), array(array(), $xmlConfig, 'some/config/path', true, $xmlConfig->descend('some/config/path')));
 }
 /**
  * Processes the node 'system_configuration'.
  *
  * @param Mage_Core_Model_Config_Element $config
  * @param array $result
  * @return array
  */
 public function getCommands(Mage_Core_Model_Config_Element $config, array $result)
 {
     $systemConfiguration = $config->descend('system_configuration');
     if ($systemConfiguration === false) {
         return $result;
     }
     $result = $this->_getDefaultConfiguration($systemConfiguration, $result);
     $result = $this->_getWebsitesConfiguration($systemConfiguration, $result);
     $result = $this->_getStoresConfiguration($systemConfiguration, $result);
     return $result;
 }