コード例 #1
0
 /**
  * Register ordering API endpoint on `Neatline.g`.
  *
  * @param array $globals The array of global properties.
  * @param array $args Array of arguments, with `exhibit`.
  * @return array The modified array.
  */
 public function filterNeatlineGlobals($globals, $args)
 {
     return array_merge($globals, array('simile' => array('strings' => nl_getStrings(NL_SIMILE_DIR . '/strings.json'))));
 }
コード例 #2
0
/**
 * Construct exhibit globals array.
 *
 * @param NeatlineExhibit $exhibit The exhibit.
 * @return array The array of globals.
 */
function nl_globals($exhibit)
{
    // Get style defaults from `styles.ini`.
    $styles = new Zend_Config_Ini(NL_DIR . '/styles.ini');
    return array('neatline' => array('exhibit' => $exhibit->toArray(), 'record_api' => public_url('neatline/records'), 'exhibit_api' => public_url('neatline/exhibits/' . $exhibit->id), 'item_search_api' => public_url('items/browse'), 'item_body_api' => public_url('neatline/items'), 'per_page' => (int) get_plugin_ini('Neatline', 'per_page'), 'styles' => $styles->toArray(), 'spatial_layers' => nl_getLayersForExhibit($exhibit), 'strings' => nl_getStrings(NL_DIR . '/strings.json'), 'openlayers_theme' => nl_getOpenLayersThemeDir()));
}
コード例 #3
0
 /**
  * Register ordering API endpoint on `Neatline.g`.
  *
  * @param array $globals The array of global properties.
  * @param array $args Array of arguments, with `exhibit`.
  * @return array The modified array.
  */
 public function filterNeatlineGlobals($globals, $args)
 {
     return array_merge($globals, array('waypoints' => array('strings' => nl_getStrings(NL_WAYPOINTS_DIR . '/strings.json'), 'order_api' => url('neatline-waypoints'))));
 }