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


PHP Content::render方法代码示例

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


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

示例1: render

 function render()
 {
     if (!empty($this->path)) {
         $text = $this->load->view('content/' . $this->path, array('id' => $this->id, 'info' => json_decode($this->info), 'mode' => 'view'), TRUE);
     } else {
         $text = 'Widget Not found';
     }
     return parent::render($text);
 }
开发者ID:blumine,项目名称:vunsy,代码行数:9,代码来源:widget.php

示例2: elseif

<?php

if ($mode == 'config') {
    ?>
id:
	type:number
<?php 
} elseif ($mode == 'layout') {
    ?>
0


<?php 
} elseif ($mode == 'view') {
    $instance = new Content();
    $instance->get_by_id($id);
    if ($instance->exists()) {
        echo $instance->render();
    } else {
        $ci->load->library('gui');
        echo $ci->gui->error('Content Choosen not found');
    }
}
开发者ID:kabircse,项目名称:Codeigniter-Egypt,代码行数:23,代码来源:Repeat+existing+content.php

示例3: render

 function render()
 {
     $CI =& get_instance();
     /***************************************
      *  the main render code
      * **************************************/
     // getting the cells number
     $cell_number = $this->cells();
     $layout_content = array();
     /***************************************
      *  starting to render the cells
      * **************************************/
     for ($i = 0; $i < $cell_number; $i++) {
         // getting the content in that cell
         $c_children = $this->children($CI->vunsy->get_section(), $i);
         $cell_text = '';
         if ($CI->vunsy->edit_mode() and count($c_children) == 0 and $this->can_addin()) {
             $cell_text = $this->add_button($i, 0);
         }
         // +++ buttons +++ in start of every cell
         // rendering the cell content
         $sort_num = 0;
         foreach ($c_children as $item) {
             $sort_num++;
             $cell_text .= $item->render();
         }
         // put the cell text in it's place in the layout text array
         /* that commented block was putting every cell in container,
          * we have to put all the content in a container not the empty cell
          * the page was disply even the empty cell plus button in a container
          * */
         $layout_content[$i] = $cell_text;
     }
     // if the layout exists render the layout with the corresponding
     // cells text if not just pass the first cell value
     if ($this->path != '') {
         $text = $this->load->view('content/' . $this->path, array('id' => $this->id, 'cell' => $layout_content, 'mode' => 'view'), TRUE);
     } else {
         $text = $layout_content[0];
     }
     // enclose the layout in a container
     /* i comented that block and i'll make the parent class display all 
      * the layoutsand widgets in a container
      */
     return parent::render($text);
 }
开发者ID:blumine,项目名称:vunsy,代码行数:46,代码来源:layout.php

示例4: render

    function render()
    {
        $CI =& get_instance();
        if ($CI->vunsy->section->can_view()) {
            /*********************************************
             *  redering the page BODY content
             * here i open the edit mode so the widgets got the
             * container box and the controller buttons
             * and the admin toolbar 
             * ********************************************/
            $page_body = new Content();
            $page_body->get_by_info('PAGE_BODY_LOCKED');
            $page_body_text = $page_body->render();
            // adding the root toolbar
            if ($CI->vunsy->user->is_root()) {
                $page_body_text .= $CI->load->view('edit_mode/toolbar', '', TRUE);
            }
            $doctype_text = doctype($CI->config->item('doctype'));
            /*********************************************************
             * display the page content
             * i sum all the page content text
             * before page + CSS + JS + head + body + after page
             * *******************************************************/
            // Rendering the page
            echo <<<EOT
{$doctype_text}
<html xmlns="http://www.w3.org/1999/xhtml" >
\t<head>
\t<title>{$CI->config->item('site_name')} {$this->name}</title>
\t<meta http-equiv="content-type" content="text/html;charset={$CI->config->item('charset')}" />
\t<meta name="generator" content="VUNSY system" />
{$CI->vunsy->css_text()}
{$CI->vunsy->js_text()}
{$CI->vunsy->dojo_text()}
{$CI->vunsy->header_text()}
\t</head>
\t<body class="{$CI->vunsy->dojoStyle}">
\t\t{$page_body_text}
\t</body>
</html>
EOT;
        } else {
            show_error('Access denied');
        }
    }
开发者ID:sigit,项目名称:vunsy,代码行数:45,代码来源:section.php

示例5: render

 /**
  * render the HTML of current section
  * that function works if that section is the current
  * section of the user
  **/
 public function render()
 {
     if (!$this->ci->system->section->can_view()) {
         show_error(lang('system_access_denied'));
     }
     $page_body = new Content(1);
     $page_body_text = $page_body->render();
     // adding the admin toolbar
     if ($this->ci->ion_auth->is_admin()) {
         $page_body_text .= $this->ci->load->view('edit_mode/toolbar', '', TRUE);
     }
     theme_pagetitle($this->name);
     // Rendering the page
     $this->ci->load->view('xhtml', array('body' => $page_body_text));
 }
开发者ID:kabircse,项目名称:Codeigniter-Egypt,代码行数:20,代码来源:section.php


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