File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 44
55namespace CakeDC \Datatables \Datatable ;
66
7- use Cake \Core \InstanceConfigTrait ;
8- use Cake \Utility \Inflector ;
9- use Cake \Utility \Text ;
107use CakeDC \Datatables \Datatables ;
118use CakeDC \Datatables \Exception \MissConfiguredException ;
129use CakeDC \Datatables \View \LinkFormatter \LinkInterface ;
10+ use Cake \Core \InstanceConfigTrait ;
11+ use Cake \Utility \Inflector ;
12+ use Cake \Utility \Text ;
1313use Exception ;
1414use InvalidArgumentException ;
1515
@@ -477,6 +477,11 @@ public function getDatatableScript(): string
477477 );
478478 }
479479
480+ public function setCallback ($ callback ): void
481+ {
482+ $ this ->setConfig ('drawCallback ' , $ callback );
483+ }
484+
480485 public function getCommonScript (): string
481486 {
482487 return 'console.log("from getCommonScript") ' ;
Original file line number Diff line number Diff line change @@ -164,4 +164,9 @@ public function getTableHeaders(
164164 ->getTableHeaders ();
165165 }
166166
167+ public function setCallback (string $ functionCallback )
168+ {
169+ $ this ->dtInstance ->setCallback ($ functionCallback );
170+ }
171+
167172}
You can’t perform that action at this time.
0 commit comments