| 1 | <?php |
||
| 11 | class Column |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var Collection |
||
| 15 | */ |
||
| 16 | protected $fields; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var int |
||
| 20 | */ |
||
| 21 | protected $width; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Column constructor. |
||
| 25 | * |
||
| 26 | * @param int $width |
||
| 27 | */ |
||
| 28 | public function __construct($width = 12) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Add a filter to this column. |
||
| 36 | * |
||
| 37 | * @param Field $field |
||
| 38 | */ |
||
| 39 | public function add(Field $field) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Get all filters in this column. |
||
| 46 | * |
||
| 47 | * @return Collection |
||
| 48 | */ |
||
| 49 | public function fields() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Set column width. |
||
| 56 | * |
||
| 57 | * @param int $width |
||
| 58 | */ |
||
| 59 | public function setWidth($width) |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Get column width. |
||
| 66 | * |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | public function width() |
||
| 73 | } |
||
| 74 |