DRY way to create message boxes in SilverStripe backend.
PHP
Latest commit bf91e28 Oct 21, 2016 @spekulatius spekulatius committed on GitHub Fixing badge

README.md

Generate SilverStripe backend messages with one simple call. Type less, do more.
Build Status Latest Stable Version Latest Unstable Version Scrutinizer Code Quality Total Downloads License

Requirements

  • SilverStripe Framework ^3.0

Installation

composer require friendsofsilverstripe/backendmessages

Usage

Within any FieldList you can call any of the following static methods to create a message box:

FieldList::create(
    ErrorMessage::create('Ehh, something went wrong.'),
    WarningMessage::create('Be careful with this!'),
    SuccessMessage::create('Yeah, that went through just fine.'),
    NoticeMessage::create('This is a useful hint.'),
    Message::generic('Some more information.')
);

generates

MISC: Future ideas/development, issues, Contributing, License