View .md

QuilldEvent events

8 FeatherPanel plugin events on QuilldEvent (8 emitted by the core): the event names, the arguments each listener gets, where they fire and a PHP listener for each.

Last synced from FeatherPanel 15b94e9 on .

On this page

Part of the plugin events reference. Listeners get the payload values as positional arguments in the order shown, cannot cancel the action, and must catch their own exceptions.

Setup

Import QuilldEvent in your entry class and register listeners in processEvents():

<?php

namespace App\Addons\myplugin;

use App\App;
use App\Plugins\AppPlugin;
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\QuilldEvent;

class MyPlugin implements AppPlugin
{
    public static function processEvents(PluginEvents $event): void
    {
        $event->on(QuilldEvent::onQuilldInstallRetrieved(), function ($webspace, $install): void {
            App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:install:retrieved ' . json_encode(['webspace' => $webspace, 'install' => $install]));
        });
    }

    public static function pluginInstall(): void
    {
    }

    public static function pluginUninstall(): void
    {
    }
}

QuilldEvent::onQuilldActivityLogged()

Name: featherpanel:quilld:activity:loggedemitted at 1 siteCancel or modify: nodefinition

Docblock: array activity.

#Payload keyListener parameterType
1processed_count$processedCountint
When it fires (1 site)
$event->on(QuilldEvent::onQuilldActivityLogged(), function ($processedCount): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:activity:logged ' . json_encode(['processed_count' => $processedCount]));
});

QuilldEvent::onQuilldConfigRetrieved()

Name: featherpanel:quilld:config:retrievedemitted at 1 siteCancel or modify: nodefinition

Docblock: array config. (the emitter passes 2 values, see the table)

#Payload keyListener parameterType
1web_node_id$webNodeIdnot declared
2panel_url$panelUrlnot declared
When it fires (1 site)
$event->on(QuilldEvent::onQuilldConfigRetrieved(), function ($webNodeId, $panelUrl): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:config:retrieved');
});

QuilldEvent::onQuilldInstallCompleted()

Name: featherpanel:quilld:install:completedemitted at 1 siteCancel or modify: nodefinition

Docblock: array webspace. (the emitter passes 4 values, see the table)

#Payload keyListener parameterType
1webspace$webspacenot declared
2successful$successfulbool
3reinstall$reinstallnot declared
4status$statusnot declared
When it fires (1 site)
$event->on(QuilldEvent::onQuilldInstallCompleted(), function ($webspace, $successful, $reinstall, $status): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:install:completed ' . json_encode(['successful' => $successful]));
});

QuilldEvent::onQuilldInstallRetrieved()

Name: featherpanel:quilld:install:retrievedemitted at 1 siteCancel or modify: nodefinition

Docblock: array webspace, array install.

#Payload keyListener parameterType
1webspace$webspacearrayfrom docblock
2install$installarrayfrom docblock
When it fires (1 site)
$event->on(QuilldEvent::onQuilldInstallRetrieved(), function ($webspace, $install): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:install:retrieved ' . json_encode(['webspace' => $webspace, 'install' => $install]));
});

QuilldEvent::onQuilldSftpAuthenticated()

Name: featherpanel:quilld:sftp:authenticatedemitted at 1 siteCancel or modify: nodefinition

Docblock: array auth context. (the emitter passes 3 values, see the table)

#Payload keyListener parameterType
1webspace_uuid$webspaceUuidnot declared
2user_uuid$userUuidnot declared
3permissions$permissionsnot declared
When it fires (1 site)
$event->on(QuilldEvent::onQuilldSftpAuthenticated(), function ($webspaceUuid, $userUuid, $permissions): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:sftp:authenticated');
});

QuilldEvent::onQuilldTransferStatusReported()

Name: featherpanel:quilld:transfer:statusemitted at 1 siteCancel or modify: nodefinition

Docblock: array transfer. (the emitter passes 3 values, see the table)

#Payload keyListener parameterType
1webspace_uuid$webspaceUuidstring
2successful$successfulbool
3error$errorbool
When it fires (1 site)
$event->on(QuilldEvent::onQuilldTransferStatusReported(), function ($webspaceUuid, $successful, $error): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:transfer:status ' . json_encode(['webspace_uuid' => $webspaceUuid, 'successful' => $successful, 'error' => $error]));
});

QuilldEvent::onQuilldWebSpaceRetrieved()

Name: featherpanel:quilld:webspace:retrievedemitted at 1 siteCancel or modify: nodefinition

Docblock: array webspace.

#Payload keyListener parameterType
1webspace$webspacearrayfrom docblock
When it fires (1 site)
$event->on(QuilldEvent::onQuilldWebSpaceRetrieved(), function ($webspace): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:webspace:retrieved ' . json_encode(['webspace' => $webspace]));
});

QuilldEvent::onQuilldWebSpaceUpdated()

Name: featherpanel:quilld:webspace:updatedemitted at 1 siteCancel or modify: nodefinition

Docblock: array webspace.

#Payload keyListener parameterType
1webspace$webspacearrayfrom docblock
When it fires (1 site)
$event->on(QuilldEvent::onQuilldWebSpaceUpdated(), function ($webspace): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:quilld:webspace:updated ' . json_encode(['webspace' => $webspace]));
});