From f0bd3e9490a6114b1b9dd051aad9fb984fb535ee Mon Sep 17 00:00:00 2001 From: ajstanley Date: Fri, 29 Jul 2016 18:08:44 -0300 Subject: [PATCH] now as a renderable array --- islandora.module | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/islandora.module b/islandora.module index 2ffc8133..7a7f2212 100644 --- a/islandora.module +++ b/islandora.module @@ -2188,13 +2188,13 @@ function islandora_islandora_overview_object(AbstractObject $object) { } } } - $header = count($rows) > 1 ? t('Content Models') : t('Content Model'); + $header = format_plural(count($rows), 'Content Model', 'Content Models'); $table = array( - '#theme' => 'table', - '#header' => array($header), - '#rows' => $rows, - '#empty' => t('No Islandora content model associated with this object.'), - ); - $rendered_table = drupal_render($table); - return array('cmodels' => $rendered_table); + '#type' => 'markup', + '#theme' => 'table', + '#header' => array($header), + '#rows' => $rows, + '#empty' => t('No Islandora content model associated with this object.') + ); + return array('cmodels' => $table); }