Elgg
Version master
|
Entities that support icons should implement this interface. More...
Public Member Functions | |
saveIconFromUploadedFile (string $input_name, string $type= 'icon', array $coords=[]) | |
Saves icons using an uploaded file as the source. More... | |
saveIconFromLocalFile (string $filename, string $type= 'icon', array $coords=[]) | |
Saves icons using a local file as the source. More... | |
saveIconFromElggFile (\ElggFile $file, string $type= 'icon', array $coords=[]) | |
Saves icons using a file located in the data store as the source. More... | |
getIcon (string $size, string $type= 'icon') | |
Returns entity icon as an ElggIcon object The icon file may or may not exist on filestore. More... | |
deleteIcon (string $type= 'icon') | |
Removes all icon files and metadata for the passed type of icon. More... | |
getIconURL (array $params) | |
Returns a URL of the icon. More... | |
getIconLastChange (string $size, string $type= 'icon') | |
Returns the timestamp of when the icon was changed. More... | |
hasIcon (string $size, string $type= 'icon') | |
Returns if the entity has an icon of the passed type. More... | |
Entities that support icons should implement this interface.
Definition at line 7 of file EntityIcon.php.
Elgg\EntityIcon::deleteIcon | ( | string | $type = 'icon' | ) |
Removes all icon files and metadata for the passed type of icon.
string | $type | The name of the icon. e.g., 'icon', 'cover_photo' |
Implemented in ElggEntity.
Elgg\EntityIcon::getIcon | ( | string | $size, |
string | $type = 'icon' |
||
) |
Returns entity icon as an ElggIcon object The icon file may or may not exist on filestore.
string | $size | Size of the icon |
string | $type | The name of the icon. e.g., 'icon', 'cover_photo' |
Implemented in ElggEntity.
Elgg\EntityIcon::getIconLastChange | ( | string | $size, |
string | $type = 'icon' |
||
) |
Returns the timestamp of when the icon was changed.
string | $size | The size of the icon |
string | $type | The name of the icon. e.g., 'icon', 'cover_photo' |
Implemented in ElggEntity.
Elgg\EntityIcon::getIconURL | ( | array | $params | ) |
Returns a URL of the icon.
array | $params | An array of paramaters including: string 'size' => the size of the icon (default: medium) string 'type' => the icon type (default: icon) |
Elgg\EntityIcon::hasIcon | ( | string | $size, |
string | $type = 'icon' |
||
) |
Returns if the entity has an icon of the passed type.
string | $size | The size of the icon |
string | $type | The name of the icon. e.g., 'icon', 'cover_photo' |
Implemented in ElggEntity.
Elgg\EntityIcon::saveIconFromElggFile | ( | \ElggFile | $file, |
string | $type = 'icon' , |
||
array | $coords = [] |
||
) |
Saves icons using a file located in the data store as the source.
string | $file | An ElggFile instance |
string | $type | The name of the icon. e.g., 'icon', 'cover_photo' |
array | $coords | An array of cropping coordinates x1, y1, x2, y2 |
Implemented in ElggEntity.
Elgg\EntityIcon::saveIconFromLocalFile | ( | string | $filename, |
string | $type = 'icon' , |
||
array | $coords = [] |
||
) |
Saves icons using a local file as the source.
string | $filename | The full path to the local file |
string | $type | The name of the icon. e.g., 'icon', 'cover_photo' |
array | $coords | An array of cropping coordinates x1, y1, x2, y2 |
Implemented in ElggEntity.
Elgg\EntityIcon::saveIconFromUploadedFile | ( | string | $input_name, |
string | $type = 'icon' , |
||
array | $coords = [] |
||
) |
Saves icons using an uploaded file as the source.
string | $input_name | Form input name |
string | $type | The name of the icon. e.g., 'icon', 'cover_photo' |
array | $coords | An array of cropping coordinates x1, y1, x2, y2 |
Implemented in ElggEntity.