本文整理汇总了PHP中helpers\Assets::avatar方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::avatar方法的具体用法?PHP Assets::avatar怎么用?PHP Assets::avatar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers\Assets
的用法示例。
在下文中一共展示了Assets::avatar方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: orgChartEmplTree
private function orgChartEmplTree($array, $parent = 0)
{
$tree .= "<ul class=\"root\">";
foreach ($array as $row) {
if (!empty($row->dep)) {
$dep = 'dep';
} else {
$dep = '';
}
if ($row->manager_id == $parent) {
$tree .= "<li><a id=\"user-" . $row->id . "\" href=\"#user-" . $row->id . "\"><span class=\"image\"><img src=\"" . Assets::avatar($row->id) . "\" widht=\"60\" height=\"60\"></span><span class=\"name\">" . $row->name . "<span data-placement=\"top\" data-popup=\"tooltip\" title=\"" . $row->dep . "\" class=\"" . $dep . "\" style=\"background-color: " . $row->color . "\"></span></span><span class=\"title\">" . $row->title . "</span></a>";
$tree .= $this->orgChartEmplTree($array, $row->id);
# recurse
$tree .= "</li>";
}
}
$tree .= "</ul>";
return $tree;
}
示例2:
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#">
<i class="icon-bell3"></i>
<span class="visible-xs-inline-block position-right">Notifications</span>
<span class="badge bg-danger">4</span>
</a>
</li>
<li class="dropdown dropdown-user">
<a class="dropdown-toggle" data-toggle="dropdown">
<img class="avatar" src="<?php
echo Assets::avatar(Session::get('id'));
?>
" alt="">
<span><?php
echo Session::get('first_name') . ' ' . Session::get('last_name');
?>
</span>
<i class="caret"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="/users/edit/<?php
echo $_SESSION['id'];
?>
"><i class="icon-user"></i> My profile</a></li>
<li><a href="/users/edit/<?php
示例3: foreach
<!-- Timeline -->
<div class="timeline timeline-left content-group">
<div class="timeline-container">
<?php
foreach ($data['posts'] as $row) {
?>
<!-- Post -->
<div class="timeline-row">
<div class="timeline-icon">
<a href="#"><img data-popup="tooltip" data-placement="bottom" title="<?php
echo $row->name;
?>
" src="<?php
echo Assets::avatar($row->user_id);
?>
" alt=""></a>
</div>
<div class="panel panel-flat timeline-content">
<div class="panel-heading">
<h3 class="panel-title">
<?php
echo $row->title;
?>
</h3>
<div class="heading-elements">
<span class="heading-text"><time data-date-published="<?php
echo Date::showDateTime($row->published_at, 'local', 'local');
?>
示例4:
<div class="col-lg-4">
<div class="panel panel-default">
<div class="panel-heading">
<h6 class="panel-title"><?php
echo Language::show('profile_photo', 'users');
?>
</h6>
<a class="heading-elements-toggle"><i class="icon-menu"></i></a></div>
<div class="panel-body">
<!-- User avatar -->
<div class="thumb thumb-rounded thumb-slide avatar-view mb-20">
<img class="avatar" src="<?php
echo Assets::avatar($data['user'][0]->id);
?>
" alt="">
<div class="caption cursor-pointer">
<span>
<i class="fa fa-camera fa-2x"></i><br><p class="hidden-xs"><?php
echo Language::show('change_avatar', 'users');
?>
</p>
</span>
</div>
</div>
<!-- /User Avatar -->
</div>