---
title: "Signal/Slots"
manual: "t3oodle"
version: "main"
permalink: "https://docs.typo3.org/permalink/fgtclb/t3oodle:signalslots@main"
source: "DevNotes/SignalSlots.rst"
rendered: "2026-10-08T14:49:08+00:00"
---

# Signal/Slots {#signalslots}

> [!WARNING]
> This section is outdated, as it is not possible to use signals and slots in TYPO3 11 anymore.

Every action in t3oodle controllers implemented a **signal** you can use to put slots in it and modify or extend
extension behaviour.

## Existing signals {#existing-signals}

The following signals exist:

`\FGTCLB\T3oodle\Controller\PollController`

-   **list**
-   **show**
-   **vote**
-   **deleteOwnVote**
-   **resetVotes**
-   **showFinish**
-   **finish**
-   **new**
-   **createBefore**
-   **createAfter**
-   **publish**
-   **edit**
-   **updateBefore**
-   **updateAfter**
-   **delete**
-   **finishSuggestionMode**
-   **newSuggestion**
-   **createSuggestionBefore**
-   **createSuggestionAfter**
-   **editSuggestion**
-   **updateSuggestionBefore**
-   **updateSuggestionAfter**
-   **deleteSuggestion**

`\FGTCLB\T3oodle\Domain\Permission\PollPermission`

-   Also all permissions defined in [PollPermission](https://docs.typo3.org/permalink/fgtclb/t3oodle:pollpermission@main) dispatch an own signal

`\FGTCLB\T3oodle\Domain\Repository\PollRepository`

-   **findPolls** Allows you to modify query constraints

## Register a slot {#register-a-slot}

To register a slot, you just need to add the following PHP code in `ext_localconf.php` of a TYPO3 extension:

```php
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$signalSlotDispatcher->connect(
    \FGTCLB\T3oodle\Controller\PollController::class,
    'vote',
    \Vendor\MyExt\Slots\MyCustomSlots::class,
    'vote'
);

```

## Writing the slot {#writing-the-slot}

The method you define as slot requires all arguments, passed by dispatcher.
To identify the correct arguments, search in t3oodle code for `->dispatch(__CLASS__`.

For example the arguments passed to vote action slot are:

```php
[
    'vote' => $vote,
    'isNew' => !$vote->getUid(),
    'settings' => $this->settings,
    'continue' => true,
    'caller' => $this
]

```

So, this is how the slot method signature must look like:

```php
use FGTCLB\T3oodle\Domain\Model\Vote;

final class MyCustomSlots
{
    public function vote(\FGTCLB\T3oodle\Domain\Model\Vote $vote, bool $isNew, array $settings, bool $continue, PollPermission $caller): array
    {
        // TODO: implement me
        return [
            'vote' => $vote,
            'isNew' => $isNew,
            'settings' => $settings,
            'continue' => $continue,
            'caller' => $caller,
        ];
    }
}

```

Also, the slot  **needs** to return the arguments in **same order**, with **keys prefixed**!

### Continue argument {#continue-argument}

Some signals pass a `continue` argument, which is set to `true` by default.

When you set this value to `false` in your slot, the original code following, is not executed anymore.
You can use this to prevent flash messages and redirects.
