1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* Disclaimer: This source code is protected by copyright law and by |
5
|
|
|
* international conventions. |
6
|
|
|
* |
7
|
|
|
* Any reproduction or partial or total distribution of the source code, by any |
8
|
|
|
* means whatsoever, is strictly forbidden. |
9
|
|
|
* |
10
|
|
|
* Anyone not complying with these provisions will be guilty of the offense of |
11
|
|
|
* infringement and the penal sanctions provided for by law. |
12
|
|
|
* |
13
|
|
|
* © 2018 All rights reserved. |
14
|
|
|
*/ |
15
|
|
|
|
16
|
|
|
namespace WBW\Bundle\JQuery\DataTablesBundle\Helper; |
17
|
|
|
|
18
|
|
|
use WBW\Bundle\JQuery\DataTablesBundle\API\DataTablesColumnInterface; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* DataTables column helper. |
22
|
|
|
* |
23
|
|
|
* @author webeweb <https://github.com/webeweb/> |
24
|
|
|
* @package WBW\Bundle\JQuery\DataTablesBundle\Helper |
25
|
|
|
*/ |
26
|
|
|
class DataTablesColumnHelper { |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* DataTables cell types. |
30
|
|
|
* |
31
|
|
|
* @return array Returns the cell types. |
32
|
|
|
*/ |
33
|
|
|
public static function dtCellTypes() { |
34
|
|
|
return [ |
35
|
|
|
DataTablesColumnInterface::DATATABLES_CELL_TYPE_TD, |
36
|
|
|
DataTablesColumnInterface::DATATABLES_CELL_TYPE_TH, |
37
|
|
|
]; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* DataTables order sequences. |
42
|
|
|
* |
43
|
|
|
* @return array Returns the order sequences. |
44
|
|
|
*/ |
45
|
|
|
public static function dtOrderSequences() { |
46
|
|
|
return [ |
47
|
|
|
DataTablesColumnInterface::DATATABLES_ORDER_SEQUENCE_ASC, |
48
|
|
|
DataTablesColumnInterface::DATATABLES_ORDER_SEQUENCE_DESC, |
49
|
|
|
]; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* DataTables types. |
54
|
|
|
* |
55
|
|
|
* @return array Returns the types. |
56
|
|
|
*/ |
57
|
|
|
public static function dtTypes() { |
58
|
|
|
return [ |
59
|
|
|
DataTablesColumnInterface::DATATABLES_TYPE_DATE, |
60
|
|
|
DataTablesColumnInterface::DATATABLES_TYPE_HTML, |
61
|
|
|
DataTablesColumnInterface::DATATABLES_TYPE_HTML_NUM, |
62
|
|
|
DataTablesColumnInterface::DATATABLES_TYPE_NUM, |
63
|
|
|
DataTablesColumnInterface::DATATABLES_TYPE_NUM_FMT, |
64
|
|
|
DataTablesColumnInterface::DATATABLES_TYPE_STRING, |
65
|
|
|
]; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
} |
69
|
|
|
|