File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,46 +84,6 @@ public function webformIsPublished(WebformInterface $webform): bool {
8484 return (bool ) ($ webform ->getThirdPartySetting ('os2forms ' , 'os2forms_sync ' )['publish ' ] ?? FALSE );
8585 }
8686
87- /**
88- * Webform to array.
89- *
90- * @phpstan-return array<string, mixed>
91- */
92- public function webformToArray (WebformInterface $ webform ): array {
93- $ data = array_filter (
94- $ webform ->toArray (),
95- static function ($ key ) {
96- return in_array ($ key , [
97- 'id ' ,
98- 'uuid ' ,
99- 'title ' ,
100- 'description ' ,
101- 'category ' ,
102- 'elements ' ,
103- ]);
104- },
105- ARRAY_FILTER_USE_KEY
106- );
107-
108- if (isset ($ data ['elements ' ])) {
109- try {
110- $ data ['elements ' ] = Yaml::decode ($ data ['elements ' ]);
111- }
112- catch (InvalidDataTypeException $ invalidDataTypeException ) {
113- }
114- }
115-
116- $ url = Url::fromRoute ('os2forms_sync.jsonapi.webform.show ' , ['webform ' => $ webform ->id ()],
117- ['absolute ' => TRUE ])->toString ();
118-
119- return [
120- 'data ' => $ data ,
121- 'links ' => [
122- 'self ' => $ url ,
123- ],
124- ];
125- }
126-
12787 /**
12888 * Implements hook_webform_third_party_settings_form_alter().
12989 *
You can’t perform that action at this time.
0 commit comments