Download the PHP package tobento/app-notification without Composer

On this page you can find all versions of the php package tobento/app-notification. 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 app-notification

App Notification

The app notification provides the following features:

Table of Contents

Getting Started

Add the latest version of the app notification project running this command.

Requirements

Documentation

App

Check out the App Skeleton if you are using the skeleton.

You may also check out the App to learn more about the app in general.

Notification Boot

The notification boot does the following:

You may install the App Backend and boot the notification in the backend app.

Notification Config

The configuration for the notification is located in the file at the default App Skeleton config location where you can configure features and more.

Features

Notifications Feature

The notifications feature provides a page where users can create, edit and delete any notification types registered such as custom notifications or any other custom notification types created.

Config

In the config file you can configure this feature:

ACL Permissions

If using the App Backend, you can assign the permissions in the roles or users page.

Preview Notification

A preview link is available on the index page and edit page of the notifications if supported by the notification type.

To support previewing, you will use the following two methods on any notification type you want to support it.

Example from the :

You may check out the file too.

Send Notification For Review

On the notifications index page, each notification may have a link to send the notification for reviewing if supported by the notification type.

Sending notifications is supported:

Reports

On the notifications index page, each notification may have a link to view reports about sent notifications if supported by the notification type. Reports may differ depending on its notification type. For instance, newsletters notifications, will display the total number of notifications sent, the number of recipients who clicked links if tracking enabled and more.

To support reports, the notification type must implement the and have configured cards using the method.

Example from the :

For further details, please refer to the source file.

You may visit the App Card link to find out more about cards.

Available Cards

Adding Custom Cards Using The ReportCards::class

You can add custom cards onto the class which will be displayed together with the cards defined in the method on the notification types. Use the app method to add cards on demand only:

Adding Or Modifying Cards For Specific Notification Types

You can modify or add cards by simply extending the notification type:

Do not forget to register the customized notification type in the notification config file:

Custom Notifications Feature

You may create custom notifications for replacing notifications send by the App - Notifier.

Create Custom Notification

Lets create a custom notification type for the App User Web - Forgot Password Notification by extending the :

Check out the Placeholders to learn more about it.

Register Custom Notification

config file:

Manage Custom Notification

Custom notifications can be managed by simply enabling the Mail Editor - App Block is used to create the mail messages with, which you may configure to fit your requirements.

Replace Custom Notification

Add the feature to replace notifications with your custom notifications in the app(s) you support. Only notifications with the status will be replaced.

Config

In the config file you can configure this feature:

You may consider using the App Backend to manage custom notifications.

In addition, you may check out the Apps bundle if you want to support multiple apps.

Users Notification Feature

Register User Notification

Register the users notification type so as to config file:

Manage User Notification

User notifications can be easily managed by enabling the Notifications Feature.

Sending User Notifications

You can deliver user notifications created from the web interface by using the Notifications Send Command. There are two main approaches:

Warning Use caution with the option when sending notifications immediately. To avoid timeouts, a maximum of 20 is recommended. When queueing notifications, the interval can be set much higher, with a maximum of 20000 recommended.

Option 1: Using App Schedule

Install the App Schedule bundle and configure a command task:

Option 2: Using App Task

Install the App Task bundle and register the task in the task config file. This allows users to schedule the task directly from the web interface:

Alternatively, you can use the Command Task Registry:

Newsletter Feature

Register Newsletter Notification

Register the newsletter notification type so as to config file:

Manage Newsletter Notification

Newsletter notifications can be managed by simply enabling the Notifications Feature.

Sending Newsletters

You can deliver newsletters created from the web interface by using the Notifications Send Command. There are two main approaches:

Warning Use caution with the option when sending notifications immediately. To avoid timeouts, a maximum of 20 is recommended. When queueing notifications, the interval can be set much higher, with a maximum of 20000 recommended.

Option 1: Using App Schedule

Install the App Schedule bundle and configure a command task:

Option 2: Using App Task

Install the App Task bundle and register the task in the task config file. This allows users to schedule the task directly from the web interface:

Alternatively, you can use the Command Task Registry:

Newsletter Subscribers Feature

The newsletter subscribers feature provides a page where users can create, edit and delete newsletter subscribers to send newsletters using the Newsletter Feature.

Config

In the config file you can configure this feature:

ACL Permissions

If using the App Backend, you can assign the permissions in the roles or users page.

Manage Newsletter Subscribers

Newsletter Subscribers can be managed by simply enabling this feature and using the web interface.

Subscribe And Unsubscribe From Newsletter

Using The Subscriber Repository

You may check out the App User and Service User for more information.

Using User Web

If using the App - User Web bundle, you can register the event listener which will subscribe and unsubscribe users from the newsletter after registration and profile updates depending whether the users clicked the newsletter checkbox.

In the config/event.php file add the following listener:

Subscribe Newsletter Feature

The subscribe newsletter feature provides a simple subscribe to newsletter functionality.

Config

In the config file you can configure this feature:

ACL Permissions

If using the App Backend, you can assign the permissions in the roles or users page.

Topics

You may configure topics the user can select. In the newsletter type web interface you can specify which topics the newsletter covers and should only be sent to those subscribers who have selected the topics.

In the config file you can configure the topics globally:

Spam Protection

