Skip to content
This repository was archived by the owner on Jan 5, 2018. It is now read-only.

Conversation

@primsi
Copy link
Contributor

@primsi primsi commented Feb 19, 2016

No description provided.

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$configuration = $this->getConfiguration();
$settings = $configuration['settings'];
$form += parent::buildConfigurationForm($form, $form_state);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parent is WidgetBase, which doesn't do anything in buildConfigurationForm(). Only description is added here, but we have few more configuration options in defaultConfiguration(), which we would need to handle.

if (!empty($values['max_filesize'])) {
$this->configuration['max_filesize'] = $values['max_filesize'] . 'M';
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the other options are mentioned in this method, and in my testing, any changes I made to them were not saved.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be possible to rely on default submit implementation. See \Drupal\entity_browser\PluginConfigurationFormTrait

@primsi primsi force-pushed the 2671914_conf_ui branch 3 times, most recently from 523c740 to 5c712e7 Compare April 29, 2016 13:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants