'hervorgehoben DESC, dateAdded DESC, id DESC'] ); $notes = []; if (null !== $collection) { foreach ($collection as $entry) { $imagePath = null; if ($entry->bild) { $fileModel = FilesModel::findByUuid($entry->bild); $imagePath = $fileModel?->path; } $notes[] = [ 'id' => (int) $entry->id, 'headline' => (string) $entry->ueberschrift, 'text' => (string) $entry->text, 'link' => (string) $entry->link, 'dateAdded' => (int) $entry->dateAdded, 'dateModified' => (int) $entry->dateModified, 'imagePath' => $imagePath, 'highlighted' => '1' === $entry->hervorgehoben, ]; } } $template->set('entries', $notes); $template->set('module', $model); return $template->getResponse(); } }