|
@@ -5,18 +5,18 @@ $options = array('return_array' => 1);
|
|
$featuremap = tripal_core_expand_chado_vars($featuremap, 'table', 'featuremapprop', $options);
|
|
$featuremap = tripal_core_expand_chado_vars($featuremap, 'table', 'featuremapprop', $options);
|
|
$properties = $featuremap->featuremapprop;
|
|
$properties = $featuremap->featuremapprop;
|
|
|
|
|
|
-if(count($properties) > 0){
|
|
|
|
|
|
+if(count($properties) > 0){
|
|
// the $headers array is an array of fields to use as the colum headers.
|
|
// the $headers array is an array of fields to use as the colum headers.
|
|
// additional documentation can be found here
|
|
// additional documentation can be found here
|
|
// https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7
|
|
// https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7
|
|
$headers = array('Property Name', 'Value');
|
|
$headers = array('Property Name', 'Value');
|
|
-
|
|
|
|
|
|
+
|
|
// the $rows array contains an array of rows where each row is an array
|
|
// the $rows array contains an array of rows where each row is an array
|
|
// of values for each column of the table in that row. Additional documentation
|
|
// of values for each column of the table in that row. Additional documentation
|
|
// can be found here:
|
|
// can be found here:
|
|
// https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7
|
|
// https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7
|
|
$rows = array();
|
|
$rows = array();
|
|
-
|
|
|
|
|
|
+
|
|
foreach ($properties as $property){
|
|
foreach ($properties as $property){
|
|
$property = tripal_core_expand_chado_vars($property,'field','featuremapprop.value');
|
|
$property = tripal_core_expand_chado_vars($property,'field','featuremapprop.value');
|
|
$rows[] = array(
|
|
$rows[] = array(
|
|
@@ -24,7 +24,7 @@ if(count($properties) > 0){
|
|
urldecode($property->value)
|
|
urldecode($property->value)
|
|
);
|
|
);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// the $table array contains the headers and rows array as well as other
|
|
// the $table array contains the headers and rows array as well as other
|
|
// options for controlling the display of the table. Additional
|
|
// options for controlling the display of the table. Additional
|
|
// documentation can be found here:
|
|
// documentation can be found here:
|
|
@@ -40,7 +40,8 @@ if(count($properties) > 0){
|
|
'colgroups' => array(),
|
|
'colgroups' => array(),
|
|
'empty' => '',
|
|
'empty' => '',
|
|
);
|
|
);
|
|
-
|
|
|
|
|
|
+
|
|
// once we have our table array structure defined, we call Drupal's theme_table()
|
|
// once we have our table array structure defined, we call Drupal's theme_table()
|
|
// function to generate the table.
|
|
// function to generate the table.
|
|
- print theme_table($table);
|
|
|
|
|
|
+ print theme_table($table);
|
|
|
|
+}
|