--- /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_EntityFinancialAccount extends CRM_Financial_DAO_EntityFinancialAccount {
+
+ /**
+ * Whitelist of possible values for the entity_table field
+ *
+ * @return array
+ */
+ public static function entityTables(): array {
+ return [
+ 'civicrm_financial_type' => ts('Financial Type'),
+ 'civicrm_option_value' => ts('Payment Instrument'),
+ 'civicrm_payment_processor' => ts('Payment Processor'),
+ ];
+ }
+
+}
*
* Generated from xml/schema/CRM/Financial/EntityFinancialAccount.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:caf02136c148fe50dbc39d8d29605f72)
+ * (GenCodeChecksum:ac2a0a2e8eae1471b71da25e95b52d55)
*/
/**
'where' => 'civicrm_entity_financial_account.id',
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount',
'localizable' => 0,
'html' => [
'type' => 'Number',
'export' => TRUE,
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount',
'localizable' => 0,
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Financial_BAO_EntityFinancialAccount::entityTables',
+ ],
'add' => '4.3',
],
'entity_id' => [
'where' => 'civicrm_entity_financial_account.entity_id',
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount',
'localizable' => 0,
'add' => '4.3',
],
'where' => 'civicrm_entity_financial_account.account_relationship',
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount',
'localizable' => 0,
'html' => [
'type' => 'Select',
'where' => 'civicrm_entity_financial_account.financial_account_id',
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
- 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
+ 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
'html' => [
--- /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;
+
+/**
+ * EntityFinancialAccount. Joins financial accounts to financial types.
+ *
+ * @see https://docs.civicrm.org/dev/en/latest/financial/financialentities/#financial-accounts
+ *
+ * @bridge entity_id financial_account_id
+ * @ui_join_filters account_relationship
+ *
+ * @package Civi\Api4
+ */
+class EntityFinancialAccount extends Generic\DAOEntity {
+ use Generic\Traits\EntityBridge;
+
+}