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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
f829b947
Commit
f829b947
authored
Aug 03, 2013
by
Luciano Baraglia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor doc and messages fixes [skip ci]
parent
9f4ccb62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
DetailView.php
framework/yii/widgets/DetailView.php
+3
-3
No files found.
framework/yii/widgets/DetailView.php
View file @
f829b947
...
...
@@ -21,7 +21,7 @@ use yii\helpers\Inflector;
* DetailView displays the detail of a single data [[model]].
*
* DetailView is best used for displaying a model in a regular format (e.g. each model attribute
* is displayed as a row in a table.) The model can be either an instance of [[Model]]
or
* is displayed as a row in a table.) The model can be either an instance of [[Model]]
* or an associative array.
*
* DetailView uses the [[attributes]] property to determines which model attributes
...
...
@@ -105,7 +105,7 @@ class DetailView extends Widget
public
function
init
()
{
if
(
$this
->
model
===
null
)
{
throw
new
InvalidConfigException
(
'Please specify the "
data
" property.'
);
throw
new
InvalidConfigException
(
'Please specify the "
model
" property.'
);
}
if
(
$this
->
formatter
==
null
)
{
$this
->
formatter
=
Yii
::
$app
->
getFormatter
();
...
...
@@ -166,7 +166,7 @@ class DetailView extends Widget
}
elseif
(
is_array
(
$this
->
model
))
{
$this
->
attributes
=
array_keys
(
$this
->
model
);
}
else
{
throw
new
InvalidConfigException
(
'The "
data
" property must be either an array or an object.'
);
throw
new
InvalidConfigException
(
'The "
model
" property must be either an array or an object.'
);
}
sort
(
$this
->
attributes
);
}
...
...
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