protected function sendJsonResponse($response, $params = null) { if (!$this->ignoreQuotaError() && $this->isQuotaError()) { parent::sendJsonResponse(array('status' => static::STATUS_NO_SPACE)); } $detail = array(); $errors = $this->getErrors(); if ($this->storage) { $errors = array_merge($errors, $this->storage->getErrors()); } $this->appendLastErrorToErrorCollection(); //may be duplicate rows foreach ($errors as $error) { /** @var Error $error */ $detail[] = array('message' => $error->getMessage(), 'code' => $error->getCode()); } if ($detail) { $response['detail'] = $detail; } parent::sendJsonResponse($response, $params); }
protected function init() { parent::init(); $this->documentHandlersManager = Driver::getInstance()->getDocumentHandlersManager(); }
protected function processBeforeAction($actionName) { parent::processBeforeAction($actionName); \CFile::enableTrackingResizeImage(); return true; }