Elgg  Version 3.0
add_button.php
Go to the documentation of this file.
1 <?php
7  'context' => elgg_get_context(),
8  'context_stack' => elgg_get_context_stack(),
9  'show_access' => elgg_extract('show_access', $vars, true),
10  'owner_guid' => elgg_extract('owner_guid', $vars, elgg_get_page_owner_guid()),
11 ];
12 
14 
15 echo elgg_view_menu('title:widgets', [
16  'items' => [
17  [
18  'name' => 'widgets_add',
19  'href' => false,
20  'text' => elgg_echo('widgets:add'),
21  'icon' => 'cog',
22  'link_class' => 'elgg-lightbox elgg-more',
23  'data-colorbox-opts' => json_encode([
24  'href' => $href,
25  'maxWidth' => '900px',
26  'maxHeight' => '90%',
27  ]),
28  ],
29  ],
30  'class' => 'elgg-menu-hz',
31 ]);
elgg_http_add_url_query_elements($url, array $elements)
Sets elements in a URL&#39;s query string.
Definition: elgglib.php:942
elgg_normalize_url($url)
Definition: output.php:186
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:755
$href
Definition: add_button.php:13
$href_options
Button area for showing the add widgets panel.
Definition: add_button.php:6
elgg echo
Translates a string.
Definition: languages.js:43
elgg_get_context()
Get the current context.
Definition: pageowner.php:201
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
$vars['type']
Definition: save.php:11
elgg_get_context_stack()
Get the entire context stack (e.g.
Definition: pageowner.php:248
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
Definition: pageowner.php:22