Basic search API integration.
[sandbox/serialjaywalker/1195272.git] / modules / search / commerce_pos_search.facetapi.inc
1 <?php
2
3 /**
4 * @file
5 * Common functions for search features integrated with the POS.
6 */
7
8 /**
9 * Implements hook_facetapi_realm_info().
10 */
11 function commerce_pos_search_facetapi_realm_info() {
12 return array(
13 'commerce_pos_search' => array(
14 'label' => t('POS Search'),
15 'sortable' => FALSE,
16 'weight' => -10,
17 'default widget' => 'commerce_pos_search_radios',
18 'element type' => 'form elements',
19 'settings callback' => 'commerce_pos_search_realm_settings',
20 'description' => t('The <em>POS</em> realm displays facets in the Commerce POS panels and automatically updates via AJAX.'),
21 ),
22 );
23 }
24
25 /**
26 * Settings callback for the commerce_pos realm.
27 */
28 function commerce_pos_search_realm_settings() {
29
30 }
31
32 /**
33 * Implements hook_facetapi_widgets().
34 */
35 function commerce_pos_search_facetapi_widgets() {
36 return array(
37 'commerce_pos_search_radios' => array(
38 'handler' => array(
39 'label' => t('Commerce POS Search Radios'),
40 'class' => 'CommercePOSSearchWidgetRadios',
41 'query types' => array('term'),
42 'requirements' => array(
43 'facetapi_requirement_realm_property' => array('element type' => 'form elements')
44 ),
45 ),
46 ),
47 );
48 }