original_string: protected function setFieldValue( $field, $fieldPostName )
      {
          $user = eZUser::currentUser();
          switch ( $field )
          {
              case 'email':
                  if( !$user->isAnonymous() )
                  {
                      $this->fieldValues[$field] = $user->attribute( 'email' );
                  }
                  else
                  {
                      parent::setFieldValue( $field, $fieldPostName );
                  }
                  break;
              case 'notificationField':
                  $http = eZHTTPTool::instance();
                  $notification = false;
                  if( $http->hasPostVariable( $fieldPostName ) && $http->postVariable( $fieldPostName ) == '1')
                  {
                      $notification = true;
                  }
                  $this->fieldValues[$field] = $notification;
                  break;
              default:
                  parent::setFieldValue( $field, $fieldPostName );
                  break;
          }
      }
code: protected function setFieldValue( $field, $fieldPostName )
      {
          $user = eZUser::currentUser();
          switch ( $field )
          {
              case 'email':
                  if( !$user->isAnonymous() )
                  {
                      $this->fieldValues[$field] = $user->attribute( 'email' );
                  }
                  else
                  {
                      parent::setFieldValue( $field, $fieldPostName );
                  }
                  break;
              case 'notificationField':
                  $http = eZHTTPTool::instance();
                  $notification = false;
                  if( $http->hasPostVariable( $fieldPostName ) && $http->postVariable( $fieldPostName ) == '1')
                  {
                      $notification = true;
                  }
                  $this->fieldValues[$field] = $notification;
                  break;
              default:
                  parent::setFieldValue( $field, $fieldPostName );
                  break;
          }
      }
code_tokens: protected function setFieldValue ( $ field , $ fieldPostName ) { $ user = eZUser :: currentUser ( ) ; switch ( $ field ) { case 'email' : if ( ! $ user -> isAnonymous ( ) ) { $ this -> fieldValues [ $ field ] = $ user -> attribute ( 'email' ) ; } else { parent :: setFieldValue ( $ field , $ fieldPostName ) ; } break ; case 'notificationField' : $ http = eZHTTPTool :: instance ( ) ; $ notification = false ; if ( $ http -> hasPostVariable ( $ fieldPostName ) && $ http -> postVariable ( $ fieldPostName ) == '1' ) { $ notification = true ; } $ this -> fieldValues [ $ field ] = $ notification ; break ; default : parent :: setFieldValue ( $ field , $ fieldPostName ) ; break ; } }
docstring: Implement the setFieldValue in adding comment
  @see extension/ezcomments/classes/ezcomFormTool#setFieldValue($fieldPostName)
docstring_tokens: Implement the setFieldValue in adding comment