Omeka_Plugin_Mvc¶
- class Omeka_Plugin_Mvc¶
Package: Plugin
Connects plugins with Omeka’s model-view-controller system.
- property _basePath¶
Path to the root plugins directory.
- property _pluginViewDirs¶
View script directories that have been added by plugins.
- property _pluginHelpersDirs¶
View helper directories from plugins.
- __construct(string $basePath)¶
Parameters: - $basePath (string) – Plugins directory path.
- addThemeDir(string $pluginDirName, string $path, string $themeType, string $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 thatcan 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.
Returns: void
- getModuleViewScriptDirs(string $moduleName)¶
Retrieve the list of plugin-added view script directories.
Parameters: - $moduleName (string) – (optional) MVC module name.
Returns: array List of indexed directory names.
- getHelpersDirs()¶
Get all the existing plugin view helper dirs, indexed by plugin name.
Returns: array
- addControllerDir(string $pluginDirName, string $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 belowercased to conform to Zend’s weird naming conventions.
Parameters: - $pluginDirName (string) – Plugin name.
- $moduleName (string) – MVC module name.
Returns: void
- addApplicationDirs(string $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.
Returns: void
- _getModuleName(string $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(string $path)¶
Check include path to see if it already contains a specific path.
Parameters: - $path (string) –
Returns: boolean