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
c5bad9ea
Commit
c5bad9ea
authored
May 08, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes issue #172: Added Object::className().
parent
2dd51d5b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
+18
-4
main.php
apps/bootstrap/protected/views/layouts/main.php
+4
-2
contact.php
apps/bootstrap/protected/views/site/contact.php
+3
-1
login.php
apps/bootstrap/protected/views/site/login.php
+3
-1
Object.php
framework/base/Object.php
+8
-0
No files found.
apps/bootstrap/protected/views/layouts/main.php
View file @
c5bad9ea
<?php
use
yii\helpers\Html
;
use
yii\widgets\Menu
;
/**
* @var $this \yii\base\View
* @var $content string
*/
use
yii\helpers\Html
;
$this
->
registerAssetBundle
(
'app'
);
?>
<?php
$this
->
beginPage
();
?>
...
...
@@ -23,7 +25,7 @@ $this->registerAssetBundle('app');
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<?php
$this
->
widget
(
'yii\widgets\Menu'
,
array
(
<?php
$this
->
widget
(
Menu
::
className
()
,
array
(
'options'
=>
array
(
'class'
=>
'nav'
),
'items'
=>
array
(
array
(
'label'
=>
'Home'
,
'url'
=>
array
(
'/site/index'
)),
...
...
apps/bootstrap/protected/views/site/contact.php
View file @
c5bad9ea
<?php
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
/**
* @var yii\base\View $this
* @var yii\widgets\ActiveForm $form
...
...
@@ -20,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title;
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
</p>
<?php
$form
=
$this
->
beginWidget
(
'yii\widgets\ActiveForm'
,
array
(
<?php
$form
=
$this
->
beginWidget
(
ActiveForm
::
className
()
,
array
(
'options'
=>
array
(
'class'
=>
'form-horizontal'
),
'fieldConfig'
=>
array
(
'inputOptions'
=>
array
(
'class'
=>
'input-xlarge'
)),
));
?>
...
...
apps/bootstrap/protected/views/site/login.php
View file @
c5bad9ea
<?php
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
/**
* @var yii\base\View $this
* @var yii\widgets\ActiveForm $form
...
...
@@ -12,7 +14,7 @@ $this->params['breadcrumbs'][] = $this->title;
<p>
Please fill out the following fields to login:
</p>
<?php
$form
=
$this
->
beginWidget
(
'yii\widgets\ActiveForm'
,
array
(
'options'
=>
array
(
'class'
=>
'form-horizontal'
)));
?>
<?php
$form
=
$this
->
beginWidget
(
ActiveForm
::
className
()
,
array
(
'options'
=>
array
(
'class'
=>
'form-horizontal'
)));
?>
<?php
echo
$form
->
field
(
$model
,
'username'
)
->
textInput
();
?>
<?php
echo
$form
->
field
(
$model
,
'password'
)
->
passwordInput
();
?>
<?php
echo
$form
->
field
(
$model
,
'rememberMe'
)
->
checkbox
();
?>
...
...
framework/base/Object.php
View file @
c5bad9ea
...
...
@@ -15,6 +15,14 @@ namespace yii\base;
class
Object
{
/**
* @return string the fully qualified name of this class.
*/
public
static
function
className
()
{
return
get_called_class
();
}
/**
* Constructor.
* The default implementation does two things:
*
...
...
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