/** * @param ImagePage $imagePage */ public function __construct($imagePage) { global $wgShowArchiveThumbnails; $this->current = $imagePage->getPage()->getFile(); $this->img = $imagePage->getDisplayedFile(); $this->title = $imagePage->getTitle(); $this->imagePage = $imagePage; $this->showThumb = $wgShowArchiveThumbnails && $this->img->canRender(); $this->setContext($imagePage->getContext()); }