elgg_extract('id', $vars), 'class' => (array) elgg_extract('class', $vars, []), ]; $attrs['class'][] = 'elgg-module'; if ($type) { $attrs['class'][] = "elgg-module-$type"; } $header = elgg_extract('header', $vars); if ($title) { $header = elgg_format_element('h3', [], $title); } if ($header !== null) { $header = elgg_format_element('div', ['class' => 'elgg-head'], $header); } $body = elgg_format_element('div', ['class' => 'elgg-body'], $body); if ($footer) { $footer = elgg_format_element('div', ['class' => 'elgg-foot'], $footer); } $contents = $header . $body . $footer; if ($show_inner) { $contents = elgg_format_element('div', ['class' => 'elgg-inner'], $contents); } echo elgg_format_element('div', $attrs, $contents);