function Common::nodeContentLoad in Filebrowser 8.2
Same name and namespace in other branches
- 3.x src/Services/Common.php \Drupal\filebrowser\Services\Common::nodeContentLoad()
Load a specific node content.
Parameters
int $fid content fid:
Return value
mixed record
File
- src/
Services/ Common.php, line 202
Class
- Common
- Class Common @package Drupal\filebrowser\Services
Namespace
Drupal\filebrowser\ServicesCode
function nodeContentLoad($fid) {
// todo: combine with nodeContentLoadMultiple
static $contents = [];
if (isset($contents[$fid])) {
return $contents[$fid];
}
$contents[$fid] = $this->storage
->loadRecord($fid);
if ($contents[$fid]) {
return $contents[$fid];
}
else {
return FALSE;
}
}