Class WFRadio

Description

A Radio Button widget for our framework.

Radio buttons are a set of 1 or more items that are mutually exclusive. They are similar in logic to a popup menu where only one item can be selected. Typically, NULL selection is not allowed.

Unlike a popup menu, however, each choice is represented by a distinct radio button.

For Phocoa, we implement this by creating whichever radio buttons are desired, and making them part of a WFRadioGroup, which acts as the interface to the selected radio button.

PHOCOA Builder Setup:

Required:

Optional:
NOTE: The "value" property is not really used for WFRadio... that instead is handled by the WFRadioGroup.

Located in /framework/widgets/WFRadio.php (line 32)

WFObject
   |
   --WFView
      |
      --WFWidget
         |
         --WFRadio
Variable Summary
string $label
boolean $selected
Method Summary
static void exposedProperties ()
WFRadio __construct ( $id,  $page)
void label ()
void render ([ $blockContent = NULL])
void restoreState ()
void selected ()
void selectedValue ()
void setLabel ( $label)
void setSelected ( $selected)
void setSelectedValue ( $v)
void setValue ( $v)
Variables
string $label (line 45)
  • var: The label to show next to the radio. This will be shown to the RIGHT of the radio, and will use the HTML <label> tag to link the radio to the label.
  • access: protected
boolean $selected (line 37)
  • var: Whether or not the radio is selected.
  • access: protected
string $selectedValue (line 41)
  • var: The value of the radio field when it's selected.
  • access: protected

Inherited Variables

Inherited from WFWidget

WFWidget::$bindings
WFWidget::$class
WFWidget::$errors
WFWidget::$formatter
WFWidget::$hasRestoredState
WFWidget::$hidden
WFWidget::$name
WFWidget::$value
WFWidget::$widgetLabel

Inherited from WFView

WFView::$children
WFView::$cssImports
WFView::$enabled
WFView::$id
WFView::$importInHead
WFView::$jsActions
WFView::$jsEvents
WFView::$jsImports
WFView::$page
WFView::$parent
Methods
static method exposedProperties (line 58)
  • access: public
static void exposedProperties ()

Redefinition of:
WFWidget::exposedProperties()
Constructor __construct (line 50)

Constructor.

WFRadio __construct ( $id,  $page)
  • $id
  • $page

Redefinition of:
WFWidget::__construct()
Constructor.
allConfigFinishedLoading (line 130)

A WFRadio can only determine if it's the selected one after all of its config has been loaded.

void allConfigFinishedLoading ()

Redefinition of:
WFView::allConfigFinishedLoading()
After WFPage has completed the loading of all config for all widgets, it will call this function on each widget.
canPushValueBinding (line 155)
void canPushValueBinding ()

Redefinition of:
WFWidget::canPushValueBinding()
Does this widget use the "value" binding to WRITE data back to the bindings?
label (line 92)
void label ()
render (line 136)
void render ([ $blockContent = NULL])
  • $blockContent

Redefinition of:
WFView::render()
Render the view into HTML.
restoreState (line 113)
void restoreState ()

Redefinition of:
WFWidget::restoreState()
Restore the UI state of this widget from the $_REQUEST data.
selected (line 77)
void selected ()
selectedValue (line 72)
void selectedValue ()
setLabel (line 97)
void setLabel ( $label)
  • $label
setSelected (line 82)
void setSelected ( $selected)
  • $selected
setSelectedValue (line 68)
void setSelectedValue ( $v)
  • $v
setupExposedBindings (line 102)
void setupExposedBindings ()

Redefinition of:
WFWidget::setupExposedBindings()
Set up all exposed bindings for this widget.
setValue (line 87)
void setValue ( $v)
  • $v

Redefinition of:
WFWidget::setValue()
Set the value used by the widget.

Inherited Methods

Inherited From WFWidget

WFWidget::__construct()
WFWidget::addError()
WFWidget::bind()
WFWidget::bindingByName()
WFWidget::bindings()
WFWidget::canPushValueBinding()
WFWidget::errors()
WFWidget::exposedBindings()
WFWidget::exposedProperties()
WFWidget::formattedValue()
WFWidget::formatter()
WFWidget::hasRestoredState()
WFWidget::hidden()
WFWidget::name()
WFWidget::processBindingOptions()
WFWidget::propagateValueToBinding()
WFWidget::pullBindings()
WFWidget::pushBindings()
WFWidget::restoreState()
WFWidget::setFormatter()
WFWidget::setHidden()
WFWidget::setName()
WFWidget::setupExposedBindings()
WFWidget::setValue()
WFWidget::setWidgetLabel()
WFWidget::unbind()
WFWidget::value()
WFWidget::valueForBinding()
WFWidget::widgetLabel()

Inherited From WFView

WFView::__construct()
WFView::addChild()
WFView::allConfigFinishedLoading()
WFView::children()
WFView::cloneWithID()
WFView::enabled()
WFView::exposedProperties()
WFView::getForm()
WFView::getJSActions()
WFView::getListenerJS()
WFView::getListenerJSInScriptTag()
WFView::getWidgetDir()
WFView::getWidgetWWWDir()
WFView::id()
WFView::importCSS()
WFView::importJS()
WFView::jsEndHTML()
WFView::jsStartHTML()
WFView::page()
WFView::parent()
WFView::removeChild()
WFView::render()
WFView::setEnabled()
WFView::setId()
WFView::setJSonBlur()
WFView::setJSonClick()
WFView::setListener()
WFView::setOnEvent()
WFView::setParent()
WFView::yuiPath()

Inherited From WFObject

WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()

Documentation generated on Thu, 07 Aug 2008 10:36:57 -0400 by phpDocumentor 1.4.1