當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。