本文整理汇总了PHP中Render::renderFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Render::renderFile方法的具体用法?PHP Render::renderFile怎么用?PHP Render::renderFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Render
的用法示例。
在下文中一共展示了Render::renderFile方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html_list
public function html_list($document)
{
Backend::add('Sub Title', $document->getMeta('name'));
Backend::add('TabLinks', $this->getTabLinks(Controller::$action));
Backend::add('Object', $document);
Backend::addContent(Render::renderFile('document_list.tpl.php'));
}
示例2: html_display
public function html_display($content)
{
Backend::add('Sub Title', 'Revisions for ' . $content->array['name']);
Backend::add('content', $content);
Backend::add('revisions', $content->object->revisions);
Backend::addContent(Render::renderFile('content_revision.display.tpl.php'));
return true;
}
示例3: html_list
public function html_list($result)
{
Backend::add('Sub Title', $result->getMeta('name'));
Backend::add('TabLinks', $this->getTabLinks(Controller::$action));
Backend::addScript(SITE_LINK . '/js/jquery.js');
Backend::addScript(SITE_LINK . '/js/image_list.js');
Backend::addStyle(SITE_LINK . '/css/image_list.css');
Backend::addContent(Render::renderFile('image.list.tpl.php', array('db_object' => $result)));
}
示例4: html_display
public function html_display($result)
{
$result = parent::html_display($result);
if (Value::get(get_class($this) . '_commented', true) && Component::isActive('Comment')) {
if ($result instanceof DBObject) {
$comments = Comment::getComments($result->getMeta('table'), $result->getMeta('id'));
Backend::addContent(Render::renderFile('comments.tpl.php', array('comment_list' => $comments)));
if (Permission::check('create', 'comment')) {
$values = array('foreign_table' => $result->getMeta('table'), 'foreign_id' => $result->getMeta('id'));
Backend::addContent(Render::renderFile('comment.add.tpl.php', $values));
}
}
}
return $result;
}
示例5: get_list
function get_list($start, $count, array $options = array())
{
$Assignments = new AssignmentObj();
if ($start === 'all') {
$limit = 'all';
} else {
$limit = "{$start}, {$count}";
}
$conditions = array('`assignments`.`active` = 1');
$joins = array(array('type' => 'LEFT', 'table' => '`roles`', 'conditions' => array('`roles`.`id` = `assignments`.`role_id`', '`roles`.`active` = 1')));
$fields = array('`assignments`.*', '`roles`.`name` AS `role`');
list($query, $params) = $Assignments->getSelectSQL(array('conditions' => $conditions, 'joins' => $joins, 'fields' => $fields, 'limit' => $limit));
$Assignments->read(array('query' => $query, 'parameters' => $params));
Backend::add('Assignments', $Assignments);
Backend::addContent(Render::renderFile('assignment_list.tpl.php'));
}
示例6: hook_output
public static function hook_output($to_print)
{
Backend::add('BackendErrors', Backend::getError());
Backend::add('BackendSuccess', Backend::getSuccess());
Backend::add('BackendNotices', Backend::getNotice());
Backend::add('BackendInfo', Backend::getInfo());
Backend::setError();
Backend::setSuccess();
Backend::setNotice();
Backend::setInfo();
$content = Backend::getContent();
if (empty($content)) {
ob_start();
var_dump($to_print);
$content = ob_get_clean();
if (substr($content, 0, 4) != '<pre') {
$content = '<pre>' . $content . '</pre>';
}
Backend::addContent($content);
}
$to_print = Render::renderFile('styles.area.tpl.php');
$to_print .= Render::renderFile('maincontent.tpl.php');
$to_print .= Render::renderFile('scripts.tpl.php');
$to_print = HtmlView::addLastContent($to_print);
$to_print = HtmlView::replace($to_print);
$to_print = HtmlView::rewriteLinks($to_print);
$to_print = HtmlView::addLinks($to_print);
$to_print = HtmlView::formsAcceptCharset($to_print);
if (Component::isActive('BackendFilter')) {
$BEFilter = new BEFilterObj();
$BEFilter->read();
$filters = $BEFilter->list ? $BEFilter->list : array();
foreach ($filters as $row) {
if (class_exists($row['class'], true) && is_callable(array($row['class'], $row['function']))) {
$to_print = call_user_func(array($row['class'], $row['function']), $to_print);
}
}
}
return $to_print;
}
示例7: html_filter
public function html_filter($resultArray)
{
//backend_error.filter.tpl.php
Backend::addContent(Render::renderFile('backend_request.filter.tpl.php', array('data' => $resultArray['data'], 'params' => $resultArray['params'], 'pager' => $resultArray['pager'], 'sort' => $resultArray['sort'])));
}
示例8: getExample
public static function getExample()
{
return Render::renderFile('api.example.tpl.php');
}
示例9: install_check
public static function install_check()
{
if (!self::checkCacheFolder()) {
if (function_exists('posix_getgrgid') && function_exists('posix_getegid')) {
if ($group = posix_getgrgid(posix_getegid())) {
$group = $group['name'];
}
}
$values = array('folder' => self::$cache_folder, 'group' => isset($group) ? $group : false);
Backend::addContent(Render::renderFile('render.fix_cache_folder.tpl.php', $values));
return false;
}
return true;
}
示例10: html_permissions
public function html_permissions($result)
{
if (is_post()) {
if ($result === false) {
Backend::addError('Could not update Permissions');
} else {
Backend::addSuccess($result . ' Permissions Updated');
}
Controller::redirect('previous');
}
//GET
if (!empty(Controller::$parameters[0])) {
Backend::add('Sub Title', class_name(Controller::$parameters[0]) . ' Permissions');
Links::add('All Permissions', '?q=gate_manager/permissions', 'secondary');
} else {
Backend::add('Sub Title', ConfigValue::get('Title') . ' Permissions');
}
Backend::addContent(Render::renderFile('gate_manager.permissions.tpl.php', (array) $result));
}
示例11: array
<?php
$list_start = !isset($list_start) ? Controller::$parameters[1] : $list_start;
$list_length = !isset($list_length) ? Controller::$parameters[2] : $list_length;
?>
{tpl:std_search.tpl.php}
<?php
if (!empty($term)) {
?>
<p class="large">Showing results for the search for <strong>#term#</strong></p>
<?php
if (Render::checkTemplateFile($db_object->getArea() . '.list.tpl.php')) {
?>
<?php
echo Render::renderFile($db_object->getArea() . '.list.tpl.php', array('list_start' => $list_start, 'list_length' => $list_length));
?>
<?php
} else {
?>
{tpl:std_list.tpl.php}
<?php
}
}