本文整理汇总了PHP中JoomleagueHelper::formatTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomleagueHelper::formatTitle方法的具体用法?PHP JoomleagueHelper::formatTitle怎么用?PHP JoomleagueHelper::formatTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoomleagueHelper
的用法示例。
在下文中一共展示了JoomleagueHelper::formatTitle方法的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);
}
示例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);
}