forked from fheider/cakephp-datatables
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Hello,
Do you thinks that it will possible to add a params to table function (file DataTablesHelper.php) to select the block name where the code will be appear in the layout ?
public function table(string $id = 'datatable', array $dtOptions = [], array $htmlOptions = [], string $blocName = '') : string
{
$htmlOptions = array_merge($htmlOptions, [
'id' => $id,
'class' => 'dataTable ' . ($htmlOptions['class'] ?? ''),
]);
$table = $this->Html->tag('table', '', $htmlOptions);
$code = $this->draw("#{$id}", $dtOptions);
if ($blockName != '') {
return $table.$this->Html->scriptBlock($code, ['block' => $blockName]);
} else {
return $table.$this->Html->scriptBlock($code);
}
}
Metadata
Metadata
Assignees
Labels
No labels