phpDocumentor GalleryCore
Classes
[ class tree: GalleryCore ] [ index: GalleryCore ] [ all elements ]

Class: GalleryModule

Source Location: /modules/core/classes/GalleryModule.class

Class GalleryModule

Direct descendents
Child Class Description
RegisterModule The self-registration module
FlashVideoModule The implementation of the FlashVideo module
NetPbmModule NetPBM Graphics Module.
DebugModule Debug Module
UploadAppletModule
MembersModule The implementation of the members module
HiddenModule Hidden Items
ImageBlockModule The implementation of the Image Block module
ImageFrameModule The implementation of the Image Frame module
ImageMagickModule ImageMagick Graphics Module
UserAlbumModule Create a private top level album for new users.
SlideshowModule The implementation of the Slideshow module
SitemapModule Module that creates a Google Sitemap for your Gallery2 install.
SearchModule Search Module
PermalinksModule Permalinks Module
NokiaUploadModule This module implements the Nokia Image Upload Server API v1.1.
SizeLimitModule This module sets size limit for the picture
EcardModule eCard module
ReplicaModule Create item copies sharing the same original data file.
RewriteApiMockModule Mock module for tests
RewriteHelperMockModule
RewriteModuleMockModule Mock module for this test
RewriteParserMockModule
AdminRewriteMockModule Mock module for this test
RewriteModule URL Rewrite Module
GdModule Gd Graphics Module
NewItemsModule Add new/updated image in summary info for new/updated items.
ExifModule Exif Module
MultiLangModule Support item captions in multiple languages
WatermarkModule This module provides support for adding watermarks to images
MultirootModule This module assists in setting up an alternate guest view of a Gallery that is displayed via a different URL.
PicasaModule Import for Picasa 2 XML-Exports
PasswordModule Password protected items
FfmpegModule Ffmpeg Graphics Module
RssModule Implementation of the RSS module
ItemAddModule The implementation of the ItemAdd module.
PhotoAccessModule Photo printing at photoworks.com
IconsModule The implementation of the Icons module
ThumbPageModule Pick which page of a multi-page file to use for the thumbnail.
ZipCartModule Cart plugin to download all images in a zip file
ThumbnailModule Thumbnail defaults
RatingModule Provides item rating mechanism for Gallery2
EventTestModule Mock module.
ModuleTestModule
PluginTestCompatibleModule
FactoryTestModule Bogus classes that we can feed to the factory
FactoryTestModule2
DatabaseImportTest1Module
DatabaseImportTest2Module
DatabaseImportTest3Module
DatabaseImportTest4Module
CoreModule Gallery core module.
MigrateModule Migrate Module
CartModule The implementation of the cart module
DcrawModule Dcraw Graphics Module
RearrangeModule The implementation of the Rearrange module
SlideshowAppletModule
ShutterflyModule Photo printing at shutterfly.com
ReuploadModule Reupload a file without destroying metadata information
LinkItemModule
FotokastenModule Print photos on fotokasten.de
ColorPackModule The implementation of the ColorPack module
PublishXpModule Module to allow publishing from XP directly to Gallery.
Getid3Module getID3() ID3 metadata Module
MP3AudioModule The implementation of the MP3Audio module
ArchiveUploadModule ArchiveUpload module.
MimeModule This module allows gallery administrator to maintain MIME types and corresponding file extensions
RemoteModule
WebCamModule
PanoramaModule View wide images in a java applet viewer.
SquareThumbModule Square thumbnails
AlbumSelectModule The implementation of the AlbumSelect module
CommentModule Comment Module
CaptchaModule The implementation of the Captcha module
RandomHighlightModule RandomHighlight module - periodically change the album highlight
KeyAlbumModule Dynamic album based on keyword search
DigibugModule Photo printing at digibug.com
QuotasModule The implementation of the core-module
CustomFieldModule Custom fields
DynamicAlbumModule Dynamic albums for newest, most viewed or random items.
HttpAuthModule HTTP Auth Module. Login using HTTP authentication.
WebDavModule WebDAV Module. Mount Gallery on your desktop.
JpegtranModule Jpegtran Rotation Module
SnapGalaxyModule Photo printing at snapgalaxy.com.
NotificationModule Event Notification by Method.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GalleryPlugin

