本文整理汇总了PHP中Groups::isAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP Groups::isAdmin方法的具体用法?PHP Groups::isAdmin怎么用?PHP Groups::isAdmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Groups
的用法示例。
在下文中一共展示了Groups::isAdmin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testBasicFixture
/**
* A basic fixture test example
*
* @return void
*/
public function testBasicFixture()
{
$user = Sentry::findUserByLogin('superuser@saasventure.com');
$this->assertEquals('Benevolent', $user->first_name);
$this->assertEquals('Dictator', $user->last_name);
$brand = Groups::getBrandProvider()->findByTitle('BizGym');
$this->assertTrue(Groups::isAdmin($user->id, $brand->id));
}
示例2:
<li><a href="/Views/User/dashboard.php">Overview <span class="sr-only">(current)</span></a></li>
<li><a href="/Views/User/profile.php">Profile</a></li>
<li><a href="/Views/Friends/manager.php">Friends</a></li>
<li class="active"><a href="/Views/Groups/manager.php">Groups</a></li>
<li><a href="/Views/Events/manager.php">Events</a></li>
</ul>
<ul class="nav nav-sidebar">
<li><a href="/Views/Business/manager.php">Buisness</a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<?php
$results = $groups->getGroup();
// Edit only for admin
$adminCheck = $groups->isAdmin();
echo "<script>console.log('isAdmin: " . $adminCheck . "');</script>";
if ($adminCheck) {
echo '<div class="row">';
echo '<div class="col-md-12"><a class="btn btn-info btn-raised" style="float: right;" data-toggle="modal" data-dismiss="modal" data-target="#EditG">Edit Group</a></div>';
echo '</div>';
}
?>
<div class="row placeholders panel panel-primary" style="margin-top:15px;">
<!-- <div class="" style="margin-bottom:20px;"></div> -->
<div class="panel-body">
<div class="col-xs-6 col-sm-3 placeholder" style="margin:40px 0px; border-right: solid 2px gainsboro;">
<?php
$results = $groups->getGroup();
echo '<img src=" ' . $results->group_image . ' " width="100" height="100" class="img-responsive" alt="Generic placeholder thumbnail">';