From 277fedffc624f55c6ecc8bd80ed8db370134e47e Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 20 Jan 2023 20:22:06 +0100 Subject: Rename and reorganize more source files. --- includes/view-helpers/select_field.php | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 includes/view-helpers/select_field.php (limited to 'includes/view-helpers/select_field.php') diff --git a/includes/view-helpers/select_field.php b/includes/view-helpers/select_field.php deleted file mode 100644 index aa156d0..0000000 --- a/includes/view-helpers/select_field.php +++ /dev/null @@ -1,31 +0,0 @@ - -// SPDX-FileCopyrightText: 2021 Harald Eilertsen -// -// SPDX-License-Identifier: AGPL-3.0-or-later - -namespace EternalTerror\ViewHelpers; - -/** - * Return HTML code for a selction box with the given options and preselected value. - * - * @param string $name The name attribute for the selection box - * @param array $opts The options as arrays of [value, label] pairs - * @param mixed|int $selected The value of the preselected option, or null if no - * option is preselected. - * @param string $blank Text to use for "no selection", defaults to "Please - * select..." - * @return string - */ -function select_field( - string $name, - array $opts = array(), - $selected = null, - string $blank = 'Please select...' ) : string { - $body = ""; - foreach ( $opts as $opt ) { - $sel = selected( $selected, $opt[0], false ); - $body .= ""; - } - return ""; -} -- cgit v1.2.3