chomenko/confirm

There is no license information available for the latest version (v2.0.0) of this package.

Installs: 580

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:extensions

v2.0.0 2019-07-15 06:23 UTC

This package is auto-updated.

Last update: 2024-10-15 18:41:29 UTC


README

Confirm modal from Nette Framework

confirm

Required

Install

composer require chomenko/confirm

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