Prado\Web\UI\ActiveControls\TActivePager::handleCallback PHP Method

handleCallback() public method

This handler will raise the {@link onCallback OnCallback} event
public handleCallback ( mixed $sender, TCallbackEventParameter $param )
$sender mixed
$param TCallbackEventParameter
    public function handleCallback($sender, $param)
    {
        // Update all the buttons pagers attached to the same control.
        // Dropdown pagers doesn't need to be re-rendered.
        $controlToPaginate = $this->getControlToPaginate();
        foreach ($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control) {
            if ($control->getMode() !== TPagerMode::DropDownList && $control->getControlToPaginate() === $controlToPaginate) {
                $control->render($param->getNewWriter());
                // FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting
                // of getting the same boundaries in ajax response. Wait 1 microsecond to avoid this.
                usleep(1);
            }
        }
        // Raise callback event
        $this->onCallback($param);
    }