Closed felixOlesen closed 7 months ago
This would change the $class
parameter behaviour from appending to overriding classes.
I've just search. We have 3 usages in core that uses the Format::photo()
method:
return Format::photo($item['imageLocation'], 75);
return Format::photo($item['imageLocation']);
return Format::photo($item['imageLocation'], 75);
None of these use the $class
parameter to override the photo class. Not sure if there is any usage in the modules.
Thanks @yookoala for checking! I didn't recall this method even existing, so did some looking around in the code. It appears like this method was created by a community member, as part of Library refactoring work they contributed to the core, and has only been used in that context, and not in additional modules. Given this limited use, it looks like we're good to proceed in cleaning up this method a bit, as it also has some duplicate code that was intended only for the Format::userPhoto method.
Description Updated Format file to remove in-baked styling of Format::photo uses. The styling will now only be used as a default param.
Motivation and Context This change allows for more modular usage of the Format::photo method stylistically.
How Has This Been Tested? Tested Locally