Prado\Web\UI\JuiControls\TJuiEventParameter::getControl PHP Method

getControl() public method

Compatibility method to get a control from its clientside id
public getControl ( $id ) : TControl
return Prado\Web\UI\TControl control, or null if not found
    public function getControl($id)
    {
        $control = null;
        $service = Prado::getApplication()->getService();
        if ($service instanceof TPageService) {
            // Find the control
            // Warning, this will not work if you have a '_' in your control Id !
            $controlId = str_replace(TControl::CLIENT_ID_SEPARATOR, TControl::ID_SEPARATOR, $id);
            $control = $service->getRequestedPage()->findControl($controlId);
        }
        return $control;
    }
TJuiEventParameter