Download the PHP package sheadawson/silverstripe-notifications without Composer

On this page you can find all versions of the php package sheadawson/silverstripe-notifications. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-notifications

SilverStripe Notifications Module

Send CMS managed system email notifications from code.

Maintainer Contacts

Requirements

Installation Instructions

Sending a notification

The module comes with a default BroadcastNotification object that can be used to send a notification to multiple people at once. First, create the SystemNotification (which defines how the notification will be sent)

Notifications => Add System Notification

Notifications => Add Broadcast Notification

Creating System Notifications

Creating custom notifications requires a few pieces of code to put things together. Use the BroadcastNotification as an example, with the key points identified below

1)

In your _config yml file, add an identifier for each notification you require. This allows you to lookup Notification objects in the database from your code.

2)

Add the NotifiedOn interface to any dataobjects that are relevant to the notifications you will be sending. This is required so the Notifications module can look up the below methods on your object to send the notification.

Define the following interface methods on the Object being notified on.

Note: the follow template data is automatically included:

Note: getRecipients() can return an array of any objects, as long as they have an Email property or method

3)

Create a notification in the Notifications model admin, in the CMS.

4)

Send the notification from your code, where $contextObject is an instance of the DataObject being NotifiedOn

Templates

Notifications can be rendered with .ss templates. This is useful if you want to have a header/footer in your email notifications. You can either specify a template on a per/notification basis in the CMS, and/or set a default template for all notifications to be rendered with:

In your templates, you render the notification text with the $Body variable.

Configuration

You will probably want to configure a send_from email address -

TODO


All versions of silverstripe-notifications with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
silverstripe/cms Version ~3.1
silverstripe/framework Version ~3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sheadawson/silverstripe-notifications contains the following files

Loading the files please wait ....