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())
  • $config (array) – View configuration.

Get the currently-configured asset paths.

Omeka_View::addAssetPath($physical, $web)

Add an asset path to the view.

  • $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.

  • $physical (string) – Local filesystem path.
  • $web (string) – URL path.

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;


Look for a ‘custom.php’ script in all script paths and include the file if it exists.


Add a script path to the view.

  • $path (string) – Local filesystem path.