當前位置: 首頁>>代碼示例>>PHP>>正文


PHP c2cTools::extractHighest方法代碼示例

本文整理匯總了PHP中c2cTools::extractHighest方法的典型用法代碼示例。如果您正苦於以下問題:PHP c2cTools::extractHighest方法的具體用法?PHP c2cTools::extractHighest怎麽用?PHP c2cTools::extractHighest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在c2cTools的用法示例。


在下文中一共展示了c2cTools::extractHighest方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getHighestSummit

 protected function getHighestSummit()
 {
     $id = $this->getRequestParameter('id');
     if (empty($id)) {
         return null;
     }
     $prefered_cultures = $this->getUser()->getCulturesForDocuments();
     $associated_summits = Association::findAllWithBestName($id, $prefered_cultures, 'sr');
     return c2cTools::extractHighest($associated_summits);
 }
開發者ID:snouhaud,項目名稱:camptocamp.org,代碼行數:10,代碼來源:actions.class.php

示例2: include_partial

        echo '<div class="all_associations col_right col_66 no_print">';
        include_partial('routes/association', array('associated_docs' => $associated_routes, 'module' => 'routes', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'rr', 'strict' => false, 'display_info' => true, 'title' => 'variants'));
        if ($show_link_tool && !$mobile_version) {
            $modules_list = array('summits', 'sites', 'huts', 'parkings', 'routes', 'books', 'articles');
            $options = array('field_prefix' => 'multi_1');
            // try to determine the "center" of the route:
            // - centroid if it has track
            // - highest linked summits with coordinates
            if (check_not_empty_doc($document, 'lon')) {
                $options['suggest_near_docs'] = array('lon' => $document['lon'], 'lat' => $document['lat']);
            } else {
                $summits_with_geom = array_filter($sf_data->getRaw('associated_summits'), function ($n) {
                    return isset($n['pointwkt']);
                });
                if (count($summits_with_geom)) {
                    $ref_summit = c2cTools::extractHighest($summits_with_geom);
                    $options['suggest_near_docs'] = array('lon' => $ref_summit['lon'], 'lat' => $ref_summit['lat']);
                }
            }
            if (isset($options['suggest_near_docs'])) {
                $options['suggest_exclude'] = array('summits' => get_directly_linked_ids($associated_summits), 'sites' => get_directly_linked_ids($associated_sites), 'huts' => get_directly_linked_ids($associated_huts), 'parkings' => get_directly_linked_ids($associated_parkings));
            }
            echo c2c_form_add_multi_module('routes', $id, $modules_list, 3, $options);
        }
        echo '</div>';
    }
    include_partial('documents/geom_warning', array('document' => $document, 'message' => 'No GPX track, please edit this document to add some'));
}
echo end_section_tag();
// lang-dependent content
echo start_section_tag('Description', 'description');
開發者ID:snouhaud,項目名稱:camptocamp.org,代碼行數:31,代碼來源:viewSuccess.php


注:本文中的c2cTools::extractHighest方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。