本文整理汇总了PHP中Render::image方法的典型用法代码示例。如果您正苦于以下问题:PHP Render::image方法的具体用法?PHP Render::image怎么用?PHP Render::image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Render
的用法示例。
在下文中一共展示了Render::image方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: shared
public static function shared($task)
{
$stats = array('lists' => array());
// Get contacts
$lists = BackupsModel::all(array('sync_task_id' => $task['id'], 'user_id' => $task['user_id'], 'entity_type' => static::$kind['list']))->toArray();
if ($lists) {
foreach ($lists as $list) {
$data = json_decode($list['entity'], true);
$stats['lists'][] = array('id' => $list['entity_id'], 'name' => $list['entity_title'], 'picture' => \Render::image('no-photo.png'), 'data' => $data);
}
}
return $stats;
}
示例2: profileImageUrl
/**
* Resize the google profile pic from it's URL
*
* @param null $user
* @param int $size
*
* @return string
*/
public static function profileImageUrl($user = null, $size = 28)
{
if ($user) {
if (isset($user['avatar'])) {
$url = parse_url($user['avatar']);
if (isset($url['query'])) {
$url['query'] = 'sz=' . $size;
return $url['scheme'] . '://' . $url['host'] . '/' . $url['path'] . '?' . $url['query'];
} else {
if ($user['avatar']) {
return $user['avatar'] . '?sz=' . $size;
}
}
}
}
return Render::image('no-photo.jpg');
}
示例3:
</div>
</div>
</div>
<?php
}
?>
<div class="col-sm-6 col-md-3">
<div class="thumbnail new clearfix">
<div class="big-avatar pull-left">
<a href="<?php
echo Render::link('accounts/add');
?>
">
<img src="<?php
echo Render::image('new-user.png');
?>
" alt="avatar" class="img-rounded img-responsive" title="Choose New Account">
</a>
</div>
<div class="caption pull-left">
<h3>Not done?</h3>
<h6>Add as many accounts as you want</h6>
<h6>Click the button below to add another one</h6>
<br />
<p>
<a href="<?php
echo Render::link('accounts/add');
示例4: shared
public static function shared($task)
{
$stats = array('calendars' => array());
// Get calendars
$calendars = CalendarsModel::withEvents($task['user_id'], $task['id']);
if ($calendars) {
foreach ($calendars as $calendar) {
$stats['calendars'][] = array('id' => $calendar['calendar_id'], 'name' => $calendar['name'], 'picture' => \Render::image('no-photo.png'), 'data' => $calendar);
}
}
return $stats;
}
示例5:
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand <?php
echo Router::$class == 'dashboard' ? 'active' : '';
?>
" href="<?php
echo Render::link('dashboard');
?>
"><img src="<?php
echo Render::image('icon.png');
?>
"/></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li <?php
echo Router::$class == 'dashboard' ? 'class="active"' : '';
?>
><a href="<?php
echo Render::link('dashboard');
?>
">Dashboard</a></li>
<li <?php
echo Router::$class == 'migrate' ? 'class="active"' : '';
示例6: foreach
echo $stats['calendars'];
?>
</strong></i></div>
<br />
<hr class="clear"/>
<div class="sub-block clearfix clear">
<?php
if (isset($migratedData['calendars'])) {
?>
<?php
foreach ($migratedData['calendars'] as $calendar) {
?>
<div class="col-xs-2 no-padding margin-bottom-md clearfix" style="overflow: none; word-wrap: none ">
<img src="<?php
echo Render::image('no-photo.png');
?>
" width="24" class="img-responsive img-rounded pull-left" />
<strong><?php
echo Util::wrap($calendar['name']);
?>
</strong>
</div>
<?php
}
?>
<?php
}
?>
</div>
</section>