(loadedEntries: ImplementationEntry[], collection: Collection)
| 545 | } |
| 546 | |
| 547 | processEntries(loadedEntries: ImplementationEntry[], collection: Collection) { |
| 548 | const entries = loadedEntries.map(loadedEntry => |
| 549 | createEntry( |
| 550 | collection.get('name'), |
| 551 | selectEntrySlug(collection, loadedEntry.file.path), |
| 552 | loadedEntry.file.path, |
| 553 | { |
| 554 | raw: loadedEntry.data || '', |
| 555 | label: loadedEntry.file.label, |
| 556 | author: loadedEntry.file.author, |
| 557 | updatedOn: loadedEntry.file.updatedOn, |
| 558 | meta: { path: prepareMetaPath(loadedEntry.file.path, collection) }, |
| 559 | }, |
| 560 | ), |
| 561 | ); |
| 562 | const formattedEntries = entries.map(this.entryWithFormat(collection)); |
| 563 | // If this collection has a "filter" property, filter entries accordingly |
| 564 | const collectionFilter = collection.get('filter'); |
| 565 | const filteredEntries = collectionFilter |
| 566 | ? this.filterEntries({ entries: formattedEntries }, collectionFilter) |
| 567 | : formattedEntries; |
| 568 | |
| 569 | if (hasI18n(collection)) { |
| 570 | const extension = selectFolderEntryExtension(collection); |
| 571 | const groupedEntries = groupEntries(collection, extension, filteredEntries); |
| 572 | return groupedEntries; |
| 573 | } |
| 574 | |
| 575 | return filteredEntries; |
| 576 | } |
| 577 | |
| 578 | async listEntries(collection: Collection) { |
| 579 | const extension = selectFolderEntryExtension(collection); |
no test coverage detected