本文整理汇总了PHP中Frontend::html方法的典型用法代码示例。如果您正苦于以下问题:PHP Frontend::html方法的具体用法?PHP Frontend::html怎么用?PHP Frontend::html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frontend
的用法示例。
在下文中一共展示了Frontend::html方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeView
/**
* makeView
*
* @param $target
* @param $instanceId
* @param $mode
*
* @return \Illuminate\Contracts\View\View
*/
protected function makeView($target, $instanceId, $mode)
{
/** @var SkinHandler $skinHandler */
$skinHandler = app('xe.skin');
$skinInstanceId = $skinHandler->mergeKey($target, $instanceId);
$selectedSkin = $skinHandler->getAssigned([$target, $instanceId], $mode);
if ($selectedSkin !== null) {
$settingView = $selectedSkin->getSettingView();
} else {
$settingView = null;
}
// get skin list
$skinList = $skinHandler->getList($target);
$skins = function ($skinList, $selectedSkin) {
(yield ['text' => '선택하세요', 'selected' => false]);
foreach ($skinList as $id => $skin) {
$support = [];
$support[] = $skin->supportDesktop() ? '데스크탑' : '';
$support[] = $skin->supportMobile() ? '모바일' : '';
$support = '[' . implode('|', $support) . ']';
(yield ['value' => $id, 'text' => $skin->getTitle() . $support, 'selected' => $selectedSkin === null ? false : $id === $selectedSkin->getId()]);
}
};
$skins = $skins($skinList, $selectedSkin);
\Frontend::js('assets/skin/section.js')->load();
$url = route('settings.skin.section.setting');
\Frontend::html('skin.loadSkinSetting')->content("<script>\n XE.\$(function(\$){\n \$('.__xe_skinSetting').xeSkinSetting({\n 'loadUrl': '{$url}',\n 'saveUrl': '{$url}'\n });\n });\n </script>")->load();
return View::make('skin.setting', compact('skinInstanceId', 'settingView', 'skins', 'mode', 'selectedSkin'));
}