The newsletter subscribe form is protected against spam by default using the App Spam bundle. It uses the spam detector as the defined named detector does not exist. In order to use a custom detector, you will just need to define it on the file:

Rate Limiting

The newsletter subscribe form is rate limitied by default using the App Spam bundle.

You may customize it by overwriting the method:

Available Events

Event Description
The event will dispatch after a user subscribes to the newsletter.
The event will dispatch after a user subscription failed.

Unsubscribe Newsletter Feature

The unsubscribe newsletter feature provides a simple unsubscribe from newsletter functionality.

Config

In the config file you can configure this feature:

Use the router to generate unsubscribe links. Make sure you sign the url as the registered route in the feature class is signed too.

You may check out the Signed Routing service for more information.

Additionally, a newsletter notification page.

Warning When using multiple apps, ensure that the is consistently configured in each file, otherwise unsubscribe links may not function properly.

Sent Notifications Feature

This feature is in consideration.

Tracking Feature

The tracking feature will events tracking.

Config

In the config file you can configure this feature:

You may disable tracking using the parameter when registering newsletter notification.

Warning If you do not enable the feature at all, make sure you disable the tracking on all notification types, otherwise tracking links will not be found and result in 404 responses.

Links Tracking

When generating notification content, href links are replaced by a tracking token link, using the implemented and configurable in the querying reports data.

Events Tracking

After a link is clicked, the click ID is stored in the session under the key . You can use this ID to track user activity. You may use the implemented configurable in the config file to store events.

Make sure the uses a storage supporting raw statements as they will be used for querying reports data.

Example

For example, you can record how many orders were generated by a newsletter campaign.

Newsletter notifications have already added the most tracked events card, but you may create a custom report card to display reports about generated orders by a newsletter campaign. Use the app method to register the card on demand only using to add the card:

Check out the reports section to find out more about reports.

Channels

Channels are responsible for rendering the fields required to create channel‑specific messages within the notifications web interface. Based on the configured notification, they generate the corresponding message for the notifier to deliver. In addition, channels manage the notification preview feature.

Configure Channels

Channels can be configure in the notification config file:

Be sure to configure the notifier channels as well.

Mail Channel

The mail channel allows you to create email messages using the Block Mail Editor, which can be customized to meet your requirements. Additionally, it supports uploading email attachments.

Make sure to also configure the corresponding notifier mail channel in the file.

SMS Channel

The SMS channel allows you to create SMS messages.

Make sure to also configure the corresponding notifier sms channel in the file.

Storage Channel

The storage channel enables you to create messages that are displayed on the user notifications page, provided the Notifications Feature from the App User Web is installed.

Make sure to also configure the corresponding notifier storage channel in the file.

Additionally, ensure that the is registered in the same configuration file:

Chat Channel

The chat channel allows you to create chat messages.

Make sure to also configure the corresponding notifier chat channel in the file.

Push Channel

The push channel allows you to create push messages.

Make sure to also configure the corresponding notifier push channel in the file.

Placeholders

Placeholders allow the user to insert placeholders like into their content, which can be replaced with dynamic values when the content is rendered.

Placeholders can be defined in notification type classes. See create custom notification for instance.

Placeholder

This placeholder will replace the placeholder defined by the parameter with the defined.

Greeting Placeholder

This placeholder will replace the placeholder with the greeting from the address.

Console

Notifications Send Command

Use the following command to send any type of notifications:

Available Options

Option Description
The number of notifications to send or queue.
Define the queue name if you want to queue the notification, otherwise notifcation will be sent immediately.
Send only specific types.
Sends notfication with the status.
The maximum number of times a job should be attempted.
The priority when queueing, highest are first prioritized.
If set notification will be encrypted when queueing.

Check out the Sending Newsletters section to see possible options how to automate this process.

Purge Tracking Tokens Command

Use the following command to delete expired tracking tokens.

Available Options

Option Description
The number of days to retain tracking tokens after expiring.

You may install the App Task bundle and register the following task in the task config file which enables users to schedule the task from a web interface:

Example using the Command Task Registry:

Custom Loggers

You can configure custom loggers in the Logging Config file for the following classes, which make use of the Logger Trait.

Learn More

Using Multiple Apps

When using multiple Apps, you may use the App Backend for managing notifications and subscribers. Make sure that you configure the database using the same connection as in this example.

Next, configure the config for another app (frontend). You may visit the Apps documentation to find out more about creating apps.

Finally, in the database config file, in both apps, configure the database:

Configure Language For Notifications

When using multiple apps you may configure languages for the following services in the backend app.

Credits


All versions of app-notification with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
tobento/app Version ^2.0
tobento/app-block Version ^2.0
tobento/app-card Version ^2.0
tobento/app-crud Version ^2.0
tobento/app-http Version ^2.0
tobento/app-migration Version ^2.0
tobento/app-notifier Version ^2.0
tobento/app-language Version ^2.0
tobento/app-logging Version ^2.0
tobento/app-translation Version ^2.0
tobento/app-user Version ^2.0
tobento/app-view Version ^2.0
tobento/service-collection Version ^2.0
tobento/service-repository Version ^2.0
tobento/service-repository-storage Version ^2.0
tobento/service-user Version ^2.0
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 tobento/app-notification contains the following files

Loading the files please wait ...