本文整理汇总了PHP中Region::get_all方法的典型用法代码示例。如果您正苦于以下问题:PHP Region::get_all方法的具体用法?PHP Region::get_all怎么用?PHP Region::get_all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Region
的用法示例。
在下文中一共展示了Region::get_all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array_push
array_push($errors, "Invalid slug!");
}
if ($p_slug == '') {
$success = false;
array_push($errors, "The slug field is required !");
}
if ($success) {
$update = array('name' => $p_name, 'slug' => $p_slug);
if ($region['parent'] > 0 && $p_parent > 0) {
$update['parent'] = $p_parent;
}
Region::update($g_id, $update);
$region = Region::get_one($g_id);
}
}
$regions = Region::get_all(array('parent' => 0));
include "page-header.php";
?>
<div id="wrapper">
<?php
include "page-left.php";
?>
<div id="content">
<form name="form_region_edit" id="form_region_edit" method="post" enctype='application/x-www-form-urlencoded' accept-charset="UTF-8" class="form">
<h2><?php
print 'Edit ' . $current_group_page['name'] . ($exists ? "<span class='note'>( id: {$g_id} )</span>" : '');
示例2: array
if (isset($_GET['o'])) {
$o = (int) $_GET['o'];
$r = (int) $_GET['r'];
if ($r != 0) {
$r = 1;
}
Region::set_order($o, $parent, $r);
}
$tct = Region::count(array('parent' => $parent));
//total count
$rpp = 10;
//row per page
$pager_options = array('mode' => 'Sliding', 'perPage' => $rpp, 'delta' => 2, 'totalItems' => $tct, 'urlVar' => "pageID{$parent}", 'excludeVars' => array('o', 'r', 'd', 't', 'e'));
$pager = @Pager::factory($pager_options);
list($from, $to) = $pager->getOffsetByPageId();
$regions = Region::get_all(array('r.parent' => $parent), '', $from - 1 . ", {$rpp}");
include "page-header.php";
?>
<div id="wrapper">
<?php
include "page-left.php";
?>
<div id="content">
<?php
if ($tct > $rpp) {
echo $pager->links . '<br /><br />';
}