當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。