Select box with additional functions for category and article selection
package | CONTENIDO Frontend |
---|---|
subpackage | Input Helper |
__construct(string $sName, int $iWidth, string $sID, string $bDisabled, int $iTabIndex, $sAccessKey) : \none
Creates an HTML select field (aka "DropDown").
string
Name of the element
int
Width of the select element
string
ID of the element
string
Item disabled flag (non-empty to set disabled)
int
Tab index for form elements
\none
__toString() : string
inherited_from | \cHTML::__toString() |
---|---|
inherited_from | \cHTMLFormElement::__toString() |
inherited_from | \cHTMLSelectElement::__toString() |
string
Generated markupaddArticles(int $iIDCat, bool $bColored, bool $bArtOnline, string $sSpaces) : int
Adds articles to select box values.
int
idcat of the category to be listed
bool
Add color information to option elements
bool
If true, only online articles will be added
string
Just some "" to show data hierarchically (used in conjunction with addCategories)
int
Number of items addedaddCategories(int $iMaxLevel, bool $bColored, bool $bCatVisible, bool $bCatPublic, bool $bWithArt, bool $bArtOnline) : int
Adds category elements (optionally including articles) to select box values. Note: Using "with articles" adds the articles also - but the categories will get a negative value! There is no way to distinguish between a category id and an article id...
int
Max. level shown (to be exact: except this level)
bool
Add color information to option elements
bool
If true, only add idcat as value, if cat is visible
bool
If true, only add idcat as value, if cat is public
bool
Add also articles per category
bool
If true, show only online articles
int
Number of items addedaddOptionElement(string $index, \cHTMLOptionElement $element) : \cHTMLSelectElement
inherited_from | \cHTMLSelectElement::addOptionElement() |
---|
string
Index of the element
\cHTMLSelectElement
$thisaddRequiredScript(string $script) : \cHTML
Anyway, scripts are not included twice.
inherited_from | \cHTML::addRequiredScript() |
---|---|
inherited_from | \cHTMLFormElement::addRequiredScript() |
inherited_from | \cHTMLSelectElement::addRequiredScript() |
string
the script to include
\cHTML
$thisaddTypesFromArt(int $iIDCatArt, string $sTypeRange) : int
Adds types and type ids which are available for the specified article
int
Article id
string
Komma separated list of CONTENIDO type ids which may be in the resulting list (e.g. '1','17','28')
int
Number of items addedadvanceID() : \cHTML
This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.
inherited_from | \cHTML::advanceID() |
---|---|
inherited_from | \cHTMLFormElement::advanceID() |
inherited_from | \cHTMLSelectElement::advanceID() |
\cHTML
$thisappendOptionElement(\cHTMLOptionElement $element) : \cHTMLSelectElement
inherited_from | \cHTMLSelectElement::appendOptionElement() |
---|
\cHTMLSelectElement
$thisappendStyleDefinition(string $property, string $value) : \cHTML
Example usage: $element->appendStyleDefinition('margin', '5px');
inherited_from | \cHTML::appendStyleDefinition() |
---|---|
inherited_from | \cHTMLFormElement::appendStyleDefinition() |
inherited_from | \cHTMLSelectElement::appendStyleDefinition() |
string
the property name, e.g. 'margin'
string
the value of the property, e.g. '5px'
\cHTML
$thisappendStyleDefinitions(array $styles) : \cHTML
Example usage: $element->appendStyleDefinitions(array( 'margin' => '5px', 'padding' => '0' ));
inherited_from | \cHTML::appendStyleDefinitions() |
---|---|
inherited_from | \cHTMLFormElement::appendStyleDefinitions() |
inherited_from | \cHTMLSelectElement::appendStyleDefinitions() |
string
the styles to append
\cHTML
$thisattachEventDefinition(string $name, string $event, string $code) : \cHTML
Example to attach an onClick handler: attachEventDefinition('foo', 'onClick', 'alert("foo");');
inherited_from | \cHTML::attachEventDefinition() |
---|---|
inherited_from | \cHTMLFormElement::attachEventDefinition() |
inherited_from | \cHTMLSelectElement::attachEventDefinition() |
string
Defines the name of the event
string
Defines the event (e.g. onClick)
string
Defines the code
\cHTML
$thisattachStyleDefinition(string $name, string $definition) : \cHTML
This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle('myIdentifier', 'border: 1px solid black; white-space: nowrap'); $example->attachStyle('myIdentifier2', 'padding: 0px');
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
inherited_from | \cHTML::attachStyleDefinition() |
---|---|
inherited_from | \cHTMLFormElement::attachStyleDefinition() |
inherited_from | \cHTMLSelectElement::attachStyleDefinition() |
string
Name for a style definition
string
Definition for the given entity
\cHTML
$thisautoFill(array $stuff) : \cHTMLSelectElement
Array format: $stuff = array( array('value', 'title'), array('value', 'title') );
or regular key => value arrays: $stuff = array( 'value' => 'title', 'value' => 'title' );
inherited_from | \cHTMLSelectElement::autoFill() |
---|
array
Array with all items
\cHTMLSelectElement
$thiscHTML()
inherited_from | \cHTML::cHTML() |
---|---|
inherited_from | \cHTMLFormElement::cHTML() |
inherited_from | \cHTMLSelectElement::cHTML() |
cHTMLFormElement($name, $id, $disabled, $tabindex, $accesskey, $class)
inherited_from | \cHTMLFormElement::cHTMLFormElement() |
---|---|
inherited_from | \cHTMLSelectElement::cHTMLFormElement() |
cHTMLInputSelectElement($sName, $iWidth, $sID, $bDisabled, $iTabIndex, $sAccessKey)
deprecated | 2012-08-24 Use __construct() |
---|
cHTMLSelectElement($name, $width, $id, $disabled, $tabindex, $accesskey)
inherited_from | \cHTMLSelectElement::cHTMLSelectElement() |
---|
display()
inherited_from | \cHTML::display() |
---|---|
inherited_from | \cHTMLFormElement::display() |
inherited_from | \cHTMLSelectElement::display() |
fillCloseSkeleton() : string
inherited_from | \cHTML::fillCloseSkeleton() |
---|---|
inherited_from | \cHTMLFormElement::fillCloseSkeleton() |
inherited_from | \cHTMLSelectElement::fillCloseSkeleton() |
string
filled SGML closer skeletonfillSkeleton(string $attributes) : string
fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
inherited_from | \cHTML::fillSkeleton() |
---|---|
inherited_from | \cHTMLFormElement::fillSkeleton() |
inherited_from | \cHTMLSelectElement::fillSkeleton() |
string
Attributes to set
string
filled SGML opener skeletongetAttribute(string $attributeName) : string
inherited_from | \cHTML::getAttribute() |
---|---|
inherited_from | \cHTMLFormElement::getAttribute() |
inherited_from | \cHTMLSelectElement::getAttribute() |
string
Attribute name
string
null value or null if the attribute does not
existgetAttributes(bool $returnAsString) : array
inherited_from | \cHTML::getAttributes() |
---|---|
inherited_from | \cHTMLFormElement::getAttributes() |
inherited_from | \cHTMLSelectElement::getAttributes() |
bool
Whether to return the attributes as string
array
stringgetDefault() : string
inherited_from | \cHTMLSelectElement::getDefault() |
---|
string
bool "lvalue" or falsegetID() : string
inherited_from | \cHTML::getID() |
---|---|
inherited_from | \cHTMLFormElement::getID() |
inherited_from | \cHTMLSelectElement::getID() |
string
current IDremoveAttribute(string $attributeName) : \cHTML
inherited_from | \cHTML::removeAttribute() |
---|---|
inherited_from | \cHTMLFormElement::removeAttribute() |
inherited_from | \cHTMLSelectElement::removeAttribute() |
string
Attribute name
\cHTML
$thisrender() : string
inherited_from | \cHTML::render() |
---|---|
inherited_from | \cHTMLFormElement::render() |
inherited_from | \cHTMLSelectElement::render() |
string
Generated markupsetAccessKey(string $accesskey) : \cHTMLFormElement
inherited_from | \cHTMLFormElement::setAccessKey() |
---|---|
inherited_from | \cHTMLSelectElement::setAccessKey() |
string
The length of the access key. May be A-Z and 0-9.
\cHTMLFormElement
$thissetAlt(string $alt) : \cHTML
Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
inherited_from | \cHTML::setAlt() |
---|---|
inherited_from | \cHTMLFormElement::setAlt() |
inherited_from | \cHTMLSelectElement::setAlt() |
string
Text to set as the "alt" and "title" attribute
\cHTML
$thissetAttribute(string $attributeName, string $value) : \cHTML
inherited_from | \cHTML::setAttribute() |
---|---|
inherited_from | \cHTMLFormElement::setAttribute() |
inherited_from | \cHTMLSelectElement::setAttribute() |
string
Name of the attribute
string
Value of the attribute
\cHTML
$thissetAttributes(array $attributes) : \cHTML
inherited_from | \cHTML::setAttributes() |
---|---|
inherited_from | \cHTMLFormElement::setAttributes() |
inherited_from | \cHTMLSelectElement::setAttributes() |
array
Associative array with attributes
\cHTML
$thissetClass(string $class) : \cHTML
inherited_from | \cHTML::setClass() |
---|---|
inherited_from | \cHTMLFormElement::setClass() |
inherited_from | \cHTMLSelectElement::setClass() |
string
Text to set as the "class" attribute
\cHTML
$thissetContentlessTag(bool $contentlessTag) : \cHTML
inherited_from | \cHTML::setContentlessTag() |
---|---|
inherited_from | \cHTMLFormElement::setContentlessTag() |
inherited_from | \cHTMLSelectElement::setContentlessTag() |
bool
\cHTML
$thissetDefault(string $lvalue) : \cHTMLSelectElement
inherited_from | \cHTMLSelectElement::setDefault() |
---|
string
Specifies the "value" of the cHTMLOptionElement to set
\cHTMLSelectElement
$thissetDisabled(string $disabled) : \cHTMLFormElement
User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled('disabled'); $obj->setDisabled('');
The first example sets the disabled flag, the second one removes the disabled flag.
inherited_from | \cHTMLFormElement::setDisabled() |
---|---|
inherited_from | \cHTMLSelectElement::setDisabled() |
string
Sets the disabled-flag if non-empty
\cHTMLFormElement
$thissetEvent(string $event, string $action) : \cHTML
example: $item->setEvent('change','document.forms[0].submit');
inherited_from | \cHTML::setEvent() |
---|---|
inherited_from | \cHTMLFormElement::setEvent() |
inherited_from | \cHTMLSelectElement::setEvent() |
string
Type of the event, e. g. "change" for "onchange"
string
Function or action to call (JavaScript Code)
\cHTML
$thissetGenerateXHTML(bool $value)
inherited_from | \cHTML::setGenerateXHTML() |
---|---|
inherited_from | \cHTMLFormElement::setGenerateXHTML() |
inherited_from | \cHTMLSelectElement::setGenerateXHTML() |
bool
setID(string $id) : \cHTML
inherited_from | \cHTML::setID() |
---|---|
inherited_from | \cHTMLFormElement::setID() |
inherited_from | \cHTMLSelectElement::setID() |
string
Text to set as the "id"
\cHTML
$thissetMultiselect() : \cHTMLSelectElement
setSelected(array $aElements) : \none
array
Array with "values" of the cHTMLOptionElement to set
\none
setStyle(string $style) : \cHTML
inherited_from | \cHTML::setStyle() |
---|---|
inherited_from | \cHTMLFormElement::setStyle() |
inherited_from | \cHTMLSelectElement::setStyle() |
string
Text to set as the "style" attribute
\cHTML
$thissetStyleDefinition(string $entity, string $definition) : \cHTML
inherited_from | \cHTML::setStyleDefinition() |
---|---|
inherited_from | \cHTMLFormElement::setStyleDefinition() |
inherited_from | \cHTMLSelectElement::setStyleDefinition() |
string
Entity to define
string
Definition for the given entity
\cHTML
$thissetTabindex(int $tabindex) : \cHTMLFormElement
The tab index needs to be numeric, bigger than 0 and smaller than 32767.
inherited_from | \cHTMLFormElement::setTabindex() |
---|---|
inherited_from | \cHTMLSelectElement::setTabindex() |
int
Desired tab index
\cHTMLFormElement
$thissetTag(string $tag) : \cHTML
inherited_from | \cHTML::setTag() |
---|---|
inherited_from | \cHTMLFormElement::setTag() |
inherited_from | \cHTMLSelectElement::setTag() |
string
The new tag
\cHTML
$thistoHTML() : string
inherited_from | \cHTML::toHTML() |
---|---|
inherited_from | \cHTMLFormElement::toHTML() |
inherited_from | \cHTMLSelectElement::toHTML() |
string
Generated markuptoHtml() : string
inherited_from | \cHTMLSelectElement::toHtml() |
---|
string
Rendered HTMLunsetEvent(string $event) : \cHTML
example: $item->unsetEvent('change');
inherited_from | \cHTML::unsetEvent() |
---|---|
inherited_from | \cHTMLFormElement::unsetEvent() |
inherited_from | \cHTMLSelectElement::unsetEvent() |
string
Type of the event
\cHTML
$thisupdateAttribute(string $name, string $value) : \cHTML
inherited_from | \cHTML::updateAttribute() |
---|---|
inherited_from | \cHTMLFormElement::updateAttribute() |
inherited_from | \cHTMLSelectElement::updateAttribute() |
string
the name of the attribute
string
the value of the attribute with the given name
\cHTML
$thisupdateAttributes(array $attributes) : \cHTML
inherited_from | \cHTML::updateAttributes() |
---|---|
inherited_from | \cHTMLFormElement::updateAttributes() |
inherited_from | \cHTMLSelectElement::updateAttributes() |
array
Associative array with attributes
\cHTML
$this_appendContent(string | object | array $content) : \cHTML
inherited_from | \cHTML::_appendContent() |
---|---|
inherited_from | \cHTMLFormElement::_appendContent() |
inherited_from | \cHTMLSelectElement::_appendContent() |
string
object
array
String with the content or an object to render or an array of strings/objects.
\cHTML
$this_getAttrString(array $attributes) : string
inherited_from | \cHTML::_getAttrString() |
---|---|
inherited_from | \cHTMLFormElement::_getAttrString() |
inherited_from | \cHTMLSelectElement::_getAttrString() |
array
Associative array with attributes
string
Attribute string in HTML format_parseAttributes(array $attributes) : array
inherited_from | \cHTML::_parseAttributes() |
---|---|
inherited_from | \cHTMLFormElement::_parseAttributes() |
inherited_from | \cHTMLSelectElement::_parseAttributes() |
array
Associative array with attributes
array
the parsed attributes_setContent(string | object | array $content) : \cHTML
inherited_from | \cHTML::_setContent() |
---|---|
inherited_from | \cHTMLFormElement::_setContent() |
inherited_from | \cHTMLSelectElement::_setContent() |
string
object
array
String with the content or a cHTML object to render or an array of strings / objects.
\cHTML
$this$_attributes : array
inherited_from | \cHTML::$$_attributes |
---|---|
inherited_from | \cHTMLFormElement::$$_attributes |
inherited_from | \cHTMLSelectElement::$$_attributes |
$_content : string
inherited_from | \cHTML::$$_content |
---|---|
inherited_from | \cHTMLFormElement::$$_content |
inherited_from | \cHTMLSelectElement::$$_content |
$_contentlessTag : bool
inherited_from | \cHTML::$$_contentlessTag |
---|---|
inherited_from | \cHTMLFormElement::$$_contentlessTag |
inherited_from | \cHTMLSelectElement::$$_contentlessTag |
$_eventDefinitions : array
inherited_from | \cHTML::$$_eventDefinitions |
---|---|
inherited_from | \cHTMLFormElement::$$_eventDefinitions |
inherited_from | \cHTMLSelectElement::$$_eventDefinitions |
$_generateXHTML : bool
inherited_from | \cHTML::$$_generateXHTML |
---|---|
inherited_from | \cHTMLFormElement::$$_generateXHTML |
inherited_from | \cHTMLSelectElement::$$_generateXHTML |
$_idCounter : int
inherited_from | \cHTML::$$_idCounter |
---|---|
inherited_from | \cHTMLFormElement::$$_idCounter |
inherited_from | \cHTMLSelectElement::$$_idCounter |
$_requiredScripts : array
inherited_from | \cHTML::$$_requiredScripts |
---|---|
inherited_from | \cHTMLFormElement::$$_requiredScripts |
inherited_from | \cHTMLSelectElement::$$_requiredScripts |
$_skeletonClose : string
inherited_from | \cHTML::$$_skeletonClose |
---|---|
inherited_from | \cHTMLFormElement::$$_skeletonClose |
inherited_from | \cHTMLSelectElement::$$_skeletonClose |
$_skeletonOpen : string
inherited_from | \cHTML::$$_skeletonOpen |
---|---|
inherited_from | \cHTMLFormElement::$$_skeletonOpen |
inherited_from | \cHTMLSelectElement::$$_skeletonOpen |
$_skeletonSingle : string
inherited_from | \cHTML::$$_skeletonSingle |
---|---|
inherited_from | \cHTMLFormElement::$$_skeletonSingle |
inherited_from | \cHTMLSelectElement::$$_skeletonSingle |
$_styleDefinitions : array
inherited_from | \cHTML::$$_styleDefinitions |
---|---|
inherited_from | \cHTMLFormElement::$$_styleDefinitions |
inherited_from | \cHTMLSelectElement::$$_styleDefinitions |
$_styleDefs : array
inherited_from | \cHTML::$$_styleDefs |
---|---|
inherited_from | \cHTMLFormElement::$$_styleDefs |
inherited_from | \cHTMLSelectElement::$$_styleDefs |
$_tag : string
inherited_from | \cHTML::$$_tag |
---|---|
inherited_from | \cHTMLFormElement::$$_tag |
inherited_from | \cHTMLSelectElement::$$_tag |