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


PHP JView::assignRef方法代码示例

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


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

示例1: onAfterRender

 function onAfterRender()
 {
     global $mainframe;
     if (!isset($this->_plugin)) {
         return;
     }
     if (JRequest::getVar("option") == "com_menus" && JRequest::getVar("task") == "edit") {
         $path = JPATH_PLUGINS . DS . 'system' . DS . 'S5FlexMenu' . DS . 'element' . DS . 'S5FlexMenu.xml';
         $params = $this->getSystemParams($path);
         JView::assignRef('params', $params);
         $item = $this->getModulesData();
         ob_start();
         $pane =& JPane::getInstance('sliders', array('allowAllClose' => true));
         JView::assignRef('pane', $pane);
         echo $this->pane->startPanel(JText::_('Parameters - S5 Flex Menu'), "S5SM-page");
         echo $params;
         echo $this->pane->endPanel();
         $thexml = ob_get_clean();
         $body = JResponse::getBody();
         $start_string = '<div id="menu-pane" class="pane-sliders">';
         $body = str_replace($start_string, $start_string . $thexml, $body);
         JResponse::setBody($body);
     }
     if (JRequest::getVar("option") == "com_templates" && JRequest::getVar("task") == "edit") {
         $path = JPATH_PLUGINS . DS . 'system' . DS . 'S5FlexMenu' . DS . 'element' . DS . 'S5FlexTemplate.xml';
         $params = $this->getSystemParams($path);
         $template_params = $this->getTemplateParams();
         JView::assignRef('params', $params);
         $item = $this->getModulesData();
         $body = JResponse::getBody();
         $start_string = '<legend>Parameters</legend>';
         $body = str_replace($start_string, $start_string . $params, $body);
         JResponse::setBody($body);
     }
     return true;
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:36,代码来源:S5FlexMenu.php

示例2: fetchTemplateChiaSe

 function fetchTemplateChiaSe($templatePath, $templateName, $data = null)
 {
     $template = new JView();
     $template->addTemplatePath($templatePath);
     if (!empty($data)) {
         $template->assignRef('data', $data);
     }
     $template->setLayout($templateName);
     return $template->loadTemplate();
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:10,代码来源:common_utils.bk-22-5.php

示例3: fetchTienIchTemplate

 function fetchTienIchTemplate($tienIchIds, $templatePath, $templateName, $listAllFlag = true, $lang)
 {
     // TODO: remove hard code
     //    	$tienIchIds = '1-1,1-2,2-6';
     $data = null;
     // $lang = ilandCommonUtils::getLanguage();
     // lay tat ca du lieu tien ich
     $allList = U_ReModelProperties::layDanhSachTienIch($lang);
     $data = U_ReModelProperties::parseTienIch($tienIchIds, $allList, $listAllFlag);
     // fetch template tien ich
     $template = new JView();
     $template->addTemplatePath($templatePath);
     $template->assignRef('allFlag', $listAllFlag);
     $template->assignRef('tienIchAllList', $data);
     $template->setLayout($templateName);
     return $template->loadTemplate();
     return $data;
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:18,代码来源:properties.bk.php

示例4: getList

 /**
  * Method to get the events
  *
  * @access public
  * @return array
  */
 function getList(&$params)
 {
     global $mainframe;
     $db =& JFactory::getDBO();
     $user =& JFactory::getUser();
     $user_gid = (int) $user->get('aid');
     //all upcoming events
     if ($params->get('type') == 1) {
         $where = ' WHERE a.dates > CURDATE()';
         //	$where = ' WHERE a.published = 1';
         $order = ' ORDER BY a.dates, a.times';
     }
     //archived events only
     if ($params->get('type') == 2) {
         $where = ' WHERE a.published = -1';
         $order = ' ORDER BY a.dates DESC, a.times DESC';
     }
     //currently running events only
     if ($params->get('type') == 3) {
         $where = ' WHERE a.published = 1';
         $where .= ' AND ( a.dates = CURDATE()';
         $where .= ' OR ( a.enddates >= CURDATE() AND a.dates <= CURDATE() ))';
         $order = ' ORDER BY a.dates, a.times';
     }
     //clean parameter data
     $catid = trim($params->get('catid'));
     $venid = trim($params->get('venid'));
     $state = JString::strtolower(trim($params->get('stateloc')));
     //Build category selection query statement
     if ($catid) {
         $ids = explode(',', $catid);
         JArrayHelper::toInteger($ids);
         $categories = ' AND (c.id=' . implode(' OR c.id=', $ids) . ')';
     }
     //Build venue selection query statement
     if ($venid) {
         $ids = explode(',', $venid);
         JArrayHelper::toInteger($ids);
         $venues = ' AND (l.id=' . implode(' OR l.id=', $ids) . ')';
     }
     //Build state selection query statement
     if ($state) {
         $rawstate = explode(',', $state);
         foreach ($rawstate as $val) {
             if ($val) {
                 $states[] = '"' . trim($db->getEscaped($val)) . '"';
             }
         }
         JArrayHelper::toString($states);
         $stat = ' AND (LOWER(l.state)=' . implode(' OR LOWER(l.state)=', $states) . ')';
     }
     //perform select query
     $query = 'SELECT a.title, a.dates, a.enddates, a.times, a.endtimes, a.datdescription, a.datimage, l.venue, l.state, l.locimage, l.city, l.locdescription, c.catname,' . ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,' . ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(\':\', l.id, l.alias) ELSE l.id END as venueslug,' . ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END as categoryslug' . ' FROM #__eventlist_events AS a' . ' LEFT JOIN #__eventlist_venues AS l ON l.id = a.locid' . ' LEFT JOIN #__eventlist_categories AS c ON c.id = a.catsid' . $where . ' AND c.access <= ' . $user_gid . ($catid ? $categories : '') . ($venid ? $venues : '') . ($state ? $stat : '') . $order . ' LIMIT ' . (int) $params->get('count', '2');
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     //assign datemethod value to jview
     jimport('joomla.application.component.view');
     JView::assignRef('datemethod', $params->get('datemethod', 1));
     JView::assignRef('use_modal', $params->get('use_modal', 0));
     if ($params->get('use_modal', 0)) {
         JHTML::_('behavior.modal');
     }
     //Loop through the result rows and prepare data
     $i = 0;
     $lists = array();
     foreach ($rows as $row) {
         //create thumbnails if needed and receive imagedata
         $dimage = ELImage::flyercreator($row->datimage, 'event');
         $limage = ELImage::flyercreator($row->locimage);
         //cut titel
         $length = strlen(htmlspecialchars($row->title));
         if ($length > $params->get('cuttitle', '25')) {
             $row->title = substr($row->title, 0, $params->get('cuttitle', '18'));
             $row->title = $row->title . '...';
         }
         $lists[$i]->title = htmlspecialchars($row->title, ENT_COMPAT, 'UTF-8');
         $lists[$i]->venue = htmlspecialchars($row->venue, ENT_COMPAT, 'UTF-8');
         $lists[$i]->catname = htmlspecialchars($row->catname, ENT_COMPAT, 'UTF-8');
         $lists[$i]->state = htmlspecialchars($row->state, ENT_COMPAT, 'UTF-8');
         $lists[$i]->eventlink = $params->get('linkevent', 1) ? JRoute::_(EventListHelperRoute::getRoute($row->slug)) : '';
         $lists[$i]->venuelink = $params->get('linkvenue', 1) ? JRoute::_(EventListHelperRoute::getRoute($row->venueslug, 'venueevents')) : '';
         $lists[$i]->categorylink = $params->get('linkcategory', 1) ? JRoute::_(EventListHelperRoute::getRoute($row->categoryslug, 'categoryevents')) : '';
         $lists[$i]->date = modEventListwideHelper::_format_date($row, $params);
         $lists[$i]->time = $row->times ? modEventListwideHelper::_format_time($row->dates, $row->times, $params) : '';
         $lists[$i]->eventimage = JURI::base(true) . '/' . $dimage['thumb'];
         $lists[$i]->eventimageorig = JURI::base(true) . '/' . $dimage['original'];
         $lists[$i]->venueimage = JURI::base(true) . '/' . $limage['thumb'];
         $lists[$i]->venueimageorig = JURI::base(true) . '/' . $limage['original'];
         $lists[$i]->eventdescription = strip_tags($row->datdescription);
         $lists[$i]->venuedescription = strip_tags($row->locdescription);
         $i++;
     }
     return $lists;
 }
开发者ID:julienV,项目名称:testrepo,代码行数:100,代码来源:helper.php


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