2020-05-29 13:41:58 +02:00
|
|
|
<?php
|
|
|
|
$data = array();
|
|
|
|
if (!empty($field['data'])) {
|
|
|
|
foreach ($field['data'] as $dataField => $dataValue) {
|
|
|
|
$value = '';
|
|
|
|
if (!empty($dataValue['value'])) {
|
|
|
|
$value = $dataValue['value'];
|
|
|
|
}
|
|
|
|
if (!empty($dataValue['value_path']) && !empty($this->Hash->extract($row, $dataValue['value_path'])[0])) {
|
|
|
|
$value = $this->Hash->extract($row, $dataValue['value_path'])[0];
|
|
|
|
}
|
|
|
|
$data[] = 'data-' . h($dataField) . '="' . h($value) . '"';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo sprintf(
|
2021-06-23 11:15:22 +02:00
|
|
|
'<input class="selectable_row select" type="checkbox" data-rowid="%s" %s>',
|
2020-05-29 13:41:58 +02:00
|
|
|
h($k),
|
|
|
|
empty($data) ? '' : implode(' ', $data)
|
|
|
|
);
|
|
|
|
?>
|