function registration_entity_settings in Entity Registration 8.2
Same name and namespace in other branches
- 8 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.
18 calls to registration_entity_settings()
- RegistrationStandardTestCase::testHostEntitySettings in tests/
registration.test - Tests entity update helper.
- RegistrationStandardTestCase::testHostEntitySettings in src/
RegistrationStandardTestCase.php - Tests entity update helper.
- RegistrationStandardTestCase::testHostEntitySettingsForm in tests/
registration.test - RegistrationStandardTestCase::testHostEntitySettingsForm in src/
RegistrationStandardTestCase.php - registration_entity_access_registration_access in modules/
registration_entity_access/ registration_entity_access.module - Implements hook_registration_access().
File
- ./
registration.module, line 917
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;
}