function registration_entity_settings in Entity Registration 8
Same name and namespace in other branches
- 8.2 registration.module \registration_entity_settings()
- 7.2 registration.module \registration_entity_settings()
- 7 registration.module \registration_entity_settings()
Get registration settings for a host entity.
Parameters
string $entity_type: The host entity type.
int $entity_id: The host entity ID.
Return value
array|bool A row from {registration_entity}, or FALSE if no settings exist.
15 calls to registration_entity_settings()
- registration_access_people in ./
registration.module - Determine people types user may register for an entity.
- registration_entity_access_registration_access in modules/
registration_entity_access/ registration_entity_access.module - Implements hook_registration_access().
- registration_entity_settings_page in ./
registration.module - Page callback for entity registration settings.
- registration_entity_update in ./
registration.module - Implements hook_entity_update().
- registration_event_count in ./
registration.module - Determines current number of spaces filled for a host entity.
File
- ./
registration.module, line 903
Code
function registration_entity_settings($entity_type, $entity_id, $reset = FALSE) {
$result =& drupal_static(__FUNCTION__ . $entity_type . $entity_id);
if (!$result || $reset) {
$result = db_select('registration_entity', 're')
->fields('re')
->condition('entity_id', $entity_id, '=')
->condition('entity_type', $entity_type, '=')
->execute()
->fetchAssoc();
if ($result) {
$result['settings'] = unserialize($result['settings']);
}
}
return $result;
}