2017 © Pedro Peláez
 

library bootstrap-flash-messenger

Simple implementation of ZF2 flash messengers using bootstrap. Contains easy helpers that will save you a LOT of time.

image

zf-hipsters/bootstrap-flash-messenger

Simple implementation of ZF2 flash messengers using bootstrap. Contains easy helpers that will save you a LOT of time.

  • Sunday, March 9, 2014
  • by aaron4m
  • Repository
  • 3 Watchers
  • 14 Stars
  • 4,925 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 3 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

Bootstrap Flash Messenger

A simple module that makes flash messengers as simple as they are in CakePHP. And the best part is it generates beautifully formatted Bootstrap alerts!, (*1)

Installation

1) Add the following requirement to your projects composer.json file., (*2)

Within the "require" section:, (*3)

"zf-hipsters/bootstrap-flash-messenger": ">=1.0"

2) Open up your command line and run, (*4)

php ./composer.phar update

2) Add 'FlashMessenger' to your /config/application.config.php modules, (*5)

Controller Plugin Examples

Simple success (this is the default namespace), (*6)

$this->fm('You have been logged in.');
return $this->redirect()->toRoute('dashboard');

Error, (*7)

$this->fm('Your username and/or password were incorrect.', 'error');
return $this->redirect()->toRoute('authorize/login');

Info, (*8)

$this->fm('Something cool happened!', 'info');
return $this->redirect()->toRoute('home');

Warning, (*9)

$this->fm('Careful! Something bad could happen!', 'warning');
return $this->redirect()->toRoute('dashboard');

View Helper Example

Default usage, (*10)

<?=$this->fm()?>

Custom Namespace(s), (*11)

<?=$this->fm('exciting_namespace')?>
<?=$this->fm(array('mynamespace1', 'mynamespace2'))?>

Customising templates

Customising templates and changing the titles is super easy! Ensure that FlashMessenger is somewhere at the top of your list in application.config.php Now, copy the vendor/zf-hipsters/bootstrap-flash-messenger/view/flash-messenger folder to your eg module/application/view folder., (*12)

That's it, customise to your hearts content and they will overload the default files!, (*13)

The Versions

09/03 2014

dev-master

9999999-dev https://github.com/zf-hipsters/bootstrap-flash-messenger

Simple implementation of ZF2 flash messengers using bootstrap. Contains easy helpers that will save you a LOT of time.

  Sources   Download

The Requires

 

zf2 flash bootstrap flashmessenger

10/11 2013

1.02

1.02.0.0 https://github.com/zf-hipsters/bootstrap-flash-messenger

Simple implementation of ZF2 flash messengers using bootstrap. Contains easy helpers that will save you a LOT of time.

  Sources   Download

The Requires

 

zf2 flash bootstrap flashmessenger

09/11 2013

1.01

1.01.0.0 https://github.com/zf-hipsters/bootstrap-flash-messenger

Simple implementation of ZF2 flash messengers using bootstrap. Contains easy helpers that will save you a LOT of time.

  Sources   Download

The Requires

 

zf2 flash bootstrap flashmessenger

09/11 2013

1.0

1.0.0.0 https://github.com/zf-hipsters/bootstrap-flash-messenger

Simple implementation of ZF2 flash messengers using bootstrap. Contains easy helpers that will save you a LOT of time.

  Sources   Download

The Requires

 

zf2 flash bootstrap flashmessenger