Bloom.Book.BookCopyrightAndLicense.UpdateDomFromDataDiv C# (CSharp) Method

UpdateDomFromDataDiv() static private method

Propagating the copyright and license information in the bloomDataDiv to template fields found in the pages of the book (normally just the credits page).
This is "internal" just as a convention, that it is accessible for testing purposes only
static private UpdateDomFromDataDiv ( HtmlDom dom, string bookFolderPath, CollectionSettings collectionSettings ) : void
dom HtmlDom
bookFolderPath string
collectionSettings Bloom.Collection.CollectionSettings
return void
        internal static void UpdateDomFromDataDiv(HtmlDom dom, string bookFolderPath, CollectionSettings collectionSettings)
        {
            CopyItemToFieldsInPages(dom, "copyright");
            CopyItemToFieldsInPages(dom, "licenseUrl");
            CopyItemToFieldsInPages(dom, "licenseDescription", languagePreferences:collectionSettings.LicenseDescriptionLanguagePriorities.ToArray());
            CopyItemToFieldsInPages(dom, "licenseNotes");
            CopyItemToFieldsInPages(dom, "licenseImage", valueAttribute:"src");

            if(!String.IsNullOrEmpty(bookFolderPath)) //unit tests may not be interested in checking this part
                UpdateBookLicenseIcon(GetMetadata(dom), bookFolderPath);
        }