Document List
Generic, immediately rendered document lists with AJAX search and pagination.
Reusable document-based lists
Document List is the generic foundation for lists backed by APPNETOS document collections. A new domain-specific list typically only needs its collection mapping, column definitions and row mapping. Search, sorting, pagination, rendering and AJAX refresh are inherited from the Core App.
Its getCollection() default returns null; the application must provide a
compatible collection. An invalid or missing collection results in a list initialization error.
How lists work
Unlike a picker, a Document List renders its initial rows immediately during the normal page response. Search and pagination refresh the relevant list content asynchronously with AJAX, avoiding a full page reload. The underlying document collection is queried for the requested page rather than rendering the entire collection.
Lists can display clickable links, boolean indicators and JavaScript-driven buttons. The application controls which data is exposed in each row and which actions are available. Authorization must still be enforced by the application and its server-side endpoints.
Row representation
The getFields() keys correspond to the keys returned by getRows(). Each
cell
can specify a field type, value, CSS classes, links or attributes. The DNS Control user and group
examples use FieldType::LINK, FieldType::BOOL and
FieldType::BUTTON.
protected function getFields(): array
{
return [
'name' => ['label' => 'Name'],
'active' => ['label' => 'Active'],
];
}
protected function getRows(array $documents): array
{
$rows = [];
foreach ($documents as $document) {
$rows[] = [
'name' => ['type' => FieldType::LINK->value, 'value' => $document->getName(), 'href' => '...'],
'active' => ['type' => FieldType::BOOL->value, 'value' => $document->getActive()],
];
}
return $rows;
}
Core extension points
getCollection(): BaseCollection|null— provide the document collection (required).getFields(): array— define visible column labels and presentation classes.getRows(array $documents): array— map documents to the row representation used by the templates.getSearchFields(): string|array|null— enable text search on selected document fields.getSortFields(): array|null— expose sorting choices.getFilter(): array|Filter|null— apply a fixed collection filter.getId(): string— control the per-list DOM/JavaScript identifier.getBaseTemplate(),getListTemplate(),getFormTemplate(),getEntriesTemplate(),getPaginationTemplate()— replace any part of the UI.__invoke()renders the initial list;search()is the AJAX refresh endpoint.
Templates, Bootstrap and translations
The shared list renders through versioned Bootstrap templates. Supported Bootstrap versions are maintained in the Core App, while all templates can be replaced by application-specific Twig files. Core Apps that need translations provide them in 81 languages. Custom column labels and application actions can use the host application’s own translations.
Related Core Apps
Both Group List and User List extend this base list and supply defaults for their respective document types.