You are here

public function LdapQueryAdmin::drupalFormSubmit in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_query/LdapQueryAdmin.class.php \LdapQueryAdmin::drupalFormSubmit()
  2. 7.2 ldap_query/LdapQueryAdmin.class.php \LdapQueryAdmin::drupalFormSubmit()

File

ldap_query/LdapQueryAdmin.class.php, line 260

Class

LdapQueryAdmin

Code

public function drupalFormSubmit($op, $values) {
  $this
    ->populateFromDrupalForm($op, $values);
  if ($op == 'delete') {
    $this
      ->delete($this);
  }
  else {

    // add or edit
    try {
      $save_result = $this
        ->save($op);
    } catch (Exception $e) {
      $this
        ->setError('Save Error', t('Failed to save object.  Your form data was not saved.'));
    }
  }
}