35 $id =
'elgg-tabs-' . base_convert(mt_rand(), 10, 36);
50 if (!isset($tab[
'href']) && !isset($tab[
'content'])) {
51 elgg_log(
'Tab configuration in "page/components/tabs" requires either a "href" or "content" parameter',
'NOTICE');
59 $tab_id =
"{$id}-{$index}";
60 if (isset($tab[
'content'])) {
64 unset($tab[
'content']);
66 $tab[
'href'] =
"#{$tab_id}";
68 if (!isset($tab[
'data-ajax-reload'])) {
69 $tab[
'data-ajax-reload'] =
true;
79 if (!isset($tab[
'name'])) {
80 $tab[
'name'] =
"{$id}-tab-{$index}";
83 $tab[
'data-target'] =
"#{$tab_id}";
90 'class' =>
'elgg-components-tabs',
97 unset(
$vars[
'module']);
elgg_view_module(string $type, string $title, string $body, array $vars=[])
Wrapper function for the module display pattern.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
elgg_import_esm(string $name)
Helper functions for external files like css/js.
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
if(!isset($id)) $vars['id']
$id
Tabbed module component Provides support for inline and ajax tabbing.
if(empty($tabs)) $content
$selected
Admin helper view for tabs on the different security pages.
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.