1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 11:14:12 +02:00

Update MarkupAdminDataTable to correct issue where some properties indicated as readable were not. Also update phpdoc to indicate they are readable but not writable.

This commit is contained in:
Ryan Cramer
2019-11-20 08:32:18 -05:00
parent cf03946633
commit 66258de9ee

View File

@@ -5,12 +5,12 @@
*
* @method string render()
*
* @property array $headerRow
* @property array $footerRow
* @property array $rows
* @property array $rowClasses
* @property array $rowAttrs
* @property array $actions
* @property-read array $headerRow
* @property-read array $footerRow
* @property-read array $rows
* @property-read array $rowClasses
* @property-read array $rowAttrs
* @property-read array $actions
* @property bool $encodeEntities
* @property bool $sortable
* @property bool $resizable
@@ -110,6 +110,19 @@ class MarkupAdminDataTable extends ModuleJS {
parent::init();
}
/**
* Get property
*
* @param string $key
* @return mixed|null
*
*/
public function get($key) {
if($key === 'rows' || $key === 'headerRow' || $key === 'footerRow') return $this->$key;
if($key === 'rowClasses' || $key === 'rowAttrs' || $key === 'actions') return $this->$key;
return parent::get($key);
}
/**
* Set the header row for the table
*