Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
7eaf83ba
Commit
7eaf83ba
authored
Apr 22, 2014
by
Ivan Kolmycheck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BaseListView - errors rendering added
parent
104a38a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
BaseListView.php
framework/widgets/BaseListView.php
+13
-1
No files found.
framework/widgets/BaseListView.php
View file @
7eaf83ba
...
@@ -78,11 +78,12 @@ abstract class BaseListView extends Widget
...
@@ -78,11 +78,12 @@ abstract class BaseListView extends Widget
* The following tokens will be replaced with the corresponding section contents:
* The following tokens will be replaced with the corresponding section contents:
*
*
* - `{summary}`: the summary section. See [[renderSummary()]].
* - `{summary}`: the summary section. See [[renderSummary()]].
* - `{errors}`: the errors section. See [[renderErrors()]].
* - `{items}`: the list items. See [[renderItems()]].
* - `{items}`: the list items. See [[renderItems()]].
* - `{sorter}`: the sorter. See [[renderSorter()]].
* - `{sorter}`: the sorter. See [[renderSorter()]].
* - `{pager}`: the pager. See [[renderPager()]].
* - `{pager}`: the pager. See [[renderPager()]].
*/
*/
public
$layout
=
"
{
summary}\n{items}\n{pager
}
"
;
public
$layout
=
"
{
summary}\n{
errors}\n{
items}\n{pager
}
"
;
/**
/**
* Renders the data models.
* Renders the data models.
...
@@ -91,6 +92,15 @@ abstract class BaseListView extends Widget
...
@@ -91,6 +92,15 @@ abstract class BaseListView extends Widget
abstract
public
function
renderItems
();
abstract
public
function
renderItems
();
/**
/**
* Renders the list of errors, if there are any
* @return string the rendering result
*/
public
function
renderErrors
()
{
return
''
;
}
/**
* Initializes the view.
* Initializes the view.
*/
*/
public
function
init
()
public
function
init
()
...
@@ -131,6 +141,8 @@ abstract class BaseListView extends Widget
...
@@ -131,6 +141,8 @@ abstract class BaseListView extends Widget
public
function
renderSection
(
$name
)
public
function
renderSection
(
$name
)
{
{
switch
(
$name
)
{
switch
(
$name
)
{
case
'{errors}'
:
return
$this
->
renderErrors
();
case
'{summary}'
:
case
'{summary}'
:
return
$this
->
renderSummary
();
return
$this
->
renderSummary
();
case
'{items}'
:
case
'{items}'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment