code: protected function normalizeFieldsForSave($selectedFields)
      {
          $fields = [];
          if ($this->fields === null) {
              return [];
          }
  
          foreach ($this->fields as $field => $value) {
              if (!$this->fieldShouldNotBeSaved($field, $value, $selectedFields)) {
                  $fields[$field] = $value;
              }
          }
  
          return $fields ?: null;
      }
docs: Create an array of fields that will be saved to database.
  
  @param $selectedFields
  
  @return array|null