all_relationships; * * This variable is an array with two sub arrays with the keys 'object' and 'subject'. The array with * key 'object' contains relationships where the contact is the object, and the array with * the key 'subject' contains relationships where the contact is the subject */ $contact = $variables['node']->contact; $all_relationships = $contact->all_relationships; $object_rels = $all_relationships['object']; $subject_rels = $all_relationships['subject']; if (count($object_rels) > 0 or count($subject_rels) > 0) { ?>
$rels){ foreach ($rels as $obj_type => $objects){ ?>

This type_id->name);?> with the following contact(s): record->object_id->name; if (property_exists($object->record, 'nid')) { $contact_name = "record->nid) . "\" target=\"_blank\">" . $object->record->object_id->name . ""; } $rows[] = array( $contact_name, ); } // the $table array contains the headers and rows array as well as other // options for controlling the display of the table. Additional // documentation can be found here: // https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7 $table = array( 'header' => $headers, 'rows' => $rows, 'attributes' => array( 'id' => 'tripal_contact-table-relationship-object', 'class' => 'tripal-data-table' ), 'sticky' => FALSE, 'caption' => '', 'colgroups' => array(), 'empty' => '', ); // once we have our table array structure defined, we call Drupal's theme_table() // function to generate the table. print theme_table($table); ?>


$rels){ foreach ($rels as $subject_type => $subjects){?>

The following record->subject_id->type_id->name ?> contact(s) are this type_id->name;?>: record->subject_id->name; if (property_exists($subject->record, 'nid')) { $contact_name = "record->nid) . "\" target=\"_blank\">" . $subject->record->subject_id->name . ""; } $rows[] = array( $contact_name, ); } // the $table array contains the headers and rows array as well as other // options for controlling the display of the table. Additional // documentation can be found here: // https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7 $table = array( 'header' => $headers, 'rows' => $rows, 'attributes' => array( 'id' => 'tripal_contact-table-relationship-subject', 'class' => 'tripal-data-table' ), 'sticky' => FALSE, 'caption' => '', 'colgroups' => array(), 'empty' => '', ); // once we have our table array structure defined, we call Drupal's theme_table() // function to generate the table. print theme_table($table); ?>