Skip to content

Latest commit

 

History

History
1839 lines (1297 loc) · 68.2 KB

CHANGELOG.md

File metadata and controls

1839 lines (1297 loc) · 68.2 KB

NotiZ NotiZ – ChangeLog

v2.1.3 - 14 June 2021

ℹ️ Click on a changelog entry to see more details.

Bugs fixed

Trigger event definition registration in more contexts

by Romain Canon on 14 Jun 2021 / 5e4f479 / #235

In some context — for instance in a CLI request — middlewares do not run, meaning the event definition registration is not done. Because the initialization will be run only once in any case, old hooks are used to ensure a proper registration.

Fixes #234

Fix links to the official extension documentation

by Romain Canon on 14 Jun 2021 / e685438 / #233

Others

Fix Caches cleared event configuration label

by Romain Canon on 14 Jun 2021 / 876f6f8 / #231

Update link to documentation

by Romain Canon on 18 Nov 2020 / f70e0e3 / #227

Update code style

by Romain Canon on 02 Aug 2020 / 5d32722 / #228

v2.1.2 - 27 July 2020

ℹ️ Click on a changelog entry to see more details.

Bugs fixed

Fix editor access to notifications on root page

by Romain Canon on 27 Jul 2020 / aed0d0f / #223

Send notification to all email recipients

by Romain Canon on 30 Apr 2020 / abb23d2 / #220

When multiple event email recipients are selected, only one of them was mapped. Fixes wrong array assignment and merges recipients.

Fix event filter button

by Romain Canon on 30 Apr 2020 / 59ec8f8 / #218

Others

Fix button label

by Romain Canon on 27 Jul 2020 / 4cf5032 / #224

Increase required TYPO3 core version

by Romain Canon on 12 Jun 2020 / 49b2c6a / #221

See advisory:

https://github.com/advisories/GHSA-pqg8-crx9-g8m4

v2.1.1 - 10 April 2020

ℹ️ Click on a changelog entry to see more details.

Bugs fixed

Use middleware for event definition registration

by Romain Canon on 10 avr 2020 / abccf91 / #213

With TYPO3 v9.5+ hooks have been deprecated in favor of middleware usage. Some hooks would event not run as they used to in former versions.

This commit introduces a new middleware (which is used both in frontend and backend) to register the event definitions.

Add default values to TCA entries

by Romain Canon on 04 avr 2020 / 85d28ea / #211

This solves an issue which would display an error message when trying to create a notification with MySQL strict mode enabled.

The "solution" that was written in the documentation was a work around and not adapted at all, as explained in this post: https://stackoverflow.com/a/50138799

Others

Remove year from copyright header

by Romain Canon on 08 avr 2020 / fba2218 / #216

Fix Composer schema validation

by Romain Canon on 04 avr 2020 / 5111006 / #212

composer validate

v2.1.0 - 01 July 2019

ℹ️ Click on a changelog entry to see more details.

New features

Introduce event for new comment submission with EXT:blog

by Romain Canon on 09 May 2019 / 9b2dc98 / #203

A new event is added, it is triggered whenever a user submits a new comment on a blog post.

Both the comment and the post data can be used within a notification.

Bugs fixed

Repair notification entities translation

by Romain Canon on 09 May 2019 / 48b2bdd / #201

Some love has been given to the notification translation inside TYPO3 backend.

Unfortunately, since 2ee9d93 the translation is broken on TYPO3 8.7 instances. Because this issue is already fixed with TYPO3 9.5, no fix has been done yet. Instead, a new section inside the "Known issues" documentation chapter has been added to explain it.

Others

Make Slack additional channel not required

by Romain Canon on 01 Jul 2019 / 8c4f544 / #206

Because another field (slack_channel) can be used to select a channel where to send the Slack message, the additional channel has no reason to be required.

Fixes #204

Remove useless TYPO3 constraint

by Romain Canon on 09 May 2019 / 909f95a / #202

Since v2.0 of this extension, the TYPO3 requirement is higher than the one written in documentation.

Apply TCA migrations

by Romain Canon on 09 May 2019 / d669d4b / #200

Fixes #198

v2.0.1 - 22 March 2019

ℹ️ Click on a changelog entry to see more details.

Bugs fixed

Always return slot label as string

