Skip to content

[ProcessFieldExportImport] Long Functions (?) #2064

@LimeWub

Description

@LimeWub

Hello there :)

This is more of a question than an issue.

I am currently working on a module to import a set of preset templates/fields for every new PW installation; so as to speed up development time at the beginning of a project.

I am looking into the wire/ProcessTemplate/ProcessTemplateExportImport.php (and the ProcessField equivalent) and I can see I could make use of some of the functionality in there -in particular ___buildImport() -.

However, this function expects get and post input to work.
I think if I were to provide a json string instead (as a method parameter) this should be working fine. Am I wrong to think that?
Looking at the method it's also 150-ish lines long.

Basically is there a reason this is one method or would it be ok for me to break it down into at least 2 (Data Aquisition + Processing) methods and commit this back?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions