- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
<?php
//Контроллер
$response = call_external_api($data['form']->getRequestParams());
$data['response'] = $this->formatResponse($response);
if (!empty($data['response'])) {
Yii::app()->user->setFlash('response', $data['response']);
}
$this->render('index', $data);
//Шаблон (smarty), в самом верху
{if $response = Yii::app()->user->getFlash('response')}
{$this->renderPartial('some_tpl', ['response' => $response])}
{/if}
1024-- 23.10.2016 07:01 # 0