GalleryPlugin::$_description
GalleryPlugin::$_id
GalleryPlugin::$_l10Domain
GalleryPlugin::$_name
GalleryPlugin::$_requiredCoreApi
GalleryPlugin::$_version

Inherited From GalleryPlugin

GalleryPlugin::activate()
Activate this plugin
GalleryPlugin::deactivate()
Deactivate this plugin.
GalleryPlugin::fetchParameters()
Fetch all plugin specific parameters for the given item. The results will contain a mixture of global parameters and item specific parameters, where the item specific ones ones override the global ones.
GalleryPlugin::getDescription()
GalleryPlugin::getId()
GalleryPlugin::getL10Domain()
GalleryPlugin::getName()
GalleryPlugin::getParameter()
Convenience method to get a plugin parameter
GalleryPlugin::getPluginType()
GalleryPlugin::getRequiredCoreApi()
GalleryPlugin::getVersion()
GalleryPlugin::installOrUpgrade()
Perform the plugin installation or upgrade, whatever is required.
GalleryPlugin::isActive()
Is this plugin active?
GalleryPlugin::reactivate()
Reactivate this plugin. The plugin is already active, so call deactivate() and then activate(). Perform the deactivation without sending an event because the activation will immediately follow and we don't want other plugins to sense this deactivation and deactivate themselves. If the plugin isn't currently active, don't do anything.
GalleryPlugin::removeParameter()
Convenience method to remove a plugin parameter
GalleryPlugin::setDescription()
GalleryPlugin::setId()
GalleryPlugin::setName()
GalleryPlugin::setParameter()
Convenience method to set a plugin parameter
GalleryPlugin::setRequiredCoreApi()
GalleryPlugin::setVersion()
GalleryPlugin::translate()
Localize the given content.
GalleryPlugin::uninstall()
Remove this plugin's parameters
GalleryPlugin::upgrade()
Perform any upgrade tasks required at this point. This method is called
GalleryPlugin::_flushPluginCache()
Flush plugin-related caches.
GalleryPlugin::_postDeactivationEvent()
Post a deactivation event for this plugin. Used by deactivate and reactivate.

[ Top ]
Property Summary
string   $_callbacks   This module's callbacks. This is a pipe (|) delimited string containing
array   $_group   The module group (optional).
array   $_requiredModuleApi   The version of the GalleryModule API required by this module
int   $_templateVersion   The version of the templates associated with this plugin

