mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 07:02:34 +01:00
77 lines
1.8 KiB
PHP
77 lines
1.8 KiB
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Observers;
|
|
|
|
use App\Models\ClientContact;
|
|
|
|
class ClientContactObserver
|
|
{
|
|
/**
|
|
* Handle the client contact "created" event.
|
|
*
|
|
* @param \App\Models\ClientContact $clientContact
|
|
* @return void
|
|
*/
|
|
public function created(ClientContact $clientContact)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the client contact "updated" event.
|
|
*
|
|
* @param \App\Models\ClientContact $clientContact
|
|
* @return void
|
|
*/
|
|
public function updated(ClientContact $clientContact)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the client contact "deleted" event.
|
|
*
|
|
* @param \App\Models\ClientContact $clientContact
|
|
* @return void
|
|
*/
|
|
public function deleted(ClientContact $clientContact)
|
|
{
|
|
$clientContact->invoice_invitations()->delete();
|
|
$clientContact->quote_invitations()->delete();
|
|
$clientContact->credit_invitations()->delete();
|
|
}
|
|
|
|
/**
|
|
* Handle the client contact "restored" event.
|
|
*
|
|
* @param \App\Models\ClientContact $clientContact
|
|
* @return void
|
|
*/
|
|
public function restored(ClientContact $clientContact)
|
|
{
|
|
$clientContact->invoice_invitations()->restore();
|
|
$clientContact->quote_invitations()->restore();
|
|
$clientContact->credit_invitations()->restore();
|
|
}
|
|
|
|
/**
|
|
* Handle the client contact "force deleted" event.
|
|
*
|
|
* @param \App\Models\ClientContact $clientContact
|
|
* @return void
|
|
*/
|
|
public function forceDeleted(ClientContact $clientContact)
|
|
{
|
|
//
|
|
}
|
|
}
|