/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Tui/Event/SelectEvent.php
68 строк
1 KB
HypeMC
[Tui] Add `multiselect` option to `SelectListWidget`
07 авг 2026, 17:23
07 авг 2026, 17:23
1d28753
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Tui\Event; use Symfony\Component\Tui\Widget\SelectListWidget; /** * Event dispatched when an item is selected in a SelectList. * * @experimental * * @author Fabien Potencier <fabien@symfony.com> */ class SelectEvent extends AbstractEvent { /** * @param array{value: string, label: string, description?: string, checked?: bool} $item */ public function __construct( SelectListWidget $target, private readonly array $item, ) { parent::__construct($target); } /** * Get the full selected item array. * * @return array{value: string, label: string, description?: string, checked?: bool} */ public function getItem(): array { return $this->item; } /** * Get the selected item's value. */ public function getValue(): string { return $this->item['value']; } /** * Get the selected item's label. */ public function getLabel(): string { return $this->item['label']; } /** * Get the selected item's description, if any. */ public function getDescription(): ?string { return $this->item['description'] ?? null; } }