mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-05 20:25:05 +02:00
43 lines
943 B
PHP
43 lines
943 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Filament\HeaderActions\Storage\Wiki\Audio;
|
|
|
|
use App\Actions\Storage\Wiki\Audio\DeleteAudioAction as DeleteAudio;
|
|
use App\Filament\HeaderActions\Storage\Base\DeleteHeaderAction;
|
|
use App\Models\BaseModel;
|
|
use App\Models\Wiki\Audio;
|
|
|
|
/**
|
|
* Class DeleteAudioHeaderAction.
|
|
*/
|
|
class DeleteAudioHeaderAction extends DeleteHeaderAction
|
|
{
|
|
/**
|
|
* Initial setup for the action.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->label(__('filament.actions.audio.delete.name'));
|
|
|
|
$this->authorize('forcedelete', Audio::class);
|
|
}
|
|
|
|
/**
|
|
* Get the underlying storage action.
|
|
*
|
|
* @param Audio $audio
|
|
* @param array $fields
|
|
* @return DeleteAudio
|
|
*/
|
|
protected function storageAction(BaseModel $audio, array $fields): DeleteAudio
|
|
{
|
|
return new DeleteAudio($audio);
|
|
}
|
|
}
|