You are here

public static function LdapAuthorizationConsumerConfAdmin::fields in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php \LdapAuthorizationConsumerConfAdmin::fields()
  2. 7 ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php \LdapAuthorizationConsumerConfAdmin::fields()
2 calls to LdapAuthorizationConsumerConfAdmin::fields()
LdapAuthorizationConsumerConfAdmin::__construct in ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php
Constructor Method.
ldap_authorization_schema in ldap_authorization/ldap_authorization.install
Implements hook_schema().

File

ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php, line 414

Class

LdapAuthorizationConsumerConfAdmin
LDAP Authorization Consumer Configration Admin Class.

Code

public static function fields() {

  /**
   * consumer_type is tag (unique alphanumeric id) of consuming authorization such as
   *   drupal_roles, og_groups, civicrm_memberships
   */
  $fields = [
    'numeric_consumer_conf_id' => [
      'schema' => [
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary ID field for the table.  Only used internally.',
        'no export' => TRUE,
      ],
    ],
    'sid' => [
      'schema' => [
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
      ],
    ],
    'consumer_type' => [
      'schema' => [
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
      ],
    ],
    'consumer_module' => [
      'schema' => [
        'type' => 'varchar',
        'length' => 30,
        'not null' => TRUE,
      ],
    ],
    'status' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'only_ldap_authenticated' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 1,
      ],
    ],
    'use_first_attr_as_groupid' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'mappings' => [
      'form_default' => [],
      'schema' => [
        'type' => 'text',
        'size' => 'medium',
        'not null' => FALSE,
        'default' => NULL,
      ],
    ],
    'use_filter' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 1,
      ],
    ],
    'synchronization_modes' => [
      'form_default' => [
        'user_logon',
      ],
    ],
    'synchronization_actions' => [
      'form_default' => [
        'revoke_ldap_provisioned',
        'create_consumers',
      ],
    ],
    'synch_to_ldap' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'synch_on_logon' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'revoke_ldap_provisioned' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'create_consumers' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'regrant_ldap_provisioned' => [
      'schema' => [
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
  ];
  return $fields;
}