本文整理汇总了PHP中Widget::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::load方法的具体用法?PHP Widget::load怎么用?PHP Widget::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Widget
的用法示例。
在下文中一共展示了Widget::load方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_index
public function action_index()
{
$id = $this->request->param('cat_alias');
$cat = ORM::factory('Category', $id);
$suff = $cat->cat_title_en;
$this->template->styles[] = 'media/css/' . $suff . '_plugin_style.css';
$plugin = Widget::load('Plugin' . $suff);
$this->template->slider_plugin = $plugin;
$products = $cat->products->find_all();
$examples = $cat->examples->limit(5)->find_all();
$wood_colors = Widget::load('WoodColors');
$glass_colors = Widget::load('GlassColors');
$content = View::factory('index/category/v_category');
$content->set('cat', $cat);
$content->set('products', $products);
$content->set('wood_colors', $wood_colors);
$content->set('glass_colors', $glass_colors);
$content->set('examples', $examples);
$this->template->title = $cat->cat_title_ru;
if ($cat->title_head) {
$this->template->title_head = $cat->title_head;
}
if ($cat->seo_snippet) {
$this->template->seo_snippet = $cat->seo_snippet;
}
if ($cat->keywords) {
$this->template->keywords = $cat->keywords;
}
$this->template->content = $content;
}
示例2: before
public function before()
{
parent::before();
if (!$this->auth->logged_in('admin')) {
Controller::redirect('Auth');
}
$menu_admin = Widget::load('menuadmin');
// Вывод в шаблон
$this->template->site_name = null;
$this->template->styles = array('media/css/style_adm_first.css');
$this->template->styles[] = 'media/css/style_admin.css';
$this->template->scripts = array('media/js/jquery-1.7.2.min.js');
$this->template->menu_admin = $menu_admin;
$this->template->page_title = null;
}
示例3: before
public function before()
{
parent::before();
$meniu_main = Widget::load('MainMeniu');
//Установка начальных настроек
$setting = ORM::factory('Setting', 1);
$this->template->seo_snippet = $setting->seo_snippet;
$this->template->keywords = $setting->keywords;
$this->template->title_head = $setting->main_head;
$this->template->email = $setting->email;
// подключаем стили и скрипты
$this->template->styles = array('media/css/style.css');
$this->template->scripts = array('media/js/jquery-1.7.2.min.js', 'media/js/menu.js');
$this->template->meniu_main = $meniu_main;
}
示例4: action_index
public function action_index()
{
$video = Widget::load('AboutVideo');
$data = ORM::factory('Page')->where('title_en', '=', 'about')->find();
$this->template->slider_plugin = $video;
$content = View::factory('index/about/about');
$content->set('data', $data);
$this->template->title = $data->title_ru;
if ($data->title_head) {
$this->template->title_head = $data->title_head;
}
if ($data->seo_snippet) {
$this->template->seo_snippet = $data->seo_snippet;
}
if ($data->keywords) {
$this->template->keywords = $data->keywords;
}
$this->template->content = $content;
}
示例5: action_index
public function action_index()
{
$this->template->scripts[] = 'media/js/slider.js';
$data = ORM::factory('Page')->where('title_en', '=', 'main')->find();
$slider = Widget::load('Slider');
$this->template->slider_plugin = $slider;
$news = Widget::load('News');
$adress = ORM::factory('Setting', 1)->main_adress;
$content = View::factory('index/main/v_main');
$content->set('news', $news);
$content->set('adress', $adress);
$this->template->title = $data->title_ru;
if ($data->title_head) {
$this->template->title_head = $data->title_head;
}
if ($data->seo_snippet) {
$this->template->seo_snippet = $data->seo_snippet;
}
if ($data->keywords) {
$this->template->keywords = $data->keywords;
}
$this->template->content = $content;
}
示例6: before
public function before()
{
parent::before();
$this->template->scripts = array('media/js/jquery-1.7.2.min.js', 'media/tinymce/tinymce.min.js', 'media/js/edit_tech.js');
$this->template->submenu = Widget::load('SubMenuMain');
}
示例7:
<?php
include 'header.php';
?>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h1 class="page-header">List Sessions</h1>
<?php
Widget::load('sessions');
?>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="js/bootstrap.min.js"></script>
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
<script src="js/holder.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
<?php
include 'footer.php';
示例8:
<?php
if (Module::is_on('cms_shop')) {
echo Widget::load('shop', 'nav');
}
?>
<?php
if (Module::is_on('cms_blog')) {
echo Widget::load('blog', 'nav');
}
?>
<?php
if (Module::is_on('cms_publications')) {
echo Widget::load('publications', 'nav');
}
?>
<?php
if (Module::is_on('cms_static')) {
//echo Widget::load('static', 'nav');
}
?>
<div id="content-cart-top" style="margin-top: 15px">
<?php
echo View::factory('shop/frontend/cart/v_cart_top');
?>
</div>
示例9: load_widget
public function load_widget($badge_tag)
{
$widget = new Widget($this->user_id);
$widget->load($badge_tag);
return $widget;
}
示例10: getWidget
/**
* Get widget
*
* @param string $widgetname widget name (widgetname : find ./widgets folder, modulename/widgetname(using slash) : find ./modules/modulename/widgets folder)
* @return object $widget
*/
function getWidget($widget)
{
$class = new Widget($this);
return $class->load($widget);
}
示例11:
<?php
if (Module::is_on('cms_shop')) {
echo Widget::load('shop', 'recent');
}
?>
<?php
if (Module::is_on('cms_blog')) {
echo Widget::load('blog', 'recent');
}
?>
<?php
if (Module::is_on('cms_publications')) {
echo Widget::load('publications', 'recent');
}
?>
</div>
</div>
</div>
</div>
<?php
echo $v_footer;
?>
<?php
Assets::instance()->render(Assets::SCRIPTS);