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


PHP Gdn_Theme::assetBegin方法代码示例

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


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

示例1: htmlspecialchars

?>
    <!-- Robots should not see the dashboard, but tell them not to index it just in case. -->
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body id="<?php 
echo htmlspecialchars($BodyIdentifier);
?>
" class="<?php 
echo $this->CssClass;
?>
">
<?php 
$this->renderAsset('Symbols');
// TODO: Pull this asset out elsewhere
Gdn_Theme::assetBegin('DashboardUserDropDown');
$user = Gdn::session()->User;
$rm = new RoleModel();
$roles = $rm->getByUserID(val('UserID', $user))->resultArray();
$roleTitlesArray = [];
foreach ($roles as $role) {
    $roleTitlesArray[] = val('Name', $role);
}
$roleTitles = implode(', ', $roleTitlesArray);
/** var UserController $user */
?>
<div class="card card-user">
    <?php 
$userBlock = new MediaItemModule(val('Name', $user), userUrl($user), $roleTitles, '', ['class' => 'card-block']);
$userBlock->setView('media-sm')->setImage(userPhotoUrl($user))->addButton(t('My Profile') . ' ' . dashboardSymbol('external-link', 'icon-11 icon-text'), userUrl($user), ['class' => 'btn btn-sm-rounded btn-secondary padded-top']);
echo $userBlock;
开发者ID:vanilla,项目名称:vanilla,代码行数:31,代码来源:admin.master.php

示例2: helpAsset

 /**
  * Formats a help element and adds it to the help asset.
  *
  * @param $title
  * @param $description
  */
 function helpAsset($title, $description)
 {
     Gdn_Theme::assetBegin('Help');
     echo '<aside role="note" class="help">';
     echo wrap($title, 'h2', ['class' => 'help-title']);
     echo wrap($description, 'div', ['class' => 'help-description']);
     echo '</aside>';
     Gdn_Theme::assetEnd();
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:15,代码来源:functions.render.php


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