[TASK] Clean up phpDoc comments in typo3/sysext/
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 14 Jun 2012 21:59:31 +0000 (23:59 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 14 Jun 2012 22:10:41 +0000 (00:10 +0200)
Clean up phpDoc comments for the following classes:

* typo3/sysext/cms/tslib/content/class.tslib_content_imagetext.php
* typo3/sysext/cms/tslib/content/class.tslib_content_loadregister.php
* typo3/sysext/cms/tslib/content/class.tslib_content_media.php
* typo3/sysext/cms/tslib/content/class.tslib_content_multimedia.php
* typo3/sysext/cms/tslib/content/class.tslib_content_offsettable.php
* typo3/sysext/cms/tslib/content/class.tslib_content_quicktimeobject.php
* typo3/sysext/cms/tslib/content/class.tslib_content_records.php
* typo3/sysext/cms/tslib/content/class.tslib_content_restoreregister.php
* typo3/sysext/cms/tslib/content/
class.tslib_content_scalablevectorgraphics.php
* typo3/sysext/cms/tslib/content/class.tslib_content_searchresult.php
* typo3/sysext/cms/tslib/content/
class.tslib_content_shockwaveflashobject.php
* typo3/sysext/cms/tslib/content/class.tslib_content_template.php
* typo3/sysext/cms/tslib/content/class.tslib_content_text.php
* typo3/sysext/cms/tslib/content/class.tslib_content_user.php
* typo3/sysext/cms/tslib/content/class.tslib_content_userinternal.php

Clean up provides:

* Provide correct parameter names in phpDoc
* Provide correct data types in phpDoc
* CGLify phpDoc (remove tabs)

Change-Id: I33fec7cd9ca9a10c760b519db2980b8a667b2830
Resolves: #38061
Releases: 6.0
Reviewed-on: http://review.typo3.org/12073
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
15 files changed:
typo3/sysext/cms/tslib/content/class.tslib_content_imagetext.php
typo3/sysext/cms/tslib/content/class.tslib_content_loadregister.php
typo3/sysext/cms/tslib/content/class.tslib_content_media.php
typo3/sysext/cms/tslib/content/class.tslib_content_multimedia.php
typo3/sysext/cms/tslib/content/class.tslib_content_offsettable.php
typo3/sysext/cms/tslib/content/class.tslib_content_quicktimeobject.php
typo3/sysext/cms/tslib/content/class.tslib_content_records.php
typo3/sysext/cms/tslib/content/class.tslib_content_restoreregister.php
typo3/sysext/cms/tslib/content/class.tslib_content_scalablevectorgraphics.php
typo3/sysext/cms/tslib/content/class.tslib_content_searchresult.php
typo3/sysext/cms/tslib/content/class.tslib_content_shockwaveflashobject.php
typo3/sysext/cms/tslib/content/class.tslib_content_template.php
typo3/sysext/cms/tslib/content/class.tslib_content_text.php
typo3/sysext/cms/tslib/content/class.tslib_content_user.php
typo3/sysext/cms/tslib/content/class.tslib_content_userinternal.php

index 827a712..bd6caf4 100644 (file)
@@ -37,15 +37,16 @@ class tslib_content_ImageText extends tslib_content_Abstract {
        /**
         * Rendering the cObject, IMAGE
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $content = '';
 
                if (isset($conf['text.'])) {
                        $text = $this->cObj->cObjGet($conf['text.'], 'text.');
-                       $content .= $this->cObj->stdWrap($text, $conf['text.']); // this gets the surrounding content
+                               // this gets the surrounding content
+                       $content .= $this->cObj->stdWrap($text, $conf['text.']);
                }
                $imgList = isset($conf['imgList.'])
                        ? trim($this->cObj->stdWrap($conf['imgList'], $conf['imgList.'])) // gets images
@@ -62,7 +63,8 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                ? intval($this->cObj->stdWrap($conf['imgMax'], $conf['imgMax.']))
                                : intval($conf['imgMax']);
                        if ($imgMax) {
-                               $imgCount = t3lib_utility_Math::forceIntegerInRange($imgCount, 0, $imgMax); // reduces the number of images.
+                                       // Reduces the number of images.
+                               $imgCount = t3lib_utility_Math::forceIntegerInRange($imgCount, 0, $imgMax);
                        }
 
                        $imgPath = isset($conf['imgPath.'])
@@ -74,7 +76,8 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                        $captionArray = array();
                        if (!$conf['captionSplit'] && !$conf['imageTextSplit'] && isset($conf['caption.'])) {
                                $caption = $this->cObj->cObjGet($conf['caption.'], 'caption.');
-                               $caption = $this->cObj->stdWrap($caption, $conf['caption.']); // global caption, no splitting
+                                       // Global caption, no splitting
+                               $caption = $this->cObj->stdWrap($caption, $conf['caption.']);
                        }
                        if ($conf['captionSplit'] && $conf['captionSplit.']['cObject']) {
                                $legacyCaptionSplit = 1;
@@ -157,7 +160,7 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                        if (!$caption_align) {
                                $caption_align = $align;
                        }
-                               // generate cols
+                               // Generate cols
                        $colCount = ($cols > 1)
                                ? $cols
                                : 1;
@@ -167,7 +170,7 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                        $rowCount = ($colCount > 1)
                                ? ceil($imgCount / $colCount)
                                : $imgCount;
-                               // generate rows
+                               // Generate rows
                        if ($rows > 1) {
                                $rowCount = $rows;
                                if ($rowCount > $imgCount) {
@@ -178,7 +181,7 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                        : $imgCount;
                        }
 
-                               // max Width
+                               // Max Width
                        $colRelations = isset($conf['colRelations.'])
                                ? trim($this->cObj->stdWrap($conf['colRelations'], $conf['colRelations.']))
                                : trim($conf['colRelations']);
@@ -189,18 +192,21 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                        $maxWInText = isset($conf['maxWInText.'])
                                ? intval($this->cObj->stdWrap($conf['maxWInText'], $conf['maxWInText.']))
                                : intval($conf['maxWInText']);
-                       if (!$maxWInText) { // If maxWInText is not set, it's calculated to the 50 % of the max...
+                               // If maxWInText is not set, it's calculated to the 50 % of the max...
+                       if (!$maxWInText) {
                                $maxWInText = round($maxW / 2);
                        }
 
-                       if ($maxWInText && $contentPosition >= 16) { // inText
+                               // inText
+                       if ($maxWInText && $contentPosition >= 16) {
                                $maxW = $maxWInText;
                        }
 
-                       if ($maxW && $colCount > 0) { // If there is a max width and if colCount is greater than  column
+                               // If there is a max width and if colCount is greater than  column
+                       if ($maxW && $colCount > 0) {
                                $maxW = ceil(($maxW - $colspacing * ($colCount - 1) - $colCount * $border * $borderThickness * 2) / $colCount);
                        }
-                               // create the relation between rows
+                               // Create the relation between rows
                        $colMaxW = array();
                        if ($colRelations) {
                                $rel_parts = explode(':', $colRelations);
@@ -213,7 +219,8 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                        for ($a = 0; $a < $colCount; $a++) {
                                                $colMaxW[$a] = round(($maxW * $colCount) / $rel_total * $rel_parts[$a]);
                                        }
-                                       if (min($colMaxW) <= 0 || max($rel_parts) / min($rel_parts) > 10) { // The difference in size between the largest and smalles must be within a factor of ten.
+                                               // The difference in size between the largest and smalles must be within a factor of ten.
+                                       if (min($colMaxW) <= 0 || max($rel_parts) / min($rel_parts) > 10) {
                                                $colMaxW = array();
                                        }
                                }
@@ -228,7 +235,7 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                ? intval($this->cObj->stdWrap($conf['image_frames.']['key'], $conf['image_frames.']['key.']))
                                : intval($conf['image_frames.']['key']);
 
-                               // fetches pictures
+                               // Fetches pictures
                        $splitArr = array();
                        $splitArr['imgObjNum'] = $conf['imgObjNum'];
                        $splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr, $imgCount);
@@ -237,7 +244,8 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                        $equalHeight = isset($conf['equalH.'])
                                ? intval($this->cObj->stdWrap($conf['equalH'], $conf['equalH.']))
                                : intval($conf['equalH']);
-                       if ($equalHeight) { // Initiate gifbuilder object in order to get dimensions AND calculate the imageWidth's
+                               // Initiate gifbuilder object in order to get dimensions AND calculate the imageWidth's
+                       if ($equalHeight) {
                                $gifCreator = t3lib_div::makeInstance('tslib_gifbuilder');
                                $gifCreator->init();
                                $relations = array();
@@ -246,14 +254,19 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                for ($a = 0; $a < $imgCount; $a++) {
                                        $imgKey = $a + $imgStart;
                                        $imgInfo = $gifCreator->getImageDimensions($imgPath . $imgs[$imgKey]);
-                                       $relations[$a] = $imgInfo[1] / $equalHeight; // relationship between the original height and the wished height
-                                       if ($relations[$a]) { // if relations is zero, then the addition of this value is omitted as the image is not expected to display because of some error.
-                                               $relations_cols[floor($a / $colCount)] += $imgInfo[0] / $relations[$a]; // counts the total width of the row with the new height taken into consideration.
+                                               // relationship between the original height and the wished height
+                                       $relations[$a] = $imgInfo[1] / $equalHeight;
+                                               // if relations is zero, then the addition of this value is omitted as
+                                               // the image is not expected to display because of some error.
+                                       if ($relations[$a]) {
+                                                       // Counts the total width of the row with the new height taken into consideration.
+                                               $relations_cols[floor($a / $colCount)] += $imgInfo[0] / $relations[$a];
                                        }
                                }
                        }
 
-                       $imageRowsFinalWidths = array(); // contains the width of every image row
+                               // Contains the width of every image row
+                       $imageRowsFinalWidths = array();
                        $imageRowsMaxHeights = array();
                        $imgsTag = array();
                        $origImages = array();
@@ -275,7 +288,7 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                                        $scale = $rowTotalMaxW / $totalMaxW;
                                                }
                                        }
-                                               // transfer info to the imageObject. Please note, that
+                                               // Transfer info to the imageObject. Please note, that
                                        $imgConf['file.']['height'] = round($equalHeight / $scale);
 
                                        unset(
@@ -290,7 +303,8 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                                $imgConf['file.']['minW.'],
                                                $imgConf['file.']['minH.']
                                        );
-                                       $maxW = 0; // setting this to zero, so that it doesn't disturb
+                                               // Setting this to zero, so that it doesn't disturb
+                                       $maxW = 0;
                                }
 
                                if ($maxW) {
@@ -357,11 +371,11 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                        $imageRowsMaxHeights[floor($a / $colCount)] = $GLOBALS['TSFE']->lastImageInfo[1];
                                }
                        }
-                               // calculating the tableWidth:
+                               // Calculating the tableWidth:
                                // TableWidth problems: It creates problems if the pictures are NOT as wide as the tableWidth.
                        $tableWidth = max($imageRowsFinalWidths) + $colspacing * ($colCount - 1) + $colCount * $border * $borderThickness * 2;
 
-                               // make table for pictures
+                               // Make table for pictures
                        $index = $imgIndex = $imgStart;
 
                        $noRows = isset($conf['noRows.'])
@@ -404,7 +418,7 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                ? $this->cObj->editIcons('', $conf['editIcons'], $conf['editIcons.'])
                                : '';
 
-                               // strech out table:
+                               // Strech out table:
                        $tablecode = '';
                        $flag = 0;
                        $noStretchAndMarginCells = isset($conf['noStretchAndMarginCells.'])
@@ -435,13 +449,18 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                        }
 
                                // draw table
-                       for ($c = 0; $c < $rowCount; $c++) { // Looping through rows. If 'noRows' is set, this is '1 time', but $rowCount_temp will hold the actual number of rows!
-                               if ($c && $rowspacing) { // If this is NOT the first time in the loop AND if space is required, a row-spacer is added. In case of "noRows" rowspacing is done further down.
+                               // Looping through rows. If 'noRows' is set, this is '1 time', but $rowCount_temp will hold the actual number of rows!
+                       for ($c = 0; $c < $rowCount; $c++) {
+                                       // If this is NOT the first time in the loop AND if space is required, a row-spacer is added. In case of "noRows" rowspacing is done further down.
+                               if ($c && $rowspacing) {
                                        $tablecode .= '<tr><td colspan="' . $colspan . '"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $rowspacing . '"' . $this->cObj->getBorderAttr(' border="0"') . ' alt="" title="" /></td></tr>';
                                }
-                               $tablecode .= '<tr>'; // starting row
-                               for ($b = 0; $b < $colCount_temp; $b++) { // Looping through the columns
-                                       if ($b && $colspacing) { // If this is NOT the first iteration AND if column space is required. In case of "noCols", the space is done without a separate cell.
+                                       // starting row
+                               $tablecode .= '<tr>';
+                                       // Looping through the columns
+                               for ($b = 0; $b < $colCount_temp; $b++) {
+                                               // If this is NOT the first iteration AND if column space is required. In case of "noCols", the space is done without a separate cell.
+                                       if ($b && $colspacing) {
                                                if (!$noCols) {
                                                        $tablecode .= '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' .
                                                                $colspacing . '" height="1"' . $this->cObj->getBorderAttr(' border="0"') . ' alt="" title="" /></td>';
@@ -456,17 +475,23 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                                }
                                        }
                                        if (!$noCols || ($noCols && !$b)) {
-                                               $tablecode .= '<td valign="top">'; // starting the cell. If "noCols" this cell will hold all images in the row, otherwise only a single image.
+                                                       // starting the cell. If "noCols" this cell will hold all images in the row, otherwise only a single image.
+                                               $tablecode .= '<td valign="top">';
                                                if ($noCols) {
                                                        $tablecode .= '<table width="' . $imageRowsFinalWidths[$c] . '" border="0" cellpadding="0" cellspacing="0"><tr>';
                                                } // In case of "noCols" we must set the table-tag that surrounds the images in the row.
                                        }
-                                       for ($a = 0; $a < $rowCount_temp; $a++) { // Looping through the rows IF "noRows" is set. "noRows"  means that the rows of images is not rendered by physical table rows but images are all in one column and spaced apart with clear-gifs. This loop is only one time if "noRows" is not set.
-                                               $GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgIndex; // register previous imgIndex
+                                               // Looping through the rows IF "noRows" is set. "noRows"  means that the rows of images is not rendered
+                                               // by physical table rows but images are all in one column and spaced apart with clear-gifs. This loop is
+                                               // only one time if "noRows" is not set.
+                                       for ($a = 0; $a < $rowCount_temp; $a++) {
+                                                       // register previous imgIndex
+                                               $GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgIndex;
                                                $imgIndex = $index + $a * $colCount_temp;
                                                $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imgIndex;
                                                if ($imgsTag[$imgIndex]) {
-                                                       if ($rowspacing && $noRows && $a) { // Puts distance between the images IF "noRows" is set and this is the first iteration of the loop
+                                                               // Puts distance between the images IF "noRows" is set and this is the first iteration of the loop
+                                                       if ($rowspacing && $noRows && $a) {
                                                                $tablecode .= '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' .
                                                                        $rowspacing . '" alt="" title="" /><br />';
                                                        }
@@ -477,14 +502,16 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                                                $thisCaption = $this->cObj->stdWrap($thisCaption, $conf['caption.']);
                                                        }
                                                        $imageHTML = $imgsTag[$imgIndex] . '<br />';
-                                                       $Talign = (!trim($thisCaption) && !$noRows) ? ' align="left"' : ''; // this is necessary if the tablerows are supposed to space properly together! "noRows" is excluded because else the images "layer" together.
+                                                               // this is necessary if the tablerows are supposed to space properly together! "noRows" is excluded because else the images "layer" together.
+                                                       $Talign = (!trim($thisCaption) && !$noRows) ? ' align="left"' : '';
                                                        if ($border) {
                                                                $imageHTML = '<table border="0" cellpadding="' . $borderThickness . '" cellspacing="0" bgcolor="' .
                                                                        $borderColor . '"' . $Talign . '><tr><td>' . $imageHTML . '</td></tr></table>';
                                                        }
                                                        $imageHTML .= $editIconsHTML;
                                                        $editIconsHTML = '';
-                                                       $imageHTML .= $thisCaption; // Adds caption.
+                                                               // Adds caption.
+                                                       $imageHTML .= $thisCaption;
                                                        if ($noCols) {
                                                                $imageHTML = '<td valign="top">' . $imageHTML . '</td>';
                                                        } // If noCols, put in table cell.
@@ -499,7 +526,8 @@ class tslib_content_ImageText extends tslib_content_Abstract {
                                                $tablecode .= '</td>'; // Ending the cell. In case of "noCols" the cell holds all pictures!
                                        }
                                }
-                               $tablecode .= '</tr>'; // ending row
+                                       // ending row
+                               $tablecode .= '</tr>';
                        }
                        if ($c) {
                                switch ($contentPosition) {
@@ -526,7 +554,8 @@ class tslib_content_ImageText extends tslib_content_Abstract {
 
                                        // Table-tag is inserted
                                $tablecode = '<table' . ($tableWidth ? ' width="' . $tableWidth . '"' : '') . ' border="0" cellspacing="0" cellpadding="0" ' . $table_align . ' class="imgtext-table">' . $tablecode;
-                               if ($editIconsHTML) { // IF this value is not long since reset.
+                                       // If this value is not long since reset.
+                               if ($editIconsHTML) {
                                        $tablecode .= '<tr><td colspan="' . $colspan . '">' . $editIconsHTML . '</td></tr>';
                                        $editIconsHTML = '';
                                }
index d67df01..dd63cd9 100644 (file)
@@ -38,8 +38,8 @@ class tslib_content_LoadRegister extends tslib_content_Abstract {
         * Rendering the cObject, LOAD_REGISTER
         * NOTICE: This cObject does NOT return any content since it just sets internal data based on the TypoScript properties.
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Empty string (the cObject only sets internal data!)
+        * @param array $conf Array of TypoScript properties
+        * @return string Empty string (the cObject only sets internal data!)
         */
        public function render($conf = array()) {
                array_push($GLOBALS['TSFE']->registerStack, $GLOBALS['TSFE']->register);
@@ -62,6 +62,5 @@ class tslib_content_LoadRegister extends tslib_content_Abstract {
                }
                return '';
        }
-
 }
 ?>
\ No newline at end of file
index 4b93db3..0537012 100644 (file)
@@ -37,7 +37,7 @@ class tslib_content_Media extends tslib_content_Abstract {
        /**
         * Rendering the cObject, MEDIA
         *
-        * @param $conf array Array of TypoScript properties
+        * @param array $conf Array of TypoScript properties
         * @return string Output
         */
        public function render($conf = array()) {
@@ -50,7 +50,7 @@ class tslib_content_Media extends tslib_content_Abstract {
                if (substr($flexParams, 0, 1) === '<') {
                                // It is a content element rather a TS object
                        $flexParams = t3lib_div::xml2array($flexParams, 'T3');
-                       foreach($flexParams['data'] as $sheetData) {
+                       foreach ($flexParams['data'] as $sheetData) {
                                $this->cObj->readFlexformIntoConf($sheetData['lDEF'], $conf['parameter.'], TRUE);
                        }
                }
@@ -142,9 +142,9 @@ class tslib_content_Media extends tslib_content_Abstract {
                        foreach ($conf['parameter.']['mmMediaOptions'] as $key => $value) {
                                if ($key == 'mmMediaCustomParameterContainer') {
                                        foreach ($value as $val) {
-                                                       //custom parameter entry
+                                                       // Custom parameter entry
                                                $rawTS = $val['mmParamCustomEntry'];
-                                                       //read and merge
+                                                       // Read and merge
                                                $tmp = t3lib_div::trimExplode(LF, $rawTS);
                                                if (count($tmp)) {
                                                        foreach ($tmp as $tsLine) {
@@ -290,7 +290,7 @@ class tslib_content_Media extends tslib_content_Abstract {
         * with stdWrap (if needed) and returns that value.
         *
         * @param array &$confArray
-        * @param string$key
+        * @param string $key
         * @param string $sectionKey
         * @return mixed
         */
index 5d0affa..10eaea4 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_Multimedia extends tslib_content_Abstract {
        /**
         * Rendering the cObject, MULTIMEDIA
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $content = '';
@@ -51,9 +51,9 @@ class tslib_content_Multimedia extends tslib_content_Abstract {
                        if (t3lib_div::inList('txt,html,htm', $fileinfo['fileext'])) {
                                $content = $GLOBALS['TSFE']->tmpl->fileContent($incFile);
                        } else {
-                                       // default params...
+                                       // Default params...
                                $parArray = array();
-                                       // src is added
+                                       // Src is added
 
                                $width = isset($conf['width.'])
                                        ? $this->cObj->stdWrap($conf['width'], $conf['width.'])
index cf44993..b881b72 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_OffsetTable extends tslib_content_Abstract {
        /**
         * Rendering the cObject, OTABLE
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                /** @var $controlTable tslib_tableOffset */
@@ -63,6 +63,5 @@ class tslib_content_OffsetTable extends tslib_content_Abstract {
 
                return $content;
        }
-
 }
 ?>
\ No newline at end of file
index 8ad510c..6292eeb 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_QuicktimeObject extends tslib_content_Abstract {
        /**
         * Rendering the cObject, QTOBJECT
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $params = $prefix = '';
@@ -59,13 +59,13 @@ class tslib_content_QuicktimeObject extends tslib_content_Abstract {
 
                $typeConf = $conf[$type . '.'];
 
-                       //add QTobject js-file
+                       // Add QTobject js-file
                $GLOBALS['TSFE']->getPageRenderer()->addJsFile(TYPO3_mainDir . 'contrib/flashmedia/qtobject/qtobject.js');
                $replaceElementIdString = uniqid('mmqt');
                $GLOBALS['TSFE']->register['MMQTID'] = $replaceElementIdString;
                $qtObject = 'QTObject' . $replaceElementIdString;
 
-               // merge with default parameters
+                       // Merge with default parameters
                $conf['params.'] = array_merge((array) $typeConf['default.']['params.'], (array) $conf['params.']);
 
                if (is_array($conf['params.'])) {
index c01000b..6ea7b82 100644 (file)
@@ -37,14 +37,16 @@ class tslib_content_Records extends tslib_content_Abstract {
        /**
         * Rendering the cObject, RECORDS
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $theValue = '';
 
                $originalRec = $GLOBALS['TSFE']->currentRecord;
-               if ($originalRec) { // If the currentRecord is set, we register, that this record has invoked this function. It's should not be allowed to do this again then!!
+                       // If the currentRecord is set, we register, that this record has invoked this function.
+                       // It's should not be allowed to do this again then!!
+               if ($originalRec) {
                        $GLOBALS['TSFE']->recordRegister[$originalRec]++;
                }
 
@@ -95,7 +97,8 @@ class tslib_content_Records extends tslib_content_Abstract {
                                        );
                                }
 
-                               if (is_array($row)) { // Might be unset in the content overlay things...
+                                       // Might be unset in the content overlay things...
+                               if (is_array($row)) {
                                        $dontCheckPid = isset($conf['dontCheckPid.'])
                                                ? $this->cObj->stdWrap($conf['dontCheckPid'], $conf['dontCheckPid.'])
                                                : $conf['dontCheckPid'];
@@ -134,8 +137,8 @@ class tslib_content_Records extends tslib_content_Abstract {
                if (isset($conf['stdWrap.'])) {
                        $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
                }
-
-               $GLOBALS['TSFE']->currentRecord = $originalRec; // Restore
+                       // Restore
+               $GLOBALS['TSFE']->currentRecord = $originalRec;
 
                return $theValue;
        }
index 426cb72..2495c2a 100644 (file)
@@ -38,8 +38,8 @@ class tslib_content_RestoreRegister extends tslib_content_Abstract {
         * Rendering the cObject, RESTORE_REGISTER
         * NOTICE: This cObject does NOT return any content since it just sets internal data based on the TypoScript properties.
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Empty string (the cObject only sets internal data!)
+        * @param array $conf Array of TypoScript properties
+        * @return string Empty string (the cObject only sets internal data!)
         */
        public function render($conf = array()) {
                $GLOBALS['TSFE']->register = array_pop($GLOBALS['TSFE']->registerStack);
index 5041564..eff3aa8 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_ScalableVectorGraphics extends tslib_content_Abstract {
        /**
         * Rendering the cObject, SVG
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Empty string (the cObject only sets internal data!)
+        * @param array $conf Array of TypoScript properties
+        * @return string Empty string (the cObject only sets internal data!)
         */
        public function render($conf = array()) {
                $width = isset($conf['width.'])
index 7296fbc..35687d9 100644 (file)
@@ -37,17 +37,17 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
        /**
         * Rendering the cObject, SEARCHRESULT
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                if (t3lib_div::_GP('sword') && t3lib_div::_GP('scols')) {
                        $search = t3lib_div::makeInstance('tslib_search');
                        $search->register_and_explode_search_string(t3lib_div::_GP('sword'));
                        $search->register_tables_and_columns(t3lib_div::_GP('scols'), $conf['allowedCols']);
-                               // depth
+                               // Depth
                        $depth = 100;
-                               // the startId is found
+                               // The startId is found
                        $theStartId = 0;
                        if (t3lib_utility_Math::canBeInterpretedAsInteger(t3lib_div::_GP('stype'))) {
                                $temp_theStartId = t3lib_div::_GP('stype');
@@ -69,7 +69,7 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                                $altRootLine = $GLOBALS['TSFE']->sys_page->getRootLine($pId);
                                                ksort($altRootLine);
                                                if (count($altRootLine)) {
-                                                               // check if the rootline has the real Level0 in it!!
+                                                               // Check if the rootline has the real Level0 in it!!
                                                        $hitRoot = 0;
                                                        $theNewRoot = array();
                                                        foreach ($altRootLine as $val) {
@@ -79,7 +79,8 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                                                }
                                                        }
                                                        if ($hitRoot) {
-                                                               $theRootLine = $theNewRoot; // Override the real rootline if any thing
+                                                                       // Override the real rootline if any thing
+                                                               $theRootLine = $theNewRoot;
                                                        }
                                                }
                                        }
@@ -91,7 +92,7 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                        // If not set, we use current page
                                $theStartId = $GLOBALS['TSFE']->id;
                        }
-                               // generate page-tree
+                               // Generate page-tree
                        $search->pageIdList .= $this->cObj->getTreeList(-1 * $theStartId, $depth);
 
                        $endClause = 'pages.uid IN (' . $search->pageIdList . ')
@@ -108,17 +109,17 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                intval($GLOBALS['TSFE']->sys_language_uid);
                        }
 
-                               // build query
+                               // Build query
                        $search->build_search_query($endClause);
 
-                               // count...
+                               // Count...
                        if (t3lib_utility_Math::canBeInterpretedAsInteger(t3lib_div::_GP('scount'))) {
                                $search->res_count = t3lib_div::_GP('scount');
                        } else {
                                $search->count_query();
                        }
 
-                               // range
+                               // Range
                        $spointer = intval(t3lib_div::_GP('spointer'));
                        $range = isset($conf['range.'])
                                ? $this->cObj->stdWrap($conf['range'], $conf['range.'])
@@ -139,7 +140,7 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
 
                        $search->queryParts['LIMIT'] = $spointer . ',' . $theRange;
 
-                               // search...
+                               // Search...
                        $search->execute_query();
                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($search->result)) {
                                $GLOBALS['TSFE']->register['SWORD_PARAMS'] = $search->get_searchwords();
@@ -193,7 +194,7 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
                                        $prev = '';
                                $result = str_replace('###PREV###', $prev, $result);
 
-                                       // searching result
+                                       // Searching result
                                $theValue = $this->cObj->cObjGetSingle($conf['resultObj'], $conf['resultObj.'], 'resultObj');
                                $cObj = t3lib_div::makeInstance('tslib_cObj');
                                $cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
@@ -215,7 +216,7 @@ class tslib_content_SearchResult extends tslib_content_Abstract {
 
                        $GLOBALS['TT']->setTSlogMessage('Search in fields:   ' . $search->listOfSearchFields);
 
-                               // wrapping
+                               // Wrapping
                        $content = $theValue;
 
                        $wrap = isset($conf['wrap.'])
index b51c4ef..de04608 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_ShockwaveFlashObject extends tslib_content_Abstract {
        /**
         * Rendering the cObject, SWFOBJECT
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $prefix = '';
@@ -54,7 +54,7 @@ class tslib_content_ShockwaveFlashObject extends tslib_content_Abstract {
                        : $conf['type'];
                $typeConf = $conf[$type . '.'];
 
-                       //add SWFobject js-file
+                       // Add SWFobject js-file
                $GLOBALS['TSFE']->getPageRenderer()->addJsFile(TYPO3_mainDir . 'contrib/flashmedia/swfobject/swfobject.js');
 
                $player = isset($typeConf['player.'])
@@ -95,7 +95,7 @@ class tslib_content_ShockwaveFlashObject extends tslib_content_Abstract {
                $conf['filename'] = $filename;
                $conf['prefix'] = $prefix;
 
-                       // merge with default parameters
+                       // Merge with default parameters
                $conf['flashvars.'] = array_merge((array) $typeConf['default.']['flashvars.'], (array) $conf['flashvars.']);
                $conf['params.'] = array_merge((array) $typeConf['default.']['params.'], (array) $conf['params.']);
                $conf['attributes.'] = array_merge((array) $typeConf['default.']['attributes.'], (array) $conf['attributes.']);
index 0aa05e2..4a61064 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_Template extends tslib_content_Abstract {
        /**
         * Rendering the cObject, TEMPLATE
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         * @see substituteMarkerArrayCached()
         */
        public function render($conf = array()) {
@@ -76,7 +76,8 @@ class tslib_content_Template extends tslib_content_Abstract {
                        $nonCachedSubst = isset($conf['nonCachedSubst.'])
                                ? $this->cObj->stdWrap($conf['nonCachedSubst'], $conf['nonCachedSubst.'])
                                : $conf['nonCachedSubst'];
-                       if ($nonCachedSubst) { // NON-CACHED:
+                               // NON-CACHED:
+                       if ($nonCachedSubst) {
                                        // Getting marks
                                if (is_array($conf['marks.'])) {
                                        foreach ($conf['marks.'] as $theKey => $theValue) {
@@ -146,7 +147,7 @@ class tslib_content_Template extends tslib_content_Abstract {
                                                }
                                        }
                                }
-                               // Getting marks
+                                       // Getting marks
                                if (is_array($conf['marks.'])) {
                                        foreach ($conf['marks.'] as $theKey => $theValue) {
                                                if (!strstr($theKey, '.')) {
@@ -167,16 +168,17 @@ class tslib_content_Template extends tslib_content_Abstract {
                                        // Getting subparts
                                $subpartArray = array();
                                foreach ($subparts as $theKey => $theValue) {
-                                       // Set current with the content of the subpart...
+                                               // Set current with the content of the subpart...
                                        $this->cObj->data[$this->cObj->currentValKey] = $GLOBALS['TSFE']->register['SUBPART_' . $theKey];
-                                       // Get subpart cObject and substitute it!
+                                               // Get subpart cObject and substitute it!
                                        $subpartArray[$PRE . $theKey . $POST] = $this->cObj->cObjGetSingle(
                                                $theValue['name'],
                                                $theValue['conf'],
                                                'subparts.' . $theKey
                                        );
                                }
-                               $this->cObj->data[$this->cObj->currentValKey] = ''; // Reset current to empty
+                                       // Reset current to empty
+                               $this->cObj->data[$this->cObj->currentValKey] = '';
 
 
                                        // Getting marks
index 25db79c..a35b2ce 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_Text extends tslib_content_Abstract {
        /**
         * Rendering the cObject, TEXT
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $content = '';
index 262f617..3ff6ec7 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_User extends tslib_content_Abstract {
        /**
         * Rendering the cObject, USER
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                if (!is_array($conf) || empty($conf)) {
index b9f4028..d32448c 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_UserInternal extends tslib_content_Abstract {
        /**
         * Rendering the cObject, USER_INT
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param array $conf Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $this->cObj->setUserObjectType(tslib_cObj::OBJECTTYPE_USER_INT);