You are here

function _entity_legal_document_methods in Entity Legal 7

Same name and namespace in other branches
  1. 7.2 entity_legal.module \_entity_legal_document_methods()

Methods for presenting the legal document to end users.

Parameters

string $type: The type of user, 'new_users' or 'existing_users'.

Return value

array Methods available keyed by method name and title.

1 call to _entity_legal_document_methods()
entity_legal_document_form in ./entity_legal.admin.inc
Generates the profile type editing form.

File

./entity_legal.module, line 465
Entity Legal module.

Code

function _entity_legal_document_methods($type) {
  $default_methods = array(
    'new_users' => array(
      'form_link' => t('Checkbox on signup form with link to document'),
      'form_inline' => t('Checkbox on signup form with embedded document'),
    ),
    'existing_users' => array(
      'popup' => t('Popup on all pages until accepted'),
      'message' => t('Drupal warning message, prompting the user, until accepted'),
      'redirect' => t('Redirect every page load to legal document until accepted'),
    ),
  );

  // Provide API functionality for injecting new delivery methods.
  drupal_alter('entity_legal_document_method', $default_methods);
  return $default_methods[$type];
}