本文整理汇总了PHP中unknown::render方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::render方法的具体用法?PHP unknown::render怎么用?PHP unknown::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: format
/**
* Format the log message. Prepends a DateTime formatted string and the
* log level to the message.
*
* Example:
*
* $formatter = new BaseFormatter();
* $formatter->format(LogLevel::WARNING, 'This is a warning');
*
* The above returns:
*
* 2015-08-19 14:31 +0300 WARNING This is a warning
*
* @param string $level the log level
* @param string $message the log message
* @return string the formatted message
*
* @see \Dialog\Formatter\FormatterInterface::format()
*/
public function format($level, $message)
{
$date = $this->dateBuilder->buildFromTime();
$level = strtoupper($level);
$this->templateEngine->setTemplate('{date} {level} {message}');
$this->templateEngine->setDelimiters('{', '}');
return $this->templateEngine->render(compact('date', 'level', 'message'));
}
示例2: paginate
/**
* Display paginate links with limiter as option
* @param string $limiter
* @return string
*/
public function paginate($limiter = true)
{
/*
* Render custom paginator
*/
if (is_null($this->paginatorBuilder)) {
$this->paginatorBuilder = new PaginatorBuilder($this);
}
return $this->paginatorBuilder->render($limiter);
}
示例3: renderRegistView
/**
* 編集画面用のrender
* @param unknown $app
* @param unknown $parameters
*/
protected function renderRegistView($app, $parameters = array())
{
// 商品検索フォーム
$searchProductModalForm = $app['form.factory']->createBuilder('admin_search_product')->getForm();
$viewParameters = array('searchProductModalForm' => $searchProductModalForm->createView());
$viewParameters += $parameters;
return $app->render('Recommend/View/admin/regist.twig', $viewParameters);
}