Documentation

LinkSpecImage extends LinkSpec
in package

Like LinkSpecDocument but specialised for images with resizing.

Table of Contents

Methods

getAttrs()  : array<string|int, mixed>
Get any extra html attributes to use for a given link
getEditForm()  : string
Get the HTML to use for editing a given linkspec
getUrl()  : string
Get the URL for a given link.
isValid()  : bool
Validate the submission, for instances where certain constraints apply
loadNeeds()  : void
If there are any {@see Needs} calls that the edit form requires, they should be loaded here

Methods

getAttrs()

Get any extra html attributes to use for a given link

public getAttrs(mixed $specdata) : array<string|int, mixed>
Parameters
$specdata : mixed
Return values
array<string|int, mixed>

getEditForm()

Get the HTML to use for editing a given linkspec

public getEditForm(mixed $field_name, mixed $curr_specdata) : string

The HTML should create a HTML field with the name $field_name If there is a spec currently being edited, the specdata will be provided in $curr_specdata

Parameters
$field_name : mixed
$curr_specdata : mixed
Return values
string —

HTML

getUrl()

Get the URL for a given link.

public getUrl(array<string|int, mixed> $specdata) : string
Parameters
$specdata : array<string|int, mixed>

[id, size]

Return values
string —

absolute URL

isValid()

Validate the submission, for instances where certain constraints apply

public isValid(mixed $specdata) : bool
Parameters
$specdata : mixed
Return values
bool

loadNeeds()

If there are any {@see Needs} calls that the edit form requires, they should be loaded here

public loadNeeds() : void
On this page

Search results