| 1 | <?php |
||
| 17 | trait ColumnTrait |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | public $rowSpanNoFilterHeaders = false; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Renders the header cell. |
||
| 26 | * |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function renderHeaderCell() |
||
| 30 | { |
||
| 31 | if (null !== $this->grid->filterModel && false === $this->filter && $this->rowSpanNoFilterHeaders = true && |
||
| 32 | $this->grid->filterPosition === GridView::FILTER_POS_BODY) { |
||
| 33 | $this->headerOptions['rowspan'] = 2; |
||
| 34 | } |
||
| 35 | |||
| 36 | return parent::renderHeaderCell(); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Renders the filter cell. |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function renderFilterCell() |
||
| 45 | { |
||
| 46 | if (null !== $this->grid->filterModel && false === $this->filter && $this->rowSpanNoFilterHeaders = true && |
||
| 47 | $this->grid->filterPosition === GridView::FILTER_POS_BODY) { |
||
| 48 | return null; |
||
| 49 | } |
||
| 50 | |||
| 51 | return parent::renderFilterCell(); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |