Browse Source

Fix attaching behavior via config

tags/2.0.0-beta
slavcopost 12 years ago
parent
commit
3d40b171e0
  1. 2
      framework/base/Component.php

2
framework/base/Component.php

@ -8,6 +8,7 @@
namespace yii\base;
use Yii;
use yii\helpers\base\VarDumper;
/**
* @include @yii/base/Component.md
@ -90,6 +91,7 @@ class Component extends Object
// as behavior: attach behavior
$name = trim(substr($name, 3));
$this->attachBehavior($name, $value instanceof Behavior ? $value : Yii::createObject($value));
return;
} else {
// behavior property
$this->ensureBehaviors();

Loading…
Cancel
Save