Skip to content

Can't chain registerScript() with itself #16

Closed
Vijar opened this Issue Dec 24, 2012 · 0 comments

2 participants

@Vijar
Vijar commented Dec 24, 2012

CClientScript allows something like this

$script_a = "YOUR SCRIPT A HERE";
$script_b = "YOUR SCRIPT B HERE";
Yii::app()->clientScript->registerScript('a', $script_a)->registerScript('b', $script_b);

With EClientScriptBoost you can only do:

$script_a = "YOUR SCRIPT A HERE";
$script_b = "YOUR SCRIPT B HERE";
Yii::app()->clientScript->registerScript('a', $script_a)
Yii::app()->clientScript->registerScript('b', $script_b);

Not a huge deal but took an hour to track down the bug. The error message it shows is misleading and caused me to think I was importing the extension wrong.

This should only be a few lines of code to fix I think. Just need to make EClientScriptBoost->registerScript() return the parent functions return value.

@urmaul urmaul added a commit to urmaul/Yii-extensions that referenced this issue Feb 13, 2013
@urmaul urmaul Issue #16 fix 9f40356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.