public function __construct($owner, $id) { parent::__construct($owner, $id); $renderer = Yii::app()->getComponent('viewRenderer'); Yii::app()->setComponent('viewRenderer', null); Yii::app()->setComponents(array('viewRenderer' => array('class' => 'Yii2DebugViewRenderer', 'instance' => $renderer)), false); }
public function __construct($owner, $id) { parent::__construct($owner, $id); if (!function_exists('http_response_code')) { Yii::app()->attachEventHandler('onException', array($this, 'onException')); } }