Public Member Functions | |
reverseString ($content, $conf) | |
Doing the same as user_reverseString() but with a class. | |
listContentRecordsOnPage ($content, $conf) | |
Testing USER cObject:. | |
selectThem ($query) | |
Selecting the records by input $query and returning the header field values. | |
Public Attributes | |
$cObj |
Definition at line 102 of file example_callfunction.php.
|
Testing USER cObject:. Example can be found in the testsite package at the page-path "/Intro/TypoScript examples/Custom Dynamic Co.../Calling a method.../" This TypoScript configuration will also demonstrate it: includeLibs.something = media/scripts/example_callfunction.php page = PAGE page.typeNum=0 page.30 = USER page.30 { userFunc = user_various->listContentRecordsOnPage reverseOrder = 1 }
Definition at line 143 of file example_callfunction.php. References header(). 00143 { 00144 $query = $GLOBALS['TYPO3_DB']->SELECTquery( 00145 'header', 00146 'tt_content', 00147 'pid='.intval($GLOBALS['TSFE']->id).$this->cObj->enableFields('tt_content'), 00148 '', 00149 'sorting'.($conf['reverseOrder'] ? ' DESC' : '') 00150 ); 00151 $output = 'This is the query: <strong>'.$query.'</strong><br /><br />'; 00152 return $output.$this->selectThem($query); 00153 }
|
|
Doing the same as user_reverseString() but with a class. Also demonstrates how this gives us the ability to use methods in the parent object.
Definition at line 113 of file example_callfunction.php. References $content. 00113 { 00114 $content = strrev($content); 00115 if ($conf['uppercase']) { 00116 $content=$this->cObj->caseshift($content,'upper'); 00117 } 00118 if ($conf['typolink']) { 00119 $content=$this->cObj->getTypoLink($content,$conf['typolink']); 00120 } 00121 return $content; 00122 }
|
|
Selecting the records by input $query and returning the header field values.
Definition at line 162 of file example_callfunction.php. References header(), and TYPO3_db. 00162 { 00163 $res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db,$query); 00164 $output=array(); 00165 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { 00166 $output[]=$row['header']; 00167 } 00168 return implode($output,'<br />'); 00169 }
|
|
Definition at line 103 of file example_callfunction.php. |