-
Notifications
You must be signed in to change notification settings - Fork 0
/
skaflash.rules.inc
56 lines (51 loc) · 1.32 KB
/
skaflash.rules.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* @file
* Rules integration hooks/functions for the SkaFlash module.
*/
/**
* Implements hook_rules_data_info().
*/
function skaflash_rules_data_info() {
return array(
'skaflash_push' => array(
'label' => t('skaflash push data'),
'wrap' => TRUE,
'property info' => array(
'email' => array(
'type' => 'text',
'label' => t('The email address submitted by the fan.'),
),
'phone' => array(
'type' => 'text',
'label' => t('The phone number used to submit the email address.'),
),
'timestamp' => array(
'type' => 'date',
'label' => t('The date and time of the submission'),
),
),
),
);
}
/**
* Implements hook_rules_event_info().
*/
function skaflash_rules_event_info() {
$defaults = array(
'group' => t('skaflash'),
'module' => 'skaflash',
);
return array(
'skaflash_pushed' => $defaults + array(
'label' => t('After receiving a push notification from SkaFlash'),
'variables' => array(
'skaflash_push' => array(
'type' => 'skaflash_push',
'label' => t('SkaFlash push notification'),
'description' => t('The data returned by the SkaFlash API, including e-mail address and phone number.'),
),
),
),
);
}