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


PHP JoomleagueHelper::createTitleInfo方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $project = $model->getProject();
     //no treeko !!!
     $config = $model->getTemplateConfig('tree');
     $this->project = $model->getProject();
     $this->overallconfig = $model->getOverallConfig();
     $this->config = $config;
     $this->node = $model->getTreetonode();
     $this->roundname = $model->getRoundName();
     $this->model = $model;
     // Set page title
     ///TODO: treeto name, no project name
     $titleInfo = JoomleagueHelper::createTitleInfo(JText::_('COM_JOOMLEAGUE_TREETO_PAGE_TITLE'));
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     $division = $model->getDivision(JRequest::getInt('division', 0));
     if (!empty($division) && $division->id != 0) {
         $titleInfo->divisionName = $division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $this->config["page_title_format"]);
     $document->setTitle($this->pagetitle);
     parent::display($tpl);
 }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:30,代码来源:view.html.php

示例2: display

 public function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $config = $model->getTemplateConfig("player");
     // Get the type of persondata to be shown from the query string
     // pt==1 ==> as player // pt==2 ==> as staffmember  // pt==3 ==> as referee // pt==4 ==> as club-staffmember
     $showType = JRequest::getVar('pt', '1', 'default', 'int');
     if ($showType > 3) {
         $showType = 1;
     }
     $person = $model->getPerson();
     $this->showType = $showType;
     $this->project = $model->getProject();
     $this->overallconfig = $model->getOverallConfig();
     $this->config = $config;
     $this->person = $person;
     //$extended = $this->getExtended($person->extended, 'person');
     //$this->extended = $extended;
     switch ($showType) {
         case '4':
             $titleStr = 'About %1$s %2$s as a Club staff';
             $this->historyClubStaff = $model->getPersonHistory('ASC');
             break;
         case '3':
             $titleStr = 'About %1$s %2$s as a Referee';
             $this->inprojectinfo = $model->getReferee();
             $this->historyReferee = $model->getRefereeHistory('ASC');
             break;
         case '2':
             $titleStr = 'About %1$s %2$s as a Staff member';
             $this->inprojectinfo = $model->getTeamStaff();
             $this->historyStaff = $model->getStaffHistory('ASC');
             break;
         case '1':
             $titleStr = 'About %1$s %2$s as a Player';
             $this->inprojectinfo = $model->getTeamPlayer();
             $this->historyPlayer = $model->getPlayerHistory('ASC');
             //$this->historyStaff = $model->getStaffHistory('ASC');
             $this->AllEvents = $model->getAllEvents();
             break;
         default:
             break;
     }
     // Set page title
     $titleInfo = JoomleagueHelper::createTitleInfo(JText::sprintf($titleStr, $this->person->firstname, $this->person->lastname));
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     $division = $model->getDivision(JRequest::getInt('division', 0));
     if (!empty($division) && $division->id != 0) {
         $titleInfo->divisionName = $division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $this->config["page_title_format"]);
     $document->setTitle($this->pagetitle);
     parent::display($tpl);
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:60,代码来源:view.html.php


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