Elgg  Version 2.3
Menu.php
Go to the documentation of this file.
1 <?php
2 namespace Elgg\Menu;
3 
5 
11 class Menu {
12 
16  private $params;
17 
27  public function __construct(array $params) {
28  $this->params = $params;
29  }
30 
36  public function getSections() {
37  return $this->params['menu'];
38  }
39 
48  public function getSection($name, $default = null) {
49  return isset($this->params['menu'][$name]) ? $this->params['menu'][$name] : $default;
50  }
51 
57  public function getName() {
58  return $this->params['name'];
59  }
60 
66  public function getParams() {
67  return $this->params;
68  }
69 }
getParams()
Get the menu parameters.
Definition: Menu.php:66
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
getName()
Get the menu&#39;s name.
Definition: Menu.php:57
getSection($name, $default=null)
Get a single menu section.
Definition: Menu.php:48
$default
Definition: checkbox.php:34
__construct(array $params)
Constructor.
Definition: Menu.php:27
getSections()
Get all menu sections.
Definition: Menu.php:36
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:5
A complete menu, sorted, filtered by the "prepare" hook, and split into sections. ...
Definition: Menu.php:11