Commit 5582a313 authored by Benjamin Serfhos's avatar Benjamin Serfhos Committed by Markus Klein
Browse files

[TASK] Use instanceof comparison instead of string comparison

This allows the ViewHelper to render elements which are extending
the model.

Resolves: #52469
Releases: 6.2, 6.1, 6.0
Change-Id: If4b9b3019b44e38a5a25cb74ff993e572464bb9d
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
parent be56c137
......@@ -53,7 +53,7 @@ class SpriteIconForRecordViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\Abst
if (method_exists($object, 'getIsDisabled')) {
$row['disable'] = $object->getIsDisabled();
if ($table === 'be_users' && get_class($object) === 'TYPO3\\CMS\\Beuser\\Domain\\Model\\BackendUser') {
if ($table === 'be_users' && $object instanceof \TYPO3\CMS\Beuser\Domain\Model\BackendUser) {
$row['admin'] = $object->getIsAdministrator();
if (method_exists($object, 'getStartDateAndTime')) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment