public function FilterOEmbed::settingsForm in oEmbed 8
Generates a filter's settings form.
Parameters
array $form: A minimally prepopulated form array.
\Drupal\Core\Form\FormStateInterface $form_state: The state of the (entire) configuration form.
Return value
array The $form array with additional form elements for the settings of this filter. The submitted form values should match $this->settings.
Overrides FilterBase::settingsForm
File
- src/
Plugin/ Filter/ FilterOEmbed.php, line 90 - Contains \Drupal\filter\Plugin\Filter\FilterOEmbed.
Class
- FilterOEmbed
- Provides a fallback placeholder filter to use for missing filters.
Namespace
Drupal\oembed\Plugin\FilterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form['options'] = array(
'#type' => 'textfield',
'#title' => t('Default oEmbed request options'),
'#default_value' => $this->settings['options'],
'#description' => t('A series of attribute value pairs for the default request options. For example, <em>maxwidth="500"</em>.'),
);
$form['autoembed'] = array(
'#type' => 'checkbox',
'#title' => t('Automatically embed URLs'),
'#default_value' => $this->settings['autoembed'],
'#description' => t('When possible, embed the media content from a URL directly in the input.'),
);
return $form;
}