File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 3
3
To create a ` DataView ` you need to call any of the named constructors available:
4
4
5
5
- ` DataView::table() ` - Creates a DataView with a ` table ` view type.
6
- - ` DataView::list() ` - (Not available yet) Creates a DataView with a ` list ` view type.
7
- - ` DataView::grid() ` - (Not available yet) Creates a DataView with a ` grid ` view type.
6
+ - ` DataView::list() ` - Creates a DataView with a ` list ` view type.
7
+ - ` DataView::grid() ` - Creates a DataView with a ` grid ` view type.
8
+
9
+ The view type used will be the default view type, but you can add support for other view types by declaring the other view types that are supported:
10
+
11
+ ``` php
12
+ $dataview = DataView::table( ... )->supports( View::Grid(), View::List() );
13
+ ```
14
+
15
+ The order in which support is added is the order that the view types will appear in the view type switcher.
8
16
9
17
::: note
10
18
You can’t perform that action at this time.
0 commit comments