/** * 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())); }