by Romain Canon on 22 Mar 2019 / 35fd39a / #196

Allow any value for a property entry

by Romain Canon on 22 Mar 2019 / 85a3af0 / #195

v2.0.0 - 29 January 2019

ℹ️ Click on a changelog entry to see more details.

New features

Introduce support for TYPO3 v9 LTS

by Romain Canon on 25 Jan 2019 / 383ad51

Important

⚠ Please pay attention to the changes below as they might break your TYPO3 installation:

Use strict types for PHP classes

by Romain Canon on 29 Jan 2019 / f143481 / #191

The extension now uses PHP 7.0 strict types in its API.

Third-party extensions which extend classes of the core may have to adapt their code to follow the new methods signatures.

Drop support for TYPO3 7.6

by Romain Canon on 23 Jan 2019 / e6253af / #190

Further versions of this extension will not support TYPO3 7.6 anymore.

Others

Fix wrong locallang reference for notifications listing

by Romain Canon on 22 Jan 2019 / e31cd20 / #189

Change line feed character in locallang files

by Romain Canon on 22 Jan 2019 / 273c01a / #188

Fix wrong locallang reference for notifications listing

by Romain Canon on 22 Jan 2019 / 9ea07ef / #187

v1.1.0 - 20 January 2019

ℹ️ Click on a changelog entry to see more details.

New features

Assign notification and event instances to email view

by Romain Canon on 21 Dec 2018 / af8cb88 / #176

Two new variables become accessible in the template of an email:

  • {notification} – contains the notification instance
  • {event} – contains the event instance
Handle priority for file definition sources

by Romain Canon on 21 Dec 2018 / 911c135 / #173

The file definition sources are now sorted by the priority they are given.

Default definition files have a high priority, to easily allow other files to override definition values.

Bugs fixed

Distinct TCA processors and data providers

by Romain Canon on 20 Jan 2019 / a339bf1 / #184

Some data providers were actually not acting on an actual notification record, but modifying global TCA configuration instead.

Because of this, TYPO3 core would misunderstand things, like FlexForm configuration done dynamically. This would result in strange behaviour like empty paragraph added on text columns with RTE inside FlexForm fields.

This commit separates these processors in a distinct namespace, with a brand new role and interface.

Fixes #181

Show message when CKEditor preset is missing in slot

by Romain Canon on 20 Jan 2019 / fb61c9b / #182

Make email property handle multiple email addresses

by ogrosko on 18 Dec 2018 / 82a78b9 / #171

closes #170

Others

Add documentation on how to add custom config to events

by Nathan Boiron on 20 Jan 2019 / 9296c10 / #185

Fix wrong locallang references for scheduler events

by Romain Canon on 20 Jan 2019 / 9fba3d5 / #183

Hide columns of notification entity when no event is selected

by Romain Canon on 20 Jan 2019 / cf28edd / #178

Closes #31

Change line feeds in localization files

by Romain Canon on 20 Jan 2019 / a35699e / #177

Fix a typo in the admin module language file

by Nathan Boiron on 21 Dec 2018 / 6282982 / #175

Add .idea to .gitignore

by ogrosko on 18 Dec 2018 / 9ca335d / #172

v1.0.1 - 11 December 2018

ℹ️ Click on a changelog entry to see more details.

Others

Fix documentation settings and build warnings

by Romain Canon on 11 Dec 2018 / 947af7e / #167

v1.0.0 - 10 December 2018

ℹ️ Click on a changelog entry to see more details.

New features

Handle disabled notifications in the manager

by Nathan Boiron on 26 nov 2018 / eb40888 / #159

Filter notifications by event and show a clear button

by Nathan Boiron on 20 nov 2018 / c2c83c6 / #158

Introduce simple definition file registration

by Romain Canon on 12 nov 2018 / 444a2bb / #151

Files containing definition values can now be added in a dramatically more simple way: registering a definition component service is not absolutely needed anymore.

One can just add the following piece of code to the ext_localconf.php file of his/her extension:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['NotiZ']['Definition']['Source'][\CuyZ\Notiz\Domain\Definition\Builder\Component\Source\TypoScriptDefinitionSource::class][]
    = 'EXT:my_extension/Configuration/TypoScript/MyCustomDefinition.typoscript';

