mirror of
https://github.com/friendica/friendica
synced 2025-04-27 17:10:10 +00:00
Function to return the avatar and header path for a given contact id
This commit is contained in:
parent
3ece803816
commit
ed4a18f079
2 changed files with 24 additions and 3 deletions
|
@ -1662,6 +1662,28 @@ class Contact
|
|||
return DI::baseUrl() . $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get avatar link for given contact id
|
||||
*
|
||||
* @param integer $cid contact id
|
||||
* @return string avatar link
|
||||
*/
|
||||
public static function getAvatarForContact(int $cid):string
|
||||
{
|
||||
return DI::baseUrl() . '/photo/contact/'. $cid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get header link for given contact id
|
||||
*
|
||||
* @param integer $cid contact id
|
||||
* @return string header link
|
||||
*/
|
||||
public static function getHeaderForContact(int $cid):string
|
||||
{
|
||||
return DI::baseUrl() . '/photo/header/'. $cid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the avatar links in a contact only if needed
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue