\web\lib\adminUIElements

This class provides various HTML snippets and other UI-related convenience functions.

Summary

Methods
Properties
Constants
__construct()
displayName()
infoblock()
instLevelInfoBoxes()
getBlobFromDB()
previewCAinHTML()
previewImageinHTML()
previewInfoFileinHTML()
boxFlexible()
boxOkay()
boxRemark()
boxWarning()
boxError()
pngInjectConsortiumLogo()
$nomenclature_fed
$nomenclature_inst
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$nomenclature_fed

$nomenclature_fed : 

the custom displayable variant of the term 'federation'

Type

$nomenclature_inst

$nomenclature_inst : 

the custom displayable variant of the term 'institution'

Type

Methods

__construct()

__construct() : 

Initialises the class.

Mainly fetches various nomenclature from the config and attempts to translate those into local language. Needs pre-loading some terms.

Returns

displayName()

displayName(  input) : 

provides human-readable text for the various option names as stored in DB.

Parameters

input

raw text in need of a human-readable display variant

Throws

\Exception

Returns

the human-readable variant

infoblock()

infoblock(mixed|string|int  optionlist,   class,   level) : 

creates an HTML information block with a list of options from a given category and level

Parameters

mixed|string|int optionlist

list of options

class

option class of interest

level

option level of interest

Returns

HTML code

instLevelInfoBoxes()

instLevelInfoBoxes(\core\IdP  myInst) : 

creates HTML code to display all information boxes for an IdP

Parameters

\core\IdP myInst

the IdP in question

Returns

HTML code

getBlobFromDB()

getBlobFromDB(  ref,   checkpublic) : string|bool

Parameters

ref

the database reference string

checkpublic

should we check if the requested piece of data is public?

Returns

string|bool —

the requested data, or FALSE if something went wrong

previewCAinHTML()

previewCAinHTML(  cAReference) : 

creates HTML code to display a nice UI representation of a CA

Parameters

cAReference

ROWID pointer to the CA to display

Returns

HTML code

previewImageinHTML()

previewImageinHTML(  imageReference) : 

creates HTML code to display a nice UI representation of an image

Parameters

imageReference

ROWID pointer to the image to display

Returns

HTML code

previewInfoFileinHTML()

previewInfoFileinHTML(  fileReference) : 

creates HTML code to display a nice UI representation of a TermsOfUse file

Parameters

fileReference

ROWID pointer to the file to display

Returns

HTML code

boxFlexible()

boxFlexible(  level,   text = NULL,   caption = NULL,   omittabletags = FALSE) : 

creates HTML code for a UI element which informs the user about something.

Parameters

level

what kind of information is to be displayed?

text

the text to display

caption

the caption to display

omittabletags

the output usually has tr/td table tags, this option suppresses them

Returns

boxOkay()

boxOkay(  text = NULL,   caption = NULL,   omittabletags = FALSE) : 

creates HTML code to display an "all is okay" message

Parameters

text

the text to display

caption

the caption to display

omittabletags

the output usually has tr/td table tags, this option suppresses them

Returns

HTML: the box

boxRemark()

boxRemark(  text = NULL,   caption = NULL,   omittabletags = FALSE) : 

creates HTML code to display a "smartass comment" message

Parameters

text

the text to display

caption

the caption to display

omittabletags

the output usually has tr/td table tags, this option suppresses them

Returns

HTML: the box

boxWarning()

boxWarning(  text = NULL,   caption = NULL,   omittabletags = FALSE) : 

creates HTML code to display a "something's a bit wrong" message

Parameters

text

the text to display

caption

the caption to display

omittabletags

the output usually has tr/td table tags, this option suppresses them

Returns

HTML: the box

boxError()

boxError(  text = NULL,   caption = NULL,   omittabletags = FALSE) : 

creates HTML code to display a "Whoa! Danger, Will Robinson!" message

Parameters

text

the text to display

caption

the caption to display

omittabletags

the output usually has tr/td table tags, this option suppresses them

Returns

HTML: the box

pngInjectConsortiumLogo()

pngInjectConsortiumLogo(  inputpngstring,   symbolsize,   marginsymbols = 4) : 

Injects the consortium logo in the middle of a given PNG.

Usually used on QR code PNGs - the parameters inform about the structure of the QR code so that the logo does not prevent parsing of the QR code.

Parameters

inputpngstring

the PNG to edit

symbolsize

size in pixels of one QR "pixel"

marginsymbols

size in pixels of border around the actual QR

Returns

the image with logo centered in the middle