Please note that the following method has been renamed. Calls to this method must be changed as well.

\CuyZ\Notiz\Domain\Definition\Builder\Component\Source\TypoScriptDefinitionSource::addTypoScriptFilePath($path)

now becomes:

\CuyZ\Notiz\Domain\Definition\Builder\Component\Source\TypoScriptDefinitionSource::addFilePath($path)

Bugs fixed

Forward to correct controller when an event is not found

by Romain Canon on 06 déc 2018 / ef0032a / #165

Correctly check if notification entity is editable

by Romain Canon on 06 déc 2018 / 3e832c4 / #163

Prevent toolbar Ajax request to run again when it failed

by Romain Canon on 28 nov 2018 / 30a51b0 / #161

In order to prevent potential error log spamming, when the toolbar Ajax request fails, it won't automatically run again.

Fix the activation link generation

by Nathan Boiron on 26 nov 2018 / 77a8bce / #160

Allow access to array values from a scalar index

by Nathan Boiron on 12 nov 2018 / 801c531 / #156

For an array like this:

$data = [
    ['foo' => 'value 0'],
    ['foo' => 'value 1'],
];

It is now possible to use this marker: {data.0.foo}

Use correct display-condition syntax for TYPO3 v8

by Romain Canon on 12 nov 2018 / e49cebf / #152

Move body slots TCA to graceful data provider

by Romain Canon on 25 oct 2018 / 47dc15e / #148

Prevents a crash of the whole TYPO3 backend under certain circumstances.

Handle empty form finisher list

by Romain Canon on 24 oct 2018 / 662d569 / #147

Move event configuration TCA to graceful data provider

by Romain Canon on 24 oct 2018 / 4d07418 / #146

Prevents a crash of the whole TYPO3 backend under certain circumstances.

Set the default value of custom_bot column to 1

by Nathan Boiron on 06 oct 2018 / 3c13e9f / #140

When there are no configured Slack bot, the custom_bot checkbox does not appear and is set to false. The custom bot could not be detected.

Important

⚠ Please pay attention to the changes below as they might break your TYPO3 installation:

Merge languages files

by Nathan Boiron on 06 déc 2018 / 6c50b84 / #164

The project started to have too many language files and it became hard to understand where to put translations.

Other languages were removed to instead use the TYPO3 translation server: https://translation.typo3.org/

Remove definition components identifier

by Romain Canon on 25 oct 2018 / a9c836b / #150

Adding new definition components (source or processor) doesn't require an identifier anymore.

Because these components are actually classes that must implement their own interfaces, the class name itself is a unique identifier.

Current code that uses the following methods should remove the first parameter and leave the second one:

\CuyZ\Notiz\Core\Definition\Builder\Component\DefinitionComponents::addSource($className)
\CuyZ\Notiz\Core\Definition\Builder\Component\DefinitionComponents::addProcessor($className)

Others

Rewrite documentation to RST format

by Romain Canon on 10 déc 2018 / 9f514b5 / #162

Co-authored-by: Nathan Boiron [email protected]

Use new marker syntax

by Romain Canon on 25 oct 2018 / d163c65 / #149

Move exception details panel into partial

by Romain Canon on 18 oct 2018 / 74e2834 / #145

Separate definition error handling in TCA

by Romain Canon on 18 oct 2018 / 68f11e3 / #144

Changes the way the definition error is handled within entity notifications.

The old way consisted in adding display conditions to every field to check if the definition contains error.

Now, a data provider does the same job, and replaces the whole TCA if an error is found.

Make exception return type consistent

by Romain Canon on 06 oct 2018 / 5896793 / #142

Using static was not correct and would make IDE not understand the type of the exception in all situations.

v0.6.0 - 01 October 2018

ℹ️ Click on a changelog entry to see more details.

New features

Add report in TYPO3 module for NotiZ

by Romain Canon on 01 Oct 2018 / a1f6baf / #105

Adds an entry to the status report handled by TYPO3.

If an error is found in the definition, an error report is added to the queue, making it easier for administrators to see that something is wrong with the extension.

Introduce notification manager backend module

by Romain Canon on 30 Sep 2018 / e5f73be / #135

This module gives access to different views, where notifications and events can be managed easily. The usefulness is to centralise every notification-related operation in a single place.

