Swat/SwatCascadeFlydown.php
protected function &getOptions()
    {
        $options = array();

        // If the parent flydown is empty, set parent_value to a blank string.
        // This will then return any options that exist for a blank parent.
        $parent_value = $this->hasEmptyParent() ? '' : $this->getParentValue();

        // parent_value is null when the parent has multiple options
        if ($parent_value === null) {
            if ($this->cascade_from->show_blank) {
                // select the blank option on the cascade from
                $options = array(
                    new SwatOption('', '&nbsp;'),
                    new SwatOption('', '&nbsp;')
                );
            } else {
                // select the first option on the cascade from
                $from_options = $this->cascade_from->getOptions();
                $first_value = reset($from_options)->value;
                $options = $this->options[$first_value];
            }
        } elseif (isset($this->options[$parent_value])) {
            $options = $this->options[$parent_value];
        } else {
            // if the options array doesn't exist for this parent_value, then
            // assume that means we don't want any values in this flydown for
            // that option.
            $options = array(new SwatOption(null, null));
        }

        return $options;
    }
protected function &getOptions()
    {
        $options = array();

        // If the parent flydown is empty, set parent_value to a blank string.
        // This will then return any options that exist for a blank parent.
        $parent_value = $this->hasEmptyParent() ? '' : $this->getParentValue();

        // parent_value is null when the parent has multiple options
        if ($parent_value === null) {
            if ($this->cascade_from->show_blank) {
                // select the blank option on the cascade from
                $options = array(
                    new SwatOption('', '&nbsp;'),
                    new SwatOption('', '&nbsp;')
                );
            } else {
                // select the first option on the cascade from
                $from_options = $this->cascade_from->getOptions();
                $first_value = reset($from_options)->value;
                $options = $this->options[$first_value];
            }
        } elseif (isset($this->options[$parent_value])) {
            $options = $this->options[$parent_value];
        } else {
            // if the options array doesn't exist for this parent_value, then
            // assume that means we don't want any values in this flydown for
            // that option.
            $options = array(new SwatOption(null, null));
        }

        return $options;
    }
protected function & getOptions ( ) { $ options = array ( ) ; // If the parent flydown is empty, set parent_value to a blank string. // This will then return any options that exist for a blank parent. $ parent_value = $ this -> hasEmptyParent ( ) ? '' : $ this -> getParentValue ( ) ; // parent_value is null when the parent has multiple options if ( $ parent_value === null ) { if ( $ this -> cascade_from -> show_blank ) { // select the blank option on the cascade from $ options = array ( new SwatOption ( '' , '&nbsp;' ) , new SwatOption ( '' , '&nbsp;' ) ) ; } else { // select the first option on the cascade from $ from_options = $ this -> cascade_from -> getOptions ( ) ; $ first_value = reset ( $ from_options ) -> value ; $ options = $ this -> options [ $ first_value ] ; } } elseif ( isset ( $ this -> options [ $ parent_value ] ) ) { $ options = $ this -> options [ $ parent_value ] ; } else { // if the options array doesn't exist for this parent_value, then // assume that means we don't want any values in this flydown for // that option. $ options = array ( new SwatOption ( null , null ) ) ; } return $ options ; }
Gets the options of this flydown as a flat array

For the cascading flydown, the array returned

The array is of the form:
value => title

@return array the options of this flydown as a flat array.

@see SwatFlydown::getOptions()
Gets the options of this flydown as a flat array