1 <?php
2
3 /*
4 * This file is part of the Icybee package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee\Modules\Files;
13
14 use Brickrouge\Element;
15 use Brickrouge\Form;
16 use Brickrouge\Text;
17
18 /**
19 * A block to configure files.
20 */
21 class ConfigBlock extends \Icybee\ConfigBlock
22 {
23 protected function lazy_get_children()
24 {
25 $ns = $this->module->flat_id;
26
27 return array_merge
28 (
29 parent::lazy_get_children(), array
30 (
31 "local[$ns.max_file_size]" => new Text
32 (
33 array
34 (
35 Form::LABEL => 'max_file_size',
36 Text::ADDON => 'Kb', // TODO-20110206: use conventions
37 Element::DEFAULT_VALUE => 16000,
38
39 'class' => 'measure',
40 'size' => 6
41 )
42 )
43 )
44 );
45 }
46 }