protected function _applyOptions(\MUtil_Model_ModelAbstract $model, $fieldName, array $options, array &$itemData)
    {
        if ($options) {
            $model->set($fieldName, 'multiOptions', $options);

            if (! array_key_exists($itemData[$fieldName], $options)) {
                // Set the value to the first possible value
                reset($options);
                $itemData[$fieldName] = key($options);

                return true;
            }
        } else {
            $model->del($fieldName, 'label');
        }
        return false;
    }
protected function _applyOptions(\MUtil_Model_ModelAbstract $model, $fieldName, array $options, array &$itemData)
    {
        if ($options) {
            $model->set($fieldName, 'multiOptions', $options);

            if (! array_key_exists($itemData[$fieldName], $options)) {
                // Set the value to the first possible value
                reset($options);
                $itemData[$fieldName] = key($options);

                return true;
            }
        } else {
            $model->del($fieldName, 'label');
        }
        return false;
    }
protected function _applyOptions ( \ MUtil_Model_ModelAbstract $ model , $ fieldName , array $ options , array & $ itemData ) { if ( $ options ) { $ model -> set ( $ fieldName , 'multiOptions' , $ options ) ; if ( ! array_key_exists ( $ itemData [ $ fieldName ] , $ options ) ) { // Set the value to the first possible value reset ( $ options ) ; $ itemData [ $ fieldName ] = key ( $ options ) ; return true ; } } else { $ model -> del ( $ fieldName , 'label' ) ; } return false ; }
Helper function for default handling of multi options value sets

@param \MUtil_Model_ModelAbstract $model
@param string $fieldName
@param array $options
@param array $itemData    The current items data
@param boolean True if the update changed values (usually by changed selection lists).
Helper function for default handling of multi options value sets