---
title: "ModifyPluginViewEvent"
manual: "Academic Bite Jobs"
version: "main"
permalink: "https://docs.typo3.org/permalink/fgtclb/academic-bite-jobs:developers-event-modify-plugin-view-event@main"
source: "Developers/Events/ModifyPluginViewEvent.rst"
rendered: "2026-10-26T19:20:41+00:00"
---

# ModifyPluginViewEvent {#developers-event-modify-plugin-view-event}

`\FGTCLB\AcademicBase\Event\ModifyPluginViewEvent` is owned by
**academic_base**, which describes it for the seven academic
extensions whose plugins dispatch it in its developer chapter.
This page says what the job list of **academic_bite_jobs** hands to
it.

## When it is dispatched {#developers-event-modify-plugin-view-event-dispatched}

The [Job List b-ite](https://docs.typo3.org/permalink/fgtclb/academic-bite-jobs:integrator-job-list-bite@main) dispatches the event once
each time it renders, after the request and the result event ran and the
postings are assigned to the view. The context names the extension
`AcademicBiteJobs`, the plugin `List` and the action `list`.

The view holds `{jobs}`, the postings after the result listeners and the
limit, `{data}`, the content element as an array, and `{record}`,
the content element as a record. `{settings}` carries the view of the
content element already normalised, see [Select view](https://docs.typo3.org/permalink/fgtclb/academic-bite-jobs:confval-job-list-bite-view@main).

## What this extension passes in {#developers-event-modify-plugin-view-event-api}

| Method | Returns |
| --- | --- |
| `getPluginControllerActionContext()` | The context of the job list: the request, the site and its language, the content object, the plugin and action name and the settings of the plugin, TypoScript included. |
| `getView()` | The view the job list renders. A variable a listener assigns to it reaches the template and its partials. |

## Example: when the postings were fetched {#developers-event-modify-plugin-view-event-example}

The job list is cached with its page, so a visitor may see postings that were
fetched hours ago. A site states the time of the request below the list. The
listener runs when the page is rendered for the cache, which is when the
postings were asked for, and hands that time to the view:

**EXT:my_extension/Classes/EventListener/AddFetchTimeToBiteJobList.php**

```php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\EventListener;

use FGTCLB\AcademicBase\Event\ModifyPluginViewEvent;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Context\Context;

final class AddFetchTimeToBiteJobList
{
    public function __construct(
        private readonly Context $context,
    ) {}

    #[AsEventListener(identifier: 'my-extension/add-fetch-time-to-bite-job-list')]
    public function __invoke(ModifyPluginViewEvent $event): void
    {
        $actionContext = $event->getPluginControllerActionContext();
        if ($actionContext->getControllerExtensionName() !== 'AcademicBiteJobs') {
            return;
        }
        $event->getView()->assign(
            'postingsFetchedAt',
            $this->context->getPropertyFromAspect('date', 'full'),
        );
    }
}
```

An override of `Templates/BiteJobs/List.html` renders it, see
[Templates](https://docs.typo3.org/permalink/fgtclb/academic-bite-jobs:templates@main):

```html
<p class="ace-note">
    As of <f:format.date format="d.m.Y H:i">{postingsFetchedAt}</f:format.date>
</p>
```

## Rules and pitfalls {#developers-event-modify-plugin-view-event-rules}

**Change the postings in the result event.** A listener that replaces
`{jobs}` here works around the limit of the content element, and the
postings it assigns reach no other listener. Remove, sort and enrich them in
[ModifyBiteJobPostingsEvent](https://docs.typo3.org/permalink/fgtclb/academic-bite-jobs:developers-event-modify-bite-job-postings-event@main).

**The event runs for the cache.** Like the request and the result event, it
runs when the page is rendered, not for every visitor of a cached page.

## Introduced in {#developers-event-modify-plugin-view-event-introduced}

-   [Feature: The plugin dispatches the plugin view event](https://docs.typo3.org/permalink/fgtclb/academic-bite-jobs:feature-plugin-view-event@main)
-   [Breaking: The B-ITE jobs controller is final](https://docs.typo3.org/permalink/fgtclb/academic-bite-jobs:breaking-1791043409@main): the controller is final, a project assigns
    further view variables with this event instead of a subclass.
