Skip to content

Commit

Permalink
[Task] Add mimeType to asset grid options (#651)
Browse files Browse the repository at this point in the history
* Add mimeType to asset grid.

* Add Doc for predefined_columns
  • Loading branch information
martineiber authored Jan 7, 2025
1 parent 05814a2 commit 278b22a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/10_Extending_Studio/05_Grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,20 @@ final readonly class MetadataCollector implements ColumnCollectorInterface
];
}
}
```

### Predefined Columns
You can define what columns should be visible by default in the grid by modifying the `pimcore_studio_backend.grid.asset.predefined_columns` parameter in your `config.yaml` file.

Example:
```yaml

pimcore_studio_backend:
grid:
asset:
predefined_columns:
- key: id
group: system
- key: fullpath
group: system
```
1 change: 1 addition & 0 deletions src/Grid/Mapper/ColumnMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
'published' => 'boolean',
'classname' => 'string',
'index' => 'integer',
'mimetype' => 'string',
];

public function getType(string $column): string
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Grid/Service/SystemColumnServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function testGetSystemColumnsForAssets(): void
'creationDate' => 'datetime',
'modificationDate' => 'datetime',
'size' => 'fileSize',
'mimetype' => 'string',
], $systemColumnService->getSystemColumnsForAssets());
}

Expand Down

0 comments on commit 278b22a

Please sign in to comment.