当前位置: 首页>>代码示例>>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;未经允许,请勿转载。