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