*/ /** * The implementation of the Slideshow module * * @package Slideshow */ class SlideshowModule extends GalleryModule { function SlideshowModule() { global $gallery; $this->setId('slideshow'); $this->setName('Slideshow'); $this->setDescription($gallery->i18n('Slideshow')); $this->setVersion('0.8.6'); $this->setGroup('display', $this->translate('Display')); $this->setCallbacks('getItemLinks'); $this->setRequiredCoreApi(array(4, 0)); $this->setRequiredModuleApi(array(0, 9)); } /** * @see GalleryModule::performFactoryRegistrations() */ function performFactoryRegistrations() { $ret = GalleryCoreApi::registerFactoryImplementation( 'SlideshowInterface_1_0', 'SlideshowImpl', 'Slideshow', 'modules/slideshow/classes/SlideshowImpl.class', 'slideshow', null); if ($ret->isError()) { return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); } /** * @see GalleryModule::isRecommendedDuringInstall() */ function isRecommendedDuringInstall() { return true; } /** * @see GalleryModule::autoConfigure() */ function autoConfigure() { /* We don't require any special configuration */ return array(GalleryStatus::success(), true); } /** * @see GalleryModule::getItemLinks() */ function getItemLinks($items) { global $gallery; $links = array(); foreach ($items as $item) { $links[$item->getId()][] = array('text' => $this->translate('view slideshow'), 'params' => array( 'view' => 'slideshow:Slideshow', 'itemId' => $item->getId())); } return array(GalleryStatus::success(), $links); } } ?>