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

Bugfix: cannot set 'mode' with DI configuration. #2

Merged
merged 2 commits into from
Oct 8, 2018

Conversation

antoniocambados
Copy link

With this bugfix you can set the mode with any of these configurations:

phpmob_ace:
    configs:
        html:
            autoScrollEditorIntoView: true
            maxLines: 20
            minLines: 5
            mode: 'ace/mode/html'
            theme: 'ace/theme/github'
public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
        ->add('html', AceType::class, [
            'required'    => false,
            'mode' => 'html',
        ]);
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
        ->add('html', AceType::class, [
            'required'    => false,
            'config' => [
                'mode' => 'html'
            ]
        ]);
}

When combining these methods, the first one has less priority than the last one.

Fixes #1

@liverbool liverbool merged commit c148e4f into phpmob:master Oct 8, 2018
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

Successfully merging this pull request may close these issues.

Cannot set 'mode' through configuration file
2 participants