private static void SetHasChildrenForEntryContent(IModelTransformContext context, IFacetContent source) { var structureStoreContentDataModel = context.Target as StructureStoreContentDataModel; if (structureStoreContentDataModel == null) { return; } structureStoreContentDataModel.HasChildren = source.VariationLinks != null && source.VariationLinks.Any(); }
private static void SetCurrentCategoryRelation(IModelTransformContext context, PropertyDictionary properties, IFacetContent source) { ContentReference currentCategoryLink; if (ContentReference.TryParse(context.QueryParameters.AllParameters["currentCategory"], out currentCategoryLink)) { properties["IsRelatedToCurrentCategory"] = source.NodeLinks != null && source.NodeLinks.Any(link => link.CompareToIgnoreWorkID(currentCategoryLink)); } else { properties["IsRelatedToCurrentCategory"] = true; } }
public override void TransformInstance(IContent source, EnhancedStructureStoreContentDataModel target, IModelTransformContext context) { _baseTransform.TransformInstance(source, target, context); target.IsPartOfActiveApproval = _approvalResolver.IsPartOfActiveApproval(source); }