| 1 | <?php namespace EmailLog\Core\UI\Setting; |
||
| 11 | class SettingSection { |
||
| 12 | |||
| 13 | public $id; |
||
| 14 | public $title; |
||
| 15 | public $callback; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Each section will have a single option name and the value will be array. |
||
| 19 | * All individual fields will be stored as an element in the value array. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | public $option_name; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Sanitize callback for the setting. |
||
| 27 | * An array will be passed to this callback. |
||
| 28 | * |
||
| 29 | * @var callable |
||
| 30 | */ |
||
| 31 | public $sanitize_callback; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * List of fields for this section. |
||
| 35 | * |
||
| 36 | * @var SettingField[] |
||
| 37 | */ |
||
| 38 | public $fields = array(); |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Add a field to the section. |
||
| 42 | * |
||
| 43 | * @param \EmailLog\Core\UI\Setting\SettingField $field Field to add. |
||
| 44 | */ |
||
| 45 | public function add_field( SettingField $field ) { |
||
| 48 | } |
||
| 49 |