1 | <?php |
||
29 | 1 | class DibiFluent implements IDataSource |
|
30 | { |
||
31 | use \Nette\SmartObject; |
||
32 | |||
33 | /** @var \Dibi\Fluent */ |
||
34 | protected $fluent; |
||
35 | |||
36 | /** @var int */ |
||
37 | protected $limit; |
||
38 | |||
39 | /** @var int */ |
||
40 | protected $offset; |
||
41 | |||
42 | /** |
||
43 | * @param \Dibi\Fluent $fluent |
||
44 | */ |
||
45 | 1 | public function __construct(\Dibi\Fluent $fluent) |
|
49 | |||
50 | /** |
||
51 | * @return \Dibi\Fluent |
||
52 | */ |
||
53 | public function getFluent() |
||
57 | |||
58 | /** |
||
59 | * @return int |
||
60 | */ |
||
61 | public function getLimit() |
||
65 | |||
66 | /** |
||
67 | * @return int |
||
68 | */ |
||
69 | public function getOffset() |
||
73 | |||
74 | /** |
||
75 | * @param \Grido\Components\Filters\Condition $condition |
||
76 | * @param \Dibi\Fluent $fluent |
||
77 | */ |
||
78 | protected function makeWhere(\Grido\Components\Filters\Condition $condition, \Dibi\Fluent $fluent = NULL) |
||
90 | |||
91 | /********************************** inline editation helpers ************************************/ |
||
92 | |||
93 | /** |
||
94 | * Default callback used when an editable column has customRender. |
||
95 | * @param mixed $id |
||
96 | * @param string $idCol |
||
97 | * @return \DibiRow |
||
98 | */ |
||
99 | public function getRow($id, $idCol) |
||
106 | |||
107 | /*********************************** interface IDataSource ************************************/ |
||
108 | |||
109 | /** |
||
110 | * @return int |
||
111 | */ |
||
112 | 1 | public function getCount() |
|
117 | |||
118 | /** |
||
119 | * @return array |
||
120 | */ |
||
121 | 1 | public function getData() |
|
125 | |||
126 | 1 | /** |
|
127 | * @param array $conditions |
||
128 | */ |
||
129 | 1 | public function filter(array $conditions) |
|
135 | |||
136 | /** |
||
137 | * @param int $offset |
||
138 | * @param int $limit |
||
139 | */ |
||
140 | 1 | public function limit($offset, $limit) |
|
145 | |||
146 | /** |
||
147 | * @param array $sorting |
||
148 | */ |
||
149 | 1 | public function sort(array $sorting) |
|
155 | |||
156 | /** |
||
157 | * @param mixed $column |
||
158 | * @param array $conditions |
||
159 | * @param int $limit |
||
160 | * @return array |
||
161 | * @throws Exception |
||
162 | */ |
||
163 | 1 | public function suggest($column, array $conditions, $limit) |
|
192 | } |
||
193 |