Skip to content

[Improvement] Additional setter methods #190

Description

@michaelw85

When using the ACF builder in a OOP manner setting configuration can be done using methods like so:

$builder
    ->addField('name', 'type')
        ->setLabel('Foo')
        ->setRequired()

This is nice, but not all setters are available, so you will have to use setConfig or use the array notation for some values.
While this is workable it's not ideal in my opinion.

I would like to either add methods wrapping the setConfig, which is a bit tedious but works best for intellisense, or add magic setters calling setConfig and adding docblocks for intellisense.

Before I invest any time in a PR it would be nice to receive a go-ahead or feedback if this would not be feasible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions