/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Tui/Event/SubmitEvent.php
47 строк
1004 B
Fabien Potencier
[Tui] Add the component
29 апр 2026, 11:20
29 апр 2026, 11:20
a818679
Код
Авторство
О чём код?
<?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\AbstractWidget; /** * Event dispatched when content is submitted (e.g., Enter pressed in Input/Editor). * * @experimental * * @author Fabien Potencier <fabien@symfony.com> */ class SubmitEvent extends AbstractEvent { public function __construct( AbstractWidget $target, private readonly string $value, ) { parent::__construct($target); } /** * Get the submitted value. */ public function getValue(): string { return $this->value; } /** * Check if the submitted value is empty or contains only whitespace. */ public function isBlank(): bool { return '' === trim($this->value); } }