Add property visibility to DebuggerUtility::var_dump
It would be great if the method \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump would show the visibility of object properties.
I've added a screenshot of how it could look.
[FEATURE] Adds property visibility to DebuggerUtility::var_dump
Adds property visibility information to DebuggerUtility::var_dump
after each property in the dump.
Reviewed-by: Anja Leichsenring <email@example.com>
Tested-by: Anja Leichsenring <firstname.lastname@example.org>
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>
[BUGFIX] Output HTML code only if requested
When adding visibility information in DebuggerUtility
it was not respected that this utility can also be used to output in cli.
Add the missing condition and output HTML only if requested.
Additionally when the property has nested objects,
the visibility info must be right after the property not after
every nested object.
Also prettify object type output on command line on the go.
Reviewed-by: Elmar Hinz <email@example.com>
Reviewed-by: Andreas Fernandez <firstname.lastname@example.org>
Reviewed-by: Wouter Wolters <email@example.com>
Reviewed-by: Markus Klein <firstname.lastname@example.org>
Tested-by: Elmar Hinz <email@example.com>
Reviewed-by: Nicole Cordes <firstname.lastname@example.org>
Tested-by: Nicole Cordes <email@example.com>
#1 Updated by Nicola Heisch over 3 years ago
The Visibility could be checked in \TYPO3\CMS\Extbase\Utility\DebuggerUtility::renderContent and then passed to the other methods until the headers are rendered.
$visibility = ($property->isProtected() ? 'protected' : ($property->isPrivate() ? 'private' : 'public'));