public function ShortcodeBase::settingsForm in Shortcode 8
Same name and namespace in other branches
- 2.0.x src/Plugin/ShortcodeBase.php \Drupal\shortcode\Plugin\ShortcodeBase::settingsForm()
Generates a shortcode's settings form.
Parameters
array $form: A minimally pre-populated 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 ShortcodeInterface::settingsForm
File
- src/
Plugin/ ShortcodeBase.php, line 140
Class
- ShortcodeBase
- Provides a base class for Shortcode plugins.
Namespace
Drupal\shortcode\PluginCode
public function settingsForm(array $form, FormStateInterface $form_state) {
// Implementations should work with and return $form. Returning an empty
// array here allows the text format administration form to identify whether
// this shortcode plugin has any settings form elements.
return [];
}