function media_field_type_category_info_alter

Implements hook_field_type_category_info_alter().

File

core/modules/media/media.module, line 539

Code

function media_field_type_category_info_alter(&$definitions) {
  // The `media` field type belongs in the `general` category, so the libraries
  // need to be attached using an alter hook.
  $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'media/drupal.media-icon';
}

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