You are here

function petreference_rules_action_load in Previewable email templates 6

File

modules/petreference/petreference.rules.inc, line 33
Provides additional rules support for petreference fields.

Code

function petreference_rules_action_load($node, $settings) {
  if ($pid = $node->{$settings['field']}[0]['pid']) {
    return array(
      'referenced_pet' => pet_load(array(
        'nid' => $nid,
      )),
    );
  }
}