- widget('yii\widgets\Menu', array(
+ widget(Menu::className(), array(
'options' => array('class' => 'nav'),
'items' => array(
array('label' => 'Home', 'url' => array('/site/index')),
diff --git a/apps/bootstrap/protected/views/site/contact.php b/apps/bootstrap/protected/views/site/contact.php
index 5cb5a8e..4115b53 100644
--- a/apps/bootstrap/protected/views/site/contact.php
+++ b/apps/bootstrap/protected/views/site/contact.php
@@ -1,5 +1,7 @@
params['breadcrumbs'][] = $this->title;
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
-beginWidget('yii\widgets\ActiveForm', array(
+beginWidget(ActiveForm::className(), array(
'options' => array('class' => 'form-horizontal'),
'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')),
)); ?>
diff --git a/apps/bootstrap/protected/views/site/login.php b/apps/bootstrap/protected/views/site/login.php
index f7f842e..65dc7d1 100644
--- a/apps/bootstrap/protected/views/site/login.php
+++ b/apps/bootstrap/protected/views/site/login.php
@@ -1,5 +1,7 @@
params['breadcrumbs'][] = $this->title;
Please fill out the following fields to login:
-beginWidget('yii\widgets\ActiveForm', array('options' => array('class' => 'form-horizontal'))); ?>
+beginWidget(ActiveForm::className(), array('options' => array('class' => 'form-horizontal'))); ?>
field($model, 'username')->textInput(); ?>
field($model, 'password')->passwordInput(); ?>
field($model, 'rememberMe')->checkbox(); ?>
diff --git a/framework/base/Object.php b/framework/base/Object.php
index a547990..a90a231 100644
--- a/framework/base/Object.php
+++ b/framework/base/Object.php
@@ -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:
*