Omeka_Plugin_Mvc¶
Package: Plugin
-
class
Omeka_Plugin_Mvc
¶ Connects plugins with Omeka’s model-view-controller system.
-
property
_basePath
¶ protected string
Path to the root plugins directory.
-
property
_pluginViewDirs
¶ protected array
View script directories that have been added by plugins.
-
property
_pluginHelpersDirs
¶ protected array
View helper directories from plugins.
-
__construct
($basePath)¶ Parameters: - $basePath (string) – Plugins directory path.
-
addThemeDir
($pluginDirName, $path, $themeType, $moduleName)¶ Add a theme directory to the list of plugin-added view directories.
Used by the add_theme_pages() helper to create a list of directories that can store static pages that integrate into the themes.
Parameters: - $pluginDirName (string) – Plugin name.
- $path (string) – Path to directory to add.
- $themeType (string) – Type of theme (‘public’, ‘admin’, or ‘shared’).
- $moduleName (string) – MVC module name.
-
getViewScriptDirs
($themeType)¶ Retrieve the list of plugin-added view script directories.
Parameters: - $themeType (string) – Type of theme (public or admin)
Returns: array Module-name-indexed directory names.
-
getHelpersDirs
()¶ Get all the existing plugin view helper dirs, indexed by plugin name.
Returns: array
-
addControllerDir
($pluginDirName, $moduleName)¶ Make an entire directory of controllers available to the front controller.
This has to use addControllerDirectory() instead of addModuleDirectory() because module names are case-sensitive and module directories need to be lowercased to conform to Zend’s weird naming conventions.
Parameters: - $pluginDirName (string) – Plugin name.
- $moduleName (string) – MVC module name.
-
addApplicationDirs
($pluginDirName)¶ Set up the following directory structure for plugins:
controllers/ models/ libraries/ views/ admin/ public/ shared/
This also adds these folders to the correct include paths.
Parameters: - $pluginDirName (string) – Plugin name.
-
_getModuleName
($pluginDirName)¶ Retrieve the module name for the plugin (based on the directory name of the plugin).
Parameters: - $pluginDirName (string) – Plugin name.
Returns: string Plugin MVC module name.
-
_hasIncludePath
($path)¶ Check include path to see if it already contains a specific path.
Parameters: - $path (string) –
Returns: bool
-
property