Class WFCheckboxGroup

Description

The WFCheckboxGroup is the "interface" object used to interact with a set of WFCheckbox widgets.

When setting up a WFCheckboxGroup, all of the WFCheckboxes that are part of the group should be set up as children of the WFCheckboxGroup.

PHOCOA Builder Setup:

Optional:

  • values The values of the selected WFCheckboxes. Remember these should match the checkedValue of the checkboxes. Also note that arrays cannot be set up in PHOCOA Builder at this time, so you'll have to set up an array in the module and set the values to the module's var:
    1.      protected $checkboxGroupDefaultSelections array(1,3);
In PHOCOA builder, set the value of the "values" property to "#module#checkboxGroupDefaultSelections".

  • todo: UPDATE with WFDynamic support a la WFRadioGroup. Actuallym look at both methods (WFSelectionCheckbox vs. WFRadioGroup+WFDynamic) and see if there's any real difference.
  • todo: HMM.. I think WFCheckboxGroup already works just like WFRadioGroup.... need to check it out and document. Make the interface consistent for both widget types.

Located in /framework/widgets/WFCheckboxGroup.php (line 29)

WFObject
   |
   --WFView
      |
      --WFWidget
         |
         --WFCheckboxGroup
Variable Summary
array $values
Method Summary
WFCheckboxGroup __construct ( $id,  $page)
void pushBindings ()
void render ([ $blockContent = NULL])
void restoreState ()
void setValues (mixed $vals)
Variables
Methods
Constructor __construct (line 39)

Constructor.

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

Redefinition of:
WFWidget::__construct()
Constructor.
allConfigFinishedLoading (line 105)
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 129)
void canPushValueBinding ()

Redefinition of:
WFWidget::canPushValueBinding()
Does this widget use the "value" binding to WRITE data back to the bindings?
pushBindings (line 131)
void pushBindings ()

Redefinition of:
WFWidget::pushBindings()
Each widget should implement this callback if there are any bindable properties whose values are to be propagated back to the bound objects.
render (line 124)
void render ([ $blockContent = NULL])
  • $blockContent

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

Redefinition of:
WFWidget::restoreState()
Restore the UI state of this widget from the $_REQUEST data.
setupExposedBindings (line 45)
void setupExposedBindings ()

Redefinition of:
WFWidget::setupExposedBindings()
Set up all exposed bindings for this widget.
setValues (line 59)

Set which checkbox in this group is selected.

The way this works is to unselect ALL managed WFCheckbox's, and just select the one whose WFCheckbox::$selectedValue matches the passed value.

void setValues (mixed $vals)
  • mixed $vals: The value of the WFCheckbox (selectedValue) which should be selected.
updateGroupValues (line 82)

Update the value of the selected checkboxes managed by this checkbox group, based on the values of the child WFCheckboxs.

The value for the WFCheckboxGroup is an array of the checkedValue of the all selected checkboxes, or an empty array if there is are none.

void updateGroupValues ()
updateSelectedCheckboxes (line 100)

Update the selected state of all child WFCheckboxs... select those that match the WFCheckboxGroup's values.

void updateSelectedCheckboxes ()

Inherited Methods

Inherited From WFWidget

WFWidget::__construct()
WFWidget::addError()
WFWidget::addErrors()
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::getOnEvent()
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::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()

Documentation generated on Thu, 14 May 2009 16:19:51 -0400 by phpDocumentor 1.4.2