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


PHP Zikula_View::get_template_path方法代码示例

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


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

示例1: smarty_function_debugenvironment

/**
 * Zikula_View function to get all session variables.
 *
 * This function gets all session vars from the Zikula system assigns the names and
 * values to two array. This is being used in pndebug to show them.
 *
 * Example
 *   {debugenvironment}
 *
 * @param array       $params All attributes passed to this function from the template.
 * @param Zikula_View $view   Reference to the Zikula_View object.
 *
 * @return void
 */
function smarty_function_debugenvironment($params, Zikula_View $view)
{
    $view->assign('_ZSession_keys', array_keys($_SESSION));
    $view->assign('_ZSession_vals', array_values($_SESSION));
    $view->assign('_smartyversion', $view->_version);
    $_theme = ModUtil::getInfoFromName('ZikulaThemeModule');
    $view->assign('_themeversion', $_theme['version']);
    $view->assign('_force_compile', ModUtil::getVar('ZikulaThemeModule', 'force_compile') ? __('On') : __('Off'));
    $view->assign('_compile_check', ModUtil::getVar('ZikulaThemeModule', 'compile_check') ? __('On') : __('Off'));
    $view->assign('_baseurl', System::getBaseUrl());
    $view->assign('_baseuri', System::getBaseUri());
    $plugininfo = isset($view->_plugins['function']['zdebug']) ? $view->_plugins['function']['zdebug'] : $view->_plugins['function']['zpopup'];
    $view->assign('_template', $plugininfo[1]);
    $view->assign('_path', $view->get_template_path($plugininfo[1]));
    $view->assign('_line', $plugininfo[2]);
}
开发者ID:rmaiwald,项目名称:core,代码行数:30,代码来源:function.debugenvironment.php

示例2: z_get_timestamp

 /**
  * Get the timestamp of the last change of the $tpl_name file.
  *
  * @param string $tpl_name Template name.
  * @param string      &$tpl_timestamp Template timestamp.
  * @param Zikula_View $view Reference to Smarty instance.
  *
  * @return boolean
  */
 public static function z_get_timestamp($tpl_name, &$tpl_timestamp, $view)
 {
     // get path, checks also if tpl_name file_exists and is_readable
     $tpl_path = $view->get_template_path($tpl_name);
     if ($tpl_path !== false) {
         $tpl_timestamp = filemtime(DataUtil::formatForOS($tpl_path . '/' . $tpl_name));
         return true;
     }
     return false;
 }
开发者ID:rmaiwald,项目名称:core,代码行数:19,代码来源:Resource.php

示例3: smartyViewoutputfilter

 /**
  * This smarty output filter saves all assigned templates variables.
  *
  * @param string      $output Current HTML output.
  * @param Zikula_View $view   Current Zikula_View instance.
  *
  * @return string
  */
 public function smartyViewoutputfilter($output, $view)
 {
     // extract template name
     if (isset($view->_smarty_debug_info[0])) {
         $template = $view->_smarty_debug_info[0]['filename'];
         $templatepath = $view->get_template_path($template);
         // extract module
         $templateModule = substr($templatepath, strpos($templatepath, '/') + 1);
         $templateModule = substr($templateModule, 0, strpos($templateModule, '/'));
         $this->_templates[] = array('module' => $templateModule, 'template' => $template, 'vars' => $this->removeOldModuleVars($this->removeZikulaViewVars($view->get_template_vars())));
         $view->_smarty_debug_info = array();
     }
     return $output;
 }
开发者ID:planetenkiller,项目名称:core,代码行数:22,代码来源:View.php


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