2017 © Pedro Peláez
 

lithium-library li3_flash_message

The Flash Message plugin for Lithium provides a straightforward interface for displaying status messages to the user.

image

gavd/li3_flash_message

The Flash Message plugin for Lithium provides a straightforward interface for displaying status messages to the user.

  • Thursday, March 3, 2016
  • by gavD
  • Repository
  • 1 Watchers
  • 2 Stars
  • 137 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Flash Message Plugin for Lithium

The Flash Message (li3_flash_message) plugin provides a straightforward interface for displaying status messages to the user., (*1)

Goals

  • Use existing session storage
  • Eliminate message content from controllers
  • Easily localize messages
  • Use filters to integrate into existing workflow

Integration


Usage

Here is an example of adding flash messages in a controller:, (*2)

request)) {
            FlashMessage::write('Logged you in!');
            return $this->redirect(array('Employees::index'));
        }

        $loginFailed = false;
        if ($this->request->data){
            $loginFailed = true;
        }
        return compact('loginFailed');
    }

    public function logout() {
        FlashMessage::write('Logged you out!');
        Auth::clear('admin');
        return $this->redirect('/');
    }
}
?>

To include the messages in your template, simply add:, (*3)

<?= $this->flashMessage->show() ?>

By default, libraries/li3_flash_message/app/views/elements/flash_message.html.php will be used to render your flash message. You can create app/views/elements/flash_message.html.php to override it and render it however you like!, (*4)

For a full example of using this library, please see the relevant chapter in "Step by step Li3"., (*5)

The Versions

03/03 2016

1.1.1

1.1.1.0

The Flash Message plugin for Lithium provides a straightforward interface for displaying status messages to the user.

  Sources   Download

MIT

The Requires

 

03/03 2016

1.1.0

1.1.0.0

The Flash Message plugin for Lithium provides a straightforward interface for displaying status messages to the user.

  Sources   Download

MIT

The Requires

 

12/12 2015

dev-master

9999999-dev

The Flash Message plugin for Lithium provides a straightforward interface for displaying status messages to the user.

  Sources   Download

MIT

The Requires

 

12/12 2015

1.0.5

1.0.5.0

The Flash Message plugin for Lithium provides a straightforward interface for displaying status messages to the user.

  Sources   Download

MIT

The Requires

 

12/12 2015

1.0.6

1.0.6.0

The Flash Message plugin for Lithium provides a straightforward interface for displaying status messages to the user.

  Sources   Download

MIT

The Requires