Contao\FrontendTemplate::output PHP Метод

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

Send the response to the client
Устаревший: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use FrontendTemplate::getResponse() instead.
public output ( boolean $blnCheckRequest = false )
$blnCheckRequest boolean If true, check for unsued $_GET parameters
    public function output($blnCheckRequest = false)
    {
        $this->blnCheckRequest = $blnCheckRequest;
        parent::output();
    }

Usage Example

Пример #1
0
 public function myGenerateAjax()
 {
     if (\Environment::get('isAjaxRequest') && \Input::post('id')) {
         $id = \Input::post('id');
         $objTemplate = new \FrontendTemplate('ce_swatchBookItems');
         $object = SwatchBookColorsModel::getColorList($id);
         $paletteMsg = SwatchBookModel::getPaletteMessage($id);
         while ($object->next()) {
             $arr[$object->id] = $object->title;
         }
         $objTemplate->id = $objTemplate->linkId = $id;
         $objTemplate->child_list = $arr;
         $objTemplate->text = $paletteMsg->text;
         $objTemplate->advice = $paletteMsg->advice;
         $objTemplate->output();
     }
 }