[TASK] Cleanups for CSS Styled Content 34/17834/3
authorSebastian Michaelsen <michaelsen@t3seo.de>
Wed, 30 Jan 2013 12:06:00 +0000 (13:06 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 1 Feb 2013 15:51:40 +0000 (16:51 +0100)
* Remove "@todo Define visibility" annotations from the render_*
methods. They are called from TS, they need to be public.
* Remove unused variables from the CssStyledContentController
* Don't pass the constants borderColor and rowSpace to
tt_content.image any more, they are not used there

Resolves: #44965
Releases: 6.1
Change-Id: Ia6ee55754c9af976952274e22c01565f15ec2038
Reviewed-on: https://review.typo3.org/17834
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php
typo3/sysext/css_styled_content/static/setup.txt

index 93ae4bb..b983b7a 100644 (file)
@@ -74,8 +74,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @param string $content Content input. Not used, ignore.
         * @param array $conf TypoScript configuration
         * @return string HTML output.
-        * @access private
-        * @todo Define visibility
         */
        public function render_bullets($content, $conf) {
                // Look for hook before running default code for function
@@ -115,8 +113,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @param string $content Content input. Not used, ignore.
         * @param array $conf TypoScript configuration
         * @return string HTML output.
-        * @access private
-        * @todo Define visibility
         */
        public function render_table($content, $conf) {
                // Look for hook before running default code for function
@@ -245,8 +241,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @param string $content Content input. Not used, ignore.
         * @param array $conf TypoScript configuration
         * @return string HTML output.
-        * @access private
-        * @todo Define visibility
         */
        public function render_uploads($content, $conf) {
                // Look for hook before running default code for function
@@ -457,10 +451,8 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
         * @param string $content Content input. Not used, ignore.
         * @param array $conf TypoScript configuration. See TSRef "IMGTEXT". This function aims to be compatible.
         * @return string HTML output.
-        * @access private
         * @coauthor Ernesto Baschny <ernst@cron-it.de>
         * @coauthor Patrick Broens <patrick@patrickbroens.nl>
-        * @todo Define visibility
         */
        public function render_textpic($content, $conf) {
                // Look for hook before running default code for function
@@ -525,17 +517,13 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                $imagePosition = $position & 7;
                // 0,8,16,24 (above,below,intext,intext-wrap)
                $contentPosition = $position & 24;
-               $align = $this->cObj->align[$imagePosition];
                $textMargin = intval($this->cObj->stdWrap($conf['textMargin'], $conf['textMargin.']));
                if (!$conf['textMargin_outOfText'] && $contentPosition < 16) {
                        $textMargin = 0;
                }
                $colspacing = intval($this->cObj->stdWrap($conf['colSpace'], $conf['colSpace.']));
-               $rowspacing = intval($this->cObj->stdWrap($conf['rowSpace'], $conf['rowSpace.']));
                $border = intval($this->cObj->stdWrap($conf['border'], $conf['border.'])) ? 1 : 0;
-               $borderColor = $this->cObj->stdWrap($conf['borderCol'], $conf['borderCol.']);
                $borderThickness = intval($this->cObj->stdWrap($conf['borderThick'], $conf['borderThick.']));
-               $borderColor = $borderColor ? $borderColor : 'black';
                $borderThickness = $borderThickness ? $borderThickness : 1;
                $borderSpace = $conf['borderSpace'] && $border ? intval($conf['borderSpace']) : 0;
                // Generate cols
@@ -733,16 +721,10 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                // noRows overrides noCols. They cannot exist at the same time.
                if ($noRows) {
                        $noCols = 0;
-               }
-               $rowCount_temp = 1;
-               $colCount_temp = $colCount;
-               if ($noRows) {
-                       $rowCount_temp = $rowCount;
                        $rowCount = 1;
                }
                if ($noCols) {
                        $colCount = 1;
-                       $columnWidths = array();
                }
                // Edit icons:
                if (!is_array($conf['editIcons.'])) {
index cc1b371..d953650 100644 (file)
@@ -838,11 +838,9 @@ tt_content.image.20 {
        # caption/alttext/title/longdescURL splitting
        imageTextSplit = {$styles.content.imgtext.imageTextSplit}
 
-       borderCol = {$styles.content.imgtext.borderColor}
        borderThick = {$styles.content.imgtext.borderThick}
        borderClass = {$styles.content.imgtext.borderClass}
        colSpace = {$styles.content.imgtext.colSpace}
-       rowSpace = {$styles.content.imgtext.rowSpace}
        textMargin = {$styles.content.imgtext.textMargin}
 
        borderSpace = {$styles.content.imgtext.borderSpace}