contenido\classes\widgets\class.widgets.switchabledatechooser.php
Description: MySQL Driver for GenericDB
Requirements:
- Author
- Unknown
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- {@internal created $Id: class.widgets.switchabledatechooser.php 738 2008-08-27 10:21:19Z timo.trautmann $: }}
- Package
- Contenido Backend classes
- Version
- 1.0
\cSwitchableDateChooser
- Parent(s)
- \cDateChooser < \cDatefield < \cHTMLTextbox < \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties


$_aEventDefinitions
- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions
- Inherited_from
- \cHTMLTextbox::$$_aEventDefinitions
- Inherited_from
- \cDatefield::$$_aEventDefinitions
- Inherited_from
- \cDateChooser::$$_aEventDefinitions


$_aStyleDefinitions
- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions
- Inherited_from
- \cHTMLTextbox::$$_aStyleDefinitions
- Inherited_from
- \cDatefield::$$_aStyleDefinitions
- Inherited_from
- \cDateChooser::$$_aStyleDefinitions


$_content
- Type
- n/a
- Inherited_from
- \cHTML::$$_content
- Inherited_from
- \cHTMLFormElement::$$_content
- Inherited_from
- \cHTMLTextbox::$$_content
- Inherited_from
- \cDatefield::$$_content
- Inherited_from
- \cDateChooser::$$_content


boolean $_contentlessTag
- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag
- Inherited_from
- \cHTMLTextbox::$$_contentlessTag
- Inherited_from
- \cDatefield::$$_contentlessTag
- Inherited_from
- \cDateChooser::$$_contentlessTag


$_oButton
- Type
- n/a
- Inherited_from
- \cDateChooser::$$_oButton


$_oCalendar
- Type
- n/a
- Inherited_from
- \cDateChooser::$$_oCalendar


$_oImage
- Type
- n/a
- Inherited_from
- \cDateChooser::$$_oImage


array $_requiredScripts
- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts
- Inherited_from
- \cHTMLTextbox::$$_requiredScripts
- Inherited_from
- \cDatefield::$$_requiredScripts
- Inherited_from
- \cDateChooser::$$_requiredScripts


string $_skeleton_close
- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close
- Inherited_from
- \cHTMLTextbox::$$_skeleton_close
- Inherited_from
- \cDatefield::$$_skeleton_close
- Inherited_from
- \cDateChooser::$$_skeleton_close


string $_skeleton_open
- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open
- Inherited_from
- \cHTMLTextbox::$$_skeleton_open
- Inherited_from
- \cDatefield::$$_skeleton_open
- Inherited_from
- \cDateChooser::$$_skeleton_open


string $_skeleton_single
- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single
- Inherited_from
- \cHTMLTextbox::$$_skeleton_single
- Inherited_from
- \cDatefield::$$_skeleton_single
- Inherited_from
- \cDateChooser::$$_skeleton_single


string $_styledefs
- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs
- Inherited_from
- \cHTMLTextbox::$$_styledefs
- Inherited_from
- \cDatefield::$$_styledefs
- Inherited_from
- \cDateChooser::$$_styledefs


string $_tag
- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
- Inherited_from
- \cHTMLTextbox::$$_tag
- Inherited_from
- \cDatefield::$$_tag
- Inherited_from
- \cDateChooser::$$_tag
Methods


__toString() : string
Direct call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLTextbox::__toString()\cDatefield::__toString()\cDateChooser::__toString()Type | Description |
---|---|
string | Generated markup |


_setContent( $content) : void
_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLTextbox::_setContent()\cDatefield::_setContent()\cDateChooser::_setContent()Name | Type | Description |
---|---|---|
$content | string/object String with the content or an object to render. |


addRequiredScript( $script) : void
Name | Type | Description |
---|---|---|
$script |


advanceID() : void
advances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLTextbox::advanceID()\cDatefield::advanceID()\cDateChooser::advanceID()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.


attachEventDefinition( $sName, $sEvent, $sCode) : void
attachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()\cHTMLTextbox::attachEventDefinition()\cDatefield::attachEventDefinition()\cDateChooser::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
Name | Type | Description |
---|---|---|
$sName | string defines the name of the event | |
$sEvent | string defines the event (e.g. onClick) | |
$sCode | string defines the code |


