Skip to content

Commit

Permalink
Regenerate ext DAO files using updated civix
Browse files Browse the repository at this point in the history
Uses the update from totten/civix#328 to add FKColumnName metadata.
  • Loading branch information
colemanw committed Jan 3, 2024
1 parent 0fd73ad commit 9363b60
Show file tree
Hide file tree
Showing 9 changed files with 263 additions and 134 deletions.
3 changes: 2 additions & 1 deletion ext/afform/core/CRM/Afform/DAO/AfformSubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from org.civicrm.afform/xml/schema/CRM/Afform/AfformSubmission.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:4dc8f836ce9420d461111dcaaebbb37a)
* (GenCodeChecksum:7f2d888fb07086aae91b0c864f9dedde)
*/
use CRM_Afform_ExtensionUtil as E;

Expand Down Expand Up @@ -155,6 +155,7 @@ public static function &fields() {
'bao' => 'CRM_Afform_DAO_AfformSubmission',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
'FKColumnName' => 'id',
'html' => [
'type' => 'EntityRef',
],
Expand Down
4 changes: 3 additions & 1 deletion ext/civigrant/CRM/Grant/DAO/Grant.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from civigrant/xml/schema/CRM/Grant/Grant.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:8c32dd9b0de6a449d6ee2358a2b043fc)
* (GenCodeChecksum:6572f413192bdc6c45725ba54fb7f124)
*/
use CRM_Grant_ExtensionUtil as E;

Expand Down Expand Up @@ -264,6 +264,7 @@ public static function &fields() {
'bao' => 'CRM_Grant_DAO_Grant',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
'FKColumnName' => 'id',
'html' => [
'type' => 'EntityRef',
'label' => E::ts("Contact"),
Expand Down Expand Up @@ -601,6 +602,7 @@ public static function &fields() {
'bao' => 'CRM_Grant_DAO_Grant',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialType',
'FKColumnName' => 'id',
'html' => [
'type' => 'Select',
'label' => E::ts("Financial Type"),
Expand Down
87 changes: 55 additions & 32 deletions ext/oauth-client/CRM/OAuth/DAO/OAuthClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from oauth-client/xml/schema/CRM/OAuth/OAuthClient.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:547088257f723e251fbec42e97c710bb)
* (GenCodeChecksum:55f119ab0f95efaa97a6abac23471657)
*/
use CRM_OAuth_ExtensionUtil as E;

Expand Down Expand Up @@ -143,6 +143,12 @@ public static function &fields() {
'type' => CRM_Utils_Type::T_INT,
'title' => E::ts('Internal Client ID'),
'description' => E::ts('Internal Client ID'),
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.id',
'table_name' => 'civicrm_oauth_client',
'entity' => 'OAuthClient',
Expand All @@ -159,6 +165,12 @@ public static function &fields() {
'required' => TRUE,
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.provider',
'table_name' => 'civicrm_oauth_client',
'entity' => 'OAuthClient',
Expand All @@ -177,6 +189,12 @@ public static function &fields() {
'required' => TRUE,
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.guid',
'table_name' => 'civicrm_oauth_client',
'entity' => 'OAuthClient',
Expand All @@ -191,6 +209,12 @@ public static function &fields() {
'description' => E::ts('Tenant ID'),
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.tenant',
'permission' => [
'manage OAuth client',
Expand All @@ -206,6 +230,12 @@ public static function &fields() {
'type' => CRM_Utils_Type::T_TEXT,
'title' => E::ts('Client Secret'),
'description' => E::ts('Client Secret'),
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.secret',
'permission' => [
'manage OAuth client',
Expand All @@ -221,6 +251,12 @@ public static function &fields() {
'type' => CRM_Utils_Type::T_TEXT,
'title' => E::ts('Options'),
'description' => E::ts('Extra override options for the service (JSON)'),
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.options',
'permission' => [
'manage OAuth client',
Expand All @@ -238,6 +274,12 @@ public static function &fields() {
'title' => E::ts('Is Active'),
'description' => E::ts('Is the client currently enabled?'),
'required' => TRUE,
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.is_active',
'default' => '1',
'table_name' => 'civicrm_oauth_client',
Expand All @@ -256,6 +298,12 @@ public static function &fields() {
'title' => E::ts('Created Date'),
'description' => E::ts('When the client was created.'),
'required' => TRUE,
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.created_date',
'default' => 'CURRENT_TIMESTAMP',
'table_name' => 'civicrm_oauth_client',
Expand All @@ -270,6 +318,12 @@ public static function &fields() {
'title' => E::ts('Modified Date'),
'description' => E::ts('When the client was created or modified.'),
'required' => TRUE,
'usage' => [
'import' => FALSE,
'export' => FALSE,
'duplicate_matching' => FALSE,
'token' => FALSE,
],
'where' => 'civicrm_oauth_client.modified_date',
'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
'table_name' => 'civicrm_oauth_client',
Expand All @@ -284,37 +338,6 @@ public static function &fields() {
return Civi::$statics[__CLASS__]['fields'];
}

/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
public static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}

/**
* Returns the names of this table
*
* @return string
*/
public static function getTableName() {
return self::$_tableName;
}

/**
* Returns if this table needs to be logged
*
* @return bool
*/
public function getLog() {
return self::$_log;
}

/**
* Returns the list of fields that can be imported
*
Expand Down
Loading

0 comments on commit 9363b60

Please sign in to comment.