コード例 #1
0
 protected function processActionCheckView()
 {
     $this->checkRequiredPostParams(array('id'));
     if ($this->errorCollection->hasErrors()) {
         $this->sendJsonErrorResponse();
     }
     $fileData = new FileData();
     $fileData->setId($this->request->getPost('id'));
     $result = $this->documentHandler->checkViewFile($fileData);
     if ($result === null) {
         $this->errorCollection->add($this->documentHandler->getErrors());
         $this->sendJsonErrorResponse();
     }
     $this->sendJsonSuccessResponse(array('viewed' => $result));
 }