本文整理汇总了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);
}
示例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');