Cheetah
ChPollCmts.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChTemplCmtsView');
9 
11 {
12  var $_oModule;
13 
17  function __construct($sSystem, $iId)
18  {
19  parent::__construct($sSystem, $iId);
20 
21  $this->_oModule = ChWsbModule::getInstance('ChPollModule');
22  }
23 
24  function getBaseUrl()
25  {
26  $aEntry = $this->_oModule->_oDb->getPollInfo($this->getId());
27  if(empty($aEntry) || !is_array($aEntry))
28  return '';
29 
30  $aEntry = array_shift($aEntry);
31  if(empty($aEntry) || !is_array($aEntry))
32  return '';
33 
34  return CH_WSB_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() . '&action=show_poll_info&id=' . $aEntry['id_poll'];
35  }
36 }
ChWsbModule\getInstance
static getInstance($sClassName)
Definition: ChWsbModule.php:89
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
php
$iId
$iId
Definition: license.php:15
ChWsbCmts\getId
getId()
Definition: ChWsbCmts.php:228
ChPollCmts\__construct
__construct($sSystem, $iId)
Definition: ChPollCmts.php:17
ChTemplCmtsView
Definition: ChTemplCmtsView.php:14
ChPollCmts
Definition: ChPollCmts.php:11
ChPollCmts\getBaseUrl
getBaseUrl()
Definition: ChPollCmts.php:24
ChPollCmts\$_oModule
$_oModule
Definition: ChPollCmts.php:12
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7