Editors can now create and edit notifications in a very simple and intuitive way. They can also see a detailed view of each existing record, including a preview area.

It is advised to configure editors right access to the new module, as well as their abilities to create/see every type of notification.

Introduce new view-helper to chunk an array

by Romain Canon on 19 Sep 2018 / ae87c82 / #115

Add asynchronous refresh to the notification toolbar

by Romain Canon on 18 Sep 2018 / 1afd071 / #108

A periodic asynchronous refresh has been added to the notification toolbar. These Ajax request will reload notification information every 5 minutes in normal time, and every 30 seconds if an error occurred.

Buttons have been added in the toolbar, allowing a manual refresh.

One thing to note is that the first rendering of the toolbar (done during the TYPO3 backend rendering) does not contain information about existing notifications anymore (they will be fetched asynchronously). This can slightly improve performance when a lot of notifications were to be listed.

Co-authored-by: Nathan Boiron [email protected]

Add legacy backend icon view-helper

by Nathan Boiron on 12 Sep 2018 / 5a20a0b / #107

This view-helper is needed to stay compatible with TYPO3 v7 and v8 without having to check the version every time.

In TYPO3 v7: <f:be.buttons.icon icon="foo" /> In TYPO3 v8: <core:icon identifier="foo" /> This ViewHelper: <nz:core.icon identifier="foo" />

Add description column to notification entities

by Romain Canon on 05 Sep 2018 / 6d9231b / #100

See: https://docs.typo3.org/typo3cms/TCAReference/Ctrl/Index.html#descriptioncolumn

Allow events to give example properties

by Romain Canon on 28 Aug 2018 / e22f2c9 / #97

These example properties will be used to show a preview of notifications using the events giving these examples.

Introduce view-helper to generate link to backend module

by Romain Canon on 28 Aug 2018 / 390f5e6 / #92

The old BackendUriBuilder has been removed for a module manager to take its place.

This will help new incoming backend modules to have their own handlers.

Allow event definition to count notifications bound to it

by Romain Canon on 18 May 2018 / 5256b85 / #90

Introduce signals to globally manipulate properties

by Romain Canon on 18 May 2018 / af3c379 / #89

Can be used for instance to add markers to every notification.

See documentation for more information.

Introduce preset argument for the event of a notification

by Romain Canon on 08 May 2018 / 6f0c561 / #83

An argument selectedEvent can be added to a request for the creation of a new notification. This will give a default value to the event of the notification.

Introduce nl2brTrim view-helper

by Romain Canon on 08 May 2018 / 1089a65 / #82

Will apply a trim on the value, then convert all new lines by an HTML tag <br />.

Add description to notification definition

by Romain Canon on 08 May 2018 / 1e4b2d1 / #80

Allows getting more information about a notification.

A description text has been added for existing notifications.

Add description to event definition

by Romain Canon on 08 May 2018 / ffa1cbf / #79

Allows getting more information about an event.

A description text has been added for existing events.

Allow getting event from full identifier in definition

by Romain Canon on 02 May 2018 / 265123e / #81

The full identifier of an event is composed of the identifier of the event group and the identifier of the event itself. Both are separated by a dot.

Bugs fixed

Import namespace in Fluid layout

by Romain Canon on 29 Sep 2018 / affb6c4 / #128

Make nl2br view-helper compatible with TYPO3 v7

by Nathan Boiron on 26 Sep 2018 / 7bc4999 / #126

Move the ViewHelper class to the correct folder

by Nathan Boiron on 25 Sep 2018 / 48f7481 / #123

Properly fetch Slack notification message properties

by Romain Canon on 05 Sep 2018 / 97805e5 / #103

Always return string when converting property to string

by Romain Canon on 05 Sep 2018 / 02e23f4 / #102

Make notification entity title static

by Romain Canon on 05 Sep 2018 / 72f38d9 / #101

When an error was found in definition, the current implementation would not show the title of the notification; this was leading to misunderstanding in certain modules, for instance in a backend usergroup record access list.

Important

⚠ Please pay attention to the changes below as they might break your TYPO3 installation:

Add way to check if notification has event definition

by Nathan Boiron on 26 Sep 2018 / a28b914 / #127

This patch adds a method to check if a notification has an event definition bound to it.

