CBehavior has a property named "Enabled" which can be used to temporarily enable/disable an attached behavior.
Do you think this property is useful? Have you ever used it?
Please help us decide whether we should keep it in Yii 2.0 or not. Thanks.
Page 1 of 1
The "Enabled" property of behavior
#2
Posted 29 July 2011 - 12:39 PM
Never used it. Why it's better than attaching-detaching behavior?
Yii 2.0 Development Cookbook
Enjoying Yii? Star us at github
Support me so I can work more on Yii: https://www.patreon.com/samdark
Enjoying Yii? Star us at github
Support me so I can work more on Yii: https://www.patreon.com/samdark
#3
Posted 29 July 2011 - 01:32 PM
Seems to be superfluous.
You'd want to attach/detach, wouldn't you?
You'd want to attach/detach, wouldn't you?
"Less noise - more signal"
#4
Posted 29 July 2011 - 02:37 PM
Enabling/disabling attached behaviors dynamically from code is the best way to guarantee long debugging sessions.
Doing it from configuration makes a bit more sense but I've never done it.
Answer: no.
Doing it from configuration makes a bit more sense but I've never done it.
Answer: no.
#5
Posted 29 July 2011 - 02:56 PM
Never used it...
Find more about me.... btw. Do you know your WAN IP?
#6
Posted 31 July 2011 - 06:28 PM
Voted "I don't care" - I've never used this feature, but it's never bothered me either.
#7
Posted 02 August 2011 - 02:24 AM
mindplay, on 31 July 2011 - 06:28 PM, said:
Voted "I don't care" - I've never used this feature, but it's never bothered me either.
maybe attach and detach the behavior causing more overhead than enabling disabling?
I never used it too, but I vote "don't care"
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
#8
Posted 02 August 2011 - 05:58 AM
I voted "don't care" since I myself haven't encountered a relevant use case.
This thread seems to describe a case where it at least needs to be fixed (in case it will be kept).
/Tommy
This thread seems to describe a case where it at least needs to be fixed (in case it will be kept).
/Tommy
Share this topic:
Page 1 of 1