f7cloud_client/apps/circles/lib/Activity/ProviderSubjectCircle.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

50 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Circles\Activity;
use OCA\Circles\Exceptions\FakeException;
use OCP\Activity\IEvent;
class ProviderSubjectCircle extends ProviderParser {
public function parseSubjectCircleCreate(IEvent $event, array $params): void {
if ($event->getSubject() !== 'circle_create') {
return;
}
$this->parseCircleEvent(
$event, $params,
$this->l10n->t('You created the team {circle}'),
$this->l10n->t('{author} created the team {circle}')
);
throw new FakeException();
}
/**
* @param IEvent $event
* @param array $params
*
* @throws FakeException
*/
public function parseSubjectCircleDelete(IEvent $event, array $params): void {
if ($event->getSubject() !== 'circle_delete') {
return;
}
$this->parseCircleEvent(
$event, $params,
$this->l10n->t('You deleted {circle}'),
$this->l10n->t('{author} deleted {circle}')
);
throw new FakeException();
}
}