本文整理汇总了PHP中Network::get_largest_networks方法的典型用法代码示例。如果您正苦于以下问题:PHP Network::get_largest_networks方法的具体用法?PHP Network::get_largest_networks怎么用?PHP Network::get_largest_networks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Network
的用法示例。
在下文中一共展示了Network::get_largest_networks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_links
/**
Get all the links of different network of given search String
**/
private function get_links()
{
$network = new Network();
if (!empty($this->name_string)) {
$condition = array('name_string' => $this->name_string, 'keyword' => $this->keyword);
$this->Paging["count"] = $network->get_networks_info_by_search($condition, TRUE);
if (empty($this->sort_by) || $this->sort_by == 'alphabetic') {
$links = $network->get_networks_info_by_search($condition, FALSE, $this->Paging["show"], $this->Paging["page"], 'name', 'ASC');
}
if (!empty($this->sort_by) && $this->sort_by == 'members') {
$links = $network->get_networks_info_by_search($condition, FALSE, $this->Paging["show"], $this->Paging["page"], 'members');
}
if (!empty($this->sort_by) && $this->sort_by == 'created') {
$links = $network->get_networks_info_by_search($condition, FALSE, $this->Paging["show"], $this->Paging["page"]);
}
} else {
$this->Paging["count"] = $network->get_largest_networks(TRUE);
if (!empty($this->sort_by) && $this->sort_by == 'alphabetic' || !$this->sort_by) {
$links = $network->get_largest_networks(FALSE, $this->Paging["show"], $this->Paging["page"], 'name', 'ASC');
}
if (!empty($this->sort_by) && $this->sort_by == 'members') {
$links = $network->get_largest_networks(FALSE, $this->Paging["show"], $this->Paging["page"], 'members');
}
if (!empty($this->sort_by) && $this->sort_by == 'created') {
$links = $network->get_largest_networks(FALSE, $this->Paging["show"], $this->Paging["page"]);
}
}
return $links;
}
示例2: render
public function render()
{
if (empty($this->links)) {
$this->links = Network::get_largest_networks(false, 5, 1);
}
$this->inner_HTML = $this->generate_inner_html($this->links);
if ($this->mode == SORT_BY) {
$content = $this->inner_HTML;
} else {
$content = parent::render();
}
return $content;
}
示例3: array
* http://wiki.peopleaggregator.org/index.php
*
*/
$login_required = FALSE;
$use_theme = 'Beta';
//TODO : Remove this when new UI is completely implemented.
include "includes/page.php";
require "{$current_blockmodule_path}/NewestNetworkModule/NewestNetworkModule.php";
$uid = @$_GET['uid'];
$selected_option = @$_GET['sort_by'];
$sorting_options[] = array('caption' => __('Recently Created'), 'value' => 'created');
$sorting_options[] = array('caption' => __('Recently Modified'), 'value' => 'changed');
$sorting_options[] = array('caption' => __('Largest Group'), 'value' => 'members');
$links = '';
if ($selected_option == 'members') {
$links = Network::get_largest_networks(false, 5, 1, 'member_count');
} else {
if ($selected_option == 'created') {
$links = Network::get_largest_networks(false, 5, 1, 'created');
} else {
if ($selected_option == 'changed') {
$links = Network::get_largest_networks(false, 5, 1, 'changed');
}
}
}
$obj = new NewestNetworkModule();
$obj->mode = $obj->sort_by = SORT_BY;
$obj->links = $links;
$obj->sorting_options = $sorting_options;
$obj->selected_option = $selected_option;
echo $obj->render();