Swat/SwatOptionControl.php
public function removeOption(SwatOption $option)
    {
        $removed_option = null;

        foreach ($this->options as $key => $control_option) {
            if ($control_option === $option) {
                $removed_option = $control_option;

                // remove from options list
                unset($this->options[$key]);

                // remove metadata
                $key = $this->getOptionMetadataKey($control_option);
                unset($this->option_metadata[$key]);
            }
        }

        return $removed_option;
    }
public function removeOption(SwatOption $option)
    {
        $removed_option = null;

        foreach ($this->options as $key => $control_option) {
            if ($control_option === $option) {
                $removed_option = $control_option;

                // remove from options list
                unset($this->options[$key]);

                // remove metadata
                $key = $this->getOptionMetadataKey($control_option);
                unset($this->option_metadata[$key]);
            }
        }

        return $removed_option;
    }
public function removeOption ( SwatOption $ option ) { $ removed_option = null ; foreach ( $ this -> options as $ key => $ control_option ) { if ( $ control_option === $ option ) { $ removed_option = $ control_option ; // remove from options list unset ( $ this -> options [ $ key ] ) ; // remove metadata $ key = $ this -> getOptionMetadataKey ( $ control_option ) ; unset ( $ this -> option_metadata [ $ key ] ) ; } } return $ removed_option ; }
Removes an option from this option control

@param SwatOption $option the option to remove.

@return SwatOption the removed option or null if no option was removed.
Removes an option from this option control