--- class.tx_dlf_listview.php 2013-02-06 16:46:07.000000000 +0100 +++ class.tx_dlf_listview_sbb.php 2013-04-05 13:31:49.000000000 +0200 @@ -72,6 +72,25 @@ */ protected function getPagebrowser() { + // Hook for getting custom browse bars (requested by SBB). + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'])) { + + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'] as $_classRef) { + + $hookObj = &t3lib_div::getUserObj($_classRef); + + if (method_exists($hookObj,'getPagebrowser_getCustomPageBrowser')) { + + $output = $hookObj->getPagebrowser_getCustomPageBrowser($this, $this->list, $this->template); + + return $output; + + } + + } + + } + // Get overall number of pages. $maxPages = intval(ceil($this->list->count / $this->conf['limit'])); @@ -247,6 +266,23 @@ } + // Hook for getting custom entries (requested by SBB). + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'])) { + + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'] as $_classRef) { + + $hookObj = &t3lib_div::getUserObj($_classRef); + + if (method_exists($hookObj,'getEntry_getCustomEntry')) { + + $hookObj->getEntry_getCustomEntry($this, $this->list, $this->metadata, $this->parseTS($metaConf['wrap']), $number, $template, $markerArray); + + } + + } + + } + if (!empty($this->list->elements[$number]['subparts'])) { $subpart = $this->getSubEntries($number, $template); @@ -437,6 +473,23 @@ } + // Hook for getting custom subentries (requested by SBB). + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'])) { + + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'] as $_classRef) { + + $hookObj = &t3lib_div::getUserObj($_classRef); + + if (method_exists($hookObj,'getEntry_getCustomEntry')) { + + $content = $hookObj->getSubEntries_getCustomSubEntries($this, $this->list, $this->metadata, $this->parseTS($metaConf['wrap']), $number, $template, $markerArray); + + } + + } + + } + return $this->cObj->substituteSubpart($this->cObj->getSubpart($this->template, '###SUBTEMPLATE###'), '###SUBENTRY###', $content, TRUE); } @@ -497,6 +550,23 @@ // Don't cache the output. $this->setCache(FALSE); + // Hook 1 for getting custom elements (requested by SBB). + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'])) { + + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'] as $_classRef) { + + $hookObj = &t3lib_div::getUserObj($_classRef); + + if (method_exists($hookObj,'main_getLimitAndOrder')) { + + $hookObj->main_getLimitAndOrder($this); + + } + + } + + } + // Load the list. $this->list = t3lib_div::makeInstance('tx_dlf_list'); @@ -581,12 +651,48 @@ } + // Hook 2 for getting custom elements (requested by SBB). + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'])) { + + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'] as $_classRef) { + + $hookObj = &t3lib_div::getUserObj($_classRef); + + if (method_exists($hookObj,'main_getCustomLangvarsCollectionsFacets')) { + + parent::pi_loadLL(); // This should better be in the hook function ... + + $hookObj->main_getCustomLangvarsCollectionsFacets($this, $i, $this->list, $markerArray); + + } + + } + + } + $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser(); $markerArray['###SORTING###'] = $this->getSortingForm(); $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray); + // Hook 3 for getting custom elements (requested by SBB). + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'])) { + + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/plugins/listview/class.tx_dlf_listview.php']['hookClass'] as $_classRef) { + + $hookObj = &t3lib_div::getUserObj($_classRef); + + if (method_exists($hookObj,'main_getSelectShowResults')) { + + $hookObj->main_getSelectShowResults($this, $this->template, $markerArray, $content); + + } + + } + + } + return $this->pi_wrapInBaseClass($content); }