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


PHP Widget::load方法代码示例

本文整理汇总了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;
 }
开发者ID:ruslankus,项目名称:ligneus,代码行数:30,代码来源:Categories.php

示例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;
 }
开发者ID:ruslankus,项目名称:ligneus,代码行数:15,代码来源:Admin.php

示例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;
 }
开发者ID:ruslankus,项目名称:ligneus,代码行数:15,代码来源:Index.php

示例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;
 }
开发者ID:ruslankus,项目名称:ligneus,代码行数:19,代码来源:About.php

示例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;
 }
开发者ID:ruslankus,项目名称:ligneus,代码行数:23,代码来源:Main.php

示例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');
 }
开发者ID:ruslankus,项目名称:ligneus,代码行数:6,代码来源:Contacts.php

示例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';
开发者ID:alexconrey,项目名称:kippo-analytics,代码行数:30,代码来源:listSessions.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>
开发者ID:eok8177,项目名称:shopCMS,代码行数:29,代码来源:v_home.php

示例9: load_widget

 public function load_widget($badge_tag)
 {
     $widget = new Widget($this->user_id);
     $widget->load($badge_tag);
     return $widget;
 }
开发者ID:CivicCommons,项目名称:people-aggregator,代码行数:6,代码来源:User.php

示例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);
 }
开发者ID:JRevirthuum,项目名称:iModule,代码行数:11,代码来源:iModule.class.php

示例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);
开发者ID:eok8177,项目名称:shopCMS,代码行数:30,代码来源:v_default.php


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