14
14
15
15
use Libs \ModelSerializers \Many2OneExpandSerializer ;
16
16
use models \summit \Summit ;
17
- use models \summit \SummitScheduleConfig ;
18
17
use ModelSerializers \SerializerRegistry ;
19
18
use ModelSerializers \SummitSerializer ;
20
19
@@ -70,6 +69,46 @@ final class AdminSummitSerializer extends SummitSerializer
70
69
'MuxAllowedDomains ' => 'mux_allowed_domains:json_string_array ' ,
71
70
];
72
71
72
+ protected static $ allowed_fields = [
73
+ 'available_on_api ' ,
74
+ 'max_submission_allowed_per_user ' ,
75
+ 'registration_link ' ,
76
+ 'link ' ,
77
+ 'external_summit_id ' ,
78
+ 'calendar_sync_name ' ,
79
+ 'calendar_sync_desc ' ,
80
+ 'api_feed_type ' ,
81
+ 'api_feed_url ' ,
82
+ 'api_feed_key ' ,
83
+ 'order_qr_prefix ' ,
84
+ 'ticket_qr_prefix ' ,
85
+ 'badge_qr_prefix ' ,
86
+ 'qr_registry_field_delimiter ' ,
87
+ 'qr_codes_enc_key ' ,
88
+ 'reassign_ticket_till_date ' ,
89
+ 'registration_disclaimer_content ' ,
90
+ 'registration_disclaimer_mandatory ' ,
91
+ 'external_registration_feed_type ' ,
92
+ 'external_registration_feed_api_key ' ,
93
+ 'virtual_site_oauth2_client_id ' ,
94
+ 'marketing_site_oauth2_client_id ' ,
95
+ 'presentation_votes_count ' ,
96
+ 'presentation_voters_count ' ,
97
+ 'presentations_submitted_count ' ,
98
+ 'attendees_count ' ,
99
+ 'paid_tickets_count ' ,
100
+ 'speakers_count ' ,
101
+ 'speaker_announcement_email_accepted_count ' ,
102
+ 'speaker_announcement_email_rejected_count ' ,
103
+ 'speaker_announcement_email_alternate_count ' ,
104
+ 'speaker_announcement_email_accepted_alternate_count ' ,
105
+ 'speaker_announcement_email_accepted_rejected_count ' ,
106
+ 'speaker_announcement_email_alternate_rejected_count ' ,
107
+ 'mux_token_id ' ,
108
+ 'mux_token_secret ' ,
109
+ 'mux_allowed_domains ' ,
110
+ ];
111
+
73
112
protected static $ allowed_relations = [
74
113
'ticket_types ' ,
75
114
'locations ' ,
@@ -92,7 +131,7 @@ final class AdminSummitSerializer extends SummitSerializer
92
131
* @param string|null $relation
93
132
* @return string
94
133
*/
95
- protected function getSerializerType (?string $ relation= null ): string
134
+ protected function getSerializerType (?string $ relation = null ): string
96
135
{
97
136
return SerializerRegistry::SerializerType_Private;
98
137
}
@@ -108,11 +147,11 @@ public function serialize($expand = null, array $fields = [], array $relations =
108
147
{
109
148
$ summit = $ this ->object ;
110
149
if (!$ summit instanceof Summit) return [];
111
- $ values = parent ::serialize ($ expand , $ fields , $ relations , $ params );
150
+ $ values = parent ::serialize ($ expand , $ fields , $ relations , $ params );
112
151
113
- if (in_array ('track_groups ' , $ relations ) && !isset ($ values ['track_groups ' ])){
152
+ if (in_array ('track_groups ' , $ relations ) && !isset ($ values ['track_groups ' ])) {
114
153
$ track_groups = [];
115
- foreach ($ summit ->getCategoryGroups () as $ group ){
154
+ foreach ($ summit ->getCategoryGroups () as $ group ) {
116
155
$ track_groups [] = $ group ->getId ();
117
156
}
118
157
$ values ['track_groups ' ] = $ track_groups ;
0 commit comments