Swat/SwatContainer.php
public function setDescendantStates(array $states)
    {
        foreach ($this->getDescendants('SwatState') as $id => $object) {
            if (isset($states[$id])) {
                $object->setState($states[$id]);
            }
        }
    }
public function setDescendantStates(array $states)
    {
        foreach ($this->getDescendants('SwatState') as $id => $object) {
            if (isset($states[$id])) {
                $object->setState($states[$id]);
            }
        }
    }
public function setDescendantStates ( array $ states ) { foreach ( $ this -> getDescendants ( 'SwatState' ) as $ id => $ object ) { if ( isset ( $ states [ $ id ] ) ) { $ object -> setState ( $ states [ $ id ] ) ; } } }
Sets descendant states

Sets states on all stateful UI-objects in the widget subtree below this
container.

@param array $states an array of UI-object states with UI-object
identifiers as array keys.
Sets descendant states