private function getFiles(NodeInterface $node, string $field): array { $files = []; foreach ($node->get($field)->getValue() as $value) { $file = $this->entityTypeManager ->getStorage('file') ->load($value['target_id']); if ($file) { $url = $this->fileUrlGenerator ->generateAbsoluteString($file->getFileUri()); $files[] = array("url" => $url); } } return $files; }