public function LdapAuthorizationConsumerAbstract::createConsumer in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::createConsumer()
create authorization consumers
Parameters
string (lowercase) $consumer_id:
array $consumer as associative array with the following key/values: 'value' => NULL | mixed consumer such as drupal role name, og group entity, etc. 'name' => name of consumer for UI, logging etc. 'map_to_string' => string mapped to in ldap authorization. mixed case string 'exists' => TRUE indicates consumer is known to exist, FALSE indicates consumer is known to not exist, NULL indicate consumer's existance not checked yet
2 methods override LdapAuthorizationConsumerAbstract::createConsumer()
- LdapAuthorizationConsumerDrupalRole::createConsumer in ldap_authorization/
ldap_authorization_drupal_role/ LdapAuthorizationConsumerRole.class.php - LdapAuthorizationConsumerOG::createConsumer in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php - this function is not implemented for og, but could be if a use case for generating og groups and roles on the fly existed.
File
- ldap_authorization/
LdapAuthorizationConsumerAbstract.class.php, line 152 - abstract class to represent an ldap_authorization consumer behavior such as drupal_role, og_group, etc. each authorization comsumer will extend this class with its own class named LdapAuthorizationConsumer<consumer type> such as…
Class
Code
public function createConsumer($consumer_id, $consumer) {
// method must be overridden
}