[ Top ]
Method Summary
void   activate()  
array   autoConfigure()   Allow this module to autoconfigure itself. It should only autoconfigure if it is
void   deactivate()  
array   getApiVersion()   Return the major and minor version of the GalleryModule API.
void   getCallbacks()  
array   getConfigurationView()   Get the name of the GalleryView containing the administration view specifically for configuring this module. It may be one that is also listed in getSiteAdminViews().
void   getGroup()  
array   getItemAdminViews()   Get the list of GalleryViews containing the various item administration views for this module. The module should check permissions and item type to determine which views are applicable for the authenticated user. As with getSiteAdminViews(), the view title text must be localized.
array   getItemLinks()   Return 0 or more item-specific links to an arbitrary module view.
array   getItemSummaries()   Return module-specific summary content about the item
array   getModuleEntityTypes()   Get names of all GalleryEntity types this module may register.
array   getOnLoadHandlerIds()   Get ids of all onLoadHandlers this module may register.
void   getPluginType()  
void   getRequiredModuleApi()  
array   getRewriteRules()   Returns a set of short URL rules. Array structure:
array   getSiteAdminViews()   Get the name of the GalleryView containing the various site administration views for this module. Note that the text value is localized since they will be displayed directly to the user. Include group/groupLabel in data to override the values from getGroup().
array   getSystemLinks()   Return 0 or more system-specific links to an arbitrary module view. Get the name of the GalleryView containing the administration view specifically for configuring this module.
void   getTemplateVersion()  
array   getUserAdminViews()   Get the list of GalleryViews containing the various user administration views for this module. The module should check permissions and item type to determine which views are applicable for the authenticated user. As with getSiteAdminViews(), the view title text must be localized.
GalleryStatus   installOrUpgrade()   Perform the module installation or upgrade, whatever is required.
array   needsConfiguration()   Does this module require configuration before it can be activated?
GalleryStatus   performFactoryRegistrations()   Register any factory implementations. This is called at module activation time.
void   registerEventListeners()   Register any event listeners that this module requires. Each module will get a chance to register its event listeners before any events are posted.
void   setCallbacks()  
void   setGroup()  
void   setRequiredModuleApi()  
void   setTemplateVersion()  
GalleryStatus   uninstall()   Remove this module's plugin parameters and all of its database tables.
GalleryStatus   _deleteModuleEntities()   Delete all entities with a type registered by this module.
GalleryStatus   _removeObsoleteThemeBlocks()   Remove obsolete blocks from existing themes (bug #1636339).
translated   _translate()   Translate string. Results are cached.

[ Top ]
Properties
string   $_callbacks = '' [line 61]

This module's callbacks. This is a pipe (|) delimited string containing

one or more of the following values: getSiteAdminViews getItemAdminViews getUserAdminViews getSystemLinks getItemLinks getItemSummaries registerEventListeners (deprecated)

eg. getItemAdminViews|getSystemLinks|getItemLinks

API Tags:
Access:  private


[ Top ]
array   $_group [line 43]

The module group (optional).

Used to better organize site admin pages; array('group' => string, 'groupLabel' => string)

API Tags:
Access:  private


[ Top ]
array   $_requiredModuleApi [line 68]

The version of the GalleryModule API required by this module

API Tags:
Access:  private


[ Top ]
int   $_templateVersion [line 75]

The version of the templates associated with this plugin

API Tags:
Access:  private


[ Top ]
Methods
autoConfigure  [line 453]

  array autoConfigure( )

Allow this module to autoconfigure itself. It should only autoconfigure if it is

marked as needing configuration (see GalleryModule::needsConfiguration) and it should do its best to choose a reasonable configuration. Return true upon success, even if nothing has to be done to get a successful configuration. This method should accept all the module's defaults wherever possible.


API Tags:
Return:  GalleryStatus a status code boolean was module able to autoconfigure


Redefined in descendants as:

[ Top ]
deactivate  [line 362]

  void deactivate( [ $postDeactivationEvent = true]  )

Parameters:
   $postDeactivationEvent: 

API Tags:
See:  GalleryPlugin::deactivate


Redefinition of:
GalleryPlugin::deactivate()
Deactivate this plugin.

Redefined in descendants as:

[ Top ]
getApiVersion  [line 97]

  array getApiVersion( )

Return the major and minor version of the GalleryModule API.

This follows the same rules as the core API.


API Tags:
Return:  major number, minor number
See:  GalleryCoreApi::getApiVersion

Information Tags:
Todo:  for next major version bump:
  • Change GalleryDataItem::render to match GalleryRenderer::render and consider dropping the format, since it's always HTML.
  • Drop the redirect url from GalleryPlugin::deactivate() (also requires a major bump in GalleryTheme)
  • Remove TYPE=DB_TABLE_TYPE replacement in MySqlStorage::_getSqlReplacements
  • change signature of getItemlinks() in all modules (add new parameter)
  • Remove rewrite v1.1.8 version checks in webdav, watermark, httpauth, ... (look for todo)
  • Change ->_templateVersion = x to ->setTemplateVersion(x) in module constructors
  • Remove navId and statusId related functions in GalleryUrlGenerator and GallerySession
  • Remove webdav related backwards-compatibility code in ItemAddController.

[ Top ]
getCallbacks  [line 633]

  void getCallbacks( )



[ Top ]
getGroup  [line 612]

  void getGroup( )



[ Top ]
getItemAdminViews  [line 481]

  array getItemAdminViews( GalleryItem $item  )

Get the list of GalleryViews containing the various item administration views for this module. The module should check permissions and item type to determine which views are applicable for the authenticated user. As with getSiteAdminViews(), the view title text must be localized.

Parameters:
GalleryItem   $item: 

API Tags:
Return:  GalleryStatus a status code array( array('name' => name, 'view' => view), ...)


Redefined in descendants as:

[ Top ]
getItemLinks  [line 538]

  array getItemLinks( array $items, array $wantsDetailedLinks, array $permissions, int $userId  )

Return 0 or more item-specific links to an arbitrary module view.

These are links to item specific module views. For example, the comments module uses this to link to the "add comments" view.

Parameters:
array   $items:  array of GalleryItem
array   $wantsDetailedLinks:  (id => 1, id => 1) we want detailed links for these ids
array   $permissions:  id => array(permission => 1, ...) of item permissions
int   $userId:  id of user viewing links

API Tags:
Return:  GalleryStatus a status code array(itemId => array(array('text' => 'localized text', 'params' => array(key => value, key => value)) ...))


Redefined in descendants as:

[ Top ]
getItemSummaries  [line 551]

  array getItemSummaries( array $items, array $permissions, &$template, GalleryTemplate $template  )

Return module-specific summary content about the item

Parameters:
array   $items:  array of GalleryItem
array   $permissions:  id => array(permission => 1, ...) of item permissions
GalleryTemplate   $template:  the master template instance
   &$template: 

API Tags:
Return:  GalleryStatus a status code array (id => string HTML content, ..)


Redefined in descendants as:

[ Top ]
getModuleEntityTypes  [line 581]

  array getModuleEntityTypes( )

Get names of all GalleryEntity types this module may register.

Entities of these types will be deleted upon module uninstall.


API Tags:
Return:  of class names


Redefined in descendants as:

[ Top ]
getOnLoadHandlerIds  [line 571]

  array getOnLoadHandlerIds( )

Get ids of all onLoadHandlers this module may register.

These will be removed from all entities upon module uninstall.


API Tags:
Return:  of factory impl ids


Redefined in descendants as:

[ Top ]
getPluginType  [line 644]

  void getPluginType( )


API Tags:
See:  GalleryPlugin::getPluginType


Redefinition of:
GalleryPlugin::getPluginType()

[ Top ]
getRequiredModuleApi  [line 652]

  void getRequiredModuleApi( )



[ Top ]
getRewriteRules  [line 602]

  array getRewriteRules( )

Returns a set of short URL rules. Array structure:

$rule['match'] An array of view => viewName, subView => subViewName to match when generating the short URLs. $rule['pattern'] Proposed short URL style (ie 'v/%path%'). $rule['keywords'] Pattern keywords should have the same name as its coresponding url parameter key. This is an array of additional keywords defined keyword => array(pattern => regex, ignored => 1). If ignored is set, the this keyword wont be appended to the queryString. $rule['queryString'] Additional queryString parameters to append. $rule['locked'] If this is set, the user may not change the pattern. $rule['comment'] This should be a localized comment. return array($rule, ...);


API Tags:
Return:  of short URL rules.


Redefined in descendants as:

[ Top ]
getSiteAdminViews  [line 467]

  array getSiteAdminViews( )

Get the name of the GalleryView containing the various site administration views for this module. Note that the text value is localized since they will be displayed directly to the user. Include group/groupLabel in data to override the values from getGroup().


API Tags:
Return:  GalleryStatus a status code array( array('name' => name, 'view' => view, [optional: 'group' => group, 'groupLabel' => localized label]), ...)


Redefined in descendants as:

[ Top ]
getSystemLinks  [line 520]

  array getSystemLinks( )

Return 0 or more system-specific links to an arbitrary module view. Get the name of the GalleryView containing the administration view specifically for configuring this module.

It may be one that is also listed in getSiteAdminViews(). As with getSiteAdminViews(), the view title text must be localized.


API Tags:
Return:  GalleryStatus a status code array(string linkId => array('text' => 'localized text', 'params' => array(key => value, key => value)) ...)


Redefined in descendants as:

[ Top ]
getTemplateVersion  [line 629]

  void getTemplateVersion( )



[ Top ]
getUserAdminViews  [line 495]

  array getUserAdminViews( GalleryUser $user  )

Get the list of GalleryViews containing the various user administration views for this module. The module should check permissions and item type to determine which views are applicable for the authenticated user. As with getSiteAdminViews(), the view title text must be localized.

Parameters:
GalleryUser   $user: 

API Tags:
Return:  GalleryStatus a status code array( array('name' => name, 'view' => view), ...)


Redefined in descendants as:

[ Top ]
installOrUpgrade  [line 124]

  GalleryStatus installOrUpgrade( [ $bootstrap = false], [ $statusMonitor = null]  )

Perform the module installation or upgrade, whatever is required.

It will do the following:

  1. Get the current version of the module (if its already installed)
  2. Request that the storage subsystem install this module's database tables (which will also upgrade any tables that require it)
  3. Let the module perform any necessary upgrade tasks.
  4. Set the new module version and api requirements into the database
Modules should not need to override this method. Instead they should override the upgrade method and put all their module specific logic there.

Parameters:
   $bootstrap: 
   $statusMonitor: 

API Tags:
Return:  a status code


Redefinition of:
GalleryPlugin::installOrUpgrade()
Perform the plugin installation or upgrade, whatever is required.

[ Top ]
performFactoryRegistrations  [line 561]

  GalleryStatus performFactoryRegistrations( )

Register any factory implementations. This is called at module activation time.

All implementations are unregistered when the module is deactivated.


API Tags:
Return:  a status code


Redefined in descendants as:

[ Top ]
registerEventListeners  [line 106]

  void registerEventListeners( )

Register any event listeners that this module requires. Each module will get a chance to register its event listeners before any events are posted.


API Tags:
Deprecated:  Will be removed on next major API fump


[ Top ]
setCallbacks  [line 637]

  void setCallbacks( $callbacks  )

Parameters:
   $callbacks: 


[ Top ]
setGroup  [line 608]

  void setGroup( $group, $groupLabel  )

Parameters:
   $group: 
   $groupLabel: 


[ Top ]
setRequiredModuleApi  [line 648]

  void setRequiredModuleApi( $requirement  )

Parameters:
   $requirement: 


[ Top ]
setTemplateVersion  [line 625]

  void setTemplateVersion( $version  )

Parameters:
   $version: 


[ Top ]
uninstall  [line 287]

  GalleryStatus uninstall( )

Remove this module's plugin parameters and all of its database tables.


API Tags:
Return:  a status code


Redefinition of:
GalleryPlugin::uninstall()
Remove this plugin's parameters

Redefined in descendants as:

[ Top ]
_deleteModuleEntities  [line 324]

  GalleryStatus _deleteModuleEntities( )

Delete all entities with a type registered by this module.


API Tags:
Return:  a status code
Access:  private


[ Top ]
_removeObsoleteThemeBlocks  [line 692]

  GalleryStatus _removeObsoleteThemeBlocks( )

Remove obsolete blocks from existing themes (bug #1636339).


API Tags:
Return:  a status code


[ Top ]
_translate  [line 666]

  translated _translate( mixed $params, [string $postSprintf = null]  )

Translate string. Results are cached.

Parameters:
mixed   $params:  string or array for translation
string   $postSprintf:  (optional) attempt to translate post-sprintf string using this value. This allows specific translation of strings like "Edit Album" or "Edit Photo" with a fallback to translation of "Edit %s" for other %s values. Currently only input string with single % token is supported.

API Tags:
Return:  string
Access:  protected


[ Top ]

Documentation generated on Fri, 08 Oct 2010 05:00:54 -0700 by phpDocumentor 1.3.0RC6