Image provider

The SMImageProvider class provides access to default images suitable for link buttons. A common example of usage is demonstrated below.

$button = new SMLinkButton("MyExtensionButton"); // Unique ID used
$button->SetIcon(SMImageProvider::GetImage(SMImageType::$Save));
$button->SetTitle("Save data");
The code above will create a button with an icon suitable for save operations, and the title "Save data". The class description below will explain the functionality in greater details.


SMImageProvider class

Function Return type Description
::GetImage($image:SMImageType) String Function returns reference to image of the given type, suitable for use with the SMLinkButton and ordinary HTML <img ..> elements.


SMImageType enum

Enum value Description
::$Left
Usually an image of an arrow pointing left
::$Right
Usually an image of an arrow pointing right
::$Up
Usually an image of an arrow pointing up
::$Down
Usually an image of an arrow pointing down
::$Create
Usually an image of an icon associated with the process of creating a new element
::$Modify
Usually an image of an icon associated with the process of modifying an exsiting element
::$Update
Usually an image of an icon associated with the process of updating an existing element
::$Delete
Usually an image of an icon associated with the process of removing an existing element
::$Save
Usually an image of an icon associated with the process of saving data
::$Properties
Usually an image of an icon associated with the process of accessing properties of an element
::$Browse
Usually an image of an icon associated with the process of browsing data
::$Clear
Usually an image of an icon associated with the process of clearing data
::$Search
Usually an image of an icon associated with the process of searching data
::$Lock
Usually an image of an icon associated with the process of restricting access
::$Unlock
Usually an image of an icon associated with the process of granting access
::$Mail
Usually an image of an icon associated with the process of e-mailing
::$Display
Usually an image of an icon associated with the process of displaying data
::$Help
Usually an image of an icon associated with documentation