本文整理汇总了PHP中Rule::getRule方法的典型用法代码示例。如果您正苦于以下问题:PHP Rule::getRule方法的具体用法?PHP Rule::getRule怎么用?PHP Rule::getRule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rule
的用法示例。
在下文中一共展示了Rule::getRule方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rule_add
function rule_add($tmp, $page, $rule_record_id = '')
{
if ('' != $rule_record_id) {
$rule = Rule::getRulesById($rule_record_id);
} else {
$rule = new Rule();
}
$rfiles_a =& Rule::getAllRuleFiles();
$rule_files = array();
foreach ($rfiles_a as $rule_file) {
$rule_files[] = array('rf_id' => $rule_file->getRuleFileID(), 'rf_name' => substr($rule_file->getRuleFileName(), 0, 25), 'rf_rule_count' => $rule_file->getRuleFileRuleCount());
}
$tmp->assign(array('rule_rid' => $rule->getRuleRecordID(), 'rule_id' => $rule->getRuleID(), 'rule_pid' => $rule->getRuleParrentRuleID(), 'rfile_id' => $rule->getRuleFileID(), 'rule_msg' => $rule->getRuleInformation(), 'rule' => $rule->getRule(), 'validity' => $rule->getRuleFileActive()));
$tmp->assign('rule_filter', $rule_files);
$tmp->assign('tab_page', $page);
}
示例2: array
<?php
$filter = $cookie->getFilter('rule', array('id_rule', 'entity', 'id_entity', 'rule_link'));
if (Tools::isSubmit('submitResetRule')) {
$cookie->unsetFilter('rule', array('id_rule', 'entity', 'id_entity', 'rule_link'));
$filter = array();
}
$orderBy = $cookie->getPost('ruleOrderBy') ? $cookie->getPost('ruleOrderBy') : 'id_rule';
$orderWay = $cookie->getPost('ruleOrderWay') ? $cookie->getPost('ruleOrderWay') : 'ASC';
$limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50';
$p = Tools::getRequest('rulePage') ? Tools::getRequest('rulePage') : 1;
$result = Rule::getRule(false, $p, $limit, $orderBy, $orderWay, $filter);
require_once dirname(__FILE__) . '/../errors.php';
?>
<script type="text/javascript" src="../js/jquery/jquery.tablednd_0_5.js"></script>
<script type="text/javascript">
var token = '1f0af725a0585d7827c059999fd2d35e';
var come_from = 'rule';
var alternate = '0';
</script>
<script src="../js/admin/dnd.js" type="text/javascript"></script>
<div class="path_bar">
<div class="path_title">
<h3>
<span style="font-weight: normal;" id="current_obj">
<span class="breadcrumb item-1 ">路由管理</span>
</h3>
<div class="cc_button">
<ul>
<li><a title="Back to list" href="index.php?rule=rule_check" class="toolbar_btn" id="desc-product-tools"> <span class="process-icon-tools"></span>
<div>相关设置</div>