--- /dev/null
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved. |
+ | |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ *
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ */
+class CRM_Financial_BAO_EntityFinancialTrxn extends CRM_Financial_DAO_EntityFinancialTrxn {
+
+ /**
+ * Whitelist of possible values for the entity_table field
+ *
+ * @return array
+ */
+ public static function entityTables(): array {
+ return [
+ 'civicrm_contribution' => ts('Contribution'),
+ 'civicrm_financial_item' => ts('Financial Item'),
+ ];
+ }
+
+}
*
* Generated from xml/schema/CRM/Financial/EntityFinancialTrxn.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b5fb467815fb6b501dbd2f2cd789b1b9)
+ * (GenCodeChecksum:c45a5259ff34bda9b9bad9ced505ff16)
*/
/**
'where' => 'civicrm_entity_financial_trxn.id',
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'html' => [
'type' => 'Number',
'export' => TRUE,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Financial_BAO_EntityFinancialTrxn::entityTables',
+ ],
'add' => '3.2',
],
'entity_id' => [
'where' => 'civicrm_entity_financial_trxn.entity_id',
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'add' => '3.2',
],
'where' => 'civicrm_entity_financial_trxn.financial_trxn_id',
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialTrxn',
'html' => [
'export' => TRUE,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'add' => '3.2',
],
--- /dev/null
+<?php
+
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved. |
+ | |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ *
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ */
+
+namespace Civi\Api4;
+
+/**
+ * EntityFinancialTrxns. Joins financial transactions to contributions
+ * and financial items.
+ *
+ * @see https://docs.civicrm.org/dev/en/latest/financial/financialentities/
+ *
+ * @bridge entity_id financial_trxn_id
+ *
+ * @package Civi\Api4
+ */
+class EntityFinancialTrxn extends Generic\DAOEntity {
+ use Generic\Traits\EntityBridge;
+
+}