shouts.rules.inc in Heartbeat 6.4
File
modules/shouts/shouts.rules.inc
View source
<?php
function shouts_rules_event_info() {
return array(
'shout_post' => array(
'label' => t('User posts a new shout'),
'module' => 'Shouts',
'arguments' => array(
'user' => array(
'type' => 'user',
'label' => t('User who posts a new shout.'),
),
'shout' => array(
'type' => 'shout',
'label' => t('Shout that has been posted.'),
),
),
'redirect' => TRUE,
),
);
}
function shouts_rules_data_type_info() {
return array(
'shout' => array(
'label' => t('shout'),
'class' => 'rules_data_type_shout',
'savable' => FALSE,
'identifiable' => TRUE,
'module' => 'shouts',
),
);
}
class rules_data_type_shout extends rules_data_type {
function load($shout_id) {
return shout_load($shout_id);
}
function get_identifier() {
return $this
->get()->shout_id;
}
}