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