function ListItemBase::submitFieldStorageUpdate

Same name and namespace in other branches
  1. 10 core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php \Drupal\options\Plugin\Field\FieldType\ListItemBase::submitFieldStorageUpdate()
  2. main core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php \Drupal\options\Plugin\Field\FieldType\ListItemBase::submitFieldStorageUpdate()

Resets the cached allowed values on field storage update.

@todo Deprecate this method in #3583435.

See also

https://www.drupal.org/project/drupal/issues/3583435

1 call to ListItemBase::submitFieldStorageUpdate()
OptionsAllowedValuesTest::testSubmitFieldStorageUpdate in core/modules/options/tests/src/Kernel/OptionsAllowedValuesTest.php
Tests that the field storage form submit resets the cached values.

File

core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php, line 583

Class

ListItemBase
Plugin base class inherited by the options field types.

Namespace

Drupal\options\Plugin\Field\FieldType

Code

public static function submitFieldStorageUpdate() {
  Cache::invalidateTags([
    OptionsAllowedValues::CACHE_TAG,
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.