本文整理汇总了PHP中Render::view方法的典型用法代码示例。如果您正苦于以下问题:PHP Render::view方法的具体用法?PHP Render::view怎么用?PHP Render::view使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Render
的用法示例。
在下文中一共展示了Render::view方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Generate bootstrap javascript virtual file
*
* @return void
*/
public function init()
{
$contents = \Render::view('partials.initjs');
$response = \Response::make($contents, 200);
$response->header('Content-Type', 'application/javascript');
return $response;
}
示例2: edit
/**
* [edit description]
* @return [type] [description]
*/
public function edit($page_id, $block_id)
{
\Pongo::viewShare('page_id', $page_id);
\Pongo::viewShare('block_id', $block_id);
$block = $this->manager->getBlock($block_id);
return \Render::view('sections.blocks.edit', array('block' => $block));
}
示例3: uploadFile
public function uploadFile()
{
$view = \Render::view('sections.file.upload');
$view['section'] = 'upload';
$view['page_id'] = 0;
return $view;
}
示例4: index
public function index($args)
{
$render = new Render();
$render->add('path', $args['path']);
$render->add('fullPath', $args['fullPath']);
$render->add('args', $args['args']);
switch (true) {
case count($args['args']) == 0:
case $args['args'][0] == 'pages':
case $args['args'][0] == 'page':
$render->view('index');
break;
default:
$render->view('404', true, true, "HTTP/1.0 404 Not Found");
break;
}
}
示例5: search
/**
* [search description]
* @return [type] [description]
*/
public function search()
{
if ($this->manager->withInputOnly()) {
$users = $this->manager->search('users');
return \Render::view('sections.users.index', $users);
} else {
return \Redirect::route('users');
}
}
示例6: feed
public static function feed()
{
$tasks = TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'type' => TasksModel::TYPE_BACKUP));
if ($tasks) {
$output = \Render::view('backup/table', compact('tasks'), 'return');
} else {
$output = \Render::view('common/empty', false, 'return');
}
echo $output;
}
示例7: feed
public static function feed()
{
$tasks = TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id']));
if ($tasks) {
$output = \Render::view('activity/table', compact('tasks'), 'return');
} else {
$output = '
<div class="alert alert-warning text-center alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
Your history is clean, you did not use this feature before.
</div>';
}
// Mark as viewed
TasksModel::markAsRead(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id']));
echo $output;
}
示例8: searchField
/**
* Build a search input
*
* @param string $type
* @param string $name
* @param string $value
* @param array $options
* @param array $fields
* @return blade view
*/
public function searchField($type, $name, $value = null, $options = array(), $fields = array())
{
$field_view = \Render::view('partials.forms.searchitem');
$field_view['type'] = $type;
$field_view['name'] = $name;
$field_view['value'] = $value;
$field_view['options'] = $options;
$field_view['fields'] = $fields;
return $field_view;
}
示例9: edit
/**
* [edit description]
* @return [type] [description]
*/
public function edit($page_id)
{
\Pongo::viewShare('page_id', $page_id);
$page = $this->manager->getOne($page_id);
return \Render::view('sections.pages.edit', array('page' => $page));
}
示例10:
<img src="<?php
echo Render::image('new-user.png');
?>
" alt="avatar" class="img-rounded img-responsive" title="Choose New Account">
</a>
</div>
<div class="caption pull-left">
<h3>Not done?</h3>
<h6>Add as many accounts as you want</h6>
<h6>Click the button below to add another one</h6>
<br />
<p>
<a href="<?php
echo Render::link('accounts/add');
?>
" class="btn btn-xs btn-success">Add Account </a>
</p>
</div>
</div>
</div>
</div>
</div>
<?php
echo Render::view('common/copyright');
?>
示例11: showThumb
/**
* Generate an img tag to thumb
*
* @param string $path
* @param string $thumb
* @param string $alt
* @return string
*/
public function showThumb($path, $thumb = 'cms')
{
$file_name = $this->getFileName($path);
$output = $this->loadThumb($path, $thumb);
$view = \Render::view('partials.items.filethumb');
$view['is_image'] = $this->isImage($file_name);
$view['output'] = $output;
$view['url'] = $path;
return $view;
}
示例12: finish
public static function finish()
{
echo \Render::view('migrate/finish', array('services' => $_SESSION['wizard']['services']), 'return');
}
示例13: render
public function render($template, $data = [])
{
$this->write(\Render::view($template, $data));
}
示例14:
<?php
Render::view('common/header', $templateData);
Render::view($templateData['template'], $templateData);
Render::view('common/footer', $templateData);
示例15: open
public function open($pagina)
{
if ($this->allowCrossDomain) {
header('Access-Control-Allow-Origin: *');
}
if ($this->onlyJson && $_SERVER["HTTP_ACCEPT"] && strpos($_SERVER["HTTP_ACCEPT"], "application/json") === false) {
return false;
}
if ($this->onlyLocal && strpos($_SERVER['HTTP_REFERER'], getenv('HTTP_HOST')) === false) {
return false;
}
$retorno = 200;
$pagina = substr($pagina, -1) == "/" ? substr($pagina, 0, -1) : $pagina;
$pedacos = explode("/", $pagina);
$arg = array();
$index = $pagina;
while (count($pedacos) >= 0) {
if (count($pedacos) == 0 || isset($this->controller[$index]) && in_array($this->controller[$index], $this->controller)) {
break;
} else {
$arg[] = array_pop($pedacos);
$index = join("/", $pedacos);
}
}
if (count($arg) == 0) {
}
$index = $index == "" ? 'index' : $index;
$args = array('fullPath' => $pagina, 'path' => $index, 'args' => count($arg) > 0 && $arg[0] !== "" ? array_reverse($arg) : array());
if (!is_null($this->controller[$index]) && $index !== "") {
if (file_exists($this->controller[$index]['caminho'])) {
include $this->controller[$index]['caminho'];
$className = $this->controller[$index]['controle'];
if (class_exists($className)) {
$objController = new $className();
// roda a funcao init da classe
$action = $this->controller[$index]['action'];
$retorno = $objController->run($action, $args);
// roda a funcao run
//return true;
} else {
$retorno = 404;
//echo "Erro ao ativar o controller: ".$className."<br>";
//return false;
}
} else {
$retorno = 404;
}
} else {
$retorno = 404;
}
if ($retorno) {
if (Render::templateExists($retorno)) {
if (is_numeric($retorno)) {
}
$render = new Render();
$render->add('args', $args);
$render->view($retorno);
return true;
} else {
http_response_code($retorno);
return false;
}
} else {
return true;
}
}