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


PHP View::Render方法代码示例

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


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

示例1: render

function render($file, $data = array(), $prefix = false)
{
    if ($file[0] == '~') {
        $file = substr($file, 2);
        $path = DIR_SHARED . "/View/{$file}.html";
    } else {
        $path = DIR_VIEWS . "/{$file}.html";
    }
    return View::Render($path, $data, $prefix);
}
开发者ID:Acidburn0zzz,项目名称:OEM,代码行数:10,代码来源:Basics.php

示例2: sayfa

 /**
  * slug a bağlı ilgili sayfayı açar
  *
  * @param string $slug
  * @todo slug db de var mı yok yoksa 404 bas
  * @return mixed
  */
 public function sayfa($slug = "kurumsal")
 {
     $this->model = new \Models\Posts_Model();
     $this->model->type = 'pages';
     $lng = new \Core\Language();
     $lang = $this->request->get('lang');
     if ($lang == "") {
         $lng->defaultLanguage = "tr";
         // dili belirtiyoruz
     } else {
         $lng->defaultLanguage = $lang;
     }
     $lng->load('header');
     $pages = $this->model->fetchPost_Slug($slug, $this->defaultLanguage);
     if ($pages) {
         // print_r($pages);
         $data['title'] = $pages['title'];
         $data['content'] = stripslashes($pages['content']);
         $data_head['title'] = $pages['title'];
         $data_head['meta_title'] = substr(stripslashes($pages['description']), 0, 150);
         $data_head['meta_image'] = DIR . PUBLIC_PATH . "/img/idealcomtrlogo.png";
         $data_head['meta_link'] = \Lib\Tools::currentPageURL();
         //menuler
         $data_header['kurumsal'] = $lng->get('kurumsal');
         $data_header['hizmetler'] = $lng->get('hizmetler');
         $data_header['urunler'] = $lng->get('urunler');
         $data_header['markalar'] = $lng->get('markalar');
         $data_header['satis'] = $lng->get('satis');
         $data_header['kariyer'] = $lng->get('kariyer');
         $data_header['iletisim'] = $lng->get('iletisim');
         View::RenderTemplate('head_view', $data_head);
         View::RenderTemplate('header_view', $data_header);
         View::Render('sayfa/index_view', $data);
         View::RenderTemplate('footer_view', $this->footerDatasi);
     } else {
         View::render('error/404', '');
     }
 }
开发者ID:stnc,项目名称:stnc-framework,代码行数:45,代码来源:Sayfalar.php

示例3: sayfalama

 /**
  * sayfalama olaylarının ornekleri
  * http://cms.dev/sayfalama
  */
 public function sayfalama()
 {
     $pages = new \Lib\Paginator('20', 'page');
     $toplam_urun = "50";
     // burası modelden gelebilir
     $pages->setTotal($toplam_urun);
     $pagination = \Helpers\URL_Helper::PaginationLink();
     $data['urun_sayfalama_linkler'] = $pages->pageLinks($pagination);
     View::Render('ornekler/data_aktarimi_db_view', $data);
 }
开发者ID:stnc,项目名称:stnc-framework,代码行数:14,代码来源:OrnekController.php


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