2017 © Pedro Peláez
 

cakephp-plugin cakephp-3-sweet-alert-helper

SweetAlertHelper plugin for CakePHP

image

falco442/cakephp-3-sweet-alert-helper

SweetAlertHelper plugin for CakePHP

  • Friday, March 9, 2018
  • by falco442
  • Repository
  • 2 Watchers
  • 0 Stars
  • 12 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 33 % Grown

The README.md

SweetAlertHelper plugin for CakePHP

Requirements

  • CakePHP 3.x

Installation

You can install this plugin into your CakePHP application using composer., (*1)

The recommended way to install composer packages is:, (*2)

composer require falco442/cakephp-3-sweet-alert-helper

Usage

In your src/View/AppView.php, put the helpers, (*3)

public function initialize()
{
    ...
    $this->loadHelper('SweetAlertHelper.Form');
    $this->loadHelper('SweetAlertHelper.Html');
    ...
}

and in the template layout (or in the views), load the js file:, (*4)

<?php
    ...
    echo $this->Html->script('SweetAlertHelper.sweetalert2.min');
    ...
?>

Then you can use the confirm option of * postLink method of FormHelper * link method of HtmlHelper to show a Sweet Alert at the place of a normal alert, with your message:, (*5)

<?= $this->Html->link('home',['action'=>'display','home'],['confirm'=>'Sei  proprio sicuro?']); ?>
<?= $this->Form->postLink('home',['action'=>'display','home'],['confirm'=>'Sei proprio sicuro?']) ?>

The Versions

09/03 2018

dev-master

9999999-dev

SweetAlertHelper plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

09/03 2018

1.0.1

1.0.1.0

SweetAlertHelper plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

09/03 2018

1.0.0

1.0.0.0

SweetAlertHelper plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires

09/03 2018

0.0.0

0.0.0.0

SweetAlertHelper plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires