Omeka_View
Package: View
- class Omeka_View
extends Zend_View_Abstract
Customized subclass of Zend Framework’s View class.
This adds the correct script paths for themes and plugins so that controllers can render the appropriate scripts.
This will also inject directly into the view scripts all variables that have been assigned to the view, so that theme writers can access them as $item instead of $this->item, for example.
- property Omeka_View::$_asset_paths
protected array
Maintains a key => value pairing corresponding to hard path => web path for possible assets for Omeka views.
- Omeka_View::__construct($config = array())
- Parameters:
$config (
array
) – View configuration.
- Omeka_View::getAssetPaths()
Get the currently-configured asset paths.
- Returns:
array
- Omeka_View::addAssetPath($physical, $web)
Add an asset path to the view.
- Parameters:
$physical (
string
) – Local filesystem path.$web (
string
) – URL path.
- Omeka_View::setAssetPath($physical, $web)
Remove the existing asset paths and set a single new one.
- Parameters:
$physical (
string
) – Local filesystem path.$web (
string
) – URL path.
- Omeka_View::_run()
Allow for variables set to the view object to be referenced in the view script by their actual name.
Also allows access to theme helpers.
For example, in a controller you might do something like: $view->assign(‘themes’, $themes); Normally in the view you would then reference $themes through: $this->themes;
Now you can reference it simply by using: $themes;
- Omeka_View::_loadCustomThemeScripts()
Look for a ‘custom.php’ script in all script paths and include the file if it exists.
- Omeka_View::addScriptPath($path)
Add a script path to the view.
- Parameters:
$path (
string
) – Local filesystem path.