Entity/Extension.php
public function addField(ExtensionHasField $fields)
    {
        $fields->setExtension($this);
        $this->fields[] = $fields;

        return $this;
    }
public function addField(ExtensionHasField $fields)
    {
        $fields->setExtension($this);
        $this->fields[] = $fields;

        return $this;
    }
Add fields

@param ExtensionHasField $fields
@return Extension