1 filter.module _filter_get_processed_text_fields(EntityInterface $entity)

Determines the text fields on an entity that have text processing enabled.

Parameters

EntityInterface $entity: An entity whose fields to analyze.

Return value

array: The names of the fields on this entity that have text processing enabled.

File

core/modules/filter/filter.module, line 1876
Framework for handling the filtering of content.

Code

function _filter_get_processed_text_fields(EntityInterface $entity) {
  $fields = field_info_instances($entity->entityType(), $entity->bundle());
  $field_list = array();
  foreach ($fields as $field) {
    if (!empty($field['settings']['text_processing'])) {
      $field_list[] = $field['field_name'];
    }
  }
  return $field_list;
}