You are here

function search_api_page_entity_property_info in Search API Pages 7

Implements hook_entity_property_info().

File

./search_api_page.module, line 234
Generate search pages using Search API indexes.

Code

function search_api_page_entity_property_info() {
  $info['search_api_page']['properties'] = array(
    'id' => array(
      'label' => t('ID'),
      'type' => 'integer',
      'description' => t('The primary identifier for a search page.'),
      'schema field' => 'id',
      'validation callback' => 'entity_metadata_validate_integer_positive',
    ),
    'index_id' => array(
      'label' => t('Index ID'),
      'type' => 'token',
      'description' => t('The machine name of the index this search page uses.'),
      'schema field' => 'index_id',
    ),
    'index' => array(
      'label' => t('Index'),
      'type' => 'search_api_index',
      'description' => t('The index this search page uses.'),
      'getter callback' => 'search_api_page_get_index',
    ),
    'name' => array(
      'label' => t('Name'),
      'type' => 'text',
      'description' => t('The displayed name for a search page.'),
      'schema field' => 'name',
      'required' => TRUE,
    ),
    'machine_name' => array(
      'label' => t('Machine name'),
      'type' => 'token',
      'description' => t('The internally used machine name for a search page.'),
      'schema field' => 'machine_name',
      'required' => TRUE,
    ),
    'description' => array(
      'label' => t('Description'),
      'type' => 'text',
      'description' => t('The displayed description for a search page.'),
      'schema field' => 'description',
      'sanitize' => 'filter_xss',
    ),
    'enabled' => array(
      'label' => t('Enabled'),
      'type' => 'boolean',
      'description' => t('A flag indicating whether the search page is enabled.'),
      'schema field' => 'enabled',
    ),
  );
  return $info;
}