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
3d40b171
Commit
3d40b171
authored
May 06, 2013
by
slavcopost
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix attaching behavior via config
parent
235ad40c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
Component.php
framework/base/Component.php
+2
-0
No files found.
framework/base/Component.php
View file @
3d40b171
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
yii\base
;
namespace
yii\base
;
use
Yii
;
use
Yii
;
use
yii\helpers\base\VarDumper
;
/**
/**
* @include @yii/base/Component.md
* @include @yii/base/Component.md
...
@@ -90,6 +91,7 @@ class Component extends Object
...
@@ -90,6 +91,7 @@ class Component extends Object
// as behavior: attach behavior
// as behavior: attach behavior
$name
=
trim
(
substr
(
$name
,
3
));
$name
=
trim
(
substr
(
$name
,
3
));
$this
->
attachBehavior
(
$name
,
$value
instanceof
Behavior
?
$value
:
Yii
::
createObject
(
$value
));
$this
->
attachBehavior
(
$name
,
$value
instanceof
Behavior
?
$value
:
Yii
::
createObject
(
$value
));
return
;
}
else
{
}
else
{
// behavior property
// behavior property
$this
->
ensureBehaviors
();
$this
->
ensureBehaviors
();
...
...
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