Skip to content

Commit 8193e7a

Browse files
committed
Allow to show attachment IDs in attachment table
1 parent f18c024 commit 8193e7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/DataTables/AttachmentDataTable.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
use Doctrine\ORM\QueryBuilder;
3535
use Omines\DataTablesBundle\Adapter\Doctrine\ORM\SearchCriteriaProvider;
3636
use Omines\DataTablesBundle\Adapter\Doctrine\ORMAdapter;
37+
use Omines\DataTablesBundle\Column\NumberColumn;
3738
use Omines\DataTablesBundle\Column\TextColumn;
3839
use Omines\DataTablesBundle\DataTable;
3940
use Omines\DataTablesBundle\DataTableTypeInterface;
@@ -84,6 +85,11 @@ public function configure(DataTable $dataTable, array $options): void
8485
},
8586
]);
8687

88+
$dataTable->add('id', NumberColumn::class, [
89+
'label' => $this->translator->trans('part.table.id'),
90+
'visible' => false,
91+
]);
92+
8793
$dataTable->add('name', TextColumn::class, [
8894
'label' => 'attachment.edit.name',
8995
'orderField' => 'NATSORT(attachment.name)',

0 commit comments

Comments
 (0)