mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-16 22:39:52 +08:00
Fixes issue #172: Added Object::className().
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
use yii\helpers\Html;
|
||||||
|
use yii\widgets\Menu;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var $this \yii\base\View
|
* @var $this \yii\base\View
|
||||||
* @var $content string
|
* @var $content string
|
||||||
*/
|
*/
|
||||||
use yii\helpers\Html;
|
|
||||||
$this->registerAssetBundle('app');
|
$this->registerAssetBundle('app');
|
||||||
?>
|
?>
|
||||||
<?php $this->beginPage(); ?>
|
<?php $this->beginPage(); ?>
|
||||||
@@ -23,7 +25,7 @@ $this->registerAssetBundle('app');
|
|||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<?php $this->widget('yii\widgets\Menu', array(
|
<?php $this->widget(Menu::className(), array(
|
||||||
'options' => array('class' => 'nav'),
|
'options' => array('class' => 'nav'),
|
||||||
'items' => array(
|
'items' => array(
|
||||||
array('label' => 'Home', 'url' => array('/site/index')),
|
array('label' => 'Home', 'url' => array('/site/index')),
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
|
use yii\widgets\ActiveForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var yii\base\View $this
|
* @var yii\base\View $this
|
||||||
* @var yii\widgets\ActiveForm $form
|
* @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.
|
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php $form = $this->beginWidget('yii\widgets\ActiveForm', array(
|
<?php $form = $this->beginWidget(ActiveForm::className(), array(
|
||||||
'options' => array('class' => 'form-horizontal'),
|
'options' => array('class' => 'form-horizontal'),
|
||||||
'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')),
|
'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')),
|
||||||
)); ?>
|
)); ?>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
|
use yii\widgets\ActiveForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var yii\base\View $this
|
* @var yii\base\View $this
|
||||||
* @var yii\widgets\ActiveForm $form
|
* @var yii\widgets\ActiveForm $form
|
||||||
@@ -12,7 +14,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
<p>Please fill out the following fields to login:</p>
|
<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, 'username')->textInput(); ?>
|
||||||
<?php echo $form->field($model, 'password')->passwordInput(); ?>
|
<?php echo $form->field($model, 'password')->passwordInput(); ?>
|
||||||
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
|
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
|
||||||
|
|||||||
@@ -14,6 +14,14 @@ namespace yii\base;
|
|||||||
*/
|
*/
|
||||||
class Object
|
class Object
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @return string the fully qualified name of this class.
|
||||||
|
*/
|
||||||
|
public static function className()
|
||||||
|
{
|
||||||
|
return get_called_class();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* The default implementation does two things:
|
* The default implementation does two things:
|
||||||
|
|||||||
Reference in New Issue
Block a user