Swat/SwatOptionControl.php
public function removeOptionsByValue($value)
    {
        $removed_options = array();

        foreach ($this->options as $key => $control_option) {
            if ($control_option->value === $value) {
                $removed_options[] = $control_option;

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

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

        return $removed_options;
    }
public function removeOptionsByValue($value)
    {
        $removed_options = array();

        foreach ($this->options as $key => $control_option) {
            if ($control_option->value === $value) {
                $removed_options[] = $control_option;

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

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

        return $removed_options;
    }
public function removeOptionsByValue ( $ value ) { $ removed_options = array ( ) ; foreach ( $ this -> options as $ key => $ control_option ) { if ( $ control_option -> value === $ value ) { $ removed_options [ ] = $ control_option ; // remove from options list unset ( $ this -> options [ $ key ] ) ; // remove metadata $ metadata_key = $ this -> getOptionMetadataKey ( $ control_option ) ; unset ( $ this -> option_metadata [ $ metadata_key ] ) ; } } return $ removed_options ; }
Removes options from this option control by their value

@param mixed $value the value of the option or options to remove.

@return array an array of removed SwatOption objects or an empty array
if no options are removed.
Removes options from this option control by their value