You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fc1ffd6
Browse filesBrowse the repository at this point in the historyBrowse files
-`com.woltlab.wcf.sitemap.object`, use the event `wcf\event\sitemap\SitemapObjectCollecting` instead
396
404
-`com.woltlab.wcf.condition.userSearch`, use the event `wcf\event\gridView\admin\UserGridViewInitialized` to add filters to the user list instead
405
+
-`com.woltlab.wcf.condition.trophy`, use the event `wcf\event\trophy\TrophyObjectFilterCollecting` to add filters to the conditions of trophies instead
397
406
398
407
### JavaScript
399
408
@@ -487,6 +496,8 @@ With version 6.3, we have deprecated certain components and removed several othe
Copy file name to clipboardExpand all lines: docs/migration/wsc62/php.md
+78-1Lines changed: 78 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -875,11 +875,88 @@ User options of the `profile` category tree are automatically available as filte
875
875
876
876
- the filters of the user list in the ACP, which also provides a hidden column for each option,
877
877
- the filters of the members list for options that are `searchable` and visible to other users than the owner,
878
-
- the object filters of ads, notices and automatic user group assignments (`wcf\system\object\filter\user\UserOptionObjectFilter`).
878
+
- the object filters of ads, notices, automatic user group assignments and trophies (`wcf\system\object\filter\user\UserOptionObjectFilter`).
879
879
880
880
No additional code is required, the filter is provided by the form option of the user option.
881
881
882
882
## Grid View Column Visibility
883
883
884
884
Grid views can allow users to select the visible columns, see [Column Visibility](../../php/api/grid_views.md#column-visibility).
885
885
`AbstractGridViewPage` reads the selected columns from the `columns` parameter into the new property `$columns`, which may conflict with an existing property of the same name in a subclass.
886
+
887
+
## Trophies
888
+
889
+
### Builders and Commands
890
+
891
+
`wcf\data\trophy\TrophyEditor` and the `create`, `update` and `delete` actions of `wcf\data\trophy\TrophyAction` are deprecated, trophies are created and modified through the [database object builder](../../php/database-object-builder.md)`wcf\data\trophy\TrophyBuilder` and the commands `CreateTrophy`, `UpdateTrophy` and `DeleteTrophy` in the `wcf\command\trophy` namespace.
892
+
The commands fire the PSR-14 events `TrophyCreated`, `TrophyUpdated` and `TrophyDeleted` in the `wcf\event\trophy` namespace.
893
+
`UpdateTrophy` updates the trophy points and the special trophies of the users if the disabled state of the trophy changes, `DeleteTrophy` also deletes the awarded trophies and the image of the trophy.
The title and the description of trophies are stored in the localized storage (`wcf1_trophy_l10n`) instead of language items.
922
+
The columns `title` and `description` of `wcf1_trophy` and the language items `wcf.user.trophy.title{trophyID}` and `wcf.user.trophy.description{trophyID}` have been removed.
923
+
Use `Trophy::getTitle()` and `Trophy::getDescription()` to output the values and `Trophy::getL10nValues()` to read the values of all languages.
924
+
`wcf\data\trophy\I18nTrophyList` has been replaced by `wcf\data\trophy\L10nTrophyList`, which provides the localized title and description as the columns `title` and `description` for sorting.
925
+
926
+
### Images
927
+
928
+
The images of image trophies are stored through the file upload system using the object type `com.woltlab.wcf.trophy.image`.
929
+
The column `iconFile` of `wcf1_trophy` has been replaced by `iconFileID`, use `Trophy::getIconPath()` to output the image or `Trophy::getIconFile()` to access the file.
930
+
The images are no longer stored in `images/trophy/` and the image upload of `TrophyAction` (`IUploadAction`) has been removed.
931
+
932
+
### Conditions
933
+
934
+
The conditions of trophies that are awarded automatically have been migrated to object filters, the same system that is used for the conditions of ads, notices and automatic user group assignments.
935
+
The configured filters are stored as JSON in the `conditions` column of `wcf1_trophy` and are provided by `wcf\system\object\filter\builder\TrophyObjectFilterBuilder`.
936
+
The object type definition `com.woltlab.wcf.condition.trophy` is deprecated, object types of this definition are no longer evaluated.
937
+
938
+
Additional filters are registered through the PSR-14 event `wcf\event\trophy\TrophyObjectFilterCollecting`.
939
+
The trophies are awarded and revoked by applying the filters to a `UserList`, therefore only filters implementing `wcf\system\object\filter\IObjectListFilter` are supported.
Packages that provided trophy conditions must migrate the existing conditions during the update using `wcf\system\object\filter\migration\LegacyConditionMigration`.
951
+
The update of WoltLab Suite Core disables all trophies with conditions that it cannot convert, the trophies are enabled again once the remaining conditions have been converted by the updates of the other packages.
952
+
The migration must run before the `objectType` package installation plugin removes the legacy object types, because deleting the object types also deletes their conditions.
953
+
954
+
```php
955
+
(new LegacyConditionMigration('com.woltlab.wcf.condition.trophy', 'wcf1_trophy', 'trophyID'))->migrate([
Copy file name to clipboardExpand all lines: docs/package/pip/user-option.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Registers new user options (profile fields / user settings).
4
4
5
5
The input field and the output of a user option are provided by [form options](../../php/api/form_builder/form_options.md), the same infrastructure that is used for contact form options and other custom fields.
6
-
User options of the `profile` category tree are also automatically available as filters in the user list of the ACP, in the members list (if they are `searchable`) and in object filters, e.g. for ads, notices and automatic user group assignments.
6
+
User options of the `profile` category tree are also automatically available as filters in the user list of the ACP, in the members list (if they are `searchable`) and in object filters, e.g. for ads, notices, automatic user group assignments and trophies.
0 commit comments