composer require ldc/web-status-checker-laravel remove Old static status checker Fix ImportMedia WIP commands OK many fixes Fix and try to optimize folder component Fix front icons + actions based on icons Favico front fix alert Fix Media upload on depot fix folder component buttons Full front fix with perf due tu vuejs Download medias Navigate within medias superfix Move media + loader isLocked boolean and remove media fix Folder scroll fix arcadia link color red Fix panier show external Tons of fixes back as front REwrited all
103 lines
1.9 KiB
PHP
103 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Events;
|
|
|
|
use App\Models\Etiquette;
|
|
use App\Models\Media;
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class MediaChangedLabel extends MediaCreated
|
|
{
|
|
use Dispatchable;
|
|
use SerializesModels;
|
|
|
|
/**
|
|
* The user who created the media
|
|
*
|
|
* @var \App\Models\User
|
|
*/
|
|
private $user;
|
|
|
|
/**
|
|
* The media
|
|
*
|
|
* @var \App\Models\Media
|
|
*/
|
|
private $media;
|
|
|
|
/**
|
|
* The oldLabel
|
|
*
|
|
* @var \App\Models\Etiquette|null
|
|
*/
|
|
private $oldLabel;
|
|
|
|
/**
|
|
* The newLabel
|
|
*
|
|
* @var \App\Models\Etiquette|null
|
|
*/
|
|
private $newLabel;
|
|
|
|
/**
|
|
* Create a new event instance.
|
|
*
|
|
* @param \App\Models\User $user
|
|
* @param \App\Models\Media $media
|
|
* @param \App\Models\Etiquette|null $oldLabel
|
|
* @param \App\Models\Etiquette|null $newLabel
|
|
*/
|
|
public function __construct(
|
|
User $user,
|
|
Media $media,
|
|
Etiquette $oldLabel,
|
|
Etiquette $newLabel,
|
|
) {
|
|
$this->user = $user;
|
|
$this->media = $media;
|
|
$this->oldLabel = $oldLabel;
|
|
$this->newLabel = $newLabel;
|
|
}
|
|
|
|
/**
|
|
* Get User who triggered the event
|
|
*
|
|
* @return \App\Models\User
|
|
*/
|
|
public function getUser(): User
|
|
{
|
|
return $this->user;
|
|
}
|
|
|
|
/**
|
|
* Get the media
|
|
*
|
|
* @return \App\Models\Media
|
|
*/
|
|
public function getMedia(): Media
|
|
{
|
|
return $this->media;
|
|
}
|
|
|
|
/**
|
|
* Get the oldLabel
|
|
*
|
|
* @return \App\Models\Etiquette|null
|
|
*/
|
|
public function getOldLabel(): Etiquette|null
|
|
{
|
|
return $this->oldLabel;
|
|
}
|
|
|
|
/**
|
|
* Get the newLabel
|
|
*
|
|
* @return \App\Models\Etiquette|null
|
|
*/
|
|
public function getNewLabel(): Etiquette|null
|
|
{
|
|
return $this->newLabel;
|
|
}
|
|
}
|