Repository navigation
Conversation
* develop: Release 6.1.1 Fixed deprecated use of ReflectionProperty::setValue to set static value Added event subscriber to reset webform submissions state when processing job queue Added proper entity access checks on Maestro notification preview routes
| continue; | ||
| } | ||
| $values = []; | ||
| foreach (array_keys($header) as $key) { |
There was a problem hiding this comment.
If i understand correctly just using the headers from the builder here will not necessarily contain something that uniquely identifies the webform. Consider adding the webform id to the output and database table.
| * Deletes metadata belonging to a deleted form. | ||
| */ | ||
| public function delete(string $uuid): void { | ||
| $this->database->delete('os2forms_metadata') |
There was a problem hiding this comment.
This is the fifth time os2forms_metadata is typed out here. Consider using a class constant and using this in os2forms_metadata.install aswell.
| ]; | ||
|
|
||
| if (isset($build['table']['operations']['apply_above'])) { | ||
| $build['table']['operations']['metadata_export'] = $exportLink; |
There was a problem hiding this comment.
So this would only display if operations (webform_bulk_form) is enabled? If this is on purpose then no worries.
There was a problem hiding this comment.
In my opinion having the operations coloumn (Build, View, etc.) not last in this view is strange
| ->sort('title') | ||
| ->sort('id') |
There was a problem hiding this comment.
I don't believe multiple sorts works as intented here. This would just sort with respect to webform ids.
| 'created_uid' => ['description' => 'Creator user ID, or NULL if unknown or system initiated.'] + $uid, | ||
| 'created_username' => ['description' => 'Fixed creator username snapshot, or NULL if unknown.'] + $username, | ||
| 'changed' => ['description' => 'Last form save time as a Unix timestamp, or NULL if unknown.'] + $timestamp, | ||
| 'changed_uid' => ['description' => 'Last editor user ID, or NULL if unknown or system initiated.'] + $uid, |
| type: module | ||
| description: 'Stores persistent creation, modification, and submission metadata for Webforms.' | ||
| package: OS2Forms | ||
| core_version_requirement: ^10 || ^11 |
There was a problem hiding this comment.
I think we can remove ^10 here
| $rows[] = [$label, ['data' => ['#plain_text' => (string) $value]]]; | ||
| } | ||
|
|
||
| $form['os2forms_metadata'] = [ |
There was a problem hiding this comment.
This renders below the Save button. Consider making sure its above the Save button.
| and the latest completed submission date. Displays the data in the overview and | ||
| under **Settings > OS2Forms**. |
There was a problem hiding this comment.
I read this as there being a different view for displaying all the data. I think mentioning that it is on a specific webform's Settings > OS2Forms.
| * @phpstan-param array<string, \Drupal\Core\Entity\EntityTypeInterface> $entity_types | ||
| */ | ||
| function os2forms_metadata_entity_type_alter(array &$entity_types): void { | ||
| $entity_types['webform']->setListBuilderClass(WebformMetadataListBuilder::class); |
There was a problem hiding this comment.
I think its worth noting that this is happening in the README. In Aarhus we already overwrite this, so we will not be able to use this out of the box.
No description provided.