ℹ️ Click on a changelog entry to see more details.
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
ℹ️ Click on a changelog entry to see more details.
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.
ℹ️ Click on a changelog entry to see more details.
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
ℹ️ Click on a changelog entry to see more details.
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.
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.
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.
ℹ️ Click on a changelog entry to see more details.
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
ℹ️ Click on a changelog entry to see more details.
⚠ 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.
Fix wrong locallang reference for notifications listing
by Romain Canon on 22 Jan 2019 / e31cd20 / #189
Fix wrong locallang reference for notifications listing
by Romain Canon on 22 Jan 2019 / 9ea07ef / #187
ℹ️ Click on a changelog entry to see more details.
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.
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
Add documentation on how to add custom config to events
by Nathan Boiron on 20 Jan 2019 / 9296c10 / #185
Hide columns of notification entity when no event is selected
by Romain Canon on 20 Jan 2019 / cf28edd / #178
Closes #31
ℹ️ Click on a changelog entry to see more details.
ℹ️ Click on a changelog entry to see more details.
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)
Forward to correct controller when an event is not found
by Romain Canon on 06 déc 2018 / ef0032a / #165
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.
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}
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.
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 tofalse
. The custom bot could not be detected.
⚠ 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)
Rewrite documentation to RST format
by Romain Canon on 10 déc 2018 / 9f514b5 / #162
Co-authored-by: Nathan Boiron [email protected]
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.
ℹ️ Click on a changelog entry to see more details.
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.
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.
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.
⚠ 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.
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.
Apply trim on lines wrapping
by Romain Canon on 29 Sep 2018 / 93691d9 / #131
Prevents empty
<p>
tags.
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
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
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.
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)
ℹ️ Click on a changelog entry to see more details.
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.
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.
⚠ 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
ℹ️ Click on a changelog entry to see more details.
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 methodbuild
of your builder will then be automatically called when needed.Example:
MyVendor\MyExtension\Domain\Event\MyEvent
-> EventMyVendor\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}".
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.
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
ℹ️ Click on a changelog entry to see more details.
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
⚠ 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
tonotiz
For instance, events may now be added to the definition by using the following namespace:
notiz.eventGroups.myGroup.events.myEvent
Closes #28
ℹ️ Click on a changelog entry to see more details.
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 argumentsmarkers
.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 thebar
property of thefoo
object/array.
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.
Change copyright year to 2018
by Romain Canon on 02 Feb 2018 / 4123174 / #37
Happy new year! 🍾
(sorry I'm late)
Add documentation for custom event template in mail notification
by Romain Canon on 29 Jan 2018 / 16bd2b0 / #29
Initial release.