[TASK] Use instanceof comparison instead of string comparison 57/24257/5
authorBenjamin Serfhos <serfhos@gmail.com>
Wed, 2 Oct 2013 12:28:17 +0000 (14:28 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sat, 5 Oct 2013 13:15:19 +0000 (15:15 +0200)
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-on: https://review.typo3.org/24257
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/beuser/Classes/ViewHelpers/SpriteIconForRecordViewHelper.php

index 0b067fa..05f0443 100755 (executable)
@@ -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')) {