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


PHP Zend_View_Abstract::addBasePath方法代码示例

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


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

示例1: array

 /**
  * Set initial settings and call init()
  *
  * @param array $settings
  */
 function __construct($settings = array())
 {
     $this->settings = $settings;
     $layout = Zend_Layout::getMvcInstance();
     $this->view = $layout->getView();
     // Add module paths to view scripts
     $this->view->addBasePath(ZfApplication::$_base_path . "/app/Flex/views", "Flex_View");
     $this->view->addScriptPath($layout->getLayoutPath() . "default/templates/Flex/");
     $this->view->addScriptPath($layout->getLayoutPath() . $layout->getLayout() . "/templates/Flex/");
     $this->init();
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:16,代码来源:Abstract.php

示例2: render

 /**
  * Render a hook's content
  *
  * @param string $name template to use
  * @param string $module module to fetch template from
  * @param string $controller controller to fetch template from, defaults to 'hooks'
  *
  * @return string Rendered content
  *
  */
 public function render($name, $module, $controller = "hooks")
 {
     $layout = Zend_Layout::getMvcInstance();
     // Reset view script paths
     $this->view->setScriptPath(null);
     // Build new ones for hooks
     $this->view->addBasePath(ZfApplication::$_base_path . "/app/{$module}/views", $module . "_View");
     //$this->view->addScriptPath(ZfApplication::$_base_path."/app/$module/Views/");
     $this->view->addScriptPath($layout->getLayoutPath() . "default/templates/{$module}");
     $this->view->addScriptPath($layout->getLayoutPath() . $layout->getLayout() . "/templates/{$module}");
     return $this->view->render($controller . "/" . $name);
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:22,代码来源:Abstract.php

示例3: addBasePath

 /**
  * Zend_View compatibility. Add the templates dir
  *
  * @see View/Zend_View_Abstract::addBasePath()
  * @return Ext_View_Smarty
  */
 public function addBasePath($path, $classPrefix = 'Zend_View')
 {
     parent::addBasePath($path, $classPrefix);
     $this->addScriptPath($path . '/templates');
     $this->addTemplateDir($path . '/templates/static');
     return $this;
 }
开发者ID:nikita-prikazchikov,项目名称:RoadEstimation,代码行数:13,代码来源:Smarty.php

示例4: resetViewScripts

 /**
  * Reset the view's script paths and set new ones for use in the block
  *
  * @param Zend_View_Abstract $view
  */
 private function resetViewScripts(Zend_View_Abstract $view)
 {
     $layout = Zend_Layout::getMvcInstance();
     // Reset view script paths
     $view->setScriptPath(null);
     $module = ucfirst($this->module);
     // Build new ones for blocks
     $view->addBasePath(ZfApplication::$_base_path . "/app/{$module}/views", $module . "_View");
     $view->addScriptPath(ZfApplication::$_base_path . "/app/{$module}/views/scripts/blocks");
     $view->addScriptPath($layout->getLayoutPath() . "default/templates/blocks");
     $view->addScriptPath($layout->getLayoutPath() . "default/templates/{$module}/blocks");
     $view->addScriptPath($layout->getLayoutPath() . $layout->getLayout() . "/templates/blocks");
     $view->addScriptPath($layout->getLayoutPath() . $layout->getLayout() . "/templates/{$module}/blocks");
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:19,代码来源:Abstract.php


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