mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-05-21 05:40:47 +00:00
36 lines
767 B
PHP
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;
|
|
}
|
|
}
|