[FEATURE] Allow arbitrary arguments for TagBasedViewHelper
Tag based ViewHelpers can now receive arbitrary arguments which will be added to the resulting HTML tag automatically. This offers a much more readable option compared to the "additionalAttributes" argument, which is still available for tag based ViewHelpers. Also, both "data" and "aria" arguments are still available to supply multiple data or aria attributes as an array.
As a result of this change, the following methods of AbstractTagBasedViewHelper are deprecated and will be removed with the next major version of Fluid:
-
registerUniversalTagAttributes(): The method is now a no-op since all previously registered universal attributes can now be used without registration.
-
registerTagAttribute(): The method still has the same functionality since it also supports the required flag as well as default values, but is no longer necessary in its current form. For edge cases when the required flag is still necessary, registerArgument() can be used.
Just to match expectations:
- data and aria attributes should only be handled IF they contain an array.
- data and aria attributes should just be passed through if they contain a "string"
Everything else:
- wonderful
- finally!
This should go in ASAP.
- data and aria attributes should just be passed through if they contain a "string"
I added tests for this. Currently, this throws an exception, which is consistent with what I would expect, since aria and data are registered parameters. This is also consistent with the current behavior. Why should it behave differently?
- data and aria attributes should just be passed through if they contain a "string"
I added tests for this. Currently, this throws an exception, which is consistent with what I would expect, since
ariaanddataare registered parameters. This is also consistent with the current behavior. Why should it behave differently?
I think that the names are too generic and could mistakenly be used. It´s more like graceful to pass it through when it´s 'stringable' and cannot be handled.