From 43f5238ea4b1ab62aeff74233f45a3160e863680 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 25 Mar 2019 17:13:15 +0100 Subject: [serversetup-bwlp-ipxe] Direct boot for menus with one item --- .../serversetup-bwlp-ipxe/inc/ipxemenu.inc.php | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'modules-available/serversetup-bwlp-ipxe/inc/ipxemenu.inc.php') diff --git a/modules-available/serversetup-bwlp-ipxe/inc/ipxemenu.inc.php b/modules-available/serversetup-bwlp-ipxe/inc/ipxemenu.inc.php index 991ee403..f437c447 100644 --- a/modules-available/serversetup-bwlp-ipxe/inc/ipxemenu.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/inc/ipxemenu.inc.php @@ -71,6 +71,29 @@ class IPxeMenu return $str; } + public function timeoutMs() + { + return $this->timeoutMs; + } + + /** + * @return int Number of items in this menu + */ + public function itemCount() + { + return count($this->items); + } + + /** + * @return string|false Return script label of default entry, false if not set + */ + public function getDefaultScriptLabel() + { + if ($this->defaultEntryId !== null) + return "m_{$this->menuid}_{$this->defaultEntryId}"; + return false; + } + /* * */ -- cgit v1.2.3-55-g7522