You are here

class EntityLegalMethodMessage in Entity Legal 7

Same name and namespace in other branches
  1. 7.2 methods/entity_legal.message.inc \EntityLegalMethodMessage

Method class for alerting existing users via Drupal set message.

Hierarchy

Expanded class hierarchy of EntityLegalMethodMessage

File

methods/entity_legal.message.inc, line 10
Method include file for 'message'.

View source
class EntityLegalMethodMessage extends EntityLegalMethod {

  /**
   * Execution method for message method.
   */
  public function execute($method = 'message') {
    $documents = $this
      ->getDocumentsForMethod($method, ENTITY_LEGAL_USER_EXISTING);
    foreach ($documents as $document) {
      $entity_uri = $document
        ->uri();
      $message = t('Please accept the !document_name.', array(
        '!document_name' => l(entity_legal_document_title($document), $entity_uri['path']),
      ));
      drupal_set_message($message, 'warning', FALSE);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityLegalMethod::getDocumentsForMethod public function Get all Entity Legal Documents for a given user type and method.
EntityLegalMethodMessage::execute public function Execution method for message method.