51908[CLEANUP] Streamline Avatar-related code in EXT:backend
Commit message
Review
-
Code review CR +2
- Benni Mack +2
- Daniel Goerz +1
- Georg Ringer +1
-
Verified V +2
- Benni Mack +2
- Daniel Goerz +1
- Georg Ringer +1
- TYPO3com +1 CI
Issues 1
Files 6
- typo3/sysext/backend/Classes/Backend/Avatar/Avatar.php5+21 −32
- typo3/sysext/backend/Classes/Backend/Avatar/AvatarProviderInterface.php+2 −2
- typo3/sysext/backend/Classes/Backend/Avatar/DefaultAvatarProvider.php+11 −9
- typo3/sysext/backend/Classes/Backend/Avatar/Image.php+3 −9
- typo3/sysext/backend/Classes/ViewHelpers/AvatarViewHelper.php1+5 −5
- typo3/sysext/backend/Resources/Private/Templates/Avatar/Main.html+10 −10
Review log 1013
-
Benni Mack uploaded patch set 1 02/28/17, 19:54
-
Josef Glatz commented on patch set 1 02/28/17, 19:58
-
TYPO3com voted on patch set 1 V +1 02/28/17, 20:03 Completed build in 08m 58s on Tue, 28 Feb, 09:03 PM Test Summary: 56321 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8774
-
Benni Mack commented on patch set 2 03/01/17, 05:32
Published edit on patch set 1. -
TYPO3com voted on patch set 2 V +1 03/01/17, 05:42 Completed build in 09m 48s on Wed, 1 Mar, 06:42 AM Test Summary: 56321 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8780
-
Thomas Hohn voted on patch set 2 CR +1 V +1 03/01/17, 05:44
-
Daniel Goerz commented on patch set 3 03/01/17, 09:33
Published edit on patch set 2. -
Daniel Goerz voted on patch set 3 CR +1 V +1 03/01/17, 09:33
-
TYPO3com voted on patch set 3 V +1 03/01/17, 09:39 Completed build in 06m 07s on Wed, 1 Mar, 10:39 AM Test Summary: 56367 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8787
-
Georg Ringer voted on patch set 3 CR +1 V +1 03/02/17, 19:07
-
Benni Mack voted on patch set 3 CR +2 V +2 03/03/17, 07:58
-
Gerrit merged patch set 3 03/03/17, 07:58
-
Claus Due commented on patch set 4 03/03/17, 08:19
Avatar.php:49I think it's time we assign this 32 as a constant (if we don't already have on that deals with icon sizes...) - then use that constant here and in the VH default argument value.Avatar.php:67If you refactor so instead of rendering the <img> tag we get an Image::class instance, the image tag can be rendered and thus manipulated in the template file (which is I think more appropriate especially if we allow override; see below). Looks like $this->getImage() gives the right object - and you can assign the default avatar image (uri) as template variable and put a condition in the template so it also becomes a way to replace the default avatar.Avatar.php:180These three lines can be replaced with $view->getRenderingContext()->getTemplatePaths()->fillDefaultsByPackageName('backend');Avatar.php:188This could be replaced by setting controller name and action name on RenderingContext. That would allow overrides of the template file.AvatarViewHelper.php:45This is where we could use the previously mentioned constant.
Avatar.php:26