diff options
Diffstat (limited to 'app/frontend/controls/grid/GroupGridElement.php')
-rw-r--r-- | app/frontend/controls/grid/GroupGridElement.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/frontend/controls/grid/GroupGridElement.php b/app/frontend/controls/grid/GroupGridElement.php new file mode 100644 index 0000000..dc92239 --- /dev/null +++ b/app/frontend/controls/grid/GroupGridElement.php @@ -0,0 +1,23 @@ +<?php + +Prado::using('Application.controls.grid.GridElement'); + +class GroupGridElement extends GridElement { + + public function onPreRender($param) { + parent::onPreRender($param); + $this->GroupEvents->setDataSource($this->Data->Events); + $this->GroupEvents->dataBind(); + } + + public function stripPrefix(string $string) { + return preg_replace( + '#^' . preg_quote($this->Data->Header) . '\s*#', + '', + $string + ); + } + +} + +?> |