PHP 8.2.30
Preview: populator.js Size: 674 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/backend/utils/populator/populator.js

import { populateProperty } from './populate-property.js';
/**
 * @load ./populator.doc.md
 * @param {Array<BaseRecord>} records
 * @param context
 * @new In version 3.3
 */
export async function populator(records, context) {
  if (!records || !records.length) {
    return records;
  }
  const resourceDecorator = records[0].resource.decorate();
  const allProperties = Object.values(resourceDecorator.getFlattenProperties());
  const references = allProperties.filter(p => !!p.reference());
  await Promise.all(references.map(async propertyDecorator => {
    await populateProperty(records, propertyDecorator, context);
  }));
  return records;
}
export default populator;

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
71 B lrw-r--r-- 2026-02-28 00:31:42
Edit Download
3.79 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
4.30 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
1.14 KB lrw-r--r-- 2026-02-28 00:31:56
Edit Download
674 B lrw-r--r-- 2026-02-28 00:31:48
Edit Download
323 B lrw-r--r-- 2026-02-28 00:31:48
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).