Files
2020-04-04 19:04:04 -05:00

36 lines
767 B
PHP

<?php
namespace ScummVM\Objects;
/**
* The menu class represents a sidebar menu group on the website.
*/
class MenuItem extends BasicObject
{
private $class;
private $entries;
/* Menu object constructor. */
public function __construct($data)
{
parent::__construct($data);
$this->class = $data['class'];
$this->entries = array();
foreach (array_values($data['links']) as $value) {
$this->entries[$value['name']] = $value['href'];
}
}
/* Get the CSS class. */
public function getClass()
{
return $this->class;
}
/* Get the list of links, with the name as key and URL as value. */
public function getEntries()
{
return $this->entries;
}
}