The DataFeedItemMapper allows you to define which data feed items map to which UI templates. It does this via the list <code>Mappings</code>, which take classes that extend [[Type:DataFeedItem|DataFeedItem]] and If they match a mapping in the list it Duplicates that item's template and adds it into the list.
The DataFeedItemMapper allows you to define which data feed items map to which UI templates.
|Mappings|{{RootFieldType|SyncList`1|[[#ItemMapping|DataFeedItemMapper.ItemMapping]]}}|TypeAdv0=true| A list of item Mappings to map data feed item types to Feed Templates.
|OnSetupTemplate:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Set up a basic settup with this component with a bunch of example UIs.
}}
== ItemMapping ==
{{Table TypeFields
|ItemType|{{RootFieldType|SyncType}}|TypeAdv0=true| The type to map to a template. The type coming from a data feed will extend the abstract class [[Type:DataFeedItem|DataFeedItem]].
|GenericReplacementTypes|{{RootFieldType|SyncTypeList}}|TypeAdv1=true| If <code>ItemType</code> is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
|Template|'''[[Component:FeedItemInterface|FeedItemInterface]]'''|TypeAdv2=true| The template to duplicate when matched with this item mapping.
}}
}}
== Behavior ==
== Usage ==
This component will use the item mappings defined in the Mappings list to match specific [[Type:Type|Types]] of data feed items to corresponding feed item interface templates.
This component is to be put into a [[Component:SingleFeedView]] or similar so that the component it is specified inside of can use this component to map incoming feed items from the data feed to UI or object templates.
[[Category:Components With Nested Types{{#translation:}}|Data Feed Item Mapper]]
[[Category:Components With Nested Types{{#translation:}}|Data Feed Item Mapper]]
[[Category:ComponentStub]]
[[Category:ComponentStubs]]
Latest revision as of 06:30, 17 March 2025
Component image
Data Feed Item Mapper component as seen in the Scene Inspector
The DataFeedItemMapper allows you to define which data feed items map to which UI templates. It does this via the list Mappings, which take classes that extend DataFeedItem and If they match a mapping in the list it Duplicates that item's template and adds it into the list.
If ItemType is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
The template to duplicate when matched with this item mapping.
Usage
This component is to be put into a Component:SingleFeedView or similar so that the component it is specified inside of can use this component to map incoming feed items from the data feed to UI or object templates.