Changeset View
Changeset View
Standalone View
Standalone View
src/view/fuel/FuelGridRowView.php
- This file was added.
| <?php | |||||
| final class FuelGridRowView | |||||
| extends FuelView { | |||||
| private $cells = array(); | |||||
| public function newCell() { | |||||
| $cell = new FuelGridCellView(); | |||||
| $this->cells[] = $cell; | |||||
| return $cell; | |||||
| } | |||||
| public function render() { | |||||
| $cells = $this->cells; | |||||
| $classes = array(); | |||||
| $classes[] = 'fuel-grid-row'; | |||||
| $classes[] = sprintf( | |||||
| 'fuel-grid-cell-count-%d', | |||||
| count($cells)); | |||||
| return phutil_tag( | |||||
| 'div', | |||||
| array( | |||||
| 'class' => implode(' ', $classes), | |||||
| ), | |||||
| $cells); | |||||
| } | |||||
| } | |||||