Add all files

This commit is contained in:
root
2025-11-30 11:57:22 +01:00
parent 2ee51cac4f
commit 044271db3d
1476 changed files with 142544 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace Paymenter\Extensions\Others\SocialBase\Admin\Resources\ProfileCommentResource\Pages;
use Filament\Resources\Pages\EditRecord;
use Paymenter\Extensions\Others\SocialBase\Admin\Resources\ProfileCommentResource;
class EditProfileComment extends EditRecord
{
protected static string $resource = ProfileCommentResource::class;
protected function mutateFormDataBeforeSave(array $data): array
{
// Remove virtual fields that are just for display
unset($data['commenter_name']);
unset($data['profile_owner']);
unset($data['parent_comment']);
unset($data['reactions_count']);
return $data;
}
protected function afterSave(): void
{
// Check if comment was just approved
$comment = $this->record;
if ($comment->approved && $comment->wasChanged('approved')) {
// Dispatch approval event
event('socialbase.comment.approved', $comment);
}
}
protected function getSavedNotificationTitle(): ?string
{
return 'Comment updated successfully';
}
}