abstract class AActionUploadId in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2
Abstract class for all upload actions.
Hierarchy
- class \Drupal\n1ed\Flmngr\FileUploaderServer\lib\action\AAction
- class \Drupal\n1ed\Flmngr\FileUploaderServer\lib\action\AActionUploadId
Expanded class hierarchy of AActionUploadId
File
- src/
Flmngr/ FileUploaderServer/ lib/ action/ AActionUploadId.php, line 11
Namespace
Drupal\n1ed\Flmngr\FileUploaderServer\lib\actionView source
abstract class AActionUploadId extends AAction {
/**
* Validates upload ID and throws exception in case of validation error.
*/
protected function validateUploadId($req) {
if ($req->uploadId === NULL) {
throw new MessageException(Message::createMessage(Message::UPLOAD_ID_NOT_SET));
}
$dir = $this->config
->getTmpDir() . DIRECTORY_SEPARATOR . $req->uploadId;
if (!file_exists($dir) || !is_dir($dir)) {
throw new MessageException(Message::createMessage(Message::UPLOAD_ID_INCORRECT));
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AAction:: |
protected | property | ||
AAction:: |
abstract public | function | Returnes name of action. | 7 |
AAction:: |
abstract public | function | Runs action. | 7 |
AAction:: |
public | function | Sets a config. | |
AAction:: |
protected | function | Validates boolean and returns default value if null. | |
AAction:: |
protected | function | Validates integer and returns default value if null. | |
AAction:: |
protected | function | Validates string and returns default value if null. | |
AActionUploadId:: |
protected | function | Validates upload ID and throws exception in case of validation error. |