Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
17 | class menu extends links |
||
18 | { |
||
19 | /** @var string */ |
||
20 | protected $title = 'MENU'; |
||
21 | |||
22 | /** @var bool */ |
||
23 | protected $is_navigation = true; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public function get_config(array $settings) |
||
29 | { |
||
30 | 1 | $depth_options = $this->get_depth_options(); |
|
31 | |||
32 | 1 | return array_merge( |
|
33 | 1 | parent::get_config($settings), |
|
34 | array( |
||
35 | 'expanded' => array('lang' => 'EXPANDED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'default' => 0, 'explain' => false), |
||
36 | 1 | 'max_depth' => array('lang' => 'MAX_DEPTH', 'validate' => 'int', 'type' => 'select', 'options' => $depth_options, 'default' => 3, 'explain' => false), |
|
37 | 1 | ) |
|
38 | 1 | ); |
|
39 | 1 | } |
|
40 | 1 | ||
41 | /** |
||
42 | * @return int[] |
||
43 | */ |
||
44 | protected function get_depth_options() |
||
53 | } |
||
54 | } |
||
55 |