-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
The pull request #176 has duplicated the 3 method from the AbstractController in each controller.
This could be mitigated by creating 2 traits: TranslatedErrorFlashMessage (for the getErrorFlashMessage method) and BlogAdminAccess (for the hasBlogAdminAccess and checkBlogAdminAccess methods).
That would apply the Composition over Inheritance principle.
I suppose it would need Interface to fit them, per https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/PhpArchitecture/Traits.html
Hum... Reading the doc, maybe the BlogAdminAccess trait should be a Service... BlogAccessService?
All in all, I don't like the duplicated code XD
Metadata
Metadata
Assignees
Labels
No labels