MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
groupcontrols.class
Ir para a documentação deste ficheiro.
1<?php
2
3class MBaseGroup extends MContainer
4{
5 public $borderType;
6 public $scrollable;
8
18 public function __construct($name='', $caption='', $controls='', $disposition='none', $border='css')
19 {
21
22 parent::__construct($name, $controls, $disposition);
23
24 $this->scrollable = false;
25 $this->scrollHeight = '';
26 $this->borderType = $border;
27 $this->caption = $caption;
28
29 if ( strpos(MIOLO::getInstance()->getTheme()->id, "sbootstrap") !== false ) {
30 $this->setClass("m-basegroup");
31 }
32 }
33
34 public function setScrollHeight($height)
35 {
36 $this->scrollable = true;
37 $this->scrollHeight = $height;
38 }
39
40 public function setBorder($border)
41 {
42 $this->borderType = $border;
43 }
44
45 public function generateInner()
46 {
47 switch ( $this->borderType )
48 {
49 case 'none':
50 case '':
51 $this->border = '0';
52 break;
53
54 case 'css':
55 break;
56
57 default:
58 $this->addStyle('border', $this->border);
59 break;
60 }
61
62 $attrs = $this->getAttributes();
63
64 parent::generateInner();
65
66 $html = $this->getInnerToString();
67
68 if ( $this->scrollable )
69 {
70 $f[] = new Div('', $this->caption, 'm-scrollable-label');
71
72 $this->setClass('field');
73 $f[] = $div = new Div('', $html, 'm-scrollable-field');
74 $div->height = $this->scrollHeight;
75 $this->inner = new Div('', $f, '');
76 }
77 else
78 {
79 $this->inner = $this->getRender('fieldset');
80 }
81 }
82}
83
85{
95 public function __construct($name='', $label='', $options='', $disposition='horizontal', $border='css')
96 {
97 parent::__construct($name, $label, $options, $disposition, $border);
98 }
99}
100
101?>
__construct($name='', $caption='', $controls='', $disposition='none', $border='css')
setScrollHeight($height)
setBorder($border)
setClass($cssClass, $add=true)
addStyle($name, $value)
Definição mcontrol.class:427
getAttributes( $mergeDuplicates=false)
Definição mcontrol.class:509
getRender( $method)
Definição mcontrol.class:833
getInnerToString()
Definição mcontrol.class:839
static getInstance()
Definição miolo.class:134
__construct($name='', $label='', $options='', $disposition='horizontal', $border='css')