public function OpignoScorm::scormLoadByFileEntity in Opigno SCORM 8
Same name and namespace in other branches
- 3.x src/OpignoScorm.php \Drupal\opigno_scorm\OpignoScorm::scormLoadByFileEntity()
Get Scorm data by it's file id.
Parameters
\Drupal\file\Entity\File $file: File entity.
Return value
mixed Scorm data.
File
- src/
OpignoScorm.php, line 251
Class
- OpignoScorm
- Class OpignoScorm.
Namespace
Drupal\opigno_scormCode
public function scormLoadByFileEntity(File $file) {
$connection = $this->database;
return $connection
->select('opigno_scorm_packages', 'o')
->fields('o', [])
->condition('fid', $file
->id())
->execute()
->fetchObject();
}