Public Member Functions | |
getSections ($sectionCode=null, $websiteCode=null, $storeCode=null) | |
getTabs () | |
getSection ($sectionCode=null, $websiteCode=null, $storeCode=null) | |
hasChildren ($node, $websiteCode=null, $storeCode=null, $isField=false) | |
getAttributeModule ($sectionNode=null, $groupNode=null, $fieldNode=null) | |
Protected Member Functions | |
_initSectionsAndTabs () | |
Protected Attributes | |
$_sections | |
$_tabs |
Definition at line 35 of file Config.php.
_initSectionsAndTabs | ( | ) | [protected] |
Definition at line 83 of file Config.php.
00084 { 00085 $mergeConfig = Mage::getModel('core/config_base'); 00086 00087 $config = Mage::getConfig()->loadModulesConfiguration('system.xml'); 00088 00089 $this->_sections = $config->getNode('sections'); 00090 00091 $this->_tabs = $config->getNode('tabs'); 00092 }
getAttributeModule | ( | $ | sectionNode = null , |
|
$ | groupNode = null , |
|||
$ | fieldNode = null | |||
) |
Enter description here...
Varien_Simplexml_Element | $sectionNode | |
Varien_Simplexml_Element | $groupNode | |
Varien_Simplexml_Element | $fieldNode |
Definition at line 176 of file Config.php.
00177 { 00178 $moduleName = 'adminhtml'; 00179 if (is_object($sectionNode) && method_exists($sectionNode, 'attributes')) { 00180 $sectionAttributes = $sectionNode->attributes(); 00181 $moduleName = isset($sectionAttributes['module']) ? (string)$sectionAttributes['module'] : $moduleName; 00182 } 00183 if (is_object($groupNode) && method_exists($groupNode, 'attributes')) { 00184 $groupAttributes = $groupNode->attributes(); 00185 $moduleName = isset($groupAttributes['module']) ? (string)$groupAttributes['module'] : $moduleName; 00186 } 00187 if (is_object($fieldNode) && method_exists($fieldNode, 'attributes')) { 00188 $fieldAttributes = $fieldNode->attributes(); 00189 $moduleName = isset($fieldAttributes['module']) ? (string)$fieldAttributes['module'] : $moduleName; 00190 } 00191 00192 return $moduleName; 00193 }
getSection | ( | $ | sectionCode = null , |
|
$ | websiteCode = null , |
|||
$ | storeCode = null | |||
) |
Enter description here...
string | $sectionCode | |
string | $websiteCode | |
string | $storeCode |
Definition at line 104 of file Config.php.
00105 { 00106 00107 if ($sectionCode){ 00108 return $this->getSections()->$sectionCode; 00109 } elseif ($websiteCode) { 00110 return $this->getSections()->$websiteCode; 00111 } elseif ($storeCode) { 00112 return $this->getSections()->$storeCode; 00113 } 00114 }
getSections | ( | $ | sectionCode = null , |
|
$ | websiteCode = null , |
|||
$ | storeCode = null | |||
) |
Enter description here...
string | $sectionCode | |
string | $websiteCode | |
string | $storeCode |
Definition at line 60 of file Config.php.
00061 { 00062 if (empty($this->_sections)) { 00063 $this->_initSectionsAndTabs(); 00064 } 00065 00066 return $this->_sections; 00067 }
getTabs | ( | ) |
Retrive tabs
Definition at line 74 of file Config.php.
00075 { 00076 if (empty($this->_tabs)) { 00077 $this->_initSectionsAndTabs(); 00078 } 00079 00080 return $this->_tabs; 00081 }
hasChildren | ( | $ | node, | |
$ | websiteCode = null , |
|||
$ | storeCode = null , |
|||
$ | isField = false | |||
) |
Enter description here...
Varien_Simplexml_Element | $node | |
string | $websiteCode | |
string | $storeCode | |
boolean | $isField |
Definition at line 125 of file Config.php.
00126 { 00127 $showTab = false; 00128 if ($storeCode) { 00129 if (isset($node->show_in_store)) { 00130 if ((int)$node->show_in_store) { 00131 $showTab=true; 00132 } 00133 } 00134 }elseif ($websiteCode) { 00135 if (isset($node->show_in_website)) { 00136 if ((int)$node->show_in_website) { 00137 $showTab=true; 00138 } 00139 } 00140 } elseif (isset($node->show_in_default)) { 00141 if ((int)$node->show_in_default) { 00142 $showTab=true; 00143 } 00144 } 00145 if ($showTab) { 00146 if (isset($node->groups)) { 00147 foreach ($node->groups->children() as $children){ 00148 if ($this->hasChildren ($children, $websiteCode, $storeCode)) { 00149 return true; 00150 } 00151 00152 } 00153 }elseif (isset($node->fields)) { 00154 00155 foreach ($node->fields->children() as $children){ 00156 if ($this->hasChildren ($children, $websiteCode, $storeCode, true)) { 00157 return true; 00158 } 00159 } 00160 } else { 00161 return true; 00162 } 00163 } 00164 return false; 00165 00166 }
$_sections [protected] |
Definition at line 43 of file Config.php.
$_tabs [protected] |
Definition at line 50 of file Config.php.