Prado\Web\UI\ActiveControls\TCallbackEventParameter::getNewWriter PHP Метод

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

public getNewWriter ( ) : TCallbackResponseWriter
Результат TCallbackResponseWriter holds the response content.
    public function getNewWriter()
    {
        return $this->_response->createHtmlWriter(null);
    }

Usage Example

Пример #1
0
 /**
  * Event handler to the OnCallback active buttons or active dropdownlist.
  * This handler will raise the {@link onCallback OnCallback} event
  *
  * @param mixed $sender
  * @param TCallbackEventParameter $param
  */
 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);
 }