You are here

protected function AAction::validateBoolean in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2

Validates boolean and returns default value if null.

2 calls to AAction::validateBoolean()
ActionUploadCommit::run in src/Flmngr/FileUploaderServer/lib/action/ActionUploadCommit.php
Runs action.
ActionUploadCommit::validateSize in src/Flmngr/FileUploaderServer/lib/action/ActionUploadCommit.php
Validates size options of the image.

File

src/Flmngr/FileUploaderServer/lib/action/AAction.php, line 34

Class

AAction
Abstract action - processor for any request. External code executes run() method of set config and returnes Resp* object as data structure to return via HTTP.

Namespace

Drupal\n1ed\Flmngr\FileUploaderServer\lib\action

Code

protected function validateBoolean($b, $defaultValue) {
  return $b === NULL ? $defaultValue : $b;
}