In addition, the getter now throws an exception if the notification doesn't have an event definition.

Make administration module accessible only for admin

by Romain Canon on 05 Sep 2018 / a48ee7e / #104

Make notification aware of the event it is bound to

by Romain Canon on 31 May 2018 / c86bca7 / #91

A new method is added to the notification interface, that must return the event definition it is bound to.

Allow counting notifications using a given event

by Romain Canon on 18 May 2018 / 1d4f77f / #88

A new abstract method is added to the notification processor. A default implementation is added for entity repositories.

Make notification aware of its definition

by Romain Canon on 18 May 2018 / 24bdcdf / #87

A new method is added to the notification interface, that must return the notification definition.

Others

Update changelog format

by Romain Canon on 01 Oct 2018 / f489900 / #137

The format of the automatic changelog script has changed, for a better rendering on GitHub.

Existing changelog entries have been updated as well.

Rename manager module handler

by Romain Canon on 30 Sep 2018 / 6d85f7a / #136

Remove untranslated localization content

by Romain Canon on 29 Sep 2018 / 22188ac / #134

Allow editors to create notifications on root page

by Romain Canon on 29 Sep 2018 / 2ee9d93 / #133

Allow module links inside TYPO3 frame

by Romain Canon on 29 Sep 2018 / 8d7930a / #132

Apply trim on lines wrapping

by Romain Canon on 29 Sep 2018 / 93691d9 / #131

Prevents empty <p> tags.

Rewrite index page in administration module

by Romain Canon on 29 Sep 2018 / b8e7c41 / #130

Improve the formatting of multi-line strings

by Nathan Boiron on 29 Sep 2018 / 9f58f53 / #129

Add a way to mark notifications as viewable by an editor

by Nathan Boiron on 25 Sep 2018 / cdae4b6 / #125

Add a way to mark notifications as editable by an editor

by Nathan Boiron on 25 Sep 2018 / 8ce03cb / #124

Add a way to mark notifications as creatable by an editor

by Nathan Boiron on 25 Sep 2018 / 8e746ea / #122

Improve the TCA display for Slack notifications

by Nathan Boiron on 25 Sep 2018 / e9c972a / #121

Extract exception handling to dedicated controller

by Nathan Boiron on 25 Sep 2018 / ddad7d2 / #120

Add right header menu in backend module

by Romain Canon on 23 Sep 2018 / 8c9c0f6 / #119

Add backend user property to entity notification

by Romain Canon on 23 Sep 2018 / 4258a99 / #118

Add header menu in backend module

by Romain Canon on 23 Sep 2018 / 7720b6c / #117

Add getTitle method to notification interface

by Romain Canon on 23 Sep 2018 / c45523a / #116

Select backend module for links using frame option

by Romain Canon on 19 Sep 2018 / 1d8ec75 / #114

Split backend module controller

by Romain Canon on 19 Sep 2018 / 3544658 / #113

Check access to module for backend user

by Romain Canon on 19 Sep 2018 / e3e513c / #112

Rename method with reserved keyword name

by Romain Canon on 19 Sep 2018 / dc0f7f6 / #111

The name for is a reserved keyword for PHP < 7.

Change link target to avoid anchor being added to URL

by Romain Canon on 19 Sep 2018 / 08f33a2 / #110

Rename "module managers" to "module handlers"

by Romain Canon on 19 Sep 2018 / b44614b / #109

Make UriBuilder return instance of PSR-7 Uri

by Romain Canon on 13 Sep 2018 / 1df072a / #106

The Uri class allows more control than a simple string.

Add documentation for provided events

by Nathan Boiron on 30 Aug 2018 / 359439c / #98

Move module header buttons into a partial

by Romain Canon on 28 Aug 2018 / 8d09171 / #96

Add key on SQL column event

by Romain Canon on 28 Aug 2018 / 2c7da20 / #95

Add FlexForm processor for Slack entities

by Romain Canon on 28 Aug 2018 / 94c9d2f / #94

Move default event class into Backend namespace

by Romain Canon on 28 Aug 2018 / 1fda232 / #93

Add Slack documentation to summary

by Romain Canon on 08 May 2018 / 706de34 / #86

Abstract properties from notification entities

by Romain Canon on 02 May 2018 / 9deb43a / #84

