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


PHP Module::render方法代码示例

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


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

示例1: testRender

 public function testRender()
 {
     $param = 'tset';
     $test = '<h1>Test' . $param . '</h1>';
     ob_start();
     $this->module->render('testAction', $param);
     $output = ob_get_contents();
     ob_end_clean();
     $this->assertEquals($test, $output);
     $this->setExpectedException('\\samsonphp\\core\\exception\\ControllerActionNotFound');
     $this->module->render('notFoundAction', $param);
 }
开发者ID:getmanenko,项目名称:php_core,代码行数:12,代码来源:ModuleTest.php

示例2: render

 function render()
 {
     // $this->title = "Edit Profile";
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:7,代码来源:EditProfileModule.php

示例3: render

 function render()
 {
     $param['network_id'] = PA::$network_info->network_id;
     $res = Network::get_members($param);
     $links['registered_users'] = count($res['users_data']);
     $this->email_domain_array = $this->get_email_by_domain($res['users_data']);
     $this->blog_post = Content::load_content_id_array(0, NULL, TRUE, 'ALL', 'created', 'DESC');
     $image_array = Image::load_images();
     $this->images = count($image_array);
     $this->profile_views = User::get_profile_view_stats('profile_visitor_count');
     $this->profile_visits_by_user = User::get_profile_view_stats('profile_visited_count');
     $relationship_stats = array();
     $maximum_relation = 0;
     $minimum_relation = 0;
     $average_relation = 0;
     $relationship_stats = Relation::relation_stats();
     if (count($relationship_stats) > 0) {
         $maximum_relation = max($relationship_stats);
         $minimum_relation = min($relationship_stats);
         $average_relation = array_sum($relationship_stats) / count($relationship_stats);
     }
     $this->relationship_stats = array('min' => $minimum_relation, 'max' => $maximum_relation, 'avg' => $average_relation);
     $this->inner_HTML = $this->generate_inner_html($links);
     $content = parent::render();
     return $content;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:26,代码来源:MISReportModule.php

示例4: render

 function render()
 {
     $pollObj = new Poll();
     // $current = $pollObj->load_current($_GET['gid']);
     $this->prev_polls = $pollObj->load_prev_polls(isset($_GET) && isset($_GET['gid']) ? $_GET['gid'] : null);
     if ($this->prev_polls) {
         foreach ($this->prev_polls as $poll) {
             $votes = $pollObj->load_vote($poll->poll_id);
             $poll->total_votes = count($votes);
             $options = array();
             foreach (unserialize($poll->options) as $option => $s) {
                 $options[$option]['title'] = $s;
                 $option_votes = $pollObj->load_vote_option($poll->poll_id, $s);
                 // echo "<pre>".print_r($option_votes,1)."</pre>";
                 $options[$option]['count'] = $option_votes[2]->counter;
                 $options[$option]['percent'] = $poll->total_votes != 0 ? round($option_votes[2]->counter / $poll->total_votes * 100, 1) : 0;
             }
             $poll->options = $options;
         }
         $this->inner_HTML = $this->generate_inner_html();
         $content = parent::render();
         return $content;
     } else {
         $this->do_skip = TRUE;
         return 'skip';
     }
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:27,代码来源:PollArchiveModule.php

示例5: render

 function render()
 {
     $this->get_recent_tags();
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:7,代码来源:RecentTagsModule.php

示例6: render

 function render()
 {
     global $login_uid;
     $obj = new Poll();
     $prev_poll = $obj->load_prevous_polls($_GET['gid']);
     $cnt = count($prev_poll);
     for ($i = 0; $i < $cnt; $i++) {
         $total_votes[$prev_poll[$i]->poll_id] = count($obj->load_vote($prev_poll[$i]->poll_id));
         $prev_options[$i] = unserialize($prev_poll[$i]->options);
         $num_option = count($prev_options[$i]);
         for ($j = 1; $j <= $num_option; $j++) {
             if ($prev_options[$i]['option' . $j] != '') {
                 $vote[] = $obj->load_vote_option($prev_poll[$i]->poll_id, $prev_options[$i]['option' . $j]);
             }
         }
     }
     $percentage = array();
     for ($i = 0; $i < count($vote); $i++) {
         $j = $vote[$i][0];
         if ($total_votes[$j] != 0) {
             $percentage[$j][] = round($vote[$i][2]->counter / $total_votes[$j] * 100, 1);
         }
     }
     $this->current_poll = $obj->load_current($_GET['gid']);
     $this->per_prev_poll = $percentage;
     $this->prev_poll = $prev_poll;
     $this->prev_options = $prev_options;
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:31,代码来源:ViewPollModule.php

示例7: render

 function render()
 {
     $conf = new NetworkConfig();
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:7,代码来源:NetworkDefaultControlModule.php

示例8: render

 function render()
 {
     global $login_uid;
     if ($this->type == 'group') {
         $this->view_all_url = "showcontent.php?gid={$this->gid}";
         $group = new Group();
         $group->collection_id = $this->gid;
         $this->links = $group->get_contents_for_collection($type = 'all', $cnt = FALSE, $show = 5, $page = 1, $sort_by = 'created', $direction = 'DESC', TRUE);
         //$type = 'all',$cnt=FALSE, $show='ALL', $page=0, $sort_by='created', $direction='DESC'
     } else {
         if ($this->type == 'homepage') {
             //if homepage then do some additional filter
             //Fix for homepage
             // DISPLAY_ON_HOMEPAGE has value 0
             // It means the posts whose display_on = 0 they will show up on the homepage
             $this->links = Content::get_recent_posts(array('show' => 5, 'sort_by' => 'RT.created', 'page' => 1, 'direction' => 'DESC'), 'collection_id=-1');
         } else {
             if ($this->type == 'permalink') {
                 $this->links = Content::get_recent_posts(array('show' => 5, 'sort_by' => 'RT.created', 'page' => 1, 'direction' => 'DESC'), 'collection_id=-1 ');
             } else {
                 $this->links = Content::get_recent_posts(array('show' => 5, 'sort_by' => 'RT.created', 'page' => 1, 'direction' => 'DESC'), 'collection_id=-1 ');
             }
         }
     }
     $this->view_all_url = count($this->links) > 0 ? $this->view_all_url : '';
     $this->inner_HTML = $this->generate_inner_html($this->links);
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:29,代码来源:RecentPostModule.php

示例9: render

 function render()
 {
     $this->outer = get_class_name(PAGE_LOGIN);
     $this->inner_HTML = $this->generate_center_public_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:7,代码来源:LoginModule.php

示例10: render

 function render()
 {
     $this->group_details = $this->shared_data['group_info'];
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:7,代码来源:GroupAccessModule.php

示例11: render

 function render()
 {
     $this->links = NULL;
     $Pagination = new Pagination();
     switch ($this->type) {
         case IMAGE:
             $this->links = Content::load_content_id_array($this->uid, IMAGE);
             $this->type_image = PA::$theme_url . "/images/type-image.gif";
             break;
         case AUDIO:
             $this->links = Content::load_content_id_array($this->uid, AUDIO);
             $this->type_image = PA::$theme_url . "/images/type-audio.gif";
             break;
         case VIDEO:
             $this->links = Content::load_content_id_array($this->uid, VIDEO);
             $this->type_image = PA::$theme_url . "/images/type-video.gif";
             break;
         default:
         case BLOGPOST:
             $this->links = Content::load_content_id_array($this->uid, BLOGPOST);
             $this->type_image = PA::$theme_url . "/images/type-blog.gif";
             break;
     }
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:people-aggregator,代码行数:27,代码来源:MediaManagementModule.php

示例12: render

 function render()
 {
     $this->title = __("Recover Password");
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:7,代码来源:ForgotPasswordModule.php

示例13: render

 function render()
 {
     $this->links = $this->get_links();
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:7,代码来源:CommentsManagementModule.php

示例14: render

 function render()
 {
     $this->title = 'Flickr';
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:7,代码来源:FlickrModule.php

示例15: render

 function render()
 {
     switch ($this->view) {
         case "user":
             $this->mode = 'view_conversations';
             switch (@$this->params['view']) {
                 case 'message':
                     $this->mode = 'view_message';
                     $this->title = __('View Message');
                     break;
                 case 'compose':
                     $this->mode = 'compose_message';
                     $this->title = __('Compose Message');
                     break;
                 default:
             }
             break;
         default:
             return "Unknown ConversationModule view: {$this->view}";
     }
     $this->inner_HTML = $this->generate_inner_html();
     if (preg_match($this->skin, "/_inner\$/")) {
         $content = parent::render();
     } else {
         $content = $this->inner_HTML;
     }
     return $content;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:28,代码来源:ConversationModule.php


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