1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace Icybee\Modules\Contents;
13
14 use Brickrouge\Element;
15 use Brickrouge\Group;
16 use Brickrouge\Text;
17
18 19 20
21 class ConfigBlock extends \Icybee\ConfigBlock
22 {
23 protected function lazy_get_attributes()
24 {
25 $attributes = parent::lazy_get_attributes();
26
27 $attributes[Element::GROUPS]['limits'] = [ 'title' => 'limits' ];
28
29 return $attributes;
30 }
31
32 protected function lazy_get_children()
33 {
34 $ns = $this->module->flat_id;
35
36 return array_merge(parent::lazy_get_children(), [
37
38 "local[$ns.default_editor]" => new Text([
39
40 Group::LABEL => 'default_editor'
41 ]),
42
43 "local[$ns.use_multi_editor]" => new Element(Element::TYPE_CHECKBOX, [
44
45 Element::LABEL => 'use_multi_editor'
46 ]),
47
48 "local[$ns.limits.home]" => new Text([
49
50 Group::LABEL => 'limits_home',
51 Element::DEFAULT_VALUE => 3,
52 Element::GROUP => 'limits'
53 ]),
54
55 "local[$ns.limits.list]" => new Text([
56
57 Group::LABEL => 'limits_list',
58 Element::DEFAULT_VALUE => 10,
59 Element::GROUP => 'limits'
60 ])
61 ]);
62 }
63 }