Update icons for email and log notification

by Romain Canon on 02 May 2018 / 7571754 / #85

  • Makes the TYPO3 icon-color feature work with TYPO3 v8.7;
  • Removes the tiny orange bell
  • Adds a default size (32 * 32)

v0.5.0 - 26 April 2018

ℹ️ Click on a changelog entry to see more details.

New features

Introduce Slack notification type

by Nathan Boiron on 25 Apr 2018 / 6454dbe / #75

This new notification type can be used in the TYPO3 backend in the same way as the email and log notifications.

You may send your messages in channels or to specific users of your Slack instance, whenever any pre-configured event is triggered and dispatched by NotiZ.

You will need to properly configure the definition to bind your Slack instance with NotiZ, please read documentation for more details.

Co-authored-by: Simon Praetorius [email protected]

Introduce signal dispatched when definition is built

by Romain Canon on 11 Mar 2018 / c1d3e70 / #71

You may need to use NotiZ definition to initialize things in your own extension.

A signal will be dispatched when the definition object is complete, only when no error was found when it was built.

Note that you won't be able to modify the definition, only access its values.

More information in the documentation.

Bugs fixed

Fix edition of disabled notification

by Romain Canon on 26 Apr 2018 / c94f370 / #76

The notifications that were disabled in the backend were showing a fatal error on edition.

This commit fixes the issue and disabled notifications can now be edited properly again.

Important

⚠ Please pay attention to the changes below as they might break your TYPO3 installation:

Separate properties handling from events

by Romain Canon on 25 Apr 2018 / 278ea81 / #77

Some events may exist without the need of having properties handling.

Methods in the event interface concerning the properties have been moved to a new interface HasProperties which slightly alter how the system works.

This interface is implemented by default in the AbstractEvent, so this changes nothing for events that extend this class (unless they override old methods that have been changed/deleted).

Some major refactoring works have been made so this might break your installation. In this case, please read carefully the class documentation blocks.

Deleted methods

  • \CuyZ\Notiz\Core\Event\Event::getProperties

    This method was unnecessary and won't be replaced.

  • \CuyZ\Notiz\Core\Event\Event::buildPropertyDefinition

    A new way of building the property definition is done using: \CuyZ\Notiz\Core\Event\Support\HasProperties::getPropertyBuilder

Moved methods

  • \CuyZ\Notiz\Core\Event\Event::fillPropertyEntries

    This method has been moved to: \CuyZ\Notiz\Core\Event\Support\HasProperties::fillPropertyEntries

Moved classes

  • \CuyZ\Notiz\Core\Property\Support\PropertyBuilder

    This class has been moved to: \CuyZ\Notiz\Core\Property\Builder\PropertyBuilder

Others

Add documentation for email annotation

by Lukas Niestroj on 14 Mar 2018 / 5ff61f4 / #73

Add documentation for signals sent by the extension

by Romain Canon on 09 Mar 2018 / 687d8f9 / #69

Fix signal name in example

by Romain Canon on 09 Mar 2018 / 6fc8753 / #68

Fix images paths in README file

by Romain Canon on 04 Mar 2018 / cd36f7d / #67

v0.4.0 - 01 March 2018

ℹ️ Click on a changelog entry to see more details.

New features

Introduce event for submission of forms from core extension

by Romain Canon on 01 Mar 2018 / e3c611e / #62

Adds a new finisher "Dispatch a notification" that can be added to a form definition (accessible in the form editor backend module).

A new event "A form was submitted" is now accessible for notifications, and provides several markers as well as email recipients based on the submitted form values.

Introduce PropertyDefinitionBuilder interface

by Romain Canon on 27 Feb 2018 / cacfa22 / #61

This interface must be implemented by classes intended to build property definitions for a given event.

To create a new builder, you need to have a class with the same name as your event at which you append PropertyBuilder. The method build of your builder will then be automatically called when needed.

Example:

MyVendor\MyExtension\Domain\Event\MyEvent -> Event MyVendor\MyExtension\Domain\Event\MyEventPropertyBuilder -> Builder

Introduce a signal dispatched before an email is sent

by Romain Canon on 26 Feb 2018 / 6fe9b01 / #53

