You are here

entity_legal.message.inc in Entity Legal 7.2

Same filename and directory in other branches
  1. 7 methods/entity_legal.message.inc

Method include file for 'message'.

File

methods/entity_legal.message.inc
View source
<?php

/**
 * @file
 * Method include file for 'message'.
 */

/**
 * Method class for alerting existing users via Drupal set message.
 */
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);
    }
  }

}

Classes

Namesort descending Description
EntityLegalMethodMessage Method class for alerting existing users via Drupal set message.