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

[Proposal] Public API object oriented #488

Open
yanvv2 opened this issue Feb 18, 2019 · 1 comment
Open

[Proposal] Public API object oriented #488

yanvv2 opened this issue Feb 18, 2019 · 1 comment

Comments

@yanvv2
Copy link

yanvv2 commented Feb 18, 2019

Currently auto completion is missing due to the use of arrays inside most methods.
Are you by any chance looking into making a change to make the project more object oriented?

e.g.

$textField = new TextField('field_name', 'field_id');
$textField->addLabel('This is a label for the text field')
        ->addClass('form-control')
        ->value($prefillValue);
 
$this->add($textField);
 
$selectField = new SelectField('select_name', 'select_id');
$selectField->addChoice('en', 'English')
            ->addChoice('fr', 'French')
            ->addLabel('Select field label')
            ->setMultiple(true)
 
$this->add($selectField);
@kristijanhusak
Copy link
Owner

Looks good. I don't really have time to do this, so any help is appreciated.

@mikeerickson mikeerickson self-assigned this Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants