RecommendationWidgetItem
|
Type |
Class |
|
Extends |
|
|
Import path |
|
A widget item for a recommendation widget.
Constructor
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Required. The entity associated with the widget. |
|
|
|
Required. The unique identifier of the widget. To find the widget IDwidget ID in Sitecore Search, click Widgets. Widget IDs are in the RFK ID column. Example: |
|
|
Optional. Options to determine which recommendations are given by a recommendation widget. | |
|
|
|
Optional. A list of sourcesource IDs that identify the sources to include results from. Useful for filtering results by source, for example, when managing multiple sites. To find source IDs in Sitecore Search, on the menu bar, click Sources. If set, the response will contain results only from the specified sources. If unset, the response will return results from all sources. Example: Minimum length: 1. |
Properties
|
Name |
Type |
Description |
|---|---|---|
|
|
Optional. The recommendation object of a widget item. |
Accessors
The following properties are available to get and set:
get recipe
Returns the recipe property of the RecommendationWidgetItem instance.
set recipe
Sets the recipe of the RecommendationWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
A recipe for recommendations. A recipe is used to determine which recommendations are given by a recommendation widget. |
Methods
_validateRecipe
Validates that the recipe ID is a non-empty string, and that the recipe version is an integer greater than or equal to 1.
Signature
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
A recipe for recommendations. A recipe is used to determine which recommendations are given by a recommendation widget. |
Return value
Returns void.
Errors
resetRecipe
Resets recipe to undefined.
Signature
Return value
Returns void.
resetRecommendations
Resets recommendation to an empty object.
Signature
Return value
Returns void.
toDTO
Maps the RecommendationWidgetItem instance to its DTO (data transfer object) format.
Signature
Return value
Returns the RecommendationWidgetItem instance in a standardized DTO format.