Commit f6604369 authored by mattwire's avatar mattwire Committed by mattwire
Browse files

Set default domain for PaymentprocessorWebhook.get/update/delete/replace so...

Set default domain for PaymentprocessorWebhook.get/update/delete/replace so that the Job.process_paymentprocessor_webhooks can work with multisite
parent fcff16f1
<?php
namespace Civi\Api4;
use Civi\Api4\Generic\BasicReplaceAction;
use Civi\Api4\Generic\DAOCreateAction;
use Civi\Api4\Generic\DAODeleteAction;
use Civi\Api4\Generic\DAOGetAction;
use Civi\Api4\Generic\DAOGetFieldsAction;
use Civi\Api4\Generic\DAOSaveAction;
use Civi\Api4\Generic\DAOUpdateAction;
/**
* PaymentprocessorWebhook entity.
*
......@@ -10,4 +18,43 @@ namespace Civi\Api4;
*/
class PaymentprocessorWebhook extends Generic\DAOEntity {
/**
* @param bool $checkPermissions
* @return DAOGetAction
*/
public static function get($checkPermissions = TRUE) {
return (new DAOGetAction(static::class, __FUNCTION__))
->setCheckPermissions($checkPermissions)
->addWhere('payment_processor.domain_id', '=', \CRM_Core_Config::domainID());
}
/**
* @param bool $checkPermissions
* @return DAOUpdateAction
*/
public static function update($checkPermissions = TRUE) {
return (new DAOUpdateAction(static::class, __FUNCTION__))
->setCheckPermissions($checkPermissions)
->addWhere('payment_processor.domain_id', '=', \CRM_Core_Config::domainID());
}
/**
* @param bool $checkPermissions
* @return DAODeleteAction
*/
public static function delete($checkPermissions = TRUE) {
return (new DAODeleteAction(static::class, __FUNCTION__))
->setCheckPermissions($checkPermissions)
->addWhere('payment_processor.domain_id', '=', \CRM_Core_Config::domainID());
}
/**
* @param bool $checkPermissions
* @return BasicReplaceAction
*/
public static function replace($checkPermissions = TRUE) {
return (new BasicReplaceAction(static::class, __FUNCTION__))
->setCheckPermissions($checkPermissions)
->addWhere('payment_processor.domain_id', '=', \CRM_Core_Config::domainID());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment