mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
40 lines
No EOL
789 B
PHP
40 lines
No EOL
789 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Yggverse\Yoda\Entity\Browser\Container\Page\Response;
|
|
|
|
use \Yggverse\Yoda\Entity\Browser\Container\Page\Response;
|
|
|
|
class Send extends \Yggverse\Yoda\Abstract\Entity\Button
|
|
{
|
|
// Dependencies
|
|
public Response $response;
|
|
|
|
// Defaults
|
|
public const LABEL = 'Send';
|
|
|
|
public function __construct(
|
|
Response $response
|
|
) {
|
|
// Use parent features
|
|
parent::__construct();
|
|
|
|
// Init dependency
|
|
$this->response = $response;
|
|
}
|
|
|
|
protected function _onCLick(
|
|
\GtkButton $entity
|
|
): void
|
|
{
|
|
$this->response->send();
|
|
}
|
|
|
|
public function refresh(): void
|
|
{
|
|
$this->gtk->set_sensitive(
|
|
!empty($this->response->query->getValue())
|
|
);
|
|
}
|
|
} |