From 63bea79aff3fd58f7a02c0299771819416e760cf Mon Sep 17 00:00:00 2001 From: colemanw Date: Fri, 15 Dec 2023 19:27:16 -0500 Subject: [PATCH] Ext- Regenerate DAO files without fieldKeys(), getLog() and getTableName(). Per 9d89b14 these functions are redundant with the parent class. --- .../core/CRM/Afform/DAO/AfformSubmission.php | 33 +------- ext/afform/core/sql/auto_uninstall.sql | 6 +- ext/civigrant/CRM/Grant/DAO/Grant.php | 31 -------- ext/civigrant/sql/auto_uninstall.sql | 6 +- .../CRM/Search/DAO/SearchDisplay.php | 75 +++++++++++-------- .../CRM/Search/DAO/SearchSegment.php | 69 +++++++++-------- ext/search_kit/sql/auto_install.sql | 2 +- ext/search_kit/sql/auto_uninstall.sql | 6 +- .../CRM/Standaloneusers/DAO/Role.php | 31 -------- .../CRM/Standaloneusers/DAO/User.php | 31 -------- .../CRM/Standaloneusers/DAO/UserRole.php | 31 -------- 11 files changed, 94 insertions(+), 227 deletions(-) diff --git a/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php b/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php index 55c6f36e31..a83b0c6a5e 100644 --- a/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php +++ b/ext/afform/core/CRM/Afform/DAO/AfformSubmission.php @@ -6,7 +6,7 @@ * * Generated from org.civicrm.afform/xml/schema/CRM/Afform/AfformSubmission.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:68e301b8eb1d4ca755e3eb3b614ee2ff) + * (GenCodeChecksum:4dc8f836ce9420d461111dcaaebbb37a) */ use CRM_Afform_ExtensionUtil as E; @@ -283,37 +283,6 @@ class CRM_Afform_DAO_AfformSubmission extends CRM_Core_DAO { 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 * diff --git a/ext/afform/core/sql/auto_uninstall.sql b/ext/afform/core/sql/auto_uninstall.sql index 90004586bc..6cfd28eddf 100644 --- a/ext/afform/core/sql/auto_uninstall.sql +++ b/ext/afform/core/sql/auto_uninstall.sql @@ -8,9 +8,11 @@ -- -- Generated from drop.tpl -- DO NOT EDIT. Generated by CRM_Core_CodeGen ----- /******************************************************* +-- +-- /******************************************************* +-- * +-- * Clean up the existing tables -- * --- * Clean up the existing tables-- * -- *******************************************************/ SET FOREIGN_KEY_CHECKS=0; diff --git a/ext/civigrant/CRM/Grant/DAO/Grant.php b/ext/civigrant/CRM/Grant/DAO/Grant.php index 4b2fd2c19d..aa20b3c3d1 100644 --- a/ext/civigrant/CRM/Grant/DAO/Grant.php +++ b/ext/civigrant/CRM/Grant/DAO/Grant.php @@ -634,37 +634,6 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO { 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 * diff --git a/ext/civigrant/sql/auto_uninstall.sql b/ext/civigrant/sql/auto_uninstall.sql index 6e905e1585..191b70c17c 100644 --- a/ext/civigrant/sql/auto_uninstall.sql +++ b/ext/civigrant/sql/auto_uninstall.sql @@ -8,9 +8,11 @@ -- -- Generated from drop.tpl -- DO NOT EDIT. Generated by CRM_Core_CodeGen ----- /******************************************************* +-- +-- /******************************************************* +-- * +-- * Clean up the existing tables -- * --- * Clean up the existing tables-- * -- *******************************************************/ SET FOREIGN_KEY_CHECKS=0; diff --git a/ext/search_kit/CRM/Search/DAO/SearchDisplay.php b/ext/search_kit/CRM/Search/DAO/SearchDisplay.php index 5d779bec60..2e7cf49789 100644 --- a/ext/search_kit/CRM/Search/DAO/SearchDisplay.php +++ b/ext/search_kit/CRM/Search/DAO/SearchDisplay.php @@ -6,7 +6,7 @@ * * Generated from org.civicrm.search_kit/xml/schema/CRM/Search/SearchDisplay.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:5ca9cccecaa79803d415f288292376bb) + * (GenCodeChecksum:0eed730a39d0aadd3f66f773692f5167) */ use CRM_Search_ExtensionUtil as E; @@ -155,6 +155,12 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 'title' => E::ts('Search Display ID'), 'description' => E::ts('Unique SearchDisplay ID'), 'required' => TRUE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_display.id', 'table_name' => 'civicrm_search_display', 'entity' => 'SearchDisplay', @@ -171,6 +177,12 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_display.name', 'table_name' => 'civicrm_search_display', 'entity' => 'SearchDisplay', @@ -189,6 +201,12 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_display.label', 'table_name' => 'civicrm_search_display', 'entity' => 'SearchDisplay', @@ -205,6 +223,12 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 'title' => E::ts('Saved Search ID'), 'description' => E::ts('FK to saved search table.'), 'required' => TRUE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_display.saved_search_id', 'table_name' => 'civicrm_search_display', 'entity' => 'SearchDisplay', @@ -221,6 +245,12 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 'required' => TRUE, 'maxlength' => 128, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_display.type', 'table_name' => 'civicrm_search_display', 'entity' => 'SearchDisplay', @@ -240,6 +270,12 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_TEXT, 'title' => E::ts('Search Display Settings'), 'description' => E::ts('Configuration data for the search display'), + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_display.settings', 'default' => NULL, 'table_name' => 'civicrm_search_display', @@ -254,6 +290,12 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => E::ts('Bypass ACL Permissions'), 'description' => E::ts('Skip permission checks and ACLs when running this display.'), + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_display.acl_bypass', 'default' => '0', 'table_name' => 'civicrm_search_display', @@ -271,37 +313,6 @@ class CRM_Search_DAO_SearchDisplay extends CRM_Core_DAO { 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 * diff --git a/ext/search_kit/CRM/Search/DAO/SearchSegment.php b/ext/search_kit/CRM/Search/DAO/SearchSegment.php index 4d97d825dd..806439607f 100644 --- a/ext/search_kit/CRM/Search/DAO/SearchSegment.php +++ b/ext/search_kit/CRM/Search/DAO/SearchSegment.php @@ -6,7 +6,7 @@ * * Generated from org.civicrm.search_kit/xml/schema/CRM/Search/SearchSegment.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:0776e800d97560d2b49c54bb581959c6) + * (GenCodeChecksum:0646fd70a9ae439dbb475616dde6ab30) */ use CRM_Search_ExtensionUtil as E; @@ -131,6 +131,12 @@ class CRM_Search_DAO_SearchSegment extends CRM_Core_DAO { 'title' => E::ts('Search Segment ID'), 'description' => E::ts('Unique SearchSegment ID'), 'required' => TRUE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_segment.id', 'table_name' => 'civicrm_search_segment', 'entity' => 'SearchSegment', @@ -150,6 +156,12 @@ class CRM_Search_DAO_SearchSegment extends CRM_Core_DAO { 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_segment.name', 'table_name' => 'civicrm_search_segment', 'entity' => 'SearchSegment', @@ -168,6 +180,12 @@ class CRM_Search_DAO_SearchSegment extends CRM_Core_DAO { 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_segment.label', 'table_name' => 'civicrm_search_segment', 'entity' => 'SearchSegment', @@ -185,6 +203,12 @@ class CRM_Search_DAO_SearchSegment extends CRM_Core_DAO { 'description' => E::ts('Description will appear when selecting SearchSegment in the fields dropdown.'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_segment.description', 'table_name' => 'civicrm_search_segment', 'entity' => 'SearchSegment', @@ -203,6 +227,12 @@ class CRM_Search_DAO_SearchSegment extends CRM_Core_DAO { 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_segment.entity_name', 'table_name' => 'civicrm_search_segment', 'entity' => 'SearchSegment', @@ -221,6 +251,12 @@ class CRM_Search_DAO_SearchSegment extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_TEXT, 'title' => E::ts('Items'), 'description' => E::ts('All items in set'), + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_search_segment.items', 'table_name' => 'civicrm_search_segment', 'entity' => 'SearchSegment', @@ -235,37 +271,6 @@ class CRM_Search_DAO_SearchSegment extends CRM_Core_DAO { 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 * diff --git a/ext/search_kit/sql/auto_install.sql b/ext/search_kit/sql/auto_install.sql index 4f5d09fd84..5e3e2ffaf9 100644 --- a/ext/search_kit/sql/auto_install.sql +++ b/ext/search_kit/sql/auto_install.sql @@ -31,7 +31,7 @@ SET FOREIGN_KEY_CHECKS=1; -- * -- * civicrm_search_display -- * --- * Search Kit - saved search displays +-- * SearchKit - saved search displays -- * -- *******************************************************/ CREATE TABLE `civicrm_search_display` ( diff --git a/ext/search_kit/sql/auto_uninstall.sql b/ext/search_kit/sql/auto_uninstall.sql index 43aa40194f..08f5811752 100644 --- a/ext/search_kit/sql/auto_uninstall.sql +++ b/ext/search_kit/sql/auto_uninstall.sql @@ -8,9 +8,11 @@ -- -- Generated from drop.tpl -- DO NOT EDIT. Generated by CRM_Core_CodeGen ----- /******************************************************* +-- +-- /******************************************************* +-- * +-- * Clean up the existing tables -- * --- * Clean up the existing tables-- * -- *******************************************************/ SET FOREIGN_KEY_CHECKS=0; diff --git a/ext/standaloneusers/CRM/Standaloneusers/DAO/Role.php b/ext/standaloneusers/CRM/Standaloneusers/DAO/Role.php index 31bc162368..185287e219 100644 --- a/ext/standaloneusers/CRM/Standaloneusers/DAO/Role.php +++ b/ext/standaloneusers/CRM/Standaloneusers/DAO/Role.php @@ -246,37 +246,6 @@ class CRM_Standaloneusers_DAO_Role extends CRM_Core_DAO { 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 * diff --git a/ext/standaloneusers/CRM/Standaloneusers/DAO/User.php b/ext/standaloneusers/CRM/Standaloneusers/DAO/User.php index d0176a78c3..8208e2b5b4 100644 --- a/ext/standaloneusers/CRM/Standaloneusers/DAO/User.php +++ b/ext/standaloneusers/CRM/Standaloneusers/DAO/User.php @@ -529,37 +529,6 @@ class CRM_Standaloneusers_DAO_User extends CRM_Core_DAO { 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 * diff --git a/ext/standaloneusers/CRM/Standaloneusers/DAO/UserRole.php b/ext/standaloneusers/CRM/Standaloneusers/DAO/UserRole.php index 4544b45637..eb77ccddd7 100644 --- a/ext/standaloneusers/CRM/Standaloneusers/DAO/UserRole.php +++ b/ext/standaloneusers/CRM/Standaloneusers/DAO/UserRole.php @@ -175,37 +175,6 @@ class CRM_Standaloneusers_DAO_UserRole extends CRM_Core_DAO { 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 * -- 2.25.1