summaryrefslogtreecommitdiff
path: root/resources/views/components/radios.phtml
blob: b830a28dd94922fe06d7e4c59c46535734796b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

declare(strict_types=1);

/**
 * @var string        $name
 * @var mixed         $selected
 * @var array<string> $options
 */

?>

<?php foreach ($options as $value => $label) : ?>
    <?= view('components/radio', ['label' => $label, 'name' => $name, 'value' => (string) $value, 'checked' => $value === $selected]) ?>
<?php endforeach;