当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Block_Text::setText方法代码示例

本文整理汇总了PHP中Mage_Core_Block_Text::setText方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Text::setText方法的具体用法?PHP Mage_Core_Block_Text::setText怎么用?PHP Mage_Core_Block_Text::setText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Block_Text的用法示例。


在下文中一共展示了Mage_Core_Block_Text::setText方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _beforeToHtml

 public function _beforeToHtml()
 {
     $block_1 = new Mage_Core_Block_Text();
     $block_1->setText('The first sentence.');
     $this->setChild('the_first', $block_1);
     $block_2 = new Mage_Core_Block_Text();
     $block_2->setText('The second sentence .');
     $this->setChild('the_second', $block_2);
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:9,代码来源:Helloworld.php

示例2: manejandobloquesAction

 public function manejandobloquesAction()
 {
     $block_1 = new Mage_Core_Block_Text();
     $block_1->setText('Original Text');
     $block_2 = new Mage_Core_Block_Text();
     $block_2->setText('The second sentence.');
     $main_block = new Mage_Core_Block_Template();
     $main_block->setTemplate('nofrills/manejandobloques.phtml');
     $main_block->setChild('the_first', $block_1);
     $main_block->setChild('the_second', $block_2);
     $block_1->setText('Wait , I want this text instead .');
     echo $main_block->toHtml();
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:13,代码来源:IndexController.php

示例3: testToHtml

 public function testToHtml()
 {
     $this->_block->setText('test');
     $this->assertEquals('test', $this->_block->toHtml());
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:5,代码来源:Text.php

示例4: testSetFrameTags

 public function testSetFrameTags()
 {
     $block = new Mage_Core_Block_Text();
     $block->setText('text');
     $block->setFrameTags('p');
     $this->assertEquals('<p>text</p>', $block->toHtml());
     $block->setFrameTags('p class="note"', '/p');
     $this->assertEquals('<p class="note">text</p>', $block->toHtml());
     $block->setFrameTags('non-wellformed tag', 'closing tag');
     $this->assertEquals('<non-wellformed tag>text<closing tag>', $block->toHtml());
 }
开发者ID:nemphys,项目名称:magento2,代码行数:11,代码来源:AbstractTest.php

示例5: testGetOutput

 /**
  * @covers Mage_Core_Model_Layout::addBlock
  * @covers Mage_Core_Model_Layout::addOutputBlock
  * @covers Mage_Core_Model_Layout::getOutput
  * @covers Mage_Core_Model_Layout::removeOutputBlock
  */
 public function testGetOutput()
 {
     $blockName = 'block_' . __METHOD__;
     $expectedText = "some_text_for_{$blockName}";
     $block = new Mage_Core_Block_Text();
     $block->setText($expectedText);
     $this->_model->addBlock($block, $blockName);
     $this->_model->addOutputBlock($blockName);
     $this->assertEquals($expectedText, $this->_model->getOutput());
     $this->_model->removeOutputBlock($blockName);
     $this->assertEmpty($this->_model->getOutput());
 }
开发者ID:relue,项目名称:magento2,代码行数:18,代码来源:LayoutTest.php


注:本文中的Mage_Core_Block_Text::setText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。