23 'contexts' => [
'all'],
26 'section' =>
'default',
38 'show_with_empty_children' =>
true,
59 'item_contents_view' => null,
98 $this->data[
'name'] =
$name;
136 elgg_log(__METHOD__ .
': $options "name" and "text" are required.',
'ERROR');
160 if (isset(
$options[
'link_class'])) {
165 if (isset(
$options[
'item_class'])) {
176 if (array_key_exists(
$key,
$item->data)) {
197 if (is_array(
$key)) {
198 $this->data = array_merge($this->data,
$key);
211 if (isset($this->data[
$key])) {
212 return $this->data[
$key];
225 $this->data[
'name'] =
$name;
234 return $this->data[
'name'];
294 return $this->data[
'contexts'];
305 if (in_array(
'all', $this->data[
'contexts'])) {
310 return in_array(
$context, $this->data[
'contexts']);
313 foreach ($this->data[
'contexts'] as
$context) {
329 $this->data[
'selected'] =
$state;
338 if (isset($this->data[
'selected'])) {
339 return $this->data[
'selected'];
352 $this->title =
$text;
371 $this->confirm =
$text;
391 $this->data[
'linkClass'] = [
$class];
393 $this->data[
'linkClass'] =
$class;
403 return implode(
' ', $this->data[
'linkClass']);
423 $this->data[
'deps'] = (array) $modules;
432 $modules = (array) $this->data[
'deps'];
433 return array_filter($modules,
function($m) {
434 return is_string($m) && !empty($m);
446 $this->
setDeps($current + (array) $modules);
456 $this->data[
'child_menu'] =
$options;
465 return $this->data[
'child_menu'];
476 $this->data[
'itemClass'] = [
$class];
478 $this->data[
'itemClass'] =
$class;
489 $name = preg_replace(
'/[^a-z0-9\-]/i',
'-', strtolower($this->
getName()));
493 return "elgg-menu-item-$name $class";
495 return "elgg-menu-item-$name";
517 protected function addClass(array &$current, $additional) {
518 if (!is_array($additional)) {
519 $current[] = $additional;
521 $current = array_merge($current, $additional);
541 return (
int) $this->data[
'priority'];
560 return $this->data[
'section'];
570 $this->data[
'parent_name'] =
$name;
579 return $this->data[
'parent_name'];
591 $this->data[
'parent'] = $parent;
602 return $this->data[
'parent'];
614 $this->data[
'children'][] =
$item;
637 return $this->data[
'children'];
650 foreach ($this->data[
'children'] as
$key => $node) {
651 $node->data[
'original_order'] =
$key;
652 $node->sortChildren($sortFunction);
654 usort($this->data[
'children'], $sortFunction);
664 $values = get_object_vars($this);
665 unset($values[
'data']);
687 $this->data[
'item_contents_view'] = $view_name;
697 return $this->data[
'item_contents_view'];
707 return isset($this->data[
'item_contents_view']);
if(!$user||!$user->canDelete()) $name
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
Collection item interface.
elgg_http_url_is_identical($url1, $url2, $ignore_params=['offset', 'limit'])
Test if two URLs are functionally identical.
elgg_in_context($context)
Check if this context exists anywhere in the stack.
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
elgg_get_current_url()
Returns the current page's complete URL.
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key