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


PHP eZTemplate::resetInstance方法代码示例

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


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

示例1: render

    /**
     * Renders the block (returns HTML)
     *
     * @return string HTML
     **/
    public function render()
    {
        $tpl = eZTemplate::factory();
        $tpl->setVariable( 'articles', $this->getSolrArticles() );
        $blockResult = $tpl->fetch( 'design:presenters/block/congressreport.tpl' );
        eZTemplate::resetInstance();

        return $blockResult;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:14,代码来源:mmblockcongressreportpresenter.php

示例2: render

    /**
     * Renders the block (returns HTML)
     *
     * @return string HTML
     **/
    public function render()
    {
        $tpl = eZTemplate::factory();
        $page = $this->fetchStaticPage();
        $tpl->setVariable( 'core_content', str_replace( '/bundles/static-data/', '/esibuild/static/', $page->attribute('core_content') ) );
        $renderResult = $tpl->fetch( 'design:presenters/block/content.tpl' );
        eZTemplate::resetInstance();

        return $renderResult;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:15,代码来源:mmblockcontentpresenter.php

示例3: tpl

    /**
     * @return eZTemplate
     */
    public function tpl()
    {
        if(is_null($this->_tpl))
        {
            eZTemplate::resetInstance();
            $this->_tpl = eZTemplate::factory();

            if (SolrSafeOperatorHelper::featureIsActive('showMedicalNewsDemo') && SolrSafeOperatorHelper::feature('ShowMedicalNewsDemo', 'showDemo')){
                $showMedicalNewsDemo = true;
                
            }else {
                $showMedicalNewsDemo = false;
            }
            
            $this->_tpl->setVariable('showMedicalNewsDemo',$showMedicalNewsDemo);
            
            $this->_tpl->setVariable('language'          , LocaleTool::languageISO639Code());
            $this->_tpl->setVariable('application_class' , get_class($this) );
            $this->_tpl->setVariable('view_parameters'   , $this->_params['UserParameters']);
            $this->_tpl->setVariable('cluster_identifier', ClusterTool::clusterIdentifier());
            $this->_tpl->setVariable('application_url'   , $this->applicationName());
            $this->_tpl->setVariable('consult'           , $this->isConsult);
            $this->_tpl->setVariable('httpcontext'       , array(
                'host'  => ContextTool::instance()->domain(),
            ));

            $environment = new MMEnvironment();
            $this->_tpl->setVariable('environment'       , $environment->env);

            $applicationLocalized = CacheApplicationTool::buildLocalizedApplication($this->applicationName());

            if (empty($applicationLocalized))
                $this->_tpl->setVariable('application_name'  , $this->applicationName());
            else
            {
                $applicationIdentifier = $applicationLocalized->applicationObject->attribute('identifier');

                $this->_tpl->setVariable('application_name' , $applicationIdentifier );
                $this->_tpl->setVariable('current_localized' , $applicationLocalized );
                $this->_tpl->setVariable('current_application' , $applicationLocalized->applicationObject );
            }
        }

        return $this->_tpl;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:48,代码来源:blockDefault.php

示例4: render

    /**
     * Renders the block (returns HTML)
     *
     * @return string HTML
     **/
    public function render()
    {
        $tpl = eZTemplate::factory();

        $tpl->setVariable( 'articles', $this->getSolrArticles() );
        $tpl->setVariable( 'additional_classes', $this->additionalClasses() );
        $tpl->setVariable( 'app', $this->applicationObject );
        $tpl->setVariable( 'app_localized', $this->applicationLocalized );
        $tpl->setVariable( 'app_url_alias', $this->appUrlAlias() );
        $tpl->setVariable( 'cluster_identifier', ClusterTool::clusterIdentifier() );
        $tpl->setVariable( 'include_app_name', SolrSafeOperatorHelper::clusterIni( 'HomePageSettings', 'ShowApplicationInMoreLink', 'merck.ini' ) );
        $tpl->setVariable( 'nb_articles', $this->nbArticles );
        $tpl->setVariable( 'publisher_logo', $this->publisherLogo() );
        $tpl->setVariable( 'view_mode', $this->viewMode() );
        $tpl->setVariable( 'application_url', SolrSafeOperatorHelper::getApplicationUrl($this->applicationObject->attribute('identifier')) );
        $tpl->setVariable( 'with_feed', $this->_application->resultHandler->withFeed );

        $blockResult = $tpl->fetch( 'design:presenters/block/applist.tpl' );
        eZTemplate::resetInstance();

        return $blockResult;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:27,代码来源:mmblockapplistpresenter.php


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