Passing entities other than (node, user, comment)

mgenovese - August 14, 2009 - 05:42
Project:Workflow-ng
Version:5.x-2.2
Component:Wng API
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi there,

I'm writing a new event, and need to pass other types of entities as arguments. For example,

function mymodule_event_info() {
  return array(
    'privatemsg_mail_sent' => array(
      '#label' => t('One user sends another user a private message.'),
      '#module' => t('Privatemsg'),
      '#arguments' => array(
        'subject' => array('#entity' => 'text', '#label' => t('Message subject.')),
        'sender' => array('#entity' => 'user', '#label' => t('Sender of the private message.')),
        'receiver' => array('#entity' => 'user', '#label' => t('Receiver of the private message.')),
      ),
      '#redirect' => TRUE,
    ),
  );
}

You'll see that for the subject argument, I just want to pass text -- not a node object, or user object, or a comment. I just dropped in "text" for filler...but what can I use here as the entity to pass a string or other value from the event call to the workflow I setup?

Thanks.

 
 

Drupal is a registered trademark of Dries Buytaert.