includeLLFile('EXT:wse_events/mod1/locallang.xml'); } /** * Class 'tx_wseevents_categories' for the 'wse_events' extension. * * @package TYPO3 * @subpackage wse_events * @author Michael Oehlhof */ class tx_wseevents_categories extends tx_wseevents_dbplugin { /** The extension key. */ var $extKey = 'wseevents'; // List of page ids var $selectedPids; /** * Dummy constructor: Does nothing. * * The base classe's constructor is called in $this->init(). * * @return void ... */ function tx_wseevents_categories() { $this->init(); } /** * This is the main function * * @param array TypoScript configuration for the plugin * @return void ... * @access protected */ function main($items) { return; } /** * Get list of categories * * @param array TypoScript configuration for the plugin * @param object $fobj: ToDo: insert description * @return void ... * @access protected */ function getTCAcategorylist($PA, $fobj) { global $TCA; # debug ($PA); # debug ($fobj); // Get list of common pids $thispage = t3lib_BEfunc::getRecord('pages', $PA['row']['pid']); $this->selectedPids = $this->getCommonPids($PA['row']['pid'], $thispage['pid']); // --------------------- Get the list of categories --------------------- // Initialize variables for the database query. $tableName ='tx_wseevents_categories'; $queryWhere = $TCA[$tableName]['ctrl']['languageField'] . '=0' . ' AND pid in(' . $this->selectedPids . ')' . t3lib_BEfunc::BEenableFields($tableName) . t3lib_BEfunc::versioningPlaceholderClause($tableName); $additionalTables = ''; $groupBy = ''; $orderBy = 'shortkey'; $limit = ''; // Get list of all rooms of the location $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', $tableName, $queryWhere, $groupBy, $orderBy, $limit); // Clear the item array $PA['items'] = array(); // Fill item array with rooms of location of selected event if ($res) { while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // Add the name and id to the itemlist $entry = array(); $entry[0] = $row['shortkey'] . ' - ' . $row['name']; $entry[1] = $row['uid']; $entry[2] = ''; $PA['items'][] = $entry; } $GLOBALS['TYPO3_DB']->sql_free_result($res); } # debug ($PA); return; } } if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/wse_events/class.tx_wseevents_categories.php']) { include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/wse_events/class.tx_wseevents_categories.php']); } ?>