drumaddict/yii-jstree-behavior — pull request #3 by lennartvdd (2013-10-08 11:06:55+00:00)
Title: Support override of JsTree options from widget

For more flexibility I thought it would be nice to be able to set any JsTree option directly when calling the widget in a view, so i've added an $options attribute to the `JsTreeWidget` class.
Any options set there will be merged to the default options defined in `js_plugins/jstree.behavior.js` using JQuery's `$.extend(true, {}, {});`, meaning if you define JsTreeWidget::$options, the defaults will not be lost, but can only be overriden or extended.

Example:

```php
widget('application.widgets.JsTreeWidget', array(
#...
'options' => array(
'html_data'=>array(
'ajax' => array(
'url' => $this->createUrl('fetchTree', array('id' => $_GET['id'])),
),
),
'types' => array(
'max_children' => 1,
),
),
#...
));
?>