kopia lustrzana https://github.com/nextcloud/social
26 wiersze
633 B
PHP
26 wiersze
633 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
// SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
namespace OCA\Social\Listeners;
|
|
|
|
use OCP\EventDispatcher\Event;
|
|
use OCP\EventDispatcher\IEventListener;
|
|
use OCP\Profile\BeforeTemplateRenderedEvent;
|
|
use OCP\Util;
|
|
|
|
/**
|
|
* * @template-implements IEventListener<\OCP\Profile\BeforeTemplateRenderedEvent>
|
|
*/
|
|
class ProfileSectionListener implements IEventListener {
|
|
public function handle(Event $event): void {
|
|
if (!($event instanceof BeforeTemplateRenderedEvent)) {
|
|
return;
|
|
}
|
|
Util::addScript('social', 'social-profilePage');
|
|
}
|
|
}
|