original_string: protected function updateListProductClassField()
      {
          $this->controlAccess('product_class_edit');
  
          foreach ((array) $this->setSubmitted('fields') as $id => $field) {
  
              if (!empty($field['remove'])) {
                  $this->product_class_field->delete($id);
                  continue;
              }
  
              $field['required'] = !empty($field['required']);
              $field['multiple'] = !empty($field['multiple']);
              $this->product_class_field->update($id, $field);
          }
  
          $this->redirect('', $this->text('Product class has been updated'), 'success');
      }
code: protected function updateListProductClassField()
      {
          $this->controlAccess('product_class_edit');
  
          foreach ((array) $this->setSubmitted('fields') as $id => $field) {
  
              if (!empty($field['remove'])) {
                  $this->product_class_field->delete($id);
                  continue;
              }
  
              $field['required'] = !empty($field['required']);
              $field['multiple'] = !empty($field['multiple']);
              $this->product_class_field->update($id, $field);
          }
  
          $this->redirect('', $this->text('Product class has been updated'), 'success');
      }
code_tokens: protected function updateListProductClassField ( ) { $ this -> controlAccess ( 'product_class_edit' ) ; foreach ( ( array ) $ this -> setSubmitted ( 'fields' ) as $ id => $ field ) { if ( ! empty ( $ field [ 'remove' ] ) ) { $ this -> product_class_field -> delete ( $ id ) ; continue ; } $ field [ 'required' ] = ! empty ( $ field [ 'required' ] ) ; $ field [ 'multiple' ] = ! empty ( $ field [ 'multiple' ] ) ; $ this -> product_class_field -> update ( $ id , $ field ) ; } $ this -> redirect ( '' , $ this -> text ( 'Product class has been updated' ) , 'success' ) ; }
docstring: Updates product class fields
docstring_tokens: Updates product class fields