/** * {@inheritdoc} */ public function settingsForm(array $form, FormStateInterface $form_state) { $element = parent::settingsForm($form, $form_state); $element += $this->thumbnailFormatter->settingsForm([], $form_state); $element += $this->videoFormatter->settingsForm([], $form_state); $element['modal_max_width'] = ['#title' => $this->t('Maximum Width'), '#type' => 'number', '#description' => $this->t('The maximum size of the video opened in the Colorbox window in pixels. For smaller screen sizes, the video will scale.'), '#required' => TRUE, '#field_suffix' => 'px', '#size' => 20, '#states' => ['visible' => [[':input[name*="responsive"]' => ['checked' => TRUE]]]], '#default_value' => $this->getSetting('modal_max_width')]; return $element; }
/** * {@inheritdoc} */ public function settingsForm(array $form, FormStateInterface $form_state) { $form += $this->thumbnailFormatter->settingsForm([], $form_state); $form += $this->videoFormatter->settingsForm([], $form_state); return $form; }