If you need to do advanced modification on your mail, you can use a PHP signal. Register the slot in your ext_localconf.php file :

<?php
// my_extension/ext_localconf.php

$dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
    \TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);

$dispatcher->connect(
    \CuyZ\Notiz\Core\Definition\Builder\DefinitionBuilder::class,
    \CuyZ\Notiz\Core\Definition\Builder\DefinitionBuilder::COMPONENTS_SIGNAL,
    \Vendor\MyExtension\Service\Mail\MailTransformer::class,
    'registerDefinitionComponents'
);

Then modify your mail object as you need:

<?php
// my_extension/Classes/Service/Mail/MailTransformer.php

namespace Vendor\MyExtension\Service\Mail;

use CuyZ\Notiz\Core\Channel\Payload;
use TYPO3\CMS\Core\Mail\MailMessage;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;

class MailTransformer implements SingletonInterface
{
    /**
     * @param MailMessage $mailMessage
     * @param Payload $payload
     */
    public function transform(MailMessage $mailMessage, Payload $payload)
    {
        $applicationContext = GeneralUtility::getApplicationContext();

        // We don't change anything in production.
        if ($applicationContext->isProduction()) {
            return;
        }

        // Add a prefix to the mail subject, containing the application context.
        $subject = "[$applicationContext][NotiZ] " . $mailMessage->getSubject();
        $mailMessage->setSubject($subject);

        // When not in production, we want the mail to be sent only to us.
        $mailMessage->setTo('[email protected]');
        $mailMessage->setCc([]);
        $mailMessage->setBcc([]);
    }
}
Allow event objects to give arbitrary data to notifications

by Romain Canon on 21 Feb 2018 / 858391b / #52

A new interface HasNotificationData is introduced and can be implemented by an object given to an event, when it needs to transfer arbitrary data to a notification during dispatching.

For instance, you can implement this interface in a custom scheduler task:

class MyCustomTask extends AbstractTask implements HasNotificationData
{
    protected $notificationData = [];

    public function execute()
    {
        // Do things…

        $this->notificationData['foo'] = 'bar';

        // Do more things…

        return true;
    }

    public function getNotificationData()
    {
        return $this->notificationData;
    }
}

You can then use the marker {data} in your notification:

The task has been executed with "{data.foo}".

Bugs fixed

Accept dash and underscore in markers syntax

by Romain Canon on 27 Feb 2018 / c629888 / #58

Respect language when fetching notifications

by Romain Canon on 27 Feb 2018 / c06253f / #57

Register events when no backend context is found

by Romain Canon on 26 Feb 2018 / 6670bc0 / #55

Detect definition error before TCA array is built

by Romain Canon on 26 Feb 2018 / b561942 / #54

Prevents fatal error being thrown in the backend when a definition error is found.

Others

Update changelog script

by Romain Canon on 01 Mar 2018 / 2f4cc7c / #65

Now runs in a PHP file.

Configure Code Climate checks

by Romain Canon on 28 Feb 2018 / 54bf3ee / #64

Add reST documentation index

by Romain Canon on 28 Feb 2018 / 927f95c / #63

Will fix the rendering of the documentation on docs.typo3.org

Make notification accessible in property definition build

by Romain Canon on 27 Feb 2018 / b8fbdf3 / #60

Build event with notification entry

by Romain Canon on 27 Feb 2018 / 4fcae8a / #59

Refactor and cleanup TCA declaration

by Romain Canon on 27 Feb 2018 / 6c51f13 / #56

v0.3.0 - 16 February 2018

ℹ️ Click on a changelog entry to see more details.

New features

Enhance slot.render view-helper

by Romain Canon on 16 Feb 2018 / 95552e6 / #44

This view-helper can now use two new features, for a total of three ways to render a slot.

Inline

The processed slot value will be returned.

<nz:slot.render name="MySlot"
                markers="{foo: 'bar'}" />

Conditional

Can be used to check whether the slot exists, and do something if it doesn't. When using this way, a variable slotValue becomes accessible within the view-helper, that contains the processed value of the slot. However, this variable is filled only when the slot exists and can be processed.

<nz:slot.render name="SomeOptionalSlot">
    <f:then>
        {slotValue -> f:format.html()}
    </f:then>
    <f:else>
        Some default value
    </f:else>
</nz:slot.render>

