/** * Renders a Collection model * @param models|Collection $collection to render */ public function renderCollection($collection) { if ($collection === null || !$collection->isPublic() && !$collection->isOwner($this->getUser())) { $this->renderError(new views\NotFound()); } else { $out = $this->getOutput(); $this->render(new views\Collection($this->getUser(), $collection)); $this->updateCollectionImage($collection); $this->addMetaInformation($collection->getDescription(), models\Image::getThumbnail($collection->getFile())); } }