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


PHP Renderer::output方法代码示例

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


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

示例1: array

<?php

/**
 * List Topic Pages
 */
namespace MySociety\TheyWorkForYou;

// Disable the old PAGE class.
$new_style_template = TRUE;
// Include all the things this page needs.
include_once '../../includes/easyparliament/init.php';
// Array of topic page names (must exist in metadata.php) and titles to display.
$data['topics'] = array('topicbenefits' => 'Benefits', 'topiccrimestats' => 'Crime Statistics', 'topicnhs' => 'NHS');
// Send for rendering!
Renderer::output('topic/list', $data);
开发者ID:udp12,项目名称:theyworkforyou,代码行数:15,代码来源:index.php

示例2: elseif

            }
        } elseif ($THEUSER->postcode_is_set()) {
            $member = new Member(array('postcode' => $THEUSER->postcode(), 'house' => HOUSE_TYPE_COMMONS));
        } else {
            $data['display_postcode_form'] = true;
        }
    }
    // If a member exists then we can go and do policies
    if (isset($member)) {
        $data['member_name'] = $member->full_name();
        $data['member_id'] = $member->member_id();
        $data['member_url'] = $member->url();
        $data['member_image'] = $member->image();
        $data['member_constituency'] = $member->constituency();
        // Build the policy set
        $policies = new Policies();
        $policies = $policies->limitToSet($data['policyset']);
        // Grab extra member info
        // TODO: Shouldn't this be loaded on request?
        $member->load_extra_info();
        // Get their position on relevant policies!
        $policyPositions = new PolicyPositions($policies, $member);
        $data['positions'] = $policyPositions->positions;
        $data['sinceString'] = $policyPositions->sinceString;
    }
    // Send for rendering!
    Renderer::output('topic/topic', $data);
} else {
    header('HTTP/1.0 404 Not Found');
    Renderer::output('topic/error', array('error' => 'Sorry, but there isn&rsquo;t a topic page by that name.'));
}
开发者ID:udp12,项目名称:theyworkforyou,代码行数:31,代码来源:topic.php


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