Drupal 10 Development Cookbook - Third Edition by Matt Glaman & Kevin Quillen

Drupal 10 Development Cookbook - Third Edition by Matt Glaman & Kevin Quillen

Author:Matt Glaman & Kevin Quillen
Language: eng
Format: epub
Publisher: Packt
Published: 2023-11-15T00:00:00+00:00


There’s more...

Field formatters have additional methods to provide more information; they are covered in the next section.

Formatter settings and summary

The \Drupal\Core\Field\FormatterInterface interface defines three methods that can be overridden to provide a settings form and a summary of the current settings:

defaultSettings: This returns an array of the setting keys and default values

settingsForm: This returns a Form API array that is used for the settings form

settingsSummary: This allows an array of strings to be returned and displayed on the manage display form for the field



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.