private static function createBreadcrumb($args) { if (!empty($args['groups_page_path']) && function_exists('hostsite_set_breadcrumb') && function_exists('drupal_get_normal_path')) { $path = drupal_get_normal_path($args['groups_page_path']); $node = menu_get_object('node', 1, $path); $breadcrumb[$node->title] = $args['groups_page_path']; hostsite_set_breadcrumb($breadcrumb); } }
/** * Either return a report picker, or if already picked, the report content. * @param array $args List of parameter values passed through to the form depending on how the form has been configured. * This array always contains a value for language. * @param object $node The Drupal node object. * @param array $response When this form is reloading after saving a submission, contains the response from the service call. * Note this does not apply when redirecting (in this case the details of the saved object are in the $_GET data). * @return Form HTML. */ public static function get_form($args, $node, $response = null) { iform_load_helpers(array('report_helper', 'map_helper')); $conn = iform_get_connection_details($node); $readAuth = report_helper::get_read_auth($conn['website_id'], $conn['password']); if (empty($_GET['catname']) || empty($_GET['report'])) { return self::report_picker($args, $node, $readAuth); } else { $reports = self::get_reports(); $reportDef = $reports[$_GET['catname']]['reports'][$_GET['report']]; $regionTerm = self::get_region_term($args, $readAuth); $reportDef['title'] = str_replace('#main_location_layer_type#', $regionTerm, $reportDef['title']); hostsite_set_page_title($reportDef['title']); $fn = "build_report_{$_GET['catname']}_{$_GET['report']}"; $output = $_GET['output']; hostsite_set_breadcrumb(array($node->title => $_GET['q'])); return call_user_func(array('iform_report_selector', $fn), $args, $readAuth, $output); } }
/** * If we know the page to return to, we can set the page breadcrumb. */ protected static function set_breadcrumb($args) { if (!empty($args['redirect_on_success']) && function_exists('hostsite_set_breadcrumb')) { $breadcrumb = array('Terms' => $args['redirect_on_success']); hostsite_set_breadcrumb($breadcrumb); } }
public static function points_editor($auth, $args, $tabalias, $options, $path) { if (!empty($_GET['dynamic-transect'])) { $tokens = explode(':', $_GET['dynamic-transect']); hostsite_set_page_title('Review points for transect ' . $tokens[2] . ' of survey ' . $tokens[1] . ' by group ' . $tokens[0]); } hostsite_set_breadcrumb(array('Review transect lines' => 'data/review-transect-lines')); data_entry_helper::$javascript .= "mapInitialisationHooks.push(drawPoints);\n"; data_entry_helper::$javascript .= "indiciaData.website_id={$args['website_id']};\n"; data_entry_helper::$javascript .= 'indiciaData.ajaxFormPostUrl="' . iform_ajaxproxy_url(null, 'sample') . "\";\n"; return ''; }