public function render($view, $data = NULL, $return = false)
 {
     if (isset($_POST['minimal'])) {
         echo \yii\helpers\Json::encode(parent::renderPartial($view, $data, true));
     } else {
         return parent::render($view, $data, $return);
     }
 }
 /**
  * Автоматический renderPartial, если ajax-запрос.
  */
 public function render($view, $params = [], $returnContent = false)
 {
     if (Yii::$app->request->isAjax) {
         return parent::renderPartial($view, $params, $returnContent);
     } else {
         return parent::render($view, $params, $returnContent);
     }
 }