- Issue created by @joachim
ConfigEntityListBuilder and DraggableListBuilder / DraggableListBuilderTrait both have a buildRow() method which appears to expect the same thing -- a child class for a specific entity type should return rows for the table element.
However, they handle the return value completely differently.
- ConfigEntityListBuilder puts the rows into the table element's #data
- DraggableListBuilder / DraggableListBuilderTrait put the rows into the table element as child render elements.
This means that the following rows will work in ConfigEntityListBuilder but will produce warnings (and no output) with DraggableListBuilderTrait:
public function buildRow(EntityInterface $entity) {
$row['data']['name'] = $entity->label();
// OR:
$row['data']['name'] = [
'data' => $entity->label(),
];
}
There is more background in the related docs issue, 🐛 DraggableListBuilder / DraggableListBuilderTrait need to document that buildRow() behaves completely differently from the parent class Active .
This issue is for finding a way to standardize both to use child render elements, in a backwards-compatible manner for classes that use ConfigEntityListBuilder.