function tripal_stock_list_properties_for_node
1.x tripal_stock-properties.inc | tripal_stock_list_properties_for_node($properties, $synonyms) |
Related topics
File
- tripal_stock/
includes/ tripal_stock-properties.inc, line 383 - @todo Add file header description
Code
function tripal_stock_list_properties_for_node($properties, $synonyms) {
if (!empty($properties) OR !empty($synonyms)) {
$output = '<table>';
$output .= '<tr><th>Type</th><th>Value</th></tr>';
if (!empty($synonyms)) {
foreach ($synonyms as $s) {
$output .= '<tr><td>synonym</td><td>' . $s . '</td></tr>';
}
}
if (!empty($properties)) {
foreach ($properties as $p) {
$output .= '<tr><td>' . $p->type . '</td><td>' . $p->value . '</td></tr>';
} // end of foreach property
}
$output .= '</table>';
}
else {
$output = 'No Properties Added to the Current Stock';
}
return $output;
}