You are here

function search_api_test_entity_property_info in Search API 7

Implements hook_entity_property_info().

File

tests/search_api_test.module, line 128
Test functions and classes for testing the Search API.

Code

function search_api_test_entity_property_info() {
  $info['search_api_test']['properties'] = array(
    'id' => array(
      'label' => 'ID',
      'type' => 'integer',
      'description' => 'The primary identifier for a server.',
    ),
    'title' => array(
      'label' => 'Title',
      'type' => 'text',
      'description' => 'The title of the item.',
      'required' => TRUE,
    ),
    'body' => array(
      'label' => 'Body',
      'type' => 'text',
      'description' => 'A text belonging to the item.',
      'sanitize' => 'filter_xss',
      'required' => TRUE,
    ),
    'type' => array(
      'label' => 'Type',
      'type' => 'text',
      'description' => 'A string identifying the type of item.',
      'required' => TRUE,
    ),
    'parent' => array(
      'label' => 'Parent',
      'type' => 'search_api_test',
      'description' => "The item's parent.",
      'getter callback' => 'search_api_test_parent',
    ),
    'keywords' => array(
      'label' => 'Keywords',
      'type' => 'list<string>',
      'description' => 'An optional collection of keywords describing the item.',
      'getter callback' => 'search_api_test_list_callback',
    ),
    'prices' => array(
      'label' => 'Prices',
      'type' => 'list<decimal>',
      'description' => 'An optional list of prices.',
      'getter callback' => 'search_api_test_list_callback',
    ),
  );
  return $info;
}