You are here

protected function Form::massageMetadata in GridStack 8.2

Massages media metadata.

1 call to Form::massageMetadata()
Form::validateConfigurationForm in src/Plugin/gridstack/stylizer/Form.php

File

src/Plugin/gridstack/stylizer/Form.php, line 135

Class

Form
Provides the form elements.

Namespace

Drupal\gridstack\Plugin\gridstack\stylizer

Code

protected function massageMetadata($key, array $settings, FormStateInterface $form_state) {
  $mid = $this
    ->saveMediaId($settings, $form_state);
  $data = $this
    ->getMediaData(NULL, $mid);
  $form_state
    ->setValue($key, $data ? Json::encode($data) : '');
}