Omeka_Controller_Plugin_ViewScripts

Package: Controller\Plugin

class Omeka_Controller_Plugin_ViewScripts

extends Zend_Controller_Plugin_Abstract

Sets up view script search paths on a per-request basis.

property Omeka_Controller_Plugin_ViewScripts::$_view

protected Zend_View

Registered view object.

property Omeka_Controller_Plugin_ViewScripts::$_dbOptions

protected array

List of options from the database.

property Omeka_Controller_Plugin_ViewScripts::$_baseThemePath

protected string

Base path to themes directory.

property Omeka_Controller_Plugin_ViewScripts::$_webBaseThemePath

protected string

Base web-accesible path to themes.

property Omeka_Controller_Plugin_ViewScripts::$_pluginMvc

protected Omeka_Plugin_Mvc

MVC plugin behaviors class.

Omeka_Controller_Plugin_ViewScripts::__construct($options, Omeka_Plugin_Mvc $pluginMvc)
Parameters:
  • $options (array) – List of options.

  • $pluginMvc (Omeka_Plugin_Mvc) – Plugin MVC class.

Omeka_Controller_Plugin_ViewScripts::preDispatch(Zend_Controller_Request_Abstract $request)

Add the appropriate view scripts directories for a given request. This is pretty much the glue between the plugin broker and the View object, since it uses data from the plugin broker to determine what script paths will be available to the view.

Parameters:
  • $request (Zend_Controller_Request_Abstract) – Request object.

Omeka_Controller_Plugin_ViewScripts::_addPathsToView($paths)

Add multiple script paths.

Parameters:
  • $paths (array) – The paths to add.

Omeka_Controller_Plugin_ViewScripts::_addPathToView($scriptPath)

Add a new script path for a plugin to the view.

Parameters:
  • $scriptPath (string) – Path from plugins dir to script dir.

Omeka_Controller_Plugin_ViewScripts::_getView()

Gets the view from the registry.

The initial call to the registry caches the view in this class.

Returns:

Zend_View

Omeka_Controller_Plugin_ViewScripts::_addSharedViewsDir()

Add the global views from the view scripts directory to the view.

Omeka_Controller_Plugin_ViewScripts::_addThemePaths($theme)

Add script and asset paths for a theme to the view.

Parameters:
  • $theme (string) – Theme type; either ‘public’ or ‘admin’.

Omeka_Controller_Plugin_ViewScripts::_addOverridePathForPlugin($theme, $pluginModuleName)

Add theme view path for override views for a given plugin.

Parameters:
  • $theme (string) – Theme type; ‘public’ or ‘admin’

  • $pluginModuleName (string) –

Omeka_Controller_Plugin_ViewScripts::getThemeOption($type)

Retrieve the option from the database that contains the directory of the theme to render.

Parameters:
  • $type (string) – Currently either ‘admin’ or ‘public’.

Returns:

string