public function ConvertUrlToEmbedFilter::settingsForm in URL Embed 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/ ConvertUrlToEmbedFilter.php, line 28
Class
- ConvertUrlToEmbedFilter
- Provides a filter to display embedded entities based on data attributes.
Namespace
Drupal\url_embed\Plugin\FilterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form['url_prefix'] = [
'#type' => 'textfield',
'#title' => $this
->t('URL prefix'),
'#default_value' => $this->settings['url_prefix'],
'#description' => $this
->t('Optional prefix that will be used to indicate which URLs that apply. All URLs that are supported will be converted if empty. Example: EMBED-https://twitter.com/drupal/status/735873777683320832'),
];
return $form;
}