You are here

function facetapi_realm_load in Facet API 7.2

Same name and namespace in other branches
  1. 6.3 facetapi.module \facetapi_realm_load()
  2. 6 facetapi.module \facetapi_realm_load()
  3. 7 facetapi.module \facetapi_realm_load()

Returns a realm definition.

Parameters

$realm_name: The machine readable name of the realm.

Return value

array An array containing the realm definition, FALSE if the realm is invalid.

  • name: The machine name of the realm.
  • label: The human readable name of the realm displayed in the admin UI.
  • description: The description of the realm displayed in the admin UI.
  • element type: The type of element facets are rendered as, such as 'links' or 'form elements'.
  • default widget: The default widget plugin id for facets in the realm.
  • settings callback: A callback that alters the realm settings form.
  • sortable: Whether the facets can be sorted via the admin UI.
  • weight: The weight of the realm's menu item in comparison to the others.
5 calls to facetapi_realm_load()
FacetapiAdapter::buildRealm in plugins/facetapi/adapter.inc
Uses each facet's widget to build the realm's render array.
FacetapiFacet::getSettings in plugins/facetapi/adapter.inc
Returns realm specific or global settings for a facet.
FacetapiTestCase::facetapiLoadObjects in tests/facetapi.test
Returns adapter, realm, and facet objects and base admin path.
facetapi_get_block_info in ./facetapi.block.inc
Helper function to get block info for all block-like realms.
facetapi_realm_settings_form in ./facetapi.admin.inc
Form constructor for the realm settings form.

File

./facetapi.module, line 419
An abstracted facet API that can be used by various search backends.

Code

function facetapi_realm_load($realm_name) {
  $realm_info = facetapi_get_realm_info();
  return isset($realm_info[$realm_name]) ? $realm_info[$realm_name] : FALSE;
}