本文整理汇总了PHP中Acl::is_logical_entity方法的典型用法代码示例。如果您正苦于以下问题:PHP Acl::is_logical_entity方法的具体用法?PHP Acl::is_logical_entity怎么用?PHP Acl::is_logical_entity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Acl
的用法示例。
在下文中一共展示了Acl::is_logical_entity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_policy_entities
function get_policy_entities($conn)
{
$entities = $entities_all = array();
$entities_all = Acl::get_entities_to_assign($conn);
foreach ($entities_all as $k => $v) {
if (Acl::is_logical_entity($conn, $k)) {
$parent_id = Acl::get_logical_ctx_id($conn, $k);
$parent_id = $parent_id[0];
// first
$parent_name = Acl::get_entity_name($conn, $parent_id);
$entities[$parent_id] = $parent_name;
} else {
$entities[$k] = $v;
}
}
asort($entities);
return $entities;
}
示例2: get_policy_entities
function get_policy_entities($conn)
{
$entities = $entities_all = array();
$ctx_pro = '';
$entities_all = Acl::get_entities_to_assign($conn);
foreach ($entities_all as $k => $v) {
if (Acl::is_logical_entity($conn, $k)) {
$parent_id = Acl::get_logical_ctx_id($conn, $k);
$parent_id = $parent_id[0];
// first
$parent_name = Acl::get_entity_name($conn, $parent_id);
if (!empty($parent_id)) {
$entities[$parent_id] = $parent_name;
}
} else {
$entities[$k] = $v;
}
}
asort($entities);
$ctx_pro = array_shift(array_keys($entities));
return array($entities, $ctx_pro);
}
示例3: foreach
<?php
} else {
?>
<tr>
<td class="left noborder" id='td_entities'>
<input type="hidden" name="num_entities_check" id="num_entities_check" value="<?php
if (!Session::is_pro()) {
echo "1";
}
?>
"/>
<select multiple="multiple" size="11" name="entities[]" class='vfield' id="entities">
<?php
if (is_array($sensor_entities)) {
foreach ($sensor_entities as $entity_id => $entity_name) {
if (Acl::is_logical_entity($conn, $entity_id)) {
continue;
}
?>
<option value="<?php
echo $entity_id;
?>
"><?php
echo $entity_name;
?>
</option>
<?php
}
}
?>
</select>