本文整理汇总了PHP中Widget::manager方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::manager方法的具体用法?PHP Widget::manager怎么用?PHP Widget::manager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Widget
的用法示例。
在下文中一共展示了Widget::manager方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($cargo as $k => $v) {
$output .= 'DASHBOARD.' . $k . '=' . json_encode($v) . ';';
}
$output .= 'DASHBOARD.url.hash=window.location.hash;';
echo $output . '</script>' . O_END;
}, 20);
Weapon::add('shell_after', function () use($config) {
if (!Asset::loaded($config->protocol . ICON_LIBRARY_PATH)) {
echo Asset::stylesheet($config->protocol . ICON_LIBRARY_PATH);
}
$path = __DIR__ . DS . 'assets' . DS . 'shell' . DS;
echo Asset::stylesheet(array($path . 'row.css', $path . 'upload.css', $path . 'tab.css', $path . 'toggle.css', $path . 'modal.css', $path . 'tooltip.css', $path . 'sortable.css', $path . 'accordion.css', $path . 'layout.css', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'shell' . DS . 'manager.css'), "", 'shell/manager.min.css');
}, 10);
Weapon::add('cargo_after', function () use($config, $speak) {
if (Config::get('widget_manager_bar_id', 0) <= 1) {
echo Widget::manager('BAR');
// include once ...
}
}, 20);
Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config) {
Session::kill('recent_item_update');
$path = __DIR__ . DS . 'assets' . DS . 'sword' . DS;
echo Asset::javascript(array($path . 'ajax.js', $path . 'row.js', $path . 'slug.js', $path . 'upload.js', $path . 'tab.js', $path . 'toggle.js', $path . 'modal.js', $path . 'tooltip.js', $path . 'sortable.js', $path . 'accordion.js', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'sword' . DS . 'manager.js'), "", 'sword/manager.min.js');
}, 1);
/**
* Footer Link(s)
* --------------
*/
if ($config->page_type === 'manager' || $config->is->post) {
// Add default comment footer link(s)
Weapon::add('comment_footer', function ($comment, $article) use($config, $speak) {
示例2:
?>
<?php
echo Asset::stylesheet(array($root_1 . 'row.css', $root_1 . 'upload.css', $root_1 . 'tab.css', $root_1 . 'toggle.css', $root_1 . 'modal.css', $root_1 . 'tooltip.css', $root_1 . 'sortable.css', $root_1 . 'accordion.css', $root_1 . 'layout.css', $root_2 . 'atom.css', $root_2 . 'layout.css'), "", 'shell/dashboard.min.css');
?>
<?php
Weapon::fire('shell_after');
?>
</head>
<body>
<?php
Weapon::fire('cargo_before');
?>
<div class="board cl cf">
<aside class="board-left cl cf">
<?php
echo Widget::manager('MENU');
?>
</aside>
<article class="board-right cl cf">
<?php
Shield::chunk('page.header');
?>
<?php
Shield::chunk($config->page_type !== '404' ? 'page.body' : 'page.body.404');
?>
</article>
</div>
<?php
Weapon::fire('cargo_after');
?>
<?php
示例3: function
*/
Weapon::add('meta', function () use($config) {
echo O_BEGIN . '<script>!function(a){var b=a.className;a.className=/(^|\\s)no-js(\\s|$)/.test(b)?b.replace(/(^|\\s)no-js(\\s|$)/,"$1js$2"):b+" js"}(document.documentElement);</script>' . O_END;
if (!Asset::loaded($config->protocol . JS_LIBRARY_PATH)) {
echo Asset::javascript($config->protocol . JS_LIBRARY_PATH);
}
}, 20);
Weapon::add('shell_after', function () use($config) {
echo Asset::stylesheet(array('manager/assets/shell/editor.css', 'manager/assets/shell/row.css', 'manager/assets/shell/check.css', 'manager/assets/shell/upload.css', 'manager/assets/shell/tab.css', 'manager/assets/shell/modal.css', 'manager/assets/shell/tooltip.css', 'manager/assets/shell/sortable.css', 'manager/assets/shell/accordion.css', 'manager/assets/shell/layout.css', 'assets/shell/manager.css', 'shell/manager.css'), "", 'shell/manager.min.css');
if (!Asset::loaded($config->protocol . ICON_LIBRARY_PATH)) {
echo Asset::stylesheet($config->protocol . ICON_LIBRARY_PATH);
}
}, 10);
Weapon::add('cargo_after', function () use($config, $speak) {
if (Widget::$id['manager_bar'] <= 1) {
echo O_BEGIN . Widget::manager('BAR') . O_END;
// include once ...
}
}, 20);
Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config, $speak, $uri_end) {
echo Asset::javascript(array('manager/assets/sword/dashboard.js', 'manager/assets/sword/dashboard.task.extend.js', 'manager/assets/sword/dashboard.task.file.js', 'manager/assets/sword/dashboard.task.query.js', 'manager/assets/sword/dashboard.task.session.js', 'manager/assets/sword/dashboard.task.slug.js'), "", 'sword/dashboard.min.js');
$constant = get_defined_constants(true);
$constant_js = "";
foreach ($constant['user'] as $k => $v) {
$constant_js .= $k . '=' . json_encode($v) . ',';
}
unset($constant);
$cargo = array('segment' => $uri_end, 'languages' => Config::get('DASHBOARD.languages', array()), 'is_html_parser_enabled' => Config::get('html_parser') === HTML_PARSER, 'html_parser' => HTML_PARSER, 'tab_size' => TAB, 'element_suffix' => ES, 'file_extension_allow' => implode(',', File::$config['file_extension_allow']), 'url' => array('protocol' => $config->protocol, 'base' => $config->base, 'host' => $config->host, 'url' => $config->url, 'path' => $config->url_path, 'current' => $config->url_current, 'query' => $config->url_query));
$output = O_BEGIN . '<script>var ' . rtrim($constant_js, ',') . ';';
foreach ($cargo as $k => $v) {
$output .= 'DASHBOARD.' . $k . '=' . json_encode($v) . ';';
示例4: array
<a href="#toggle" class="blog-sidebar-toggle">
<i class="fa fa-bars"></i>
</a>
<aside class="blog-sidebar widgets">
<?php
Shield::chunk('block.widget', array('title' => false, 'content' => Widget::search($speak->search . '…', '<i class="fa fa-search"></i>')));
?>
<?php
if ($manager && Widget::exist('manager')) {
?>
<?php
Shield::chunk('block.widget', array('title' => $speak->widget->manager_menus, 'content' => Widget::manager()));
?>
<?php
}
?>
<?php
Shield::chunk('block.widget', array('title' => $speak->widget->tags, 'content' => Widget::tag()));
?>
<?php
Shield::chunk('block.widget', array('title' => $speak->widget->related_posts, 'content' => Widget::relatedPost()));
?>
<?php
Shield::chunk('block.widget', array('title' => $speak->widget->archives, 'content' => Widget::archive()));
?>
</aside>
示例5:
echo Widget::search($speak->search . '…', '<i class="fa fa-search"></i>');
?>
</div>
</div>
<?php
if ($manager) {
?>
<div class="widget-wrapper">
<h4 class="widget-title">
<?php
echo $speak->widget->manager_menus;
?>
</h4>
<div class="widget-content">
<?php
echo Widget::manager();
?>
</div>
</div>
<?php
}
?>
<div class="widget-wrapper">
<h4 class="widget-title">
<?php
echo $speak->widget->tags;
?>
</h4>
<div class="widget-content">
<?php
echo Widget::tag('LIST', 'ASC');