本文整理汇总了PHP中Get::tags方法的典型用法代码示例。如果您正苦于以下问题:PHP Get::tags方法的具体用法?PHP Get::tags怎么用?PHP Get::tags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Get
的用法示例。
在下文中一共展示了Get::tags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtolower
?>
<label class="grid-group">
<span class="grid span-1 form-label"><?php
echo $speak->description;
?>
</span>
<span class="grid span-5">
<?php
echo Form::textarea('description', Guardian::wayback('description', $default->description), Config::speak('manager.placeholder_description_', strtolower($speak->article)), array('class' => 'textarea-block'));
?>
</span>
</label>
<?php
$tags = array();
$tags_wayback = ',' . implode(',', Guardian::wayback('kind', Mecha::A($default->kind))) . ',';
foreach (Get::tags() as $tag) {
if ($tag && $tag->id !== 0) {
$tags[] = '<div>' . Form::checkbox('kind[]', $tag->id, strpos($tags_wayback, ',' . $tag->id . ',') !== false, $tag->name) . '</div>';
}
}
?>
<?php
if (count($tags) > 0) {
?>
<div class="grid-group">
<span class="grid span-1 form-label"><?php
echo $speak->tags;
?>
</span>
<div class="grid span-5"><?php
echo implode("", $tags);
示例2: function
* GET PAGE/ARTICLE TAG(S)
* ==========================================================================
*
* -- CODE: -----------------------------------------------------------------
*
* foreach(Get::pageTags() as $tag) { ... }
* foreach(Get::articleTags() as $tag) { ... }
*
* --------------------------------------------------------------------------
*
*/
Get::plug('pageTags', function ($order = 'ASC', $sorter = 'name') {
return Get::tags($order, $sorter, 'page');
});
Get::plug('articleTags', function ($order = 'ASC', $sorter = 'name') {
return Get::tags($order, $sorter, 'article');
});
/**
* ==========================================================================
* RETURN SPECIFIC PAGE/ARTICLE TAG ITEM FILTERED BY ITS AVAILABLE DATA
* ==========================================================================
*
* -- CODE: -----------------------------------------------------------------
*
* $tag = Get::pageTag('lorem-ipsum');
* $tag = Get::articleTag('lorem-ipsum');
*
* --------------------------------------------------------------------------
*
*/
Get::plug('pageTag', function ($filter, $output = null, $fallback = false) {