-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate user action earlier than before execute (#2230)
- Loading branch information
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atk4\Ui\Demos; | ||
|
||
use Atk4\Ui\App; | ||
use Atk4\Ui\Button; | ||
use Atk4\Ui\View; | ||
|
||
/** @var App $app */ | ||
require_once __DIR__ . '/../init-app.php'; | ||
|
||
$country = new Country($app->db); | ||
DemoActionsUtil::setupDemoActions($country); | ||
|
||
$buttons = View::addTo($app, ['ui' => 'vertical basic buttons']); | ||
|
||
foreach ($country->getUserActions() as $action) { | ||
$b = Button::addTo($buttons, [$action->getCaption()]); | ||
$b->on('click', $action); // action is intentionally not bound to entity nor ID arg is passed to executor | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters