Skip to content

This is a Zend Framework plugin to easily set up the flash messenger action helper

Notifications You must be signed in to change notification settings

fishrod-interactive/flashmessenger-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Flash Messenger

Flash messenger is a plugin for Zend Framework to allow you to quickly and efficiently set up the FlashMessenger action helper with minimal effort!

#How To Use

Copy and Register the Plugin

  1. Clone/Download this git repo

  2. Copy "FlashMessenger.php" to /path/to/your/app/application/plugins/

  3. Add this to application.ini to register the plugin

    resources.frontController.plugins.FlashMessenger = "Application_Plugin_FlashMessenger"

Setting Flash Messages

Setting a flash message is easy, simply call the following in your controller.

$this->_helper->FlashMessenger('my flash message');

Getting Flash Messages

Getting flash messages couldn't be simpler, simply add the following to your layout.phtml or view script

<?php if(!empty($this->flashMessages)):?>
<div class="flashmessages">
	<ul>
	<?php foreach($this->flashMessages as $message): ?>
		<li><?php echo $message; ?></li>
	<?php endforeach; ?>
	</ul>
</div>
<?php endif; ?>

Or if you would like all of the messages on one line simply use

<?php if(!empty($this->flashMessages)):?>
<div class="flashmessages">
	<?php implode(',', $this->flashMessages); ?>
</div>
<?php endif; ?>

About

This is a Zend Framework plugin to easily set up the flash messenger action helper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages