protected function getDefaultClientSideOptions()
{
if (($id = $this->getCallbackOptions()) !== '') {
if (($pos = strrpos($id, '.')) !== false) {
$control = $this->getControl()->getSubProperty(substr($id, 0, $pos));
$newid = substr($id, $pos + 1);
if ($control !== null) {
$control = $control->{$newid};
}
} else {
// TCheckBoxList overrides findControl() with a fake implementation
// but accepts a second parameter to use the standard one
$control = $this->getControl()->findControl($id, true);
}
if ($control instanceof TCallbackOptions) {
return $control->getClientSide()->getOptions()->toArray();
} else {
throw new TConfigurationException('callback_invalid_callback_options', $this->getControl()->getID(), $id);
}
}
return array();
}