function ldap_authorization_tokens in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_authorization/ldap_authorization.module \ldap_authorization_tokens()
- 7 ldap_authorization/ldap_authorization.module \ldap_authorization_tokens()
Just tokens for better watchdog and drupal_set_message arguments .*
3 calls to ldap_authorization_tokens()
- LdapAuthorizationConsumerConfAdmin::drupalForm in ldap_authorization/
LdapAuthorizationConsumerConfAdmin.class.php - ldap_authorization_test_form in ldap_authorization/
ldap_authorization.admin.test.inc - Form for adding, updating, and deleting a single ldap authorization consumer configuration.
- ldap_authorization_test_form_submit in ldap_authorization/
ldap_authorization.admin.test.inc - Submit handler function for ldap_authorization_test.
File
- ldap_authorization/
ldap_authorization.module, line 306 - Ldap authorization module.
Code
function ldap_authorization_tokens($consumer) {
$tokens = [];
if (is_object($consumer)) {
foreach ([
'%',
'!',
'@',
] as $symbol) {
foreach ([
'name',
'namePlural',
'shortName',
'shortNamePlural',
'consumerModule',
'consumerType',
'mappingDirections',
'testLink',
'editLink',
] as $property) {
$tokens[$symbol . 'consumer_' . $property] = $consumer->{$property};
}
if (is_object($consumer->consumerConf)) {
foreach ([
'sid',
'status',
] as $property) {
$tokens[$symbol . 'consumer_' . $property] = $consumer->consumerConf->{$property};
}
}
}
}
return $tokens;
}