View Issue Details

IDProjectCategoryView StatusLast Update
0007179OXID eShop (all versions)4. ------ eShop Core -------public2024-07-24 10:41
Reporters.diez Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.2.2 
Fixed in Version6.4.0 
Summary0007179: Private Functions in Core/Email
DescriptionIn Core/Email several functions are declared as private, which are needed by modules.

Email::getRenderer
This function is needed for every mail you want to send to render the mail body with Smarty/Twig. Even if this is only a help function which can be copied, I don't see any reason for private ones.

Email::shouldProductReviewLinksBeIncluded
Also only a help function but the reason for private is not clear to me.


Input from customer:
In Core/Email sind verschiedene Funktionen als private deklariert, die von Modulen benötigt werden.

Email::getRenderer
Diese Funktion wird quasi bei jeder Mail die man verschicken will benötigt, um den Mailbody mit Smarty/Twig rendern zu können. Auch wenn dies nur eine Hilfsfunktion ist, die nachgebaut werden kann, sehe ich keinen Grund für private.

Email::shouldProductReviewLinksBeIncluded
Auch nur eine Hilfsfunktion aber der Grund für private ist mir hier auch nicht klar.
Additional Information - es -
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

SvenBrunk

2024-07-24 10:41

administrator   ~0017282

This was changed with https://github.com/OXID-eSales/oxideshop_ce/commit/d99866a5e0c7d84a5541d2f22b71af02879f9384 in oxideshop_ce v6.10.0 used in OXID >=6.4.0 for getRenderer to be protected instead of private.

For shouldProductReviewLinksBeIncluded this is still private. In this case the usecase is not really clear to me. This is a very basic method that only check for 2 settings:
1. Are reviews activated anyway and
2. Is the setting includeProductReviewLinksInEmail true ... which is basically what this simple getter is all about.

So: Either you just use this and put some additional check on top (e.g. to activate/deactivate it in special cases) or just change the setting. In the end we strive to make as much of the code public, but I don't see any urgent need right now. Please open a separate ticket for this if you think different, but please explain your usecase, so we can properly rank this.