|
Elgg
Version 2.3
|
Entities that support icons should implement this interface. More...
Public Member Functions | |
| saveIconFromUploadedFile ($input_name, $type='icon', array $coords=array()) | |
| Saves icons using an uploaded file as the source. More... | |
| saveIconFromLocalFile ($filename, $type='icon', array $coords=array()) | |
| Saves icons using a local file as the source. More... | |
| saveIconFromElggFile (\ElggFile $file, $type='icon', array $coords=array()) | |
| Saves icons using a file located in the data store as the source. More... | |
| getIcon ($size, $type='icon') | |
| Returns entity icon as an ElggIcon object The icon file may or may not exist on filestore. More... | |
| deleteIcon ($type='icon') | |
| Removes all icon files and metadata for the passed type of icon. More... | |
| getIconURL ($params) | |
| Returns a URL of the icon. More... | |
| getIconLastChange ($size, $type='icon') | |
| Returns the timestamp of when the icon was changed. More... | |
| hasIcon ($size, $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 | ( | $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 | ( | $size, | |
$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 | ( | $size, | |
$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 | ( | $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) |
Implemented in ElggEntity.
| Elgg\EntityIcon::hasIcon | ( | $size, | |
$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.
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 | ( | $filename, | |
$type = 'icon', |
|||
| array | $coords = array() |
||
| ) |
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 | ( | $input_name, | |
$type = 'icon', |
|||
| array | $coords = array() |
||
| ) |
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.