本文整理汇总了PHP中Mage_Core_Block_Abstract::append方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Abstract::append方法的具体用法?PHP Mage_Core_Block_Abstract::append怎么用?PHP Mage_Core_Block_Abstract::append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Block_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Block_Abstract::append方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAddToParentGroup
public function testAddToParentGroup()
{
list($blocks, ) = $this->_createSampleBlocks(2);
$this->_block->append($blocks[0], 'block1')->append($blocks[1], 'block2');
$blocks[0]->addToParentGroup('group');
$blocks[1]->addToParentGroup('group');
$group = $this->_block->getChildGroup('group');
$this->assertArrayHasKey('block1', $group);
$this->assertArrayHasKey('block2', $group);
$this->assertSame($group['block1'], $blocks[0], 'The same instance is expected.');
$this->assertSame($group['block2'], $blocks[1], 'The same instance is expected.');
}
示例2: appendGeneralBlock
protected function appendGeneralBlock(Mage_Core_Block_Abstract $block)
{
if ($this->generalBlockWasAppended) {
return;
}
$generalBlockPath = Ess_M2ePro_Helper_View::GENERAL_BLOCK_PATH;
$blockGeneral = $this->getLayout()->createBlock($generalBlockPath);
$block->append($blockGeneral);
$this->generalBlockWasAppended = true;
}