chomenko/confirm
Composer 安装命令:
composer require chomenko/confirm
包简介
README 文档
README
Confirm modal from Nette Framework
Required
Install
composer require chomenko/confirm
- Configure kdyby/events
- Configure chomenko/extra-form
- Configure chomenko/modal
And then you should enable the extension using your neon config.
extensions: Confirm: Chomenko\Confirm\DI\ConfirmExtension #optionally Confirm: translator: Chomenko\Translator\Translator
Usage
Use annotation @Confirm
in control:
<?php //Your Presenter or Component use Chomenko\Confirm\Confirm; /** * @Confirm( * question="You really want to delete this user?", * type=Confirm::TYPE_DANGER * ) * * @param int $userId * @throws \Nette\Application\AbortException */ public function handleRemoveUser(int $userId) { //.... }
in latte:
<a n:href="RemoveUser!, userId => 1">Remove user</a>
Confirm options
| Name | Type |
|---|---|
| label | string |
| question | string |
| yes | string |
| not | string |
| type | TYPE_DANGERTYPE_SUCCESSTYPE_WARNINGTYPE_INFOTYPE_DEFAULT |
| translate | bool |
| deniedDestination | string (Presenter:actin) |
| translateFile | string |
统计信息
- 总下载量: 584
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-01-30