$_action
$_action :
"action" attribute for the html form
Renders a form for setting module specific group permissions
You may not change or alter any portion of this comment or credits of supporting developers from this source code or any supporting source code which is considered copyrighted (c) material of the original comment or credit authors. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
None found |
__construct( title, modid, permname, permdesc, url, anonymous = true) :
Constructor
title | ||
modid | ||
permname | ||
permdesc | ||
url | ||
anonymous |
None found |
None found |
getObjectID( object, hashinfo = sha1) :
*#@+ retrieves object serialisation/identification id (sha1 used)
each object has serialisation
object | ||
hashinfo |
None found |
getArrayID( value, key, ret, hashinfo = sha1) :
value | ||
key | ||
ret | ||
hashinfo |
None found |
getSummary( encode = false) :
return the summary of the form
encode | To sanitizer the text? |
None found |
getTitle( encode = false) :
return the title of the form
encode | To sanitizer the text? |
None found |
getName( encode = true) :
get the "name" attribute for the <form> tag
Deprecated, to be refactored
encode | To sanitizer the text? |
None found |
getAction( encode = true) :
get the "action" attribute for the <form> tag
encode | To sanitizer the text? |
None found |
None found |
addElement(string|\APIFormElement formElement, required = false) :
Add an element to the form
string|\APIFormElement | formElement | reference to a {@link APIFormElement} |
required | is this a "required" element? |
None found |
getElements( recurse = false) : \APIFormElement||string|int
get an array of forms elements
recurse | get elements recursively? |
array of {@link APIFormElement}s
None found |
getElementNames() : mixed||string|int
get an array of "name" attributes of form elements
array of form element names
None found |
getElementByName( name) :
get a reference to a {@link APIFormElement} object by its "name"
name | "name" attribute assigned to a {@link APIFormElement} |
reference to a {@link APIFormElement}, false if not found
None found |
setElementValue( name, value) :
Sets the "value" attribute of a form element
name | the "name" attribute of a form element |
|
value | the "value" attribute of a form element |
None found |
setElementValues(mixed||string|int values) :
Sets the "value" attribute of form elements in a batch
mixed||string|int | values | array of name/value pairs to be assigned to form elements |
None found |
getElementValue( name, encode = false) :
Gets the "value" attribute of a form element
name | the "name" attribute of a form element |
|
encode | To sanitizer the text? |
the "value" attribute assigned to a form element, null if not set
None found |
getElementValues( encode = false) : mixed||string|int
gets the "value" attribute of all form elements
encode | To sanitizer the text? |
array of name/value pairs assigned to form elements
None found |
setExtra( extra) :
set the extra attributes for the <form> tag
extra | extra attributes for the |
None found |
setSummary( summary) :
set the summary tag for the <form> tag
summary |
None found |
None found |
setRequired(\APIFormElement formElement) :
make an element "required"
\APIFormElement | formElement | reference to a {@link APIFormElement} |
None found |
getRequired() : mixed||string|int
get an array of "required" form elements
array of {@link APIFormElement}s
None found |
insertBreak( extra = null) :
insert a break in the form
This method is abstract. It must be overwritten in the child classes.
extra | extra information for the break |
None found |
render() :
Renders the form
This method is abstract. It must be overwritten in the child classes.
None found |
None found |
renderValidationJS( withtags = true) :
Renders the Javascript function needed for client-side for validation
Form elements that have been declared "required" and not set will prevent the form from being submitted. Additionally, each element class may provide its own "renderValidationJS" method that is supposed to return custom validation code for the element.
The element validation code can assume that the JS "myform" variable points to the form, and must execute return false if validation fails.
A basic element validation method may contain something like this:
function renderValidationJS() {
$name = $this->getName();
return "if (myform.{$name}.value != 'valid') { " .
"myform.{$name}.focus(); window.alert( '$name is invalid' ); return false;" .
" }";
}
withtags | Include the < javascript > tags in the returned string |
None found |
assign(\APITpl tpl) :
assign to smarty form template instead of displaying directly
\APITpl | tpl | reference to a {@link Smarty} object object |
None found |
addItem( itemId, itemName, itemParent) :
Adds an item to which permission will be assigned
itemId | ||
itemName | ||
itemParent |
None found |
_loadAllChildItemIds( itemId, mixed||string|int childIds) :
Loads all child ids for an item to be used in javascript
itemId | ||
mixed||string|int | childIds |
None found |