yii\widgets\BaseListView::renderSection PHP Method

renderSection() public method

If the named section is not supported, false will be returned.
public renderSection ( string $name ) : string | boolean
$name string 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)
    {
        switch ($name) {
            case '{summary}':
                return $this->renderSummary();
            case '{items}':
                return $this->renderItems();
            case '{pager}':
                return $this->renderPager();
            case '{sorter}':
                return $this->renderSorter();
            default:
                return false;
        }
    }

Usage Example

コード例 #1
0
 /**
  * @inheritdoc
  */
 public function renderSection($name)
 {
     switch ($name) {
         case "{errors}":
             return $this->renderErrors();
         default:
             return parent::renderSection($name);
     }
 }
All Usage Examples Of yii\widgets\BaseListView::renderSection