ModifyPluginViewEvent 

\FGTCLB\AcademicBase\Event\ModifyPluginViewEvent is owned by academic_base, which describes it for the seven academic extensions whose plugins dispatch it in fgtclb/academic-base:developers-event-modify-plugin-view-event. This page says what the job list of academic_bite_jobs hands to it.

When it is dispatched 

The Job List b-ite 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.

What this extension passes in 

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 

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

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'),
        );
    }
}
Copied!

An override of Templates/BiteJobs/List.html renders it, see Templates:

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

Rules and pitfalls 

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.

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