Skip to content

librette/confirmation-dialog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

The best way to install this extension is using Composer:

$ composer require librette/confirmation-dialog

Usage

You can use confirmation dialog in handle* methods in presenters and controls.

class ArticleControl extends Control
{
	use Librette\ConfirmationDialog\TConfirmation;


	public function handleRemove($id)
	{
		$article = $this->articleRepository->get($id);
		if($this->confirm("Do you really want to delete article {$article->title}?")) {
			$this->articleRepository->delete($article);
			$this->redirect('this');
		} elseif($this->isConfirmationCancelled()) {
			$this->redirect('this');
		}
	}

}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published