original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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).
docstring_tokens: Helper function for default handling of multi options value sets