summaryrefslogtreecommitdiff
path: root/app/frontend/controls/grid/GroupGridElement.php
blob: dc92239a4c1a82eca56662014c3bcea7f089c836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
        );
    }

}

?>