Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Additional setter methods #190

Open
michaelw85 opened this issue Oct 22, 2024 · 1 comment
Open

[Improvement] Additional setter methods #190

michaelw85 opened this issue Oct 22, 2024 · 1 comment

Comments

@michaelw85
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@michaelw85 and others