private static LinkModel GetLinkModel(IPublishedElement element)
 {
     return(new LinkModel
     {
         Id = element.Key,
         LinkType = LinkTypeResolver.GetLinkType(element.ContentType.ItemType)
     });
 }
        public object Convert(object value, Dictionary <string, object> options = null)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value), $"A value for {EditorAlias} is required.");
            }

            var list = new List <LinkModel>();

            foreach (IPublishedElement element in (IEnumerable <IPublishedElement>)value)
            {
                list.Add(
                    new LinkModel
                {
                    Id       = element.Key,
                    LinkType = LinkTypeResolver.GetLinkType(element.ContentType.ItemType)
                });
            }

            return(list);
        }