attachStyleDefinition( $sName, $sDefinition) : string
attachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()\cHTMLTextbox::attachStyleDefinition()\cDatefield::attachStyleDefinition()\cDateChooser::attachStyleDefinition()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;"
Name | Type | Description |
---|---|---|
$sName | string Name for a style definition | |
$sDefinition | string Definition for the given entity |
Type | Description |
---|---|
string | filled SGML closing skeleton |


cDateChooser( $name, $initValue = false) : void
Name | Type | Description |
---|---|---|
$name | ||
$initValue |


cDatefield( $name, $initvalue, $width = 10) : void
Name | Type | Description |
---|---|---|
$name | ||
$initvalue | ||
$width |


cHTML() : void
Constructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLTextbox::cHTML()\cDatefield::cHTML()\cDateChooser::cHTML()

cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \none
Constructor.
Inherited from: \cHTMLFormElement::cHTMLFormElement()\cHTMLTextbox::cHTMLFormElement()\cDatefield::cHTMLFormElement()\cDateChooser::cHTMLFormElement()This is a generic form element, where specific elements should be inherited from this class.
Name | Type | Description |
---|---|---|
$name | string Name of the element | |
$id | string ID of the element | |
$disabled | string Item disabled flag (non-empty to set disabled) | |
$tabindex | string Tab index for form elements | |
$accesskey | string Key to access the field |
Type | Description |
---|---|
\none |


cHTMLTextbox( $name, $initvalue = "", $width = "", $maxlength = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "") : \none
Constructor.
Inherited from: \cHTMLTextbox::cHTMLTextbox()\cDatefield::cHTMLTextbox()\cDateChooser::cHTMLTextbox()Creates an HTML text box.
If no additional parameters are specified, the default width is 20 units.
Name | Type | Description |
---|---|---|
$name | string Name of the element | |
$initvalue | string Initial value of the box | |
$width | int width of the text box | |
$maxlength | int maximum input length of the box | |
$id | string ID of the element | |
$disabled | string Item disabled flag (non-empty to set disabled) | |
$tabindex | string Tab index for form elements | |
$accesskey | string Key to access the field |
Type | Description |
---|---|
\none |


cSwitchableDateChooser( $name, $initValue = false) : void
Name | Type | Description |
---|---|---|
$name | ||
$initValue |


fillCloseSkeleton() : string
fillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLTextbox::fillCloseSkeleton()\cDatefield::fillCloseSkeleton()\cDateChooser::fillCloseSkeleton()Type | Description |
---|---|
string | filled SGML closer skeleton |


fillSkeleton( $attributes) : string
fillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()\cHTMLTextbox::fillSkeleton()\cDatefield::fillSkeleton()\cDateChooser::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
Name | Type | Description |
---|---|---|
$attributes | string Attributes to set |
Type | Description |
---|---|
string | filled SGML opener skeleton |


getID() : string
getID: returns the current ID
Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLTextbox::getID()\cDatefield::getID()\cDateChooser::getID()Type | Description |
---|---|
string | current ID |


setAccessKey( $accesskey) : \none
sets the access key for this element.
Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLTextbox::setAccessKey()\cDatefield::setAccessKey()\cDateChooser::setAccessKey()Name | Type | Description |
---|---|---|
$accesskey | string The length of the access key. May be A-Z and 0-9. |
Type | Description |
---|---|
\none |


setAlt( $alt) : void
setAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLTextbox::setAlt()\cDatefield::setAlt()\cDateChooser::setAlt()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.
Name | Type | Description |
---|---|---|
$alt | string Text to set as the "alt" attribute |


setAttribute( $sAttributeName, $sValue) : void
setAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLTextbox::setAttribute()\cDatefield::setAttribute()\cDateChooser::setAttribute()Name | Type | Description |
---|---|---|
$sAttributeName | string Name of the attribute | |
$sValue | string Value of the attribute |


setClass( $class) : void
sets the CSS class
Inherited from: \cHTML::setClass()\cHTMLFormElement::setClass()\cHTMLTextbox::setClass()\cDatefield::setClass()\cDateChooser::setClass()Name | Type | Description |
---|---|---|
$class | string Text to set as the "alt" attribute |


