本文整理汇总了PHP中JLGView类的典型用法代码示例。如果您正苦于以下问题:PHP JLGView类的具体用法?PHP JLGView怎么用?PHP JLGView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JLGView类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
//$model = $this->getModel();
//$this->assignRef( 'project', $model->getProject() );
//$this->assignRef( 'overallconfig', $model->getOverallConfig() );
parent::display($tpl);
}
示例2: display
function display($tpl = null)
{
// Set toolbar items for the page
JToolBarHelper::title(JText::_('JoomLeague XML Export'), 'generic.png');
$db = JFactory::getDBO();
parent::display($tpl);
}
示例3:
function _displayForm($tpl)
{
$option = JRequest::getCmd('option');
$mainframe = JFactory::getApplication();
$uri = JFactory::getURI();
$user = JFactory::getUser();
$model = $this->getModel();
//get the project
$object =& $this->get('data');
$isNew = $object->id < 1;
// fail if checked out not by 'me'
if ($model->isCheckedOut($user->get('id'))) {
$msg = JText::sprintf('DESCBEINGEDITTED', JText::_('COM_JOOMLEAGUE_ADMIN_LEAGUE'), $object->name);
$mainframe->redirect('index.php?option=' . $option, $msg);
}
// Edit or Create?
if (!$isNew) {
$model->checkout($user->get('id'));
} else {
// initialise new record
$object->order = 0;
}
$extended = $this->getExtended($object->extended, 'league');
$this->assignRef('extended', $extended);
$this->assignRef('object', $object);
$this->assignRef('form', $this->get('form'));
$this->assign('cfg_which_media_tool', JComponentHelper::getParams($option)->get('cfg_which_media_tool', 0));
$this->addToolbar();
parent::display($tpl);
}
示例4: 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);
}
示例5: display
function display($tpl = null)
{
$option = JRequest::getCmd('option');
$mainframe = JFactory::getApplication();
$uri = JFactory::getURI();
$filter_order = $mainframe->getUserStateFromRequest($option . 's_filter_order', 'filter_order', 's.ordering', 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($option . 's_filter_order_Dir', 'filter_order_Dir', '', 'word');
$search = $mainframe->getUserStateFromRequest($option . 's_search', 'search', '', 'string');
$search = JString::strtolower($search);
$items = $this->get('Data');
$total = $this->get('Total');
$pagination = $this->get('Pagination');
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search'] = $search;
$user = JFactory::getUser();
$this->user = $user;
$this->lists = $lists;
$this->items = $items;
$this->pagination = $pagination;
$this->request_url = $uri->toString();
$this->addToolbar();
parent::display($tpl);
}
示例6: array
function _displayForm($tpl)
{
$option = JRequest::getCmd('option');
$mainframe = JFactory::getApplication();
$db = JFactory::getDBO();
$uri = JFactory::getURI();
$user = JFactory::getUser();
$model = $this->getModel();
$lists = array();
//get the matchday
$round =& $this->get('data');
$isNew = $round->id < 1;
// fail if checked out not by 'me'
if ($model->isCheckedOut($user->get('id'))) {
$msg = JText::sprintf('DESCBEINGEDITTED', JText::_('The matchday'), $round->name);
$mainframe->redirect('index.php?option=' . $option, $msg);
}
// Edit or Create?
if (!$isNew) {
$model->checkout($user->get('id'));
} else {
// initialise new record
$round->order = 0;
}
$projectws =& $this->get('Data', 'projectws');
$this->assignRef('projectws', $projectws);
#$this->assignRef('lists',$lists);
$this->assignRef('matchday', $round);
$this->assignRef('form', $this->get('form'));
//$extended = $this->getExtended($round->extended, 'round');
//$this->assignRef( 'extended', $extended );
$this->addToolbar();
parent::display($tpl);
}
示例7: unset
function _displayDefault($tpl)
{
$option = JRequest::getCmd('option');
$mainframe = JFactory::getApplication();
$project_id = $mainframe->getUserState($option . 'project');
$db = JFactory::getDBO();
$uri = JFactory::getURI();
// Get data from the model
$items =& $this->get('Data');
$total =& $this->get('Total');
$pagination =& $this->get('Pagination');
$model = $this->getModel();
$projectws =& $this->get('Data', 'projectws');
$division = $mainframe->getUserStateFromRequest($option . 'tt_division', 'division', '', 'string');
//build the html options for divisions
$divisions[] = JHTMLSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION'));
$mdlDivisions = JModel::getInstance("divisions", "JoomLeagueModel");
if ($res =& $mdlDivisions->getDivisions($project_id)) {
$divisions = array_merge($divisions, $res);
}
$lists['divisions'] = $divisions;
unset($divisions);
$this->assignRef('user', JFactory::getUser());
$this->assignRef('lists', $lists);
$this->assignRef('items', $items);
$this->assignRef('projectws', $projectws);
$this->assignRef('division', $division);
$this->assignRef('total', $total);
$this->assignRef('pagination', $pagination);
$this->assignRef('request_url', $uri->toString());
$this->addToolbar();
parent::display($tpl);
}
示例8: 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);
}
示例9: display
public function display($tpl = null)
{
$app = JFactory::getApplication();
$jinput = $app->input;
$option = $jinput->getCmd('option');
$uri = JFactory::getURI();
$lists = array();
$filter_order = $app->getUserStateFromRequest($this->get('context') . '.filter_order', 'filter_order', 's.ordering', 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest($this->get('context') . '.filter_order_Dir', 'filter_order_Dir', '', 'word');
$filter_state = $app->getUserStateFromRequest($this->get('context') . '.filter_state', 'filter_state', 'P', 'word');
$search = $app->getUserStateFromRequest($this->get('context') . '.search', 'search', '', 'string');
$search = JString::strtolower($search);
$items = $this->get('Data');
$total = $this->get('Total');
$pagination = $this->get('Pagination');
// state filter
$lists['state'] = JoomleagueHelper::stateOptions($filter_state);
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search'] = $search;
$this->user = JFactory::getUser();
$this->lists = $lists;
$this->items = $items;
$this->pagination = $pagination;
$this->request_url = $uri->toString();
$this->addToolbar();
parent::display($tpl);
}
示例10: array
function _displayForm($tpl)
{
$option = JRequest::getCmd('option');
$mainframe = JFactory::getApplication();
$project_id = $mainframe->getUserState('com_joomleagueproject');
$uri = JFactory::getURI();
$user = JFactory::getUser();
$model = $this->getModel();
$lists = array();
$node = $this->get('data');
$match = $model->getNodeMatch();
$total = $this->get('Total');
$pagination = $this->get('Pagination');
$projectws = $this->get('Data', 'project');
$model = $this->getModel('project');
$mdlTreetonodes = JModelLegacy::getInstance("Treetonodes", "JoomleagueModel");
$team_id[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'));
if ($projectteams = $mdlTreetonodes->getProjectTeamsOptions($model->_id)) {
$team_id = array_merge($team_id, $projectteams);
}
$lists['team'] = $team_id;
unset($team_id);
$this->user = JFactory::getUser();
$this->projectws = $projectws;
$this->lists = $lists;
$this->division = $division;
$this->division_id = $division_id;
$this->node = $node;
$this->match = $match;
$this->pagination = $pagination;
parent::display($tpl);
}
示例11: foreach
function _displayDefault($tpl)
{
global $mainframe, $option;
$db =& JFactory::getDBO();
$uri =& JFactory::getURI();
$user =& JFactory::getUser();
$model =& $this->getModel();
$document =& JFactory::getDocument();
$dbblink = '';
$project = $mainframe->getUserState($option . 'project');
$this->assignRef('project', $project);
$config =& JComponentHelper::getParams('com_media');
$stylelink = '<link rel="stylesheet" href="' . JURI::root() . 'administrator/components/com_joomleague/assets/css/jlextusericons.css' . '" type="text/css" />' . "\n";
$document->addCustomTag($stylelink);
JToolBarHelper::title(JText::_('JL_ADMIN_EXT_DBB_TITLE_2'), 'dbb-cpanel');
$teamart = '';
$teamarten['Herren'] = 'Herren';
$teamarten['U18m'] = 'U18m';
$teamarten['U18'] = 'U18';
$teamarten['U16m'] = 'U16m';
$teamarten['U16'] = 'U16';
// $teamarten[] = '';
// $teamarten[] = '';
// $teamarten[] = '';
$teamarthtml[] = JHTML::_('select.option', '', JText::_('JL_ADMIN_XML_IMPORT_DBB_SELECT_TEAMART'));
foreach ($teamarten as $key => $value) {
$teamarthtml[] = JHTML::_('select.option', $value, $value);
}
$lists['teamart'] = JHTML::_('select.genericlist', $teamarthtml, 'teamart', 'class="inputbox" size="1"', 'value', 'text', $teamart);
$this->assignRef('lists', $lists);
$this->assignRef('request_url', $uri->toString());
$this->assignRef('config', $config);
$this->assignRef('dbblink', $dbblink);
parent::display($tpl);
}
示例12: array
function _displayModal($tpl)
{
JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PERSON_ASSIGN_DESCR'));
// Do not allow cache
JResponse::allowCache(false);
$document = JFactory::getDocument();
$prjid = array();
$prjid = JRequest::getVar('prjid', array(0), 'post', 'array');
$proj_id = (int) $prjid[0];
//build the html select list for projects
$projects[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PROJECT'), 'id', 'name');
if ($res = JoomleagueHelper::getProjects()) {
$projects = array_merge($projects, $res);
}
$lists['projects'] = JHtmlSelect::genericlist($projects, 'prjid[]', 'class="inputbox" onChange="this.form.submit();" style="width:170px"', 'id', 'name', $proj_id);
unset($projects);
$projectteams[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'), 'value', 'text');
// if a project is active we show the teams select list
if ($proj_id > 0) {
if ($res = JoomleagueHelper::getProjectteams($proj_id)) {
$projectteams = array_merge($projectteams, $res);
}
$lists['projectteams'] = JHtmlSelect::genericlist($projectteams, 'xtid[]', 'class="inputbox" style="width:170px"', 'value', 'text');
unset($projectteams);
}
$this->lists = $lists;
$this->project_id = $proj_id;
parent::display($tpl);
}