src/Taxonomy/TaxonomyFieldRepository.php
public function add($field)
    {
        if (is_array($field)) {
            foreach ($field as $item) {
                $this->add($item);
            }
        } else {
            $this->fields[] = $field;
        }
    }
public function add($field)
    {
        if (is_array($field)) {
            foreach ($field as $item) {
                $this->add($item);
            }
        } else {
            $this->fields[] = $field;
        }
    }
public function add ( $ field ) { if ( is_array ( $ field ) ) { foreach ( $ field as $ item ) { $ this -> add ( $ item ) ; } } else { $ this -> fields [ ] = $ field ; } }
Add a field to the taxonomy.

@param FieldTypeInterface|array $field
Add a field to the taxonomy .