mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
67 lines
1.4 KiB
PHP
67 lines
1.4 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace App\Observers;
|
||
|
|
||
|
use App\CompanyGateway;
|
||
|
|
||
|
class CompanyGatewayObserver
|
||
|
{
|
||
|
/**
|
||
|
* Handle the company gateway "created" event.
|
||
|
*
|
||
|
* @param \App\CompanyGateway $company_gateway
|
||
|
* @return void
|
||
|
*/
|
||
|
public function created(CompanyGateway $company_gateway)
|
||
|
{
|
||
|
if(!$company_gateway->label){
|
||
|
$company_gateway->label = $company_gateway->gateway->name;
|
||
|
$company_gateway->save();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the company gateway "updated" event.
|
||
|
*
|
||
|
* @param \App\CompanyGateway $company_gateway
|
||
|
* @return void
|
||
|
*/
|
||
|
public function updated(CompanyGateway $company_gateway)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the company gateway "deleted" event.
|
||
|
*
|
||
|
* @param \App\CompanyGateway $company_gateway
|
||
|
* @return void
|
||
|
*/
|
||
|
public function deleted(CompanyGateway $company_gateway)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the company gateway "restored" event.
|
||
|
*
|
||
|
* @param \App\CompanyGateway $company_gateway
|
||
|
* @return void
|
||
|
*/
|
||
|
public function restored(CompanyGateway $company_gateway)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the company gateway "force deleted" event.
|
||
|
*
|
||
|
* @param \App\CompanyGateway $company_gateway
|
||
|
* @return void
|
||
|
*/
|
||
|
public function forceDeleted(CompanyGateway $company_gateway)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
}
|