|
static | makeImage ( $image, $width, $options=[]) |
| Generate an image element from the wiki or the extension.
|
|
static | getCannedIcons () |
|
|
static | makeImageFromFile ( $imageObj, $width, $link, $renderAsWikitext, $label, $squareAdjustmentAxis) |
|
static | makeImageFromIcon ( $image, $width, $colour, $link, $renderAsWikitext, $label) |
|
static | linkFactory ( $imageHtml, $link, $label, $imageObj=null) |
|
◆ getCannedIcons()
static CollaborationKitImage::getCannedIcons |
( |
| ) |
|
|
static |
- Returns
- array All the canned icons in CollaborationKit
◆ linkFactory()
static CollaborationKitImage::linkFactory |
( |
| $imageHtml, |
|
|
| $link, |
|
|
| $label, |
|
|
| $imageObj = null ) |
|
staticprotected |
- Parameters
-
string | $imageHtml | |
Title | string | $link | |
string | $label | |
null | File | $imageObj | |
- Returns
- string
◆ makeImage()
static CollaborationKitImage::makeImage |
( |
| $image, |
|
|
| $width, |
|
|
| $options = [] ) |
|
static |
Generate an image element from the wiki or the extension.
- Parameters
-
string | null | $image | The filename (no namespace prefix) or CollaborationKit icon identifier (or null to use fallback instead) |
int | $width | The width of the image in pixels |
array | $options | An array with optional parameters:
- array $options['classes'] Array of element classes to assign
- Title|string|bool $options['link'] Internal link for the image; default is true (i.e. link to its description page). Pass
false for no link at all. Pass a string to link to a page in the manner of an internal wiki link.
- string $options['colour'] The colour of the icon if using a canned icon
- string $options['css'] In-line style parameters. Avoid if possible.
- bool $options['renderAsWikitext'] Should the output be wikitext instead of HTML? Defaults to false.
- string $options['label'] Label to put under image; used for ToC icons
- string $options['fallback'] If the specified image is null or doesn't exist. Valid options are 'none', a valid icon ID, or an arbitrary string to use a seed. (Note: if you specify a label, then that will serve as the fallback.)
- bool $options['optimizeForSquare'] Fetch an image such that it's ideal for shoving into a square frame. Default is false. Images with labels always get optimzied for squares.
|
- Returns
- string HTML elements or wikitext, depending on $options['renderAsWikitext']
◆ makeImageFromFile()
static CollaborationKitImage::makeImageFromFile |
( |
| $imageObj, |
|
|
| $width, |
|
|
| $link, |
|
|
| $renderAsWikitext, |
|
|
| $label, |
|
|
| $squareAdjustmentAxis ) |
|
staticprotected |
- Parameters
-
File | $imageObj | |
int | $width | |
string | $link | |
bool | $renderAsWikitext | |
string | $label | |
string | null | $squareAdjustmentAxis | x or y |
- Returns
- string
◆ makeImageFromIcon()
static CollaborationKitImage::makeImageFromIcon |
( |
| $image, |
|
|
| $width, |
|
|
| $colour, |
|
|
| $link, |
|
|
| $renderAsWikitext, |
|
|
| $label ) |
|
staticprotected |
- Parameters
-
string | $image | |
int | $width | |
string | $colour | |
string | $link | |
bool | $renderAsWikitext | |
string | $label | |
- Returns
- string
The documentation for this class was generated from the following file: