function filter_formats_reset

Same name and namespace in other branches
  1. 10 core/modules/filter/filter.module \filter_formats_reset()
  2. 9 core/modules/filter/filter.module \filter_formats_reset()
  3. 8.9.x core/modules/filter/filter.module \filter_formats_reset()
  4. 7.x modules/filter/filter.module \filter_formats_reset()
  5. main core/modules/filter/filter.module \filter_formats_reset()

Resets the text format caches.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. Invalidate 'filter_formats' entity type list cache tags instead.

See also

https://www.drupal.org/node/3035368

File

core/modules/filter/filter.module, line 54

Code

function filter_formats_reset() : void {
  @trigger_error(__FUNCTION__ . "() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Invalidate 'filter_formats' entity type list cache tags instead. See https://www.drupal.org/node/3035368", E_USER_DEPRECATED);
  $tags = \Drupal::entityTypeManager()->getDefinition('filter_format')
    ->getListCacheTags();
  \Drupal::cache('memory')->invalidateTags($tags);
}

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