本文整理汇总了PHP中Cell::i方法的典型用法代码示例。如果您正苦于以下问题:PHP Cell::i方法的具体用法?PHP Cell::i怎么用?PHP Cell::i使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cell
的用法示例。
在下文中一共展示了Cell::i方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
echo Form::text('username', Guardian::wayback('username'), null, array('autocomplete' => 'off'));
?>
</span>
</label>
<label class="grid-group">
<span class="grid span-2 form-label"><?php
echo $speak->password;
?>
</span>
<span class="grid span-4">
<?php
echo Form::password('password', null, null, array('autocomplete' => 'off'));
?>
</span>
</label>
<?php
echo Form::hidden('kick', Request::get('kick', Guardian::wayback('url_origin', $config->manager->slug . '/article')));
?>
<div class="grid-group">
<span class="grid span-2"></span>
<span class="grid span-4">
<?php
echo Form::button(Cell::i("", array('class' => array('fa', 'fa-key'))) . ' ' . $speak->login, null, null, null, array('class' => array('btn', 'btn-action')));
?>
</span>
</div>
</form>
<script>document.getElementById('form-login:<?php
echo $form_id;
?>
').username.focus();</script>
示例2: function
<?php
// `<i class="fa fa-check-circle">`
Jot::add('icon', function ($kind, $modifier = null) {
return Cell::i("", array('class' => 'fa fa-' . $kind . (is_string($modifier) ? ' fa-' . trim(str_replace('.', ' fa-', $modifier), '.') : "")));
});
// `<button class="btn">`
Jot::add('button', function ($kind = 'default', $text = "", $name = null, $type = 'submit', $attr = array(), $indent = 0) {
$kind = explode(':', $kind);
$k = explode('.', trim($kind[0], '.'));
$icon = count($kind) === 1 ? Mecha::alter($k[0], array('action' => 'check-circle', 'accept' => 'check-circle', 'begin' => 'plus-circle', 'construct' => 'check-circle', 'danger' => 'times-circle', 'destruct' => 'times-circle', 'error' => 'exclamation-circle', 'reject' => 'times-circle'), "") : $kind[1];
if ($icon !== "") {
$text = Jot::icon($icon) . ' ' . $text;
}
if (!isset($attr['class'])) {
$attr['class'] = array();
}
$s = is_string($name) ? explode(':', $name, 2) : array(null, null);
$attr['class'] = array_merge(array('btn btn-' . str_replace('.', ' btn-', $kind[0])), (array) $attr['class']);
$attr['disabled'] = strpos($kind[0], '.disabled') !== false ? true : null;
return Form::button($text, $s[0], isset($s[1]) ? $s[1] : null, $type, $attr, $indent);
});
// `<a class="btn">`
Jot::add('btn', function ($kind = 'default', $text = "", $href = null, $attr = array(), $indent = 0) {
$kind = explode(':', $kind);
$k = explode('.', trim($kind[0], '.'));
$icon = count($kind) === 1 ? Mecha::alter($k[0], array('action' => 'check-circle', 'accept' => 'check-circle', 'begin' => 'plus-circle', 'construct' => 'check-circle', 'danger' => 'times-circle', 'destruct' => 'times-circle', 'error' => 'exclamation-circle', 'reject' => 'times-circle'), "") : $kind[1];
if ($icon !== "") {
$text = Jot::icon($icon) . ' ' . $text;
}
if (!isset($attr['class'])) {