Wrapping

You may need to add HTML around the slot value only when the slot exists.

<nz:slot.render name="SomeOptionalSlot">
    <hr />
    <div class="some-class">
        {slotValue}
    </div>
</nz:slot.render>
Allow RTE mode in text slot

by Romain Canon on 13 Feb 2018 / 4595aae / #46

Text slots can now use RTE mode like this:

<nz:slot.text name="MySlot"
              label="My slot"
              rte="true"
              rteMode="my-ckeditor-preset" />

You can use your own CKEditor preset by filling the argument rteMode.

Don't forget to wrap the rendering of your slot like this:

<f:format.html>
    <nz:slot.render name="MySlot" />
</f:format.html>

A legacy mode is also introduced, allowing old configuration from EXT:rtehtmlarea to work as well in the rteMode argument.

Closes #24

Bugs fixed

Render non-existing markers as an empty string

by Nathan Boiron on 16 Feb 2018 / e48a8ec / #49

Register notifications icons only once

by Romain Canon on 14 Feb 2018 / 29e0042 / #48

Important

⚠ Please pay attention to the changes below as they might break your TYPO3 installation:

Change PHP classes architecture

by Romain Canon on 13 Feb 2018 / 20e07bb / #47

A new folder level has been added, to ease the code readability.

You should check if your code does rely on classes that have been moved!

Change definition namespace

by Romain Canon on 13 Feb 2018 / 5e05bed / #45

The namespace root for NotiZ definition has been changed from config.tx_notiz to notiz

For instance, events may now be added to the definition by using the following namespace: notiz.eventGroups.myGroup.events.myEvent

Closes #28

Others

Fix event name

by Romain Canon on 11 Feb 2018 / 7e0f402 / #43

v0.2.0 - 03 February 2018

ℹ️ Click on a changelog entry to see more details.

New features

Introduce slots for dynamic body in mail notification

by Romain Canon on 02 Feb 2018 / a6c7f1a / #35

With this feature, the body section of the mail notification can now be composed of dynamic fields, that are managed by so-called "slots". This allows editors to handle several sections of the mail body, while the templating itself stays in the Fluid view.

The slots can be registered in the template of the mail, in a Fluid section named Slots. Two view-helpers are provided out of the box:

  • <nz:slot.text> will register a new textarea field.
  • <nz:slot.input> will register a new text-input field.

Because the registration happens in Fluid, basic operations like loops and conditions can be used.

Slots can then be rendered within the template by using the following view-helper: <nz:slot.render>. Additional markers may be added to the slot by using the arguments markers.

See documentation for more information about this feature.


Closes #26

Change the marker syntax from #FOO# to {foo}

by Nathan Boiron on 31 Jan 2018 / 71b30ab

Also adds support for dotted path syntax, meaning sub-values can be accessed. For instance {foo.bar} will return the value of the bar property of the foo object/array.

Bugs fixed

Catch exception when resolving email notification template

by Romain Canon on 02 Feb 2018 / f4fb42e / #30

An exception occurred in TYPO3 v7.6 instances.

Prevent full localization path from being returned

by Romain Canon on 02 Feb 2018 / 755a0bb / #32

When the localization service has not been initialized yet, the value returned is the full path to the translation key, not null. We need to check that in order not to return a wrong value.

Others

Force EOL for file to lf

by Romain Canon on 03 Feb 2018 / e0721a4 / #39

Introduce update script for the changelog file

by Romain Canon on 03 Feb 2018 / ebf0cd2 / #38

Change copyright year to 2018

by Romain Canon on 02 Feb 2018 / 4123174 / #37

Happy new year! 🍾

(sorry I'm late)

Add custom configuration for CodeClimate

by Romain Canon on 02 Feb 2018 / 53adc33 / #36

Fix PHP file path

by Romain Canon on 02 Feb 2018 / 97c47b4 / #22

Make notifications event and channel fields required

by Romain Canon on 02 Feb 2018 / 4692bd2 / #34

Make MarkerParser a singleton

by Romain Canon on 02 Feb 2018 / 04c86c2 / #33

Add documentation for custom event template in mail notification

by Romain Canon on 29 Jan 2018 / 16bd2b0 / #29

v0.1.0 - 21 January 2018

Initial release.