You are here

public function EntityLegalMethodMessage::execute in Entity Legal 7.2

Same name and namespace in other branches
  1. 7 methods/entity_legal.message.inc \EntityLegalMethodMessage::execute()

Execution method for message method.

File

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

Class

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

Code

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);
  }
}