[BUGFIX] Ensure arguments for instances of AbstractTagBasedViewHelper 66/46666/5
authorNicole Cordes <typo3@cordes.co>
Mon, 15 Feb 2016 10:07:08 +0000 (11:07 +0100)
committerAndreas Wolf <andreas.wolf@typo3.org>
Thu, 3 Mar 2016 16:37:46 +0000 (17:37 +0100)
The initialization of several arguments in AbstractTagBasedViewHelper
was moved from constructor to initializeArguments function. This patch
ensures that instances of that abstract class call the parent function
to register all possible arguments.

Resolves: #73432
Releases: master
Change-Id: I3f052029500cae7a9c5e6a8e44b5f647e9e0923b
Reviewed-on: https://review.typo3.org/46666
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Breaking-69863-ChangesInViewHelpersPostFluidStandalone.rst
typo3/sysext/extensionmanager/Classes/ViewHelpers/DownloadExtensionViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/Link/ActionViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Link/ClickMenuOnIconViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/SectionViewHelper.php

index 5480b24..58a8006 100644 (file)
@@ -12,6 +12,7 @@ The following ViewHelpers have changed behaviours in Fluid:
 * Arguments ``iconOnly`` and ``styleAttributes`` have been removed from ``f:be.buttons.csh``.
 * Argument ``alternateBackgroundColors`` has been removed from ``f:be.tableList``.
 * ViewHelpers no longer use the ``escapingInterceptorEnabled`` property but instead use ``escapeChildren`` and ``escapeOutput`` to control each behavior.
+* All ViewHelpers no longer initialize standard arguments ("additionalArguments" and "data") in ``__construct()``, but instead do this in ``initializeArguments()``. If you override this method, you need to make sure you include a call to ``parent::initializeArguments()`` in your subclass.
 
 The following ViewHelper classes are now only found in namespace ``TYPO3Fluid\Fluid\ViewHelpers`` and no longer exist in ``TYPO3\CMS\Fluid\ViewHelpers``:
 
index cf84d13..2c46fcd 100644 (file)
@@ -60,6 +60,7 @@ class DownloadExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\Abst
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerTagAttribute('enctype', 'string', 'MIME type with which the form is submitted');
         $this->registerTagAttribute('method', 'string', 'Transfer type (GET or POST)');
         $this->registerTagAttribute('name', 'string', 'Name of form');
index 97dd4e6..137f36e 100644 (file)
@@ -33,6 +33,7 @@ class ActionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBased
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
         $this->registerTagAttribute('name', 'string', 'Specifies the name of an anchor');
         $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document');
index 9b4d816..f94b934 100644 (file)
@@ -29,6 +29,7 @@ class ClickMenuOnIconViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abstrac
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
     }
 
index 3e5f726..78990b6 100644 (file)
@@ -90,6 +90,7 @@ class FlashMessagesViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractT
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
         $this->registerArgument('queueIdentifier', 'string', 'Flash-message queue to use', false);
     }
index 4d302d5..c8a873c 100644 (file)
@@ -102,6 +102,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerTagAttribute('enctype', 'string', 'MIME type with which the form is submitted');
         $this->registerTagAttribute('method', 'string', 'Transfer type (GET or POST)');
         $this->registerTagAttribute('name', 'string', 'Name of form');
index ff9c46f..84ce93f 100644 (file)
@@ -49,6 +49,7 @@ class EmailViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedV
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
         $this->registerTagAttribute('name', 'string', 'Specifies the name of an anchor');
         $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document');
index fdbb55d..0b6a2a8 100644 (file)
@@ -50,6 +50,7 @@ class ExternalViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBas
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
         $this->registerTagAttribute('name', 'string', 'Specifies the name of an anchor');
         $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document');
index f3fba59..014964e 100644 (file)
@@ -57,6 +57,7 @@ class PageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedVi
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
         $this->registerTagAttribute('target', 'string', 'Target of link', false);
         $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document', false);
index 745313b..04c8b38 100644 (file)
@@ -44,6 +44,7 @@ class LinkViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedVi
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
         $this->registerTagAttribute('name', 'string', 'Specifies the name of an anchor');
         $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document');
index 1a57691..3bbb713 100644 (file)
@@ -46,6 +46,7 @@ class SectionViewHelper extends AbstractTagBasedViewHelper
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerUniversalTagAttributes();
     }