当前位置: 首页>>代码示例>>PHP>>正文


PHP Label::info方法代码示例

本文整理汇总了PHP中Label::info方法的典型用法代码示例。如果您正苦于以下问题:PHP Label::info方法的具体用法?PHP Label::info怎么用?PHP Label::info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Label的用法示例。


在下文中一共展示了Label::info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

@extends('lanager-core::layouts.default')
@section('content')
	<h2>{{{ $title }}}</h2>
	@if(count($events))
		{{ Table::open(array('class' => 'events-list')) }}
		{{ Table::headers('Name', 'Time', '', 'Type', 'Signups', '') }}
		<?php 
foreach ($events as $event) {
    $eventTimespan = new Zeropingheroes\LanagerCore\Helpers\Timespan($event->start, $event->end);
    if (isset($event->signup_opens)) {
        $signupTimespan = new Zeropingheroes\LanagerCore\Helpers\Timespan($event->signup_opens, $event->signup_closes);
        switch ($signupTimespan->status) {
            case 0:
                $signupTimespan->status = Label::info('Not Yet Open');
                break;
            case 1:
                $signupTimespan->status = Label::success('Open');
                break;
            case 2:
                $signupTimespan->status = Label::warning('Closed');
                break;
        }
        $signupStatus = $signupTimespan->status;
        $signupCount = count($event->users) . ' ' . str_plural('user', count($event->users));
    } else {
        $signupStatus = '';
        $signupCount = '';
    }
    $tableBody[] = array('name' => link_to_route('event.show', $event->name, $event->id), 'time' => $eventTimespan->naturalFormat(), 'status' => $eventTimespan->status == 1 ? Label::success('In Progress') : '', 'type' => isset($event->event_type->name) ? $event->event_type->name : '', 'signup-count' => $signupCount, 'signup-status' => $signupStatus);
}
?>
开发者ID:zeropingheroes,项目名称:lanager-core,代码行数:31,代码来源:index.blade.php

示例2: isset

</div>
<hr>
{{ Markdown::string($event->description) }}
<br>
{{ HTML::resourceUpdate('event',$event->id, 'Edit') }}

{{ HTML::resourceDelete('event',$event->id, 'Delete') }}
<br>
<br>

@if( isset($event->signup_opens) AND isset($event->signup_closes) )
	<?php 
$signupTimespan = new Zeropingheroes\LanagerCore\Helpers\Timespan($event->signup_opens, $event->signup_closes);
switch ($signupTimespan->status) {
    case 0:
        $signupStatusLabel = Label::info('Not Yet Open');
        $signupRelativeTime = 'Opening ' . $signupTimespan->start->getRelativeDate();
        break;
    case 1:
        $signupStatusLabel = Label::success('Open');
        $signupRelativeTime = 'Closing ' . $signupTimespan->end->getRelativeDate();
        break;
    case 2:
        $signupStatusLabel = Label::warning('Closed');
        $signupRelativeTime = 'Closed ' . $signupTimespan->end->getRelativeDate();
        break;
}
?>

	<div class="row">
		<div class="col-md-6">
开发者ID:zeropingheroes,项目名称:lanager-core,代码行数:31,代码来源:show.blade.php

示例3: array

        case 1:
            // playing
            $playbackStateLabel = Label::success('Now Playing');
            if (Authority::can('manage', 'playlist', $playlist->id)) {
                $controls = Button::link_xs_normal(route('playlist.item.pause', array('playlist' => $playlist->id, 'playlistItem' => $playlistItem->id)), '', array('title' => 'Pause this item'))->with_icon('pause');
                //$controls .= Button::xs_normal('', array('title' => 'Skip this item'))->with_icon('step-forward');
            } else {
                //$controls = Button::xs_normal('', array('title' => 'Vote to skip this item'))->with_icon('step-forward');
            }
            break;
        case 2:
            // paused
            $playbackStateLabel = Label::info('Paused');
            if (Authority::can('manage', 'playlist', $playlist->id)) {
                $controls = Button::link_xs_normal(route('playlist.item.pause', array('playlist' => $playlist->id, 'playlistItem' => $playlistItem->id)), '', array('title' => 'Unpause this item'))->with_icon('play');
            }
            break;
        case 3:
            // skipped
            $playbackStateLabel = Label::info('Skipped');
            break;
    }
    $tableBody[] = array('user' => '<a class="pull-left" href="' . URL::route('user.show', $user->id) . '">' . HTML::userAvatar($user) . ' ' . e($user->username) . '</a>', 'title' => e($playlistItem->title), 'state' => $playbackStateLabel, 'controls' => $controls, 'duration' => $duration->shortFormat(), 'submitted' => $submitted->getRelativeDate());
}
?>
	{{ Table::body($tableBody) }}
	{{ Table::close() }}
	{{ $playlistItems->links() }}
@else
	No playlist entries to show!
@endif
开发者ID:zeropingheroes,项目名称:lanager-core,代码行数:31,代码来源:list.blade.php


注:本文中的Label::info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。