only in patch2: unchanged: --- a/core/lib/Drupal/Core/Field/FormatterInterface.php +++ b/core/lib/Drupal/Core/Field/FormatterInterface.php @@ -82,5 +82,18 @@ public function view(FieldItemListInterface $items); * consecutive numeric indexes starting from 0. */ public function viewElements(FieldItemListInterface $items); + + /** + * Returns the value of a third-party setting, or its default value if absent. + * + * @param string $module + * The module providing the third-party setting. + * @param string $key + * The setting name. + * + * @return mixed + * The setting value. + */ + public function getThirdPartySetting($module, $key); } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Field/PluginSettingsInterface.php +++ b/core/lib/Drupal/Core/Field/PluginSettingsInterface.php @@ -64,4 +64,55 @@ public function setSettings(array $settings); */ public function setSetting($key, $value); + /** + * Returns the array of third-party settings. + * + * The array is keyed by the third-party module which provides the settings, + * and includes defaults for missing settings. + * + * @return mixed + * The array of settings. + */ + public function getThirdPartySettings(); + + /** + * Returns the value of a third-party setting, or its default value if absent. + * + * @param string $module + * The module providing the third-party setting. + * @param string $key + * The setting name. + * + * @return mixed + * The setting value. + */ + public function getThirdPartySetting($module, $key); + + /** + * Sets the value of a third-party setting for the plugin. + * + * @param string $module + * The module providing the third-party setting. + * @param string $key + * The setting name. + * @param mixed $value + * The setting value. + * + * @return $this + */ + public function setThirdPartySetting($module, $key, $value); + + /** + * Sets the third-party settings for the plugin. + * + * @param array $settings + * The nested array of settings, keyed by the third party module which + * provides the settings. Individual setting are nested below modules, keyed + * by their setting names. Missing settings will be assigned their default + * values. + * + * @return $this + */ + public function setThirdPartySettings(array $settings); + }