Skip to content

Commit ce33008

Browse files
author
Muhammad Shahrukh
committed
DTAB-114: Add contact custom fields
1 parent 152dff4 commit ce33008

File tree

4 files changed

+205
-0
lines changed

4 files changed

+205
-0
lines changed

CRM/Thinkific/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
class CRM_Thinkific_ContactCustomFieldsManager {
4+
const USER_FIELD = 'Thinkific_user_ID';
5+
const SYNC_STATUS_FIELD = 'Sync_status';
6+
const SYNC_DATE_FIELD = 'Last_synced_date';
7+
const RESPONSE_FIELD = 'Last_API_response';
8+
}

managed/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* Exported Custom group and fields for Thinkific sync data.
6+
*/
7+
8+
return [
9+
[
10+
'name' => 'CustomGroup_Thinkific_Sync_Data',
11+
'entity' => 'CustomGroup',
12+
'cleanup' => 'unused',
13+
'update' => 'unmodified',
14+
'params' => [
15+
'version' => 4,
16+
'values' => [
17+
'name' => 'Thinkific_sync_data',
18+
'title' => 'Thinkific sync data',
19+
'extends' => 'Contact',
20+
'extends_entity_column_value' => NULL,
21+
'style' => 'Inline',
22+
'collapse_display' => FALSE,
23+
'help_pre' => '',
24+
'help_post' => '',
25+
'weight' => 94,
26+
'is_active' => TRUE,
27+
'is_multiple' => FALSE,
28+
'min_multiple' => NULL,
29+
'max_multiple' => NULL,
30+
'collapse_adv_display' => TRUE,
31+
'created_date' => '2025-03-18 12:00:59',
32+
'is_reserved' => FALSE,
33+
'is_public' => FALSE,
34+
'icon' => '',
35+
'extends_entity_column_id' => NULL,
36+
'table_name' => 'civicrm_value_contact_lms_thinkific_sync_data',
37+
],
38+
],
39+
],
40+
[
41+
'name' => 'CustomGroup_Thinkific_Sync_Data_CustomField_Thinkific_User_ID',
42+
'entity' => 'CustomField',
43+
'cleanup' => 'unused',
44+
'update' => 'unmodified',
45+
'params' => [
46+
'version' => 4,
47+
'values' => [
48+
'custom_group_id.name' => 'Thinkific_sync_data',
49+
'name' => CRM_Thinkific_ContactCustomFieldsManager::USER_FIELD,
50+
'label' => 'Thinkific user ID',
51+
'data_type' => 'String',
52+
'html_type' => 'Text',
53+
'default_value' => NULL,
54+
'is_required' => FALSE,
55+
'is_searchable' => TRUE,
56+
'is_search_range' => FALSE,
57+
'help_pre' => NULL,
58+
'help_post' => NULL,
59+
'mask' => NULL,
60+
'attributes' => NULL,
61+
'javascript' => NULL,
62+
'is_active' => TRUE,
63+
'is_view' => FALSE,
64+
'options_per_line' => NULL,
65+
'text_length' => 255,
66+
'start_date_years' => NULL,
67+
'end_date_years' => NULL,
68+
'date_format' => NULL,
69+
'time_format' => NULL,
70+
'note_columns' => 60,
71+
'note_rows' => 4,
72+
'column_name' => 'thinkific_user_id',
73+
'serialize' => 0,
74+
'filter' => NULL,
75+
'in_selector' => FALSE,
76+
],
77+
],
78+
],
79+
[
80+
'name' => 'CustomGroup_Thinkific_Sync_Data_CustomField_Sync_Status',
81+
'entity' => 'CustomField',
82+
'cleanup' => 'unused',
83+
'update' => 'unmodified',
84+
'params' => [
85+
'version' => 4,
86+
'values' => [
87+
'custom_group_id.name' => 'Thinkific_sync_data',
88+
'name' => CRM_Thinkific_ContactCustomFieldsManager::SYNC_STATUS_FIELD,
89+
'label' => 'Sync status',
90+
'data_type' => 'String',
91+
'html_type' => 'Select',
92+
'default_value' => NULL,
93+
'is_required' => FALSE,
94+
'is_searchable' => FALSE,
95+
'is_search_range' => FALSE,
96+
'help_pre' => NULL,
97+
'help_post' => NULL,
98+
'mask' => NULL,
99+
'attributes' => NULL,
100+
'javascript' => NULL,
101+
'is_active' => TRUE,
102+
'is_view' => TRUE,
103+
'options_per_line' => NULL,
104+
'text_length' => 255,
105+
'start_date_years' => NULL,
106+
'end_date_years' => NULL,
107+
'date_format' => NULL,
108+
'time_format' => NULL,
109+
'note_columns' => 60,
110+
'note_rows' => 4,
111+
'column_name' => 'sync_status',
112+
'option_group_id.name' => 'Thinkific_Sync_Status',
113+
'serialize' => 0,
114+
'filter' => NULL,
115+
'in_selector' => FALSE,
116+
],
117+
],
118+
],
119+
[
120+
'name' => 'CustomGroup_Thinkific_Sync_Data_CustomField_Last_Synced_Date',
121+
'entity' => 'CustomField',
122+
'cleanup' => 'unused',
123+
'update' => 'unmodified',
124+
'params' => [
125+
'version' => 4,
126+
'values' => [
127+
'custom_group_id.name' => 'Thinkific_sync_data',
128+
'name' => CRM_Thinkific_ContactCustomFieldsManager::SYNC_DATE_FIELD,
129+
'label' => 'Last synced date',
130+
'data_type' => 'Date',
131+
'html_type' => 'Select Date',
132+
'default_value' => NULL,
133+
'is_required' => FALSE,
134+
'is_searchable' => FALSE,
135+
'is_search_range' => FALSE,
136+
'help_pre' => NULL,
137+
'help_post' => NULL,
138+
'mask' => NULL,
139+
'attributes' => NULL,
140+
'javascript' => NULL,
141+
'is_active' => TRUE,
142+
'is_view' => TRUE,
143+
'options_per_line' => NULL,
144+
'text_length' => 255,
145+
'start_date_years' => NULL,
146+
'end_date_years' => NULL,
147+
'date_format' => 'dd-mm-yyyy',
148+
'time_format' => 2,
149+
'note_columns' => 60,
150+
'note_rows' => 4,
151+
'column_name' => 'last_synced_date',
152+
'serialize' => 0,
153+
'filter' => NULL,
154+
'in_selector' => FALSE,
155+
],
156+
],
157+
],
158+
[
159+
'name' => 'CustomGroup_Thinkific_Sync_Data_CustomField_Last_API_Response',
160+
'entity' => 'CustomField',
161+
'cleanup' => 'unused',
162+
'update' => 'unmodified',
163+
'params' => [
164+
'version' => 4,
165+
'values' => [
166+
'custom_group_id.name' => 'Thinkific_sync_data',
167+
'name' => CRM_Thinkific_ContactCustomFieldsManager::RESPONSE_FIELD,
168+
'label' => 'Last API response',
169+
'data_type' => 'Memo',
170+
'html_type' => 'TextArea',
171+
'default_value' => NULL,
172+
'is_required' => FALSE,
173+
'is_searchable' => FALSE,
174+
'is_search_range' => FALSE,
175+
'help_pre' => NULL,
176+
'help_post' => NULL,
177+
'mask' => NULL,
178+
'attributes' => 'rows=4, cols=60',
179+
'javascript' => NULL,
180+
'is_active' => TRUE,
181+
'is_view' => TRUE,
182+
'options_per_line' => NULL,
183+
'text_length' => NULL,
184+
'start_date_years' => NULL,
185+
'end_date_years' => NULL,
186+
'date_format' => NULL,
187+
'time_format' => NULL,
188+
'note_columns' => 60,
189+
'note_rows' => 4,
190+
'column_name' => 'last_api_response',
191+
'serialize' => 0,
192+
'filter' => NULL,
193+
'in_selector' => FALSE,
194+
],
195+
],
196+
],
197+
];

0 commit comments

Comments
 (0)