API reference
Public identifiers
Lex\\Notifications\\ Slack\\ Channel\\ Slack Channel - Implements the core
Channel. The channel name returned byInterface getisName () slack.sendresolves the route, calls(object, Notification): void toand hands the message to the transport. It does not return a Slack message timestamp.Slack () Lex\\Notifications\\ Slack\\ Configuration\\ Slack Route - Immutable destination value object with public readonly
transportanddestinationproperties. Lex\\Notifications\\ Slack\\ Message\\ Slack Message - Immutable message payload with
Jsonsupport.Serializable Lex\\Notifications\\ Slack\\ Transport\\ Slack Transport - Sends an HTTPS request.
sendreturns the Slack acknowledgement; when using the API this may contain Slack's(Slack Message, Slack Route): array tsandchannelfields. Lex\\Notifications\\ Slack\\ Configuration\\ Slack Configuration - Reads configuration through TYPO3's extension configuration service.
Provides
bot,Token () named,Webhook () api,Endpoint () timeout, and() connect.Timeout () Lex\\Notifications\\ Slack\\ Exception\\ Slack Transport Exception - Exception carrying HTTP status, retry delay and retryability.
Lex\\Notifications\\ Slack\\ Domain\\ Model\\ Ability\\ Can Send To Slack - Trait declaring
to.Slack (object $notifiable): Slack Message Lex\\Notifications\\ Slack\\ Domain\\ Model\\ Ability\\ Has Route Notification For Slack - Trait declaring
route.Notification For Slack (?Notification $notification = null)
SlackRoute factory methods
| Method | Result |
|---|---|
webhook | Validate and store a direct webhook URL. |
webhook | Store a configuration alias. |
api | Validate and store a Slack ID. |
from | Interpret a direct HTTPS URL, webhook: or API ID. |
assert | Validate the Slack/GovSlack HTTPS URL; throws on failure. |
SlackMessage factory and modifier methods
| Method | Purpose |
|---|---|
text | Create a plain-text message. |
from | Create from a permitted Slack payload array. |
from | Create from Block Kit Builder JSON or a block list. |
from | Validate and serialize a Block Kit PHP surface. |
with | Return a copy with fallback text. |
with | Return a copy with blocks. |
with | Return a copy with legacy attachments. |
in | Return a threaded message. |
without | Disable link/media previews. |
to | Get payload array. |
to | Serialize message as JSON. |
Messages may not set channel or token; these are managed by the
route and transport. Unsupported message keys and structurally invalid
payloads raise Invalid.
Service registration
Slack is automatically registered by its
# attribute. TYPO3's
Configuration/ enables autowiring/autoconfiguration.
No additional manual service tagging is needed.
See Error handling for exception details.