Prado\Web\UI\TClientScriptManager::getCallbackReference PHP Метод

getCallbackReference() публичный Метод

Returns javascript statement that create a new callback request object.
public getCallbackReference ( Prado\Web\UI\ActiveControls\ICallbackEventHandler $callbackHandler, $options = null ) : string
$callbackHandler Prado\Web\UI\ActiveControls\ICallbackEventHandler
Результат string javascript statement that creates a new callback request.
    public function getCallbackReference(ICallbackEventHandler $callbackHandler, $options = null)
    {
        $options = !is_array($options) ? array() : $options;
        $class = new \ReflectionClass($callbackHandler);
        $clientSide = $callbackHandler->getActiveControl()->getClientSide();
        $options = array_merge($options, $clientSide->getOptions()->toArray());
        $optionString = TJavaScript::encode($options);
        $this->registerPradoScriptInternal('ajax');
        $id = $callbackHandler->getUniqueID();
        return "new Prado.CallbackRequest('{$id}',{$optionString})";
    }