Documentation

LinkSpecPage extends LinkSpec
in package

Base class for the backend of the extensible link system: {@see Lnk}

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|null
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(mixed $specdata) : string|null
Parameters
$specdata : mixed
Return values
string|null —

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