Browse Source

converted output to render array

pull/653/head
ajstanley 9 years ago
parent
commit
4def002dc3
  1. 14
      islandora.module

14
islandora.module

@ -2175,7 +2175,6 @@ function islandora_islandora_get_breadcrumb_query_predicates(AbstractObject $obj
* Implements hook_islandora_overview_object(). * Implements hook_islandora_overview_object().
*/ */
function islandora_islandora_overview_object(AbstractObject $object) { function islandora_islandora_overview_object(AbstractObject $object) {
$cmodels = $object->models; $cmodels = $object->models;
$rows = array(); $rows = array();
foreach ($cmodels as $cmodel) { foreach ($cmodels as $cmodel) {
@ -2190,9 +2189,12 @@ function islandora_islandora_overview_object(AbstractObject $object) {
} }
} }
$header = count($rows) > 1 ? t('Content Models') : t('Content Model'); $header = count($rows) > 1 ? t('Content Models') : t('Content Model');
$table = theme('table', array( $table = array(
'header' => array($header), '#theme' => 'table',
'rows' => $rows, '#header' => array($header),
'empty' => t('No Islandora content model associated with this object.'))); '#rows' => $rows,
return array('cmodels' => $table); '#empty' => t('No Islandora content model associated with this object.')
);
$rendered_table = drupal_render($table);
return array('cmodels' => $rendered_table);
} }

Loading…
Cancel
Save