function registration_entity_settings in Entity Registration 7
Same name and namespace in other branches
- 8.2 registration.module \registration_entity_settings()
- 8 registration.module \registration_entity_settings()
- 7.2 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.
17 calls to registration_entity_settings()
- RegistrationStandardTestCase::testHostEntitySettings in tests/
registration.test - Tests entity update helper.
- RegistrationStandardTestCase::testHostEntitySettingsForm in tests/
registration.test - 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.
File
- ./
registration.module, line 973
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;
}