/** * Init view helpers * * @return array */ public function getViewHelperConfig() { return ['invokables' => ['miniPhotoGalleryWidget' => 'MiniPhotoGallery\\View\\Widget\\MiniPhotoGalleryWidget'], 'factories' => ['miniPhotoGalleryImageUrl' => function () { $thumbDir = ApplicationService::getResourcesUrl() . MiniPhotoGalleryBaseModel::getThumbnailsDir(); $imageDir = ApplicationService::getResourcesUrl() . MiniPhotoGalleryBaseModel::getImagesDir(); return new \MiniPhotoGallery\View\Helper\MiniPhotoGalleryImageUrl($thumbDir, $imageDir); }]]; }