Skip to content

Commit c5759af

Browse files
Added LfmItem columns config
1 parent 582b6ee commit c5759af

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/LfmItem.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ class LfmItem
1212
private $isDirectory;
1313
private $mimeType = null;
1414

15-
private $columns = ['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'];
15+
private $columns = [];
1616
public $attributes = [];
1717

1818
public function __construct(LfmPath $lfm, Lfm $helper, $isDirectory = false)
1919
{
2020
$this->lfm = $lfm->thumb(false);
2121
$this->helper = $helper;
2222
$this->isDirectory = $isDirectory;
23+
$this->columns = $helper->config('item_columns')??['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'];
2324
}
2425

2526
public function __get($var_name)

src/config/lfm.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@
109109
// setting it to false show `error-file-exist` error and stop upload
110110
'over_write_on_duplicate' => false,
111111

112+
// Item Columns
113+
'item_columns' => ['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'],
114+
112115
/*
113116
|--------------------------------------------------------------------------
114117
| Thumbnail

0 commit comments

Comments
 (0)