示例#1
0
 /**
  * Init function
  * REMEMBER to feed a $clause which will filter out non-readable pages!
  *
  * @param string $clause Part of where query which will filter out non-readable pages.
  * @param string $orderByFields Record ORDER BY field
  * @return void
  * @todo Define visibility
  */
 public function init($clause = '', $orderByFields = '')
 {
     parent::init(' AND deleted=0 ' . $clause, 'sorting');
     $this->fieldArray = array_merge($this->fieldArray, array('hidden', 'starttime', 'endtime', 'fe_group', 'module', 'extendToSubpages', 'nav_hide'));
     $this->table = 'pages';
     $this->treeName = 'pages';
 }
示例#2
0
 /**
  * Init function
  * REMEMBER to feed a $clause which will filter out non-readable pages!
  *
  * @param string $clause Part of where query which will filter out non-readable pages.
  * @param string $orderByFields Record ORDER BY field
  * @return void
  * @todo Define visibility
  */
 public function init($clause = '', $orderByFields = '')
 {
     parent::init(' AND deleted=0 ' . $clause, 'sorting');
     if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('cms')) {
         $this->fieldArray = array_merge($this->fieldArray, array('hidden', 'starttime', 'endtime', 'fe_group', 'module', 'extendToSubpages', 'nav_hide'));
     }
     $this->table = 'pages';
     $this->treeName = 'pages';
 }
示例#3
0
 /**
  * Get icon for the row.
  * If $this->iconPath and $this->iconName is set, try to get icon based on those values.
  *
  * @param
  *        	array		Item row.
  * @return string tag.
  */
 public function getIcon($row)
 {
     if (in_array($row['uid'], $this->MOUNTS)) {
         $this->table = 'tx_cal_calendar';
     }
     $return = parent::getIcon($row);
     $this->table = 'tx_cal_category';
     return $return;
 }
示例#4
0
 /**
  * Init function
  * REMEMBER to feed a $clause which will filter out non-readable pages!
  *
  * @param string $clause Part of where query which will filter out non-readable pages.
  * @param string $orderByFields Record ORDER BY field
  * @return void
  */
 public function init($clause = '', $orderByFields = '')
 {
     parent::init(' AND deleted=0 ' . $clause, 'sorting');
 }
示例#5
0
 /**
  * Returns the title for the input record. If blank, a "no title" labele (localized) will be returned.
  * '_title' is used for setting an alternative title for folders.
  *
  * @param array $row The input row array (where the key "_title" is used for the title)
  * @param int $titleLen Title length (30)
  * @return string The title
  */
 public function getTitleStr($row, $titleLen = 30)
 {
     return $row['_title'] ?: parent::getTitleStr($row, $titleLen);
 }
示例#6
0
 /**
  * Returns the title for the input record. If blank, a "no title" label (localized) will be returned.
  * Do NOT htmlspecialchar the string from this function - has already been done.
  *
  * @param array $row The input row array (where the key "title" is used for the title)
  * @param integer $titleLen Title length (30)
  * @return string The title.
  * @todo Define visibility
  */
 public function getTitleStr($row, $titleLen = 30)
 {
     // Get the basic title from the parent implementation in t3lib_treeview
     $title = parent::getTitleStr($row, $titleLen);
     if (isset($row['is_siteroot']) && $row['is_siteroot'] != 0 && $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle')) {
         $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('domainName,sorting', 'sys_domain', 'pid=' . $GLOBALS['TYPO3_DB']->quoteStr($row['uid'] . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_domain') . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('sys_domain'), 'sys_domain'), '', 'sorting', 1);
         if (is_array($rows) && count($rows) > 0) {
             $title = sprintf('%s [%s]', $title, htmlspecialchars($rows[0]['domainName']));
         }
     }
     return $title;
 }
示例#7
0
 /**
  * Returns the title for the input record. If blank, a "no title" label (localized) will be returned.
  * Do NOT htmlspecialchar the string from this function - has already been done.
  *
  * @param array $row The input row array (where the key "title" is used for the title)
  * @param int $titleLen Title length (30)
  * @return string The title.
  */
 public function getTitleStr($row, $titleLen = 30)
 {
     if ($this->ext_showNavTitle && isset($row['nav_title']) && trim($row['nav_title']) !== '') {
         $title = parent::getTitleStr(['title' => $row['nav_title']], $titleLen);
     } else {
         $title = parent::getTitleStr($row, $titleLen);
     }
     if (!empty($row['is_siteroot']) && $this->getBackendUser()->getTSConfigVal('options.pageTree.showDomainNameWithTitle')) {
         $rows = $this->getDatabaseConnection()->exec_SELECTgetRows('domainName,sorting', 'sys_domain', 'pid=' . $this->getDatabaseConnection()->quoteStr($row['uid'] . BackendUtility::deleteClause('sys_domain') . BackendUtility::BEenableFields('sys_domain'), 'sys_domain'), '', 'sorting', 1);
         if (is_array($rows) && !empty($rows)) {
             $title = sprintf('%s [%s]', $title, htmlspecialchars($rows[0]['domainName']));
         }
     }
     return $title;
 }
示例#8
0
 /**
  * Returns the title for the input record. If blank, a "no title" label (localized) will be returned.
  * Do NOT htmlspecialchar the string from this function - has already been done.
  *
  * @param array $row The input row array (where the key "title" is used for the title)
  * @param int $titleLen Title length (30)
  * @return string The title.
  */
 public function getTitleStr($row, $titleLen = 30)
 {
     if ($this->ext_showNavTitle && isset($row['nav_title']) && trim($row['nav_title']) !== '') {
         $title = parent::getTitleStr(['title' => $row['nav_title']], $titleLen);
     } else {
         $title = parent::getTitleStr($row, $titleLen);
     }
     if (!empty($row['is_siteroot']) && $this->getBackendUser()->getTSConfigVal('options.pageTree.showDomainNameWithTitle')) {
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_domain');
         $row = $queryBuilder->select('domainName', 'sorting')->from('sys_domain')->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($row['uid'], \PDO::PARAM_INT)))->orderBy('sorting')->setMaxResults(1)->execute()->fetch();
         if ($row !== false) {
             $title = sprintf('%s [%s]', $title, htmlspecialchars($row['domainName']));
         }
     }
     return $title;
 }