lib/FormBody.php
public function addFields(array $data, string $contentType = 'text/plain') {
        foreach ($data as $key => $value) {
            $this->addField($key, $value, $contentType);
        }
    }
public function addFields(array $data, string $contentType = 'text/plain') {
        foreach ($data as $key => $value) {
            $this->addField($key, $value, $contentType);
        }
    }
public function addFields ( array $ data , string $ contentType = 'text/plain' ) { foreach ( $ data as $ key => $ value ) { $ this -> addField ( $ key , $ value , $ contentType ) ; } }
Add each element of a associative array as a data field to the form entity body.

@param array  $data
@param string $contentType
Add each element of a associative array as a data field to the form entity body .