本文整理汇总了PHP中yii\widgets\ListView::renderSection方法的典型用法代码示例。如果您正苦于以下问题:PHP ListView::renderSection方法的具体用法?PHP ListView::renderSection怎么用?PHP ListView::renderSection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\widgets\ListView
的用法示例。
在下文中一共展示了ListView::renderSection方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderSection
/**
* Renders a section of the specified name.
* If the named section is not supported, false will be returned.
* @param string $name the section name, e.g., `{summary}`, `{items}`.
* @return string|boolean the rendering result of the section, or false if the named section is not supported.
*/
public function renderSection($name)
{
if ($name == '{pagerTop}') {
return $this->renderPagerTop();
}
return parent::renderSection($name);
}
示例2: renderSection
/**
* @inheritdoc
*/
public function renderSection($name)
{
switch ($name) {
case "{pagesizer}":
return $this->renderPagesizer();
default:
return parent::renderSection($name);
}
}
示例3: renderCustomSection
/**
* Renders a custom section if is specified otherwise calls parent render method
* @param string $name the section name, e.g., `{summary}`, `{items}`.
* @return string|boolean the rendering result of the section, or false if the named section is not supported.
*/
public function renderCustomSection($name)
{
if (isset($this->sections[$name])) {
return $this->sections[$name] ? $this->sections[$name] : '';
}
return parent::renderSection($name);
}