CMTV
Well-known member
Hi!
I am trying to add support for my custom avatar type "minecraft". Avatar type is used in
So I only need to put one line in switch block. How can I do so without copying the whole function code in overriding function?
I am trying to add support for my custom avatar type "minecraft". Avatar type is used in
switch
construction in the middle of a huge function called fnAvatar
(XF\Template\Templater):
PHP:
/* ... a lot of code ... */
switch ($avatarType)
{
case 'gravatar':
case 'custom':
case 'minecraft': // <------------ I only need to add this line
$src = $user->getAvatarUrl($size, $forceType, $canonical);
break;
case 'default':
default:
$src = null;
break;
}
/* ... a lot of code ... */
So I only need to put one line in switch block. How can I do so without copying the whole function code in overriding function?