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 <firstname.lastname@example.org>
Tested-by: Anja Leichsenring <email@example.com>
Reviewed-by: Christian Kuhn <firstname.lastname@example.org>
Tested-by: Christian Kuhn <email@example.com>
[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 <firstname.lastname@example.org>
Reviewed-by: Andreas Fernandez <email@example.com>
Reviewed-by: Wouter Wolters <firstname.lastname@example.org>
Reviewed-by: Markus Klein <email@example.com>
Tested-by: Elmar Hinz <firstname.lastname@example.org>
Reviewed-by: Nicole Cordes <email@example.com>
Tested-by: Nicole Cordes <firstname.lastname@example.org>
#1 Updated by Nicola Heisch about 4 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'));