Gets the file entity defined by the UUID.
string $uuid: The file entity's UUID.
\Drupal\file\FileInterface|null The file entity. NULL if the UUID is invalid.
protected function getFileByUuid($uuid) {
if ($id = \Drupal::service('paragraphs_type.uuid_lookup')
->get($uuid)) {
return $this
->entityTypeManager()
->getStorage('file')
->load($id);
}
return NULL;
}