本文整理汇总了PHP中Mage_Core_Model_Layout::_generateAction方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Layout::_generateAction方法的具体用法?PHP Mage_Core_Model_Layout::_generateAction怎么用?PHP Mage_Core_Model_Layout::_generateAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Layout
的用法示例。
在下文中一共展示了Mage_Core_Model_Layout::_generateAction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _generateAction
/**
* Enter description here...
*
* @param Varien_Simplexml_Element $node
* @param Varien_Simplexml_Element $parent
* @return Mage_Core_Model_Layout
*/
protected function _generateAction($node, $parent)
{
if (isset($node['unlessconfig']) && ($configPath = (string) $node['unlessconfig'])) {
if (Mage::getStoreConfigFlag($configPath)) {
return $this;
}
}
return parent::_generateAction($node, $parent);
}
示例2: _generateAction
/**
* Records action call
* (non-PHPdoc)
* @see Mage_Core_Model_Layout::_generateAction()
*/
protected function _generateAction($node, $parent)
{
$this->_collectedArgs = null;
parent::_generateAction($node, $parent);
if ($this->_collectedArgs !== null) {
$method = (string) $node['method'];
if (!empty($node['block'])) {
$parentName = (string) $node['block'];
} else {
$parentName = $parent->getBlockName();
}
$target = $parentName . '::' . $method;
$this->record(self::ACTION_BLOCK_ACTION, $target, $this->_collectedArgs);
}
return $this;
}
示例3: processingGenerateAction
private function processingGenerateAction($node, $parent, $type = null, $result = null)
{
$result = '__empty__' == $result ? false : $result;
if (!is_null($type)) {
switch ($type) {
case 'setTemplate':
if (!$result) {
return $this;
}
$node['method'] = 'setTemplate';
$node->template = $result;
break;
case 'Bool':
if (!$result) {
return $this;
}
break;
case 'invertBool':
if ($result) {
return $this;
}
break;
case 'addItem':
if (!$result) {
return $this;
}
$node['method'] = 'addItem';
$node->type = 'skin_js';
$node->name = $result;
break;
case 'addJs':
if (!$result) {
return $this;
}
$node['method'] = 'addJs';
$node->script = $result;
break;
case 'addCss':
if (!$result) {
return $this;
}
$node['method'] = 'addCss';
$node->stylesheet = $result;
break;
case 'addBodyClass':
if (!$result) {
return $this;
}
$node['method'] = 'addBodyClass';
$node->classname = $result;
break;
default:
return $this;
}
}
return parent::_generateAction($node, $parent);
}