Properties¶
Events will process valuable information that are used to fill so-called “properties”.
Properties can contain any type of value and can be used in several ways, depending on their type.
Note
For more information about creating custom properties, see chapter “Advanced properties usage”.
Marker¶
Marker is the most common type of property: it can contain any value. It can be used by a notification; the name of the marker will be replaced by the actual value during runtime.
For instance the event “Extension installed” fills a marker named title
. In
the body of an email notification, if the value {title}
is found it will be
replaced during runtime with the title of the installed extension.
class ExtensionInstalledEvent extends AbstractEvent
{
/**
* @label Event/TYPO3/ExtensionInstalled:marker.title
* @marker
*
* @var string
*/
protected $title;
}
Email¶
An email property contains a valid email address. These properties can be used in the recipient fields of an email notification.
Hint
Value of property annotated with @email
can be:
Without the name:
john@example.com, max@example.com
With the name:
John Smith <john@example.com>, Max Mustermann <max@example.com>
class MyCustomEvent extends AbstractEvent
{
/**
* @label User who connected to the application
* @email
*
* @var string
*/
protected $user;
}