HTML class

Provides some commonly used HTML elements

copyright CONTREXX CMS - COMVATION AG
author Reto Kohli
version 3.0.0
package contrexx
subpackage core

 Methods

Returns HTML code for the functions available in many list views

getBackendFunctions(array $arrFunction, array $arrConfirmation, boolean $align_right, array $arrText) : string
Static

The $arrFunction array must look something like: array( 'view' => The view action parameter, 'copy' => The copy action parameter, 'edit' => The edit action parameter, 'delete' => The delete action parameter, ) You may omit any indices that do not apply, those icons will not be included. The action parameter may be a full absolute or relative URI, or just a partial query string, like "act=what_to_do". In the first case, it is used unchanged. In the second case, the parameters in the string replace those of the same name or are added to the current page URI. You may also specify javascript code, this MUST start with "javascript:" and will replace the page URI. Empty actions will usually lead back to the module start page. Mind that you MUST use single quotes (') in all of those action strings ONLY. The optional $arrConfirmation array may contain any of the same indices, plus some text. If present, these texts are shown in a confirmation box, and action is only taken if it is confirmed. Note that in that case, the action parameter MUST be a valid URI, NOT some javascript statement! Any icon's alt and title tag is fitted with the default core language entry whose index is formed like "TXT_CORE_HTML_" plus the function name in upper case, e.g. "TXT_CORE_HTML_DELETE". This text may be overridden by entries in the $arrText array, indexed like $arrFunction. //Also, the current CSRF key and value pair is added to any URI processed.

Parameters

$arrFunction

array

The array of functions and actions

$arrConfirmation

array

The optional array with confirmation texts

$align_right

boolean

Align the function icons to the right using an enclosing

<

div> if true. Defaults to true

$arrText

array

Alternative/title text for the icons. Defaults to null, in which case the core language entry is used, if present

Returns

stringThe HTML code for the function column

Returns HTML code for a checkbox

getCheckbox(string $name, string $value, string $id, boolean $checked, string $onchange, string $attribute) : string
Static

If the name is empty, the empty string is returned. The $value is contrexx_raw2xhtml()d to prevent side effects. If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value, defaults to 1 (one)

$id

string

The optional element id

$checked

boolean

If true, the checkbox is checked

$onchange

string

The optional onchange event script

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a checkbox group

getCheckboxGroup(string $name, array $arrOptions, array $arrLabel, array $arrChecked, string $id, string $onchange, string $separator, $attributeCheckbox, string $attributeLabel) : string
Static

If the name is empty, the empty string is returned. The $name parameter is both used for the name and id parameter in the element. For the id, a dash and an additional index are appended, like '$name-$index'. That index is increased accordingly on each call to this method. Mind that thus, it MUST be unique on your page. The $arrOptions array must contain the key-value pairs in the order to be added. The keys are used to index the name attribute in the checkboxes, the value is put into the value attribute. The $arrLabel should use the same keys, its values are appended as label text to the respective checkboxes, if present. The $arrChecked array may contain the values to be preselected as array values. It's keys are ignored.

author Reto Kohli

Parameters

$name

string

The element name

$arrOptions

array

The options array

$arrLabel

array

The optional label text array

$arrChecked

array

The optional preselected option keys

$id

string

The optional element id

$onchange

string

The optional onchange event script

$separator

string

The optional separator between checkboxes

$attributeCheckbox

$attributeLabel

string

Additional optional attributes for the labels

Returns

stringThe HTML code for the elements

Returns HTML code for either a checked or unchecked icon for indicating yes/no status

getCheckmark(boolean $status) : string
Static

For the time being, the unchecked status is represented by an empty space, aka pixel.gif

todo There should be an unchecked icon other than "pixel.gif"

Parameters

$status

boolean

If true, the checked box is returned, the unchecked otherwise

Returns

stringThe HTML code with the checkbox icon

getClearImageCode()

getClearImageCode($id) 
Static

Parameters

$id

Returns HTML code for a form

getForm(string $name, string $action, string $content, string $id, string $method, string $attribute) : string
Static

If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

author Reto Kohli

Parameters

$name

string

The element name

$action

string

The action URI

$content

string

The form content

$id

string

The optional element id

$method

string

The optional request method. Defaults to 'post'

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a hidden imput field

getHidden(string $name, string $value, string $id, string $attribute) : string
Static

If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

todo Maybe the optional attributes will never be used and can be removed?
author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value

$id

string

The element id, if non-empty

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for the hidden active tab field

getHidden_activetab() : \type
Static

Includes Javascript setting the corresponding variable

Returns

\type

Returns an image tag for the given Image object in the size specified by the corresponding Imagetype

getImage(\Image $objImage, string $attribute) : string
Static

This adds alt, width, and height attributes with the values returned by {@see Image::getPath()}, and {@see Imagetype::getInfoArray()} methods repectively. If the $attribute parameter contains one of the alt, width, or height attributes (or corresponding style information), these will override the data from the Image or Imagetype.

author Reto Kohli

Parameters

$objImage

\Image

The Image object

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the image tag

Returns an image tag for the given Image path

getImageByPath($image_path, string $attribute) : string
Static

This adds alt, width, and height attributes with the values returned by {@see Image::getPath()}, {@see Image::getWidth()}, and {@see Image::getHeight()} methods repectively. If the $attribute parameter contains one of the alt, width, or height attributes (or corresponding style information), these will override the data from the Image object.

author Reto Kohli

Parameters

$image_path

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the image tag

Returns HTML code for an image element that links to the filebrowser for choosing an image file on the server

getImageChooserBrowser(\Image $objImage, string $id, mixed $imagetype_key, $type, $path) : string
Static

If the optional $imagetype_key is missing (defaults to false), no image type can be selected. If it's a string, the type of the Image is set to this key. If it's an array of keys, the Image type can be selected from these. Uses the $id parameter as prefix for both the name and id attributes of all HTML elements. The names and respective suffixes are: - id+'img' for the name and id of the tag - id+'_src' for the name and id of the hidden tag for the image URI - id+'_width' for the name and id of the hidden tag for the width - id+'_height' for the name and id of the hidden tag for the height All of the elements with a suffix will provide the current selected image information when the form is posted. See {@see Image::updatePostImages()} and {@see Image::uploadAndStore()} for more information and examples.

Parameters

$objImage

\Image

The image object

$id

string

The base name for the elements IDs

$imagetype_key

mixed

The optional Image type key

$type

$path

Returns

stringThe HTML code for all the elements

Returns HTML code for an image element with form elements for uploading an image file.

getImageChooserUpload(\Image $objImage, string $id, mixed $imagetype_key, string $path_default, boolean $replace_only) : string
Static

Uses the $id parameter as prefix for both the name and id attributes of all HTML elements. The names and respective suffixes are: - id+'_img' for the name and id of the tag - id+'_src' for the name and id of the hidden tag for the image path - id+'_type' for the name and id of the hidden tag or tag for the width - id+'_height' for the name and id of the hidden tag for the height - id+'_file' for the name and id of the file upload element The file upload element will provide the new image chosen by the user when the form is posted, while the hidden fields represent the previous state when the page was generated. The $path_default will replace the path of the image shown if that is empty, but the path posted back will remain empty so the default image is not accidentally stored. If the optional $imagetype_key is empty or not an array, no image type can be selected. If it's false, the image type field is omitted. If it's empty but not false, the current Image's type is used. If it's a string, the type is set to that value, overriding the Image's current type. If it's an array, the Image type can be selected from its values, and the current Image's key is preselected. The array keys *SHOULD* contain the Imagetype key, its values the Imagetype names in the current language. See {@see Image::updatePostImages()} and {@see Image::uploadAndStore()} for more information and examples.

Parameters

$objImage

\Image

The image object

$id

string

The base name for the elements IDs

$imagetype_key

mixed

The optional Image type key or Imagetype array. Defaults to the empty string

$path_default

string

The optional path of a default image. Defaults to the empty string

$replace_only

boolean

If true, the image cannot be deleted, but there's always a file upload input to replace the current image. Defaults to false

Returns

stringThe HTML code for all the elements

Returns an image tag for the given Image object in its original size

getImageOriginal(\Image $objImage, string $attribute) : string
Static

This adds alt, width, and height attributes with the values returned by {@see Image::getPath()}, {@see Image::getWidth()}, and {@see Image::getHeight()} methods repectively. If the $attribute parameter contains one of the alt, width, or height attributes (or corresponding style information), these will override the data from the Image object.

author Reto Kohli

Parameters

$objImage

\Image

The Image object

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the image tag

Returns HTML code for a button

getInputButton(string $name, string $value, string $type, string $id, string $attribute, string $label, string $label_attribute) : string
Static

If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value

$type

string

The button type, defaults to 'submit'

$id

string

The element id, if non-empty

$attribute

string

Additional optional attributes

$label

string

The optional label text

$label_attribute

string

The optional label attributes

Returns

stringThe HTML code for the element

Returns HTML code for a file upload input field

getInputFileupload(string $name, string $id, string $maxlength, string $mimetype, string $attribute, boolean $visible, string $path) : string
Static

If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

author Reto Kohli

Parameters

$name

string

The element name

$id

string

The optional element id. You can only get the target path and delete functionality if this is not false.

$maxlength

string

The optional maximum accepted size

$mimetype

string

The optional accepted MIME type

$attribute

string

Additional optional attributes

$visible

boolean

If true, the input element is set visible. Defaults to true

$path

string

Optional path. If not empty, and the $id is non-empty, the file path is shown on top of the upload element, with a clickable delete icon to the right. Defaults to false

Returns

stringThe HTML code for the element

Returns HTML code for a number imput field

getInputNumber(string $name, string $value, string $id, string $attribute) : string
Static

Note: This requires an HTML5 capable browser. If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead. Use the $attribute parameter to specify additional attributes, like min, max, or step.

author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value, defaults to the empty string

$id

string

The optional element id, defaults to false for none

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a password text imput field

getInputPassword(string $name, string $value, string $attribute) : string
Static

The $name parameter is used for both the element name and id attributes.

author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a range imput field

getInputRange(string $name, string $value, string $id, string $attribute) : string
Static

Note: This requires an HTML5 capable browser. If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead. Use the $attribute parameter to specify additional attributes, like min, max, or step.

author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value, defaults to the empty string

$id

string

The optional element id, defaults to false for none

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a text imput field

getInputText(string $name, string $value, string $id, string $attribute) : string
Static

If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead. If the custom attributes parameter $attribute is empty, and is_numeric($value) evaluates to true, the text is right aligned within the input element.

author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value, defaults to the empty string

$id

string

The optional element id, defaults to false for none

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HMTL code for displaying a group of Text fields

getInputTextGroup(array $options) 
Static

Parameters

$options

array

The options array, by reference

A few JS scripts used by the Html class

getJavascript_Element() : string
Static

Includes the following methods for manipulating HTML elements: toggleDisplay(button_element, target_id) Toggles the visibility (style.display) of the element with id attribute target_id and updates the .innerHTML property of the button_element with the appropriate text ("open" or "close"). showTab(tab_id_base, div_id_base, active_suffix, min_suffix, max_suffix) Activate a tab and show the corresponding content. Displays the element with id "div_id_base"+"active_suffix", and hides all other such elements within the "min_suffix" to "max_suffix" range (inclusive). Sets the class of the element with id "tab_id_base"+ "active_suffix" to "active", any other suffix to "". removeElement(id) -- UNTESTED! Remove the element with id "id". cloneElement(id) -- UNTESTED! Adds a clone of the element with id "id" as its next sibling.

Returns

stringThe Javascript code

A few JS scripts used by the Html and Image classes

getJavascript_Image(string $path) : string
Static

The functions included are required to show the file browser and file upload components defined in the {@see self::getImageChooserBrowser()} and {@see self::getImageChooserUpload()} methods, respectively.

Parameters

$path

string

The optional path to a default image. Defaults to the Image::PATH_NO_IMAGE class constant if empty.

Returns

stringThe Javascript code

A few JS scripts used by the Html class

getJavascript_Text() : string
Static

Includes the following methods: lengthLimit(textarea, count_min, count_max, limit_min, limit_max) Limit the length of the element "textarea" to the range of "limit_min" to "limit_max" characters (inclusive). Updates the minimum and maximum required characters in the elements "count_min" and "count_max" values.

Returns

stringThe Javascript code

Returns the javascript needed to make elements returned by {@see getToggle()} work

getJavascript_Toggle(string $toggle_id_base, string $hidden_id_base, array $arrValues, array $arrTypeIds) : string
Static

The $hidden_id_base MUST be letters and dash (-) ONLY. Everything else is considered to be part of the internal element index, including digits and underscore.

Parameters

$toggle_id_base

string

The base name of the toggle elements

$hidden_id_base

string

The base name of the (hidden) value elements

$arrValues

array

The array of individual toggle

$arrTypeIds

array

The array of type IDs

Returns

stringThe javascript code

Wraps the content in a label

getLabel(string $for, string $text, string $attribute) : string
Static

The $text is contrexx_raw2xhtml()d to prevent side effects. Mind that the $for parameter must match the id attribute of the contained element in $content.

author Reto Kohli

Parameters

$for

string

The for attribute of the label

$text

string

The text of the label

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the label with the text

Returns a single language icon

getLanguageIcon(int $languageId, string $state, $link, string $languageLabel) : string
Static

Parameters

$languageId

int

Language ID

$state

string

One of active,inactive,inexistent

$link

$languageLabel

string

(optional) Label for the icon, default is uppercase language code

Returns

stringThe HTML code for the elements

Generates code for ContentManager style language state icons

getLanguageIcons(array $languageStates, string $link) : string
Static

For $languageStates you may supply an array in one of these to forms:

$languageStates = array( {language id} => 'active','inactive','inexistent', )

$languageStates = array( {language id} => array( 'active' => {bool}, 'page' => {page id or object}, ), )

The latter will be resolved to the first form. The two forms can be mixed.

For $link, supply a hyperlink, that may contain %1$d and %2$s which will be replaced with the language ID and code.

Parameters

$languageStates

array

Language states to get icons for

$link

string

Hyperlink for language icons

Returns

stringThe HTML code for the elements

Returns HTML code to represent some status with a colored LED image

getLed($status, string $alt, string $action) : string
Static

Colors currently available include green, yellow, and red. For unknown colors, the empty string is returned. The $alt parameter value is added as the images' alt attribute value, if non-empty. The $action parameter may include URI parameters to be inserted in the href attribute of a link, which is added if $action is non-empty.

Parameters

$status

$alt

string

The optional alt attribute for the image

$action

string

The optional action URI parameters

Returns

stringThe LED HTML code on success, the empty string otherwise

Returns HTML code for selection options

getOptions(array $arrOptions, mixed $selected, string $attribute) : string
Static

The optional $selected parameter may be an array, in which case all IDs found in the array keys are selected. The arrays' values are ignored.

author Reto Kohli

Parameters

$arrOptions

array

The options array

$selected

mixed

The optional preselected option key or array of keys

$attribute

string

Additional optional attributes

Returns

stringThe menu options HTML code

Returns HTML code for a radio button

getRadio(string $name, array $value, string $id, boolean $checked, string $onchange, string $attribute) : string
Static

If the name is empty, the empty string is returned. If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

author Reto Kohli

Parameters

$name

string

The element name

$value

array

The element value

$id

string

The optional element id

$checked

boolean

If true, the radio button is preselected. Defaults to false

$onchange

string

The optional onchange event script

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a radio button group

getRadioGroup(string $name, array $arrOptions, string $checked, string $onchange, string $attributeRadio, string $attributeLabel) : string
Static

If the name is empty, the empty string is returned. The $name parameter is both used for the name and id parameter in the element. For the id, a dash and an additional index are appended, like '$name-$index'. That index is increased accordingly on each call to this method. Mind that thus, it MUST be unique on your page. The $arrOptions array must contain the value-text pairs in the order to be added. The values are used in the radio button, and the text for the label appended.

author Reto Kohli

Parameters

$name

string

The element name

$arrOptions

array

The options array

$checked

string

The optional preselected option key

$onchange

string

The optional onchange event script

$attributeRadio

string

Additional optional attributes for the radio button elements

$attributeLabel

string

Additional optional attributes for the labels

Returns

stringThe HTML code for the element

Returns the page URI

getRelativeUri() : string
Static

The URI contains neither the host nor the directory, but only the script file name and query string. //including the current CSRF parameter. This is ready for use with javascript. Apply contrexx_raw2xhtml() before using it in any href or action attribute.

see \getRelativeUri_entities()

Returns

stringThe URI

Returns the page URI with all special characters substituted by their corresponding HTML entities

getRelativeUri_entities() : string
Static

The URI contains neither the host nor the directory, but only the script file name and query string. //including the current CSRF parameter. This is ready for use in any href or action attribute. Apply html_entity_decode() before using it with javascript.

see \getRelativeUri()

Returns

stringThe URI with entities

Returns HTML code for a dropdown menu

getSelect(string $name, array $arrOptions, string $selected, string $id, string $onchange, string $attribute) : string
Static

If the name is empty, the empty string is returned. If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

author Reto Kohli

Parameters

$name

string

The element name

$arrOptions

array

The options array

$selected

string

The optional preselected option key

$id

string

The optional element id

$onchange

string

The optional onchange event script

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a custom dropdown menu

getSelectCustom(string $name, string $strOptions, string $id, string $onchange, string $attribute) : string
Static

Similar to {@see getSelect()}, but takes a preproduced string for its options instead of an array and selected key. If the name is empty, the empty string is returned. If the $id parameter is false, the id attribute is not set. If it's empty (but not false), the name is used instead.

author Reto Kohli

Parameters

$name

string

The element name

$strOptions

string

The options string

$id

string

The optional element id

$onchange

string

The optional onchange event script

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns HTML code for a text area

getTextarea(string $name, string $value, string $cols, string $rows, string $attribute) : string
Static

The $name parameter is used for both the element name and id attributes.

author Reto Kohli

Parameters

$name

string

The element name

$value

string

The element value

$cols

string

The optional number of columns

$rows

string

The optional number of rows

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the element

Returns an image tag for the given Image object in the thumbnail size specified by the corresponding Imagetype

getThumbnail(\Image $objImage, string $attribute) : string
Static

This adds alt, width, and height attributes with the values returned by {@see Image::getPath()}, and {@see Imagetype::getInfoArrayWidth()} methods repectively. If the $attribute parameter contains one of the alt, width, or height attributes (or corresponding style information), these will override the data from the Image or Imagetype.

author Reto Kohli

Parameters

$objImage

\Image

The Image object

$attribute

string

Additional optional attributes

Returns

stringThe HTML code for the image tag

Returns a clickable element that toggles its color and value

getToggle(string $name, array $arrStatus, string $id, string $hidden_id, boolean $init, array $arrTitle) : string
Static

The $arrStatus array contains two key-value pairs. The key is the element's value, the value the corresponding HTML color. The first pair is used for off, the second for on. The initial value of the element is determined by $init; if it is true, the element starts on. The optional $arrTitle array may contain values for the title attribute to be used for the two states, in the same order as $arrStatus. If the $id parameter is empty, the class constant {@see TOGGLE_ID_BASE} is used for the id attribute base name. If the optional $hidden_id is empty, an additional hidden input element with the id attribute "hidden-" plus $id is created. Otherwise, this element must exist on the page and may be any kind of element with a value. Either one of the ids are also suffixed with the current $index_toggle number if they are empty and thus autocreated. You can style the element by defining a CSS class with the name "toggle" plus your $id; this defaults to "toggletoggle"... - sorry. :)

Parameters

$name

string

The element name

$arrStatus

array

The status array

$id

string

The optional id attribute name

$hidden_id

string

The optional id attribute name of the element carrying the value

$init

boolean

The optional initial status. Defaults to false

$arrTitle

array

The optional title array

Returns

stringThe element code

Returns HMTL code for displaying two adjacent menus

getTwinmenu(array $options) 
Static

Options can be moved between the menus. The index "onsubmit" is added to the options array; insert this string into the onsubmit attribute of your form in order to have all options selected before submitting the form.

Parameters

$options

array

The options array, by reference

Builds a raty element

makeRating(string $selector, array $options) : boolean
Static

This element lets you display a customizable star rating. Uses and activates jQuery. The selector will be passed to jQuery to select the element(s) to which the rating is applied (some

<

div> or similar will do, but that element must exist). The options array may contain any keys that are valid raty options, and their respective values. See {@see http://plugins.jquery.com/project/raty} for details. As of writing this (20110228), valid options and their respective defaults are: cancelHint: 'cancel this rating!' cancelOff: 'cancel-off.png' cancelOn: 'cancel-on.png' cancelPlace: 'left' click: null half: false hintList: ['bad', 'poor', 'regular', 'good', 'gorgeous'] iconRange: [] noRatedMsg: 'not rated yet' number: 5 path: 'img/' readOnly: false scoreName: 'score' showCancel: false starHalf: 'star-half.png' starOff: 'star-off.png' starOn: 'star-on.png' start: 0 Note that you MUST specify boolean option values as true or false, NOT as string literals "true" or "false". The latter will not work.

link http://plugins.jquery.com/project/raty

Parameters

$selector

string

The element selector

$options

array

The optional raty options

Returns

booleanTrue on success, false otherwise

Replaces the URI parameters given in the URI, by reference

replaceUriParameter(string $uri, string $parameter) : void
Static

Parameters whose names are present in the URI already are replaced with the new values from the $parameter string. Parameters from $parameter that are not already present in the URI are appended. The replaced/added parameters are separated by '&'. Note that this expects and produces URIs in the form as returned by {@see getRelativeUri_entities()}. It operates on a URI without entities, too, but the result will probably not be correct.

Parameters

$uri

string

The full URI, by reference

$parameter

string

The parameters to be replaced or added

Shortens text and appends an optional link to "more.

shortenText(string $text, integer $max_length, string | string $more_uri, $more_target) : string
Static

..". Mind: the returned string is contrexx_raw2xhtml()d for the current charset!

Parameters

$text

string

The text

$max_length

integer

The maximum length

$more_uri

stringstring

The optional URI

$more_target

Returns

stringThe shortened text, with the optional link appended

Remove the parameter and its value from the URI string, by reference

stripUriParam(string $uri, string $parameter_name) : string
Static

If the parameter cannot be found, the URI is left unchanged. Note that this expects and produces URIs in the form as returned by {@see getRelativeUri_entities()}. It operates on a URI without entities, too, but the result will probably not be correct.

Parameters

$uri

string

The URI, by reference

$parameter_name

string

The name of the parameter

Returns

stringThe former parameter value, or the empty string

Returns the Javascript code required by the Twinmenu

getJavascript_Twinmenu() : string
Static

This method is called by {@see getTwinmenu()} and SHOULD NOT be used otherwise.

static
access private

Returns

stringThe Javascript code

 Properties

 

$index_tab : integer

Incremented and added to the tabindex attribute for each element in the order they are created

 

$index_toggle : integer

Incremented and added to the id attribute for each toggle element in the order they are created

 Constants

 

Some basic and often used (and frequently misspelt) HTML attributes

ATTRIBUTE_CHECKED 

Note the leading space that allows you to add the placeholder right after the preceeding attribute without wasting whitespace when it's unused

 

ATTRIBUTE_DISABLED

ATTRIBUTE_DISABLED 
 

ATTRIBUTE_MULTIPLE

ATTRIBUTE_MULTIPLE 
 

ATTRIBUTE_READONLY

ATTRIBUTE_READONLY 
 

ATTRIBUTE_SELECTED

ATTRIBUTE_SELECTED 
 

CSS_DISPLAY_BLOCK

CSS_DISPLAY_BLOCK 
 

CSS_DISPLAY_INLINE

CSS_DISPLAY_INLINE 
 

Some basic and frequently used (and often misspelt) CSS properties

CSS_DISPLAY_NONE 
 

Icon used for omitted icons (for aligning/formatting)

ICON_BLANK 
 

Icon used for Comments (with tooltip containing the text)

ICON_COMMENT 
 

Icon used to indicate a link to details for the object.

ICON_DETAILS 

Only for the hotelcard module

 

Icon used on the link for adding an HTML element

ICON_ELEMENT_ADD 
todo Find a better icon for this
 

Icon used on the link for removing an HTML element

ICON_ELEMENT_REMOVE 
 

Icon used for omitted functions

ICON_FUNCTION_BLANK 
 

Icon used on the link for removing an image

ICON_FUNCTION_CLEAR_IMAGE 
 

Icon used on the link for copying any entry

ICON_FUNCTION_COPY 
 

Icon used on the link for deleting any entry

ICON_FUNCTION_DELETE 
 

Icon used on the link for downloading a PDF document

ICON_FUNCTION_DOWNLOAD_PDF 
 

Icon used on the link for editing any entry

ICON_FUNCTION_EDIT 
 

Icon used on the link for marking as deleted

ICON_FUNCTION_MARK_DELETED 
 

Icon used on the link for marking as not deleted

ICON_FUNCTION_MARK_UNDELETED 
 

Icon used on the link for marking as not special

ICON_FUNCTION_SPECIAL_OFF 
 

Icon used on the link for marking as special

ICON_FUNCTION_SPECIAL_ON 
 

Icon used on the link for viewing any entry

ICON_FUNCTION_VIEW 
 

Icon used for gift text (with tooltip containing the text) Only for the hotelcard module

ICON_GIFT 
 

Icon used for the checked status

ICON_STATUS_CHECKED 
 

Icon used for green status

ICON_STATUS_GREEN 
 

Icon used for red status

ICON_STATUS_RED 
 

Icon used for the unchecked status

ICON_STATUS_UNCHECKED 
 

Icon used for yellow status

ICON_STATUS_YELLOW 
 

STATUS_GREEN

STATUS_GREEN 
 

Class constants defining the names of various (LED) status

STATUS_RED 

See {@see Html::getLed()}

 

STATUS_YELLOW

STATUS_YELLOW 
 

TOGGLE_CLASS_NOP

TOGGLE_CLASS_NOP 
 

TOGGLE_CLASS_OFF

TOGGLE_CLASS_OFF 
 

TOGGLE_CLASS_ON

TOGGLE_CLASS_ON 
 

The base name for the elements created by {@see getToggle()}

TOGGLE_ID_BASE 

The current value of $index_toggle is appended for each such element, starting from one. The current status is stored in a hidden input, its id being the same but prepended with "hidden-".

 

TOGGLE_KEY_NOP

TOGGLE_KEY_NOP 
 

These are the default values for the global (default) values for the Toggle Javascript class handling the toggle element events.

TOGGLE_KEY_OFF 

See {@see getToggle()}, {@see getJavascript_Toggle()}

 

TOGGLE_KEY_ON

TOGGLE_KEY_ON 
 

TOGGLE_TITLE_NOP

TOGGLE_TITLE_NOP 
 

TOGGLE_TITLE_OFF

TOGGLE_TITLE_OFF 
 

TOGGLE_TITLE_ON

TOGGLE_TITLE_ON 
© Copyright 2014 by Comvation AG
Generated on 2014-07-11T08:39:20+02:00.