You are here

function views_natural_sort_views_natural_sort_get_entry_types in Views Natural Sort 8.2

Same name and namespace in other branches
  1. 7.2 views_natural_sort.module \views_natural_sort_views_natural_sort_get_entry_types()

Implements hook_views_natural_sort_get_entry_types().

@Not-Rewritten

File

./views_natural_sort.module, line 44
Contains views_natural_sort.module..

Code

function views_natural_sort_views_natural_sort_get_entry_types() {
  $service = Drupal::service('views_natural_sort.service');
  $supported_entity_properties = $service
    ->getViewsSupportedEntityProperties();
  $entry_types = [];
  foreach ($supported_entity_properties as $entity_type => $properties) {
    foreach ($properties as $property => $schema_info) {
      $entry_types[] = new IndexRecordType($entity_type, $property);
    }
  }
  return $entry_types;
}