/**
  * Create a Neatline exhibit.
  *
  * @param string $slug The exhibit slug.
  * @param boolean $public True if the exhibit is public.
  * @return NeatlineExhibit $neatline The exhibit.
  */
 protected function _exhibit($slug = 'test-slug', $public = true)
 {
     $exhibit = new NeatlineExhibit();
     $exhibit->setArray(array('slug' => $slug, 'public' => $public));
     $exhibit->save();
     return $exhibit;
 }
/**
 * 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()));
}