1414
1515use Libs \ModelSerializers \Many2OneExpandSerializer ;
1616use models \summit \Summit ;
17- use models \summit \SummitScheduleConfig ;
1817use ModelSerializers \SerializerRegistry ;
1918use ModelSerializers \SummitSerializer ;
2019
@@ -70,6 +69,46 @@ final class AdminSummitSerializer extends SummitSerializer
7069 'MuxAllowedDomains ' => 'mux_allowed_domains:json_string_array ' ,
7170 ];
7271
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+
73112 protected static $ allowed_relations = [
74113 'ticket_types ' ,
75114 'locations ' ,
@@ -92,7 +131,7 @@ final class AdminSummitSerializer extends SummitSerializer
92131 * @param string|null $relation
93132 * @return string
94133 */
95- protected function getSerializerType (?string $ relation= null ): string
134+ protected function getSerializerType (?string $ relation = null ): string
96135 {
97136 return SerializerRegistry::SerializerType_Private;
98137 }
@@ -108,11 +147,11 @@ public function serialize($expand = null, array $fields = [], array $relations =
108147 {
109148 $ summit = $ this ->object ;
110149 if (!$ summit instanceof Summit) return [];
111- $ values = parent ::serialize ($ expand , $ fields , $ relations , $ params );
150+ $ values = parent ::serialize ($ expand , $ fields , $ relations , $ params );
112151
113- if (in_array ('track_groups ' , $ relations ) && !isset ($ values ['track_groups ' ])){
152+ if (in_array ('track_groups ' , $ relations ) && !isset ($ values ['track_groups ' ])) {
114153 $ track_groups = [];
115- foreach ($ summit ->getCategoryGroups () as $ group ){
154+ foreach ($ summit ->getCategoryGroups () as $ group ) {
116155 $ track_groups [] = $ group ->getId ();
117156 }
118157 $ values ['track_groups ' ] = $ track_groups ;
0 commit comments