mirror of
https://github.com/NamelessMC/Nameless
synced 2026-08-18 06:29:04 -04:00
* Initial work on reactions revamp and profile widgets * Remove unneeded changes * Remove unneeded change * fix style * Render emojis in reaction list StaffCP * wip minecraft account profile widget, sticky widgets on profile page * Add server name and IP to last seen * remove * rename to reaction score to match member list * align reactions table contents center * fix * wip - nicer abstraction, widgets never query db, skin 3d viewer (undecided) * wip - make reaction modals ajax, copy new reaction bar to profile posts * wip reaction modals * wip proper sorting * wip modals * wip get reaction submission working on profile wall posts * add back helpful and creative default reactions * reduce query amount on view topic * remove debug statement * wip * wip * simplify ProfileWidget pages * Revert forum dropdown * fix css syntax * fix emoji title and alt being strange * add back order input * sort widgets by order in list * fix settings link always showing * phpdoc * add widget name to exception * insert default widget data if not found * missing end if * properly cache forum news per-group * fix * fix cache key, news permission check * fix styling * wip * respect reaction ordering * wip * wip * support custom reaction scores, update member list to properly calculate * don't hardcode words * wip * allow multiple reactions * redirect to post * code style * phpstan * wip * remove hardcoded terms + fix copy * use npm for skinview3d * create ReactionContext and refactor * fix cache * docblocks * fix spelling * pr amendments
28 lines
702 B
PHP
28 lines
702 B
PHP
<?php
|
|
|
|
class UserReactionDeletedEvent extends AbstractEvent {
|
|
|
|
public User $user;
|
|
public Reaction $reaction;
|
|
public string $context;
|
|
|
|
public static function description(): string {
|
|
return (new Language())->get('admin', 'reaction_deleted_event_info');
|
|
}
|
|
|
|
public function __construct(
|
|
User $user,
|
|
Reaction $reaction,
|
|
string $context
|
|
) {
|
|
$this->user = $user;
|
|
$this->reaction = $reaction;
|
|
|
|
if (!in_array($context, ReactionContextsManager::getInstance()->validContextNames())) {
|
|
throw new InvalidArgumentException("Invalid context provided: {$context}.");
|
|
}
|
|
|
|
$this->context = $context;
|
|
}
|
|
|
|
}
|