public function H5PEditorAjaxImport::isValidPackage in Opigno module 8
Same name and namespace in other branches
- 3.x src/H5PImportClasses/H5PEditorAjaxImport.php \Drupal\opigno_module\H5PImportClasses\H5PEditorAjaxImport::isValidPackage()
Validates the package. Sets error messages if validation fails.
Parameters
bool $skipContent: Will not validate cotent if set to TRUE.
Return value
bool Valid package flag.
File
- src/
H5PImportClasses/ H5PEditorAjaxImport.php, line 19
Class
- H5PEditorAjaxImport
- Class H5PEditorAjaxMigrate.
Namespace
Drupal\opigno_module\H5PImportClassesCode
public function isValidPackage($skipContent = FALSE) {
$validator = new H5PValidatorImport($this->core->h5pF, $this->core);
if (!$validator
->isValidPackage($skipContent, FALSE)) {
$this->storage
->removeTemporarilySavedFiles($this->core->h5pF
->getUploadedH5pPath());
\Drupal::logger('opigno_groups_migration')
->error('Validating h5p package failed.');
return FALSE;
}
return TRUE;
}