@@ -290,6 +290,30 @@ abstract class AbstractColumn implements ColumnInterface
290
290
*/
291
291
protected $ originalTypeOfField ;
292
292
293
+ /**
294
+ * If the field is sent in the response, to show in the webpage
295
+ * Is set in the ColumnBuilder.
296
+ * Default: true
297
+ *
298
+ * @var bool
299
+ */
300
+ protected $ sentInResponse ;
301
+
302
+ /**
303
+ * If this column displays the total of its cells in its head
304
+ * Default: false
305
+ *
306
+ * @var bool
307
+ */
308
+ protected $ computeTotal ;
309
+
310
+ /**
311
+ * Contains the eventually computed total of the column
312
+ *
313
+ * @var mixed
314
+ */
315
+ protected $ total ;
316
+
293
317
//-------------------------------------------------
294
318
// Options
295
319
//-------------------------------------------------
@@ -323,6 +347,8 @@ public function configureOptions(OptionsResolver $resolver)
323
347
'join_type ' => 'leftJoin ' ,
324
348
'type_of_field ' => null ,
325
349
'responsive_priority ' => null ,
350
+ 'sent_in_response ' => true ,
351
+ 'compute_total ' => false
326
352
));
327
353
328
354
$ resolver ->setAllowedTypes ('cell_type ' , array ('null ' , 'string ' ));
@@ -343,6 +369,8 @@ public function configureOptions(OptionsResolver $resolver)
343
369
$ resolver ->setAllowedTypes ('join_type ' , 'string ' );
344
370
$ resolver ->setAllowedTypes ('type_of_field ' , array ('null ' , 'string ' ));
345
371
$ resolver ->setAllowedTypes ('responsive_priority ' , array ('null ' , 'int ' ));
372
+ $ resolver ->setAllowedTypes ('sent_in_response ' , array ('bool ' ));
373
+ $ resolver ->setAllowedTypes ('compute_total ' , array ('bool ' ));
346
374
347
375
$ resolver ->setAllowedValues ('cell_type ' , array (null , 'th ' , 'td ' ));
348
376
$ resolver ->setAllowedValues ('join_type ' , array (null , 'join ' , 'leftJoin ' , 'innerJoin ' ));
@@ -1075,4 +1103,76 @@ public function setOriginalTypeOfField($originalTypeOfField)
1075
1103
1076
1104
return $ this ;
1077
1105
}
1106
+
1107
+ /**
1108
+ * Get sentInResponse.
1109
+ *
1110
+ * @return bool
1111
+ */
1112
+ public function getSentInResponse ()
1113
+ {
1114
+ return $ this ->sentInResponse ;
1115
+ }
1116
+
1117
+ /**
1118
+ * Set sentIntResponse.
1119
+ *
1120
+ * @param bool $sentInResponse
1121
+ *
1122
+ * @return $this
1123
+ */
1124
+ public function setSentInResponse ($ sentInResponse )
1125
+ {
1126
+ $ this ->sentInResponse = $ sentInResponse ;
1127
+
1128
+ return $ this ;
1129
+ }
1130
+
1131
+ /**
1132
+ * Get computeTotal.
1133
+ *
1134
+ * @return bool
1135
+ */
1136
+ public function getComputeTotal ()
1137
+ {
1138
+ return $ this ->computeTotal ;
1139
+ }
1140
+
1141
+ /**
1142
+ * Set sentIntResponse.
1143
+ *
1144
+ * @param bool $computeTotal
1145
+ *
1146
+ * @return $this
1147
+ */
1148
+ public function setComputeTotal ($ computeTotal )
1149
+ {
1150
+ $ this ->computeTotal = $ computeTotal ;
1151
+
1152
+ return $ this ;
1153
+ }
1154
+
1155
+ /**
1156
+ * Get total
1157
+ *
1158
+ * @return mixed
1159
+ */
1160
+ public function getTotal ()
1161
+ {
1162
+ return $ this ->total ;
1163
+ }
1164
+
1165
+ /**
1166
+ * Set total
1167
+ *
1168
+ * @param $total
1169
+ *
1170
+ * @return $this
1171
+ */
1172
+ public function setTotal ($ total )
1173
+ {
1174
+ $ this ->total = $ total ;
1175
+
1176
+ return $ this ;
1177
+ }
1078
1178
}
0 commit comments