public function LdapAuthorizationConsumerAbstract::__construct in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::__construct()
- 7 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::__construct()
Constructor Method.
Parameters
string $consumer_type: e.g. drupal_role, og_group.
array $params: as associative array of default properties.
2 calls to LdapAuthorizationConsumerAbstract::__construct()
- LdapAuthorizationConsumerDrupalRole::__construct in ldap_authorization/
ldap_authorization_drupal_role/ LdapAuthorizationConsumerRole.class.php - Constructor Method.
- LdapAuthorizationConsumerOG::__construct in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php - Constructor Method.
2 methods override LdapAuthorizationConsumerAbstract::__construct()
- LdapAuthorizationConsumerDrupalRole::__construct in ldap_authorization/
ldap_authorization_drupal_role/ LdapAuthorizationConsumerRole.class.php - Constructor Method.
- LdapAuthorizationConsumerOG::__construct in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php - Constructor Method.
File
- ldap_authorization/
LdapAuthorizationConsumerAbstract.class.php, line 115 - 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 __construct($consumer_type, $params) {
$this->consumerType = $consumer_type;
$this->name = $params['consumer_name'];
$this->namePlural = $params['consumer_name_plural'];
$this->shortName = $params['consumer_short_name'];
$this->shortNamePlural = $params['consumer_short_name_plural'];
$this->consumerModule = $params['consumer_module'];
$this->mappingDirections = $params['consumer_mapping_directions'];
$this->testLink = l(t('test') . ' ' . $this->name, LDAP_SERVERS_MENU_BASE_PATH . '/authorization/test/' . $this->consumerType);
$this->editLink = l(t('edit') . ' ' . $this->name, LDAP_SERVERS_MENU_BASE_PATH . '/authorization/edit/' . $this->consumerType);
ldap_servers_module_load_include('php', 'ldap_authorization', 'LdapAuthorizationConsumerConfAdmin.class');
$this->consumerConf = new LdapAuthorizationConsumerConf($this);
}