You are here

function entity_metadata_site_wrapper in Entity API 7

Returns a metadata wrapper for accessing site-wide properties.

Although there is no 'site' entity or such, modules may provide info about site-wide properties using hook_entity_property_info(). This function returns a wrapper for making use of this properties.

Return value

EntityMetadataWrapper A wrapper for accessing site-wide properties.

See also

entity_metadata_system_entity_property_info()

2 calls to entity_metadata_site_wrapper()
EntityMetadataIntegrationTestCase::testSystemProperties in ./entity.test
Test properties provided by system module.
_entity_token_wrap_data in ./entity_token.tokens.inc
Wraps the given data by correctly obeying the options.

File

./entity.module, line 1452

Code

function entity_metadata_site_wrapper() {
  $site_info = entity_get_property_info('site');
  $info['property info'] = $site_info['properties'];
  return entity_metadata_wrapper('site', FALSE, $info);
}