/**
  * Get a URL to this exhibit with the specified action.
  *
  * @param string $action Action to link to
  * @return string
  */
 public function getRecordUrl($action = 'show')
 {
     if ('show' == $action) {
         return exhibit_builder_exhibit_uri($this);
     }
     $urlHelper = new Omeka_View_Helper_Url();
     $params = array('action' => $action, 'id' => $this->id);
     return $urlHelper->url($params, 'exhibitStandard');
 }
Example #2
0
/**
 * Get an absolute URL.
 *
 * This is necessary because Zend_View_Helper_Url returns relative URLs, though
 * absolute URLs are required in some contexts. Instantiates view helpers
 * directly because a view may not be registered.
 *
 * @package Omeka\Function\View\Navigation
 * @uses Zend_View_Helper_ServerUrl::serverUrl()
 * @uses Omeka_View_Helper_Url::url()
 * @param mixed $options If a string is passed it is treated as an
 *  Omeka-relative link. So, passing 'items' would create a link to the items
 *  page. If an array is passed (or no argument given), it is treated as options
 *  to be passed to Omeka's routing system.
 * @param string $route The route to use if an array is passed in the first argument.
 * @param mixed $queryParams A set of query string parameters to append to the URL
 * @param bool $reset Whether Omeka should discard the current route when generating the URL.
 * @param bool $encode Whether the URL should be URL-encoded
 * @return string HTML
 */
function absolute_url($options = array(), $route = null, $queryParams = array(), $reset = false, $encode = true)
{
    $serverUrlHelper = new Zend_View_Helper_ServerUrl();
    $urlHelper = new Omeka_View_Helper_Url();
    return $serverUrlHelper->serverUrl() . $urlHelper->url($options, $route, $queryParams, $reset, $encode);
}
 /**
  * Get the routing parameters or the URL string to this record.
  */
 public function getRecordUrl($action = 'show')
 {
     $urlHelper = new Omeka_View_Helper_Url();
     $params = array('action' => $action, 'id' => $this->id);
     return $urlHelper->url($params, 'timelineActionRoute');
 }