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

Use short array syntax for generated options #3246

Merged

Conversation

pfrenssen
Copy link
Contributor

When generating a form the resulting code is formatted with the short array syntax everywhere, but the options for a select form field are still using the old syntax:

    $form['category'] = [
      '#type' => 'select',
      '#title' => $this->t('Category'),
      '#options' => array('Technical problem / bug report' => $this->t('Technical problem / bug report')),
      '#size' => 5,
    ];

This PR ensures that short array syntax is also used for the select options.

@jmolivas jmolivas modified the milestone: 1.0.0-rc17 Mar 31, 2017
@jmolivas
Copy link
Member

jmolivas commented Apr 3, 2017

@pfrenssen nice catch. Another PR fixes templates but this was left behind.

@jmolivas jmolivas merged commit 2b5a029 into hechoendrupal:master Apr 3, 2017
@jmolivas
Copy link
Member

jmolivas commented Apr 3, 2017

@pfrenssen Thanks for your contribution, your PR was merged. This will be included on the next release.

@pfrenssen pfrenssen deleted the options-short-array-syntax branch April 3, 2017 12:41
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.

2 participants