Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 protected function init()
 {
     parent::init();
     $this->documentHandlersManager = Driver::getInstance()->getDocumentHandlersManager();
 }
Exemplo n.º 3
0
 protected function processBeforeAction($actionName)
 {
     parent::processBeforeAction($actionName);
     \CFile::enableTrackingResizeImage();
     return true;
 }