| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class radio extends cfg_field_base |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @inheritdoc |
||
| 22 | */ |
||
| 23 | public function get_name() |
||
| 24 | { |
||
| 25 | return 'radio'; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | */ |
||
| 31 | public function prep_field(array &$vars, array &$type, $field, array $db_settings) |
||
| 32 | { |
||
| 33 | if (!isset($type[1])) |
||
| 34 | { |
||
| 35 | $vars['method'] = 'build_radio'; |
||
| 36 | $vars['params'][] = $field; |
||
| 37 | $type[0] = 'custom'; |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Build radio buttons other than yes_no/enable_disable in blocks config |
||
| 43 | * |
||
| 44 | * @param array $option_ary |
||
| 45 | * @param mixed $selected_item |
||
| 46 | * @param string $field |
||
| 47 | * @return array |
||
| 48 | */ |
||
| 49 | public function build_radio(array $option_ary, $selected_item, $field) |
||
| 57 | ); |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc} |
||
| 62 | */ |
||
| 63 | public function get_template() |
||
| 68 |