public function LdapServerAdmin::getLdapServerActions in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::getLdapServerActions()
- 7 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::getLdapServerActions()
File
- ldap_servers/
LdapServerAdmin.class.php, line 182
Class
Code
public function getLdapServerActions() {
$switch = $this->status ? 'disable' : 'enable';
$actions = array();
$actions[] = l(t('edit'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/edit/' . $this->sid);
if (property_exists($this, 'type')) {
if ($this->type == 'Overridden') {
$actions[] = l(t('revert'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/delete/' . $this->sid);
}
if ($this->type == 'Normal') {
$actions[] = l(t('delete'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/delete/' . $this->sid);
}
}
else {
$actions[] = l(t('delete'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/delete/' . $this->sid);
}
$actions[] = l(t('test'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/test/' . $this->sid);
$actions[] = l($switch, LDAP_SERVERS_MENU_BASE_PATH . '/servers/' . $switch . '/' . $this->sid);
return $actions;
}