Cheetah
ChSitesCmts.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('ChSitesModule');
22  }
23 
24  function getBaseUrl()
25  {
26  $aEntry = $this->_oModule->_oDb->getSiteById($this->getId());
27  if(empty($aEntry) || !is_array($aEntry))
28  return '';
29 
30  return CH_WSB_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() . 'view/' . $aEntry['entryUri'];
31  }
32 
37  {
38  return array(
39  'cmt_actions' => $this->getActions(0, $sType),
40  'cmt_object' => $this->getId(),
41  'cmt_addon' => $this->getCmtsInit()
42  );
43  }
44 }
ChWsbModule\getInstance
static getInstance($sClassName)
Definition: ChWsbModule.php:89
ChBaseCmtsView\getActions
getActions($iCmtId, $sType='reply')
Definition: ChBaseCmtsView.php:173
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
$sType
$sType
Definition: actions.inc.php:11
ChTemplCmtsView
Definition: ChTemplCmtsView.php:14
ChSitesCmts\getCommentsShort
getCommentsShort($sType)
Definition: ChSitesCmts.php:36
ChSitesCmts\$_oModule
$_oModule
Definition: ChSitesCmts.php:12
ChBaseCmtsView\getCmtsInit
getCmtsInit()
Definition: ChBaseCmtsView.php:224
ChSitesCmts\getBaseUrl
getBaseUrl()
Definition: ChSitesCmts.php:24
ChSitesCmts
Definition: ChSitesCmts.php:11
ChSitesCmts\__construct
__construct($sSystem, $iId)
Definition: ChSitesCmts.php:17
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7