setContentlessTag( $contentlessTag = true) : void
Name | Type | Description |
---|---|---|
$contentlessTag |


setDisabled( $disabled) : \none
Sets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()\cHTMLTextbox::setDisabled()\cDatefield::setDisabled()\cDateChooser::setDisabled()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.
Name | Type | Description |
---|---|---|
$disabled | string Sets the disabled-flag if non-empty |
Type | Description |
---|---|
\none |


setEvent( $event, $action) : void
adds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLTextbox::setEvent()\cDatefield::setEvent()\cDateChooser::setEvent()example: $item->setEvent("change","document.forms[0].submit");
Name | Type | Description |
---|---|---|
$event | string Type of the event | |
$action | string Function or action to call (JavaScript Code) |


setGenerateXHTML(bool $value) : void
Setter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLTextbox::setGenerateXHTML()\cDatefield::setGenerateXHTML()\cDateChooser::setGenerateXHTML()Name | Type | Description |
---|---|---|
$value | bool |


setID( $id) : void
sets the ID class
Inherited from: \cHTML::setID()\cHTMLFormElement::setID()\cHTMLTextbox::setID()\cDatefield::setID()\cDateChooser::setID()Name | Type | Description |
---|---|---|
$id |


setMaxLength( $maxlen) : \none
sets the maximum input length of the text box.
Inherited from: \cHTMLTextbox::setMaxLength()\cDatefield::setMaxLength()\cDateChooser::setMaxLength()Name | Type | Description |
---|---|---|
$maxlen | int maximum input length |
Type | Description |
---|---|
\none |


setReadOnly( $bReadOnly = true) : void
Name | Type | Description |
---|---|---|
$bReadOnly |


setSelectsToHide( $aSelectIDs) : void
Name | Type | Description |
---|---|---|
$aSelectIDs |


setStyle( $style) : void
sets the CSS style
Inherited from: \cHTML::setStyle()\cHTMLFormElement::setStyle()\cHTMLTextbox::setStyle()\cDatefield::setStyle()\cDateChooser::setStyle()Name | Type | Description |
---|---|---|
$style |


setStyleDefinition( $entity, $definition) : string
addStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()\cHTMLTextbox::setStyleDefinition()\cDatefield::setStyleDefinition()\cDateChooser::setStyleDefinition()Name | Type | Description |
---|---|---|
$entity | string Entity to define | |
$definition | string Definition for the given entity |
Type | Description |
---|---|
string | filled SGML closing skeleton |


setTabindex( $tabindex) : \none
sets the tab index for this element.
Inherited from: \cHTMLFormElement::setTabindex()\cHTMLTextbox::setTabindex()\cDatefield::setTabindex()\cDateChooser::setTabindex()The tab index needs to be numeric, bigger than 0 and smaller than 32767.
Name | Type | Description |
---|---|---|
$tabindex | int desired tab index |
Type | Description |
---|---|
\none |


setValue( $value) : \none
sets the initial value of the text box.
Inherited from: \cHTMLTextbox::setValue()\cDatefield::setValue()\cDateChooser::setValue()Name | Type | Description |
---|---|---|
$value | string Initial value |
Type | Description |
---|---|
\none |


setWidth( $width) : \none
sets the width of the text box.
Inherited from: \cHTMLTextbox::setWidth()\cDatefield::setWidth()\cDateChooser::setWidth()Name | Type | Description |
---|---|---|
$width | int width of the text box |
Type | Description |
---|---|
\none |


toHTML() : void
Renders the output If the tag
Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLTextbox::toHTML()\cDatefield::toHTML()\cDateChooser::toHTML()

toHtml() : string
Renders the textbox
Inherited from: \cHTMLTextbox::toHtml()\cDatefield::toHtml()\cDateChooser::toHtml()Type | Description |
---|---|
string | Rendered HTML |


unsetEvent( $event) : void
removes an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()\cHTMLTextbox::unsetEvent()\cDatefield::unsetEvent()\cDateChooser::unsetEvent()example: $item->unsetEvent("change");
Name | Type | Description |
---|---|---|
$event | string Type of the event |