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


PHP CategoryModel::getTreeAssoc方法代码示例

本文整理汇总了PHP中CategoryModel::getTreeAssoc方法的典型用法代码示例。如果您正苦于以下问题:PHP CategoryModel::getTreeAssoc方法的具体用法?PHP CategoryModel::getTreeAssoc怎么用?PHP CategoryModel::getTreeAssoc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CategoryModel的用法示例。


在下文中一共展示了CategoryModel::getTreeAssoc方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 function render()
 {
     $tree = CategoryModel::getTreeAssoc($this->getPresenter()->id_lang);
     $template = $this->template;
     $template->setFile(dirname(__FILE__) . '/default.phtml');
     $template->tree = $tree;
     $template->render();
 }
开发者ID:oaki,项目名称:demoshop,代码行数:8,代码来源:MyTreeControl.php

示例2: beforeRender

 protected function beforeRender()
 {
     //		dump($this->context);
     $this->template->id_category = null;
     $this->template->id_menu_item = null;
     $this['header']['css']->addFile('reset.css');
     //		$this['header']['css']->addFile('default.css');
     $this['header']['css']->addFile('h.css');
     $this['header']['css']->addFile('article.css');
     $this['header']['css']->addFile('attachment.css');
     $this['header']['css']->addFile('gallery.css');
     $this['header']['css']->addFile('modal-dialog.css');
     $this['header']['css']->addFile('paginator.css');
     $this['header']['css']->addFile('components/ContactForm/contact-form.css');
     $this['header']['css']->addFile('delivery-form.css');
     $this['header']['css']->addFile('msg.css');
     $this['header']['css']->addFile('cart.css');
     $this['header']['css']->addFile('sharepost.css');
     $this['header']['css']->addFile('../jscripts/jquery/custom-theme/jquery-ui-1.8.13.custom.css');
     $this['header']['css']->addFile('/screen.css');
     $this['header']['css']->addFile('/login-dialog.css');
     $this['header']['css']->addFile('/flash-msg.css');
     // sekcia pre adminou, ktory maju moznost upravy aj na fronte
     //		if($this->user->isLoggedIn() AND $this->user->isAllowed('cms','edit')){
     //			$this['header']['css']->addFile('adminBar/admin-bar.css');
     //		}
     //		<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
     //		$this['header']->addCssFile('http://fonts.googleapis.com/css?family=Oswald');
     $header = $this->getHttpRequest()->getHeaders();
     if (strstr(@$header['user-agent'], 'MSIE 7')) {
         $this['header']['css']->addFile('ie.css');
     }
     $this['header']['js']->addFile('jquery/dropdown/js/superfish.js');
     $this['header']['css']->addFile('../jscripts/jquery/dropdown/css/superfish.css');
     //		$this['header']['css']->addFile('../jscripts/jquery/jquery.treeview/jquery.treeview.css');
     $this['header']['js']->addFile('jquery/prettyPhoto/js/jquery.prettyPhoto.js');
     $this['header']['css']->addFile('../jscripts/jquery/prettyPhoto/css/prettyPhoto.css');
     $this['header']['js']->addFile('jquery/In-Field-Labels/src/jquery.infieldlabel.min.js');
     $this['header']['js']->addFile('jquery/relatedselects/jquery.relatedselects.js');
     //		$this['header']['css']->addFile('../jscripts/jquery/bubblepopup/jquery.bubblepopup.v2.3.1.css');
     //		$this['header']['js']->addFile('jquery/bubblepopup/jquery.bubblepopup.v2.3.1.min.js');
     $this['header']['js']->addFile('jquery/orbit_slider/jquery.orbit-1.2.3.min.js');
     $this['header']['css']->addFile('../jscripts/jquery/orbit_slider/orbit-1.2.3.css');
     $this['header']['js']->addFile('jquery/jquery_news_ticker/includes/jquery.ticker.js');
     $this['header']['css']->addFile('../jscripts/jquery/jquery_news_ticker/styles/ticker-style.css');
     $this['header']['js']->addFile('loader.js');
     if ($this->context->parameters['GOOGLE_ANALYTICS']['ID'] != '') {
         $this['header']->addJscript("\n  var _gaq = _gaq || [];\n  _gaq.push(['_setAccount', '" . $this->context->parameters['GOOGLE_ANALYTICS']['ID'] . "']);\n  _gaq.push(['_trackPageview']);\n\n  (function() {\n    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n  })();\n");
     }
     $this->template->eshop_category = array();
     $this->template->eshop_category = CategoryModel::getTreeAssoc($this->id_lang);
     $page = $this->getService('Page');
     $this->template->mainmenu = $page->getAssoc($this->id_lang);
     /*
      * zistenie ci je nieco v akcii ak nieje nezobrazi sa tlacidlo
      * - bude sa cachovat spolu s modelom product
      */
     $count = ProductModel::loadCache('sale_count');
     //        var_dump($count);
     //        exit;
     if ($count === null) {
         $count = ProductModel::saveCache('sale_count', count(Front_SearchPresenter::getQuery()->where('product.sale = 1')->groupBy('id_product')));
     }
     $this->template->is_sale = $count > 0 ? true : false;
 }
开发者ID:oaki,项目名称:demoshop,代码行数:65,代码来源:Front_BasePresenter.php


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