presave_all() public method

Presaves all elements in what could be a set of them, dispatches to $this->presave()
public presave_all ( $values, $current_values ) : mixed[]
return mixed[] sanitized values
 /**
  * Override presave_all to handle special cases associated with multiple options fields.
  * @input mixed[] $values
  * @return mixed[] sanitized values
  */
 public function presave_all($values, $current_values)
 {
     // Multiple select and radio fields with no values chosen are left out of
     // the post request altogether, requiring special case handling.
     if (1 !== $this->limit && '' === $values) {
         $values = null;
     }
     return parent::presave_all($values, $current_values);
 }