You are here

class ActionUploadRemoveFile in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

Hierarchy

Expanded class hierarchy of ActionUploadRemoveFile

1 file declares its use of ActionUploadRemoveFile
Actions.php in vendor/edsdk/file-uploader-server-php/src/lib/Actions.php

File

vendor/edsdk/file-uploader-server-php/src/lib/action/ActionUploadRemoveFile.php, line 17

Namespace

EdSDK\FileUploaderServer\lib\action
View source
class ActionUploadRemoveFile extends AActionUploadId {
  public function getName() {
    return "uploadRemoveFile";
  }
  public function run($req) {
    $this
      ->validateUploadId($req);
    $file = new FileUploaded($this->m_config, $req->uploadId, $req->name, $req->name);
    $file
      ->checkForErrors(true);
    if ($file
      ->getErrors()
      ->size() > 0) {
      throw new MessageException(Message::createMessageByFile(Message::UNABLE_TO_DELETE_UPLOAD_DIR, $file
        ->getData()));
    }
    $file
      ->delete();
    return new RespOk();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AAction::$m_config protected property
AAction::setConfig public function
AAction::validateBoolean protected function
AAction::validateInteger protected function
AAction::validateString protected function
AActionUploadId::validateUploadId protected function
ActionUploadRemoveFile::getName public function Overrides AAction::getName
ActionUploadRemoveFile::run public function Overrides AAction::run