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


PHP Smarty_Internal_Template::assignGlobal方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     $smarty = new Smarty();
     $render = new CM_Frontend_Render();
     $this->_template = $smarty->createTemplate('string:');
     $this->_template->assignGlobal('render', $render);
 }
开发者ID:cargomedia,项目名称:cm,代码行数:7,代码来源:block.contentPlaceholderTest.php

示例2: setUp

 public function setUp()
 {
     $smarty = new Smarty();
     $render = new CM_Frontend_Render();
     $this->_template = $smarty->createTemplate('string:');
     $this->_template->assignGlobal('render', $render);
     $this->_menuData = [['label' => 'Label 1', 'page' => 'CM_Page_Example', 'params' => ['foo' => 1]], ['label' => 'Label 2', 'page' => 'CM_Page_Example', 'params' => ['foo' => 2]]];
 }
开发者ID:cargomedia,项目名称:cm,代码行数:8,代码来源:function.menuTest.php

示例3: setUp

 public function setUp()
 {
     $smarty = new Smarty();
     $this->_render = new CM_Frontend_Render();
     $this->_template = $smarty->createTemplate('string:');
     $this->_template->assignGlobal('render', $this->_render);
     $language = CMTest_TH::createLanguage();
     $language->setTranslation('.date.period.years', '{$count} years', ['count']);
     $language->setTranslation('.date.period.hour', '1 hour');
     $language->setTranslation('.date.period.day', '1 day');
 }
开发者ID:cargomedia,项目名称:cm,代码行数:11,代码来源:function.dateRangeTest.php

示例4: setUp

 public function setUp()
 {
     $smarty = new Smarty();
     $render = new CM_Frontend_Render();
     $formMock = $this->getMockForAbstractClass('CM_Form_Abstract', array(), '', true, true, true, array('getAction'));
     $actionMock = $this->getMockForAbstractClass('CM_FormAction_Abstract', array($formMock), '', true, true, true, array('getName'));
     $actionMock->expects($this->any())->method('getName')->will($this->returnValue('Create'));
     $formMock->expects($this->any())->method('getAction')->will($this->returnValue($actionMock));
     /** @var CM_Form_Abstract $formMock */
     $render->getGlobalResponse()->treeExpand(new CM_Frontend_ViewResponse($formMock));
     $this->_template = $smarty->createTemplate('string:');
     $this->_template->assignGlobal('render', $render);
 }
开发者ID:cargomedia,项目名称:cm,代码行数:13,代码来源:function.buttonTest.php


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