From 66258de9ee92681c6e60cc47c182117b91df2de0 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 20 Nov 2019 08:32:18 -0500 Subject: [PATCH] Update MarkupAdminDataTable to correct issue where some properties indicated as readable were not. Also update phpdoc to indicate they are readable but not writable. --- .../MarkupAdminDataTable.module | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/wire/modules/Markup/MarkupAdminDataTable/MarkupAdminDataTable.module b/wire/modules/Markup/MarkupAdminDataTable/MarkupAdminDataTable.module index b311fb60..da686e48 100644 --- a/wire/modules/Markup/MarkupAdminDataTable/MarkupAdminDataTable.module +++ b/wire/modules/Markup/MarkupAdminDataTable/MarkupAdminDataTable.module @@ -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 *