[TYPO3-mvc] Re: Re: Integration of TYO3 Corefeatures in Extbase
Philipp
philippwrann at gmx.at
Tue Feb 26 11:22:39 CET 2013
Done it this way for the moment
/**
* Get selected categories
*
* @param array data of contentobject
* @return array|NULL Categories
*/
public function getCategories($conf) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'uid_local',
'sys_category_record_mm',
'uid_foreign=' . $conf. ' AND tablenames="tt_content" ' .
\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tablename) .
\TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($tablename), '', ''
);
$categoryCount = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
if ($categoryCount==0) return NULL;
$categories = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
array_push($categories,$row['uid_local']);
}
return $categories;
}
More information about the TYPO3-project-typo3v4mvc
mailing list