1 | <?php |
||
6 | class GridRowsExtension extends DataExtension |
||
|
|||
7 | { |
||
8 | /* |
||
9 | If you are laying out using some form of grid, e.g. HTML table (ugh) or |
||
10 | bootstraps span classes it is useful to have the DataList split by row. |
||
11 | Here the DataList is generated from a method accessible to the current |
||
12 | controller |
||
13 | |||
14 | See README.md for a worked example |
||
15 | |||
16 | */ |
||
17 | 3 | public function SplitDataListIntoGridRows($itemsInGridMethod, $numberOfCols) |
|
41 | |||
42 | /* |
||
43 | If you are laying out using some form of grid, e.g. HTML table (ugh) or |
||
44 | bootstraps span classes it is useful to have the DataList split by row. |
||
45 | This is what this method does. |
||
46 | |||
47 | See USAGE.md for a worked example |
||
48 | |||
49 | */ |
||
50 | 1 | public function SplitClassNameDataListIntoGridRows( |
|
57 | |||
58 | /* |
||
59 | The actual method that splits the DataList into an ArrayList of rows that |
||
60 | contain an ArrayList of Columns |
||
61 | */ |
||
62 | 2 | private function createGrid($itemsInGrid, $numberOfCols) |
|
86 | } |
||
87 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.