public override IEnumerable<object> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponents = fields.GetLinkedComponentMultiValue(SchemaFieldName);

            if (linkedComponents != null)
            {
                return linkedComponents;
            }
            return null;
        }
Beispiel #2
0
        public override IEnumerable <object> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponents = fields.GetLinkedComponentMultiValue(SchemaFieldName);

            if (linkedComponents != null)
            {
                return(linkedComponents);
            }
            return(null);
        }
        public override IEnumerable<string> GetMultiValue(IFieldSet source, IPage page = null)
        {
            var internalLinks = source.GetLinkedComponentMultiValue(SchemaFieldName);

            if (internalLinks.Any())
            {
                var linkProvider = DependencyResolver.Current.GetService<ILinkProvider>();
                return internalLinks.Select(internalLink => page != null ? linkProvider.ResolveLink(page.Id, internalLink.Id, "") : linkProvider.ResolveLink(internalLink.Id));
            }

            return source.GetMultiValue(SchemaFieldName);
        }
        public override IEnumerable <string> GetMultiValue(IFieldSet source, IPage page = null)
        {
            var internalLinks = source.GetLinkedComponentMultiValue(SchemaFieldName);

            if (internalLinks.Any())
            {
                var linkProvider = DependencyResolver.Current.GetService <ILinkProvider>();
                return(internalLinks.Select(internalLink => page != null ? linkProvider.ResolveLink(page.Id, internalLink.Id, "") : linkProvider.ResolveLink(internalLink.Id)));
            }

            return(source.GetMultiValue(SchemaFieldName));
        }
        public override IEnumerable<object> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponents = fields.GetLinkedComponentMultiValue(SchemaFieldName);

            return linkedComponents.Select(comp => ComponentViewModelBuilder.Build(comp, TargetType, page));
        }
        public override IEnumerable <object> GetMultiValue(IFieldSet fields, IPage page = null)
        {
            var linkedComponents = fields.GetLinkedComponentMultiValue(SchemaFieldName);

            return(linkedComponents.Select(comp => ComponentViewModelBuilder.Build(comp, TargetType, page)));
        }