handlePhraseLists = function(collection) {
    let fileContent = ''
    if(!collection) {
        return fileContent
    }
    fileContent = '> # Phrase list definitions' + NEWLINE + NEWLINE;
    collection.forEach(function(entity) {
        let flags = '';
        fileContent += `@ phraselist `;
        fileContent += entity.name.includes(' ') ? `"${entity.name}"` : `${entity.name}`;
        fileContent += `${(entity.mode ? `(interchangeable)` : ``)}`;
        if (entity.activated !== undefined && !entity.activated) flags += `disabled`;
        if (entity.enabledForAllModels !== undefined) {
            if (entity.enabledForAllModels === true) {
                flags += (flags !== '') ? `, enabledForAllModels` : `enabledForAllModels`;
            } else {
                flags += (flags !== '') ? `, disabledForAllModels` : `disabledForAllModels`;
            }
        } 
        if (flags !== '') fileContent += ` ${flags}`;
        if (entity.words && entity.words !== '') {
            fileContent += ` = ${NEWLINE}\t- ${entity.words}`;
        }
        fileContent += NEWLINE + NEWLINE;
    });
    fileContent += NEWLINE;

    return fileContent;
}
Helper to handle phrase lists both in the new and old property.
@param {Object[]} collection