protected function getPostBackOptions() { $options = $this->getOptions()->toArray(); // overload some events to add information about the items order foreach ($options as $event => $implementation) { if ($event == 'sort' || $event == 'stop') { $options[$event] = new TJavaScriptLiteral('function( event, ui ) { ui.index = jQuery(this).sortable(\'toArray\'); Prado.JuiCallback(' . TJavaScript::encode($this->getUniqueID()) . ', \'' . $event . '\', event, ui, this); }'); } } return $options; }