You are here

function search_api_entity_info in Search API 7

Implements hook_entity_info().

File

./search_api.module, line 407
Provides a flexible framework for implementing search services.

Code

function search_api_entity_info() {
  $info['search_api_server'] = array(
    'label' => t('Search server'),
    'controller class' => 'EntityAPIControllerExportable',
    'metadata controller class' => FALSE,
    'entity class' => 'SearchApiServer',
    'base table' => 'search_api_server',
    'uri callback' => 'search_api_server_url',
    'access callback' => 'search_api_entity_access',
    'module' => 'search_api',
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'label' => 'name',
      'name' => 'machine_name',
    ),
  );
  $info['search_api_index'] = array(
    'label' => t('Search index'),
    'controller class' => 'EntityAPIControllerExportable',
    'metadata controller class' => FALSE,
    'entity class' => 'SearchApiIndex',
    'base table' => 'search_api_index',
    'uri callback' => 'search_api_index_url',
    'access callback' => 'search_api_entity_access',
    'module' => 'search_api',
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'label' => 'name',
      'name' => 'machine_name',
    ),
  );
  return $info;
}