You are here

function search_api_sorts_entity_info in Search API sorts 7

Implements hook_entity_info().

File

./search_api_sorts.module, line 72
Create sort options for search queries executed via the Search API.

Code

function search_api_sorts_entity_info() {
  $info['search_api_sort'] = array(
    'label' => t('Search sort'),
    'controller class' => 'EntityAPIControllerExportable',
    'entity class' => 'SearchApiSort',
    'base table' => 'search_api_sort',
    'label callback' => 'search_api_sort_label',
    'module' => 'search_api_sorts',
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'name' => 'identifier',
      'label' => 'name',
    ),
  );
  return $info;
}