public function useAddNew(
        $class,
        $sourceCallback,
        FieldList $fields = null,
        RequiredFields $required = null,
        $isFrontend = false
    ) {
        if (!is_callable($sourceCallback)) {
            throw new Exception(
                'the useAddNew method must be passed a callable $sourceCallback parameter, ' . gettype($sourceCallback) . ' passed.'
            );
        }

        // if the user can't create this object type, don't modify the form
        if (!singleton($class)->canCreate()) {
            return $this->owner;
        }

        Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
        Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js');
        Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
        Requirements::javascript(QUICKADDNEW_MODULE . '/javascript/quickaddnew.js');
        Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
        Requirements::css(QUICKADDNEW_MODULE . '/css/quickaddnew.css');
        Requirements::add_i18n_javascript(QUICKADDNEW_MODULE . '/javascript/lang');
        if (!$fields) {
            if (singleton($class)->hasMethod('getAddNewFields')) {
                $fields = singleton($class)->getAddNewFields();
            } else {
                $fields = singleton($class)->getCMSFields();
            }
        }

        if (!$required) {
            if (singleton($class)->hasMethod('getAddNewValidator')) {
                $required = singleton($class)->getAddNewValidator();
            }
        }

        $this->owner->addExtraClass('quickaddnew-field');
        $this->addNewEnabled = true;

        $this->sourceCallback        = $sourceCallback;
        $this->isFrontend            = $isFrontend;
        $this->addNewClass            = $class;
        $this->addNewFields        = $fields;
        $this->addNewRequiredFields = $required;

        return $this->owner;
    }