1
|
|
|
<?php
|
2
|
|
|
/**
|
3
|
|
|
* Created by PhpStorm.
|
4
|
|
|
* User: MisterX
|
5
|
|
|
* Date: 30.07.2015
|
6
|
|
|
* Time: 13:40
|
7
|
|
|
*/
|
8
|
|
|
|
9
|
|
|
namespace Ext;
|
10
|
|
|
|
11
|
|
|
|
12
|
|
|
use Ext\Mixin\Bindable;
|
13
|
|
|
use Ext\Util\Observable;
|
14
|
|
|
|
15
|
|
|
class Component extends Base
|
16
|
|
|
{
|
17
|
|
|
use Observable, Bindable;
|
18
|
|
|
|
19
|
|
|
public function setHtml($html){
|
20
|
|
|
return $this->setProperty('html',$html);
|
21
|
|
|
}
|
22
|
|
|
|
23
|
|
|
public function setRenderTo($renderTo){
|
24
|
|
|
return $this->setProperty('renderTo',$renderTo);
|
25
|
|
|
}
|
26
|
|
|
|
27
|
|
|
public function setCls($cls){
|
28
|
|
|
return $this->setProperty('renderTo',$cls);
|
29
|
|
|
}
|
30
|
|
|
|
31
|
|
|
public function setId($id){
|
32
|
|
|
return $this->setProperty('id',$id);
|
33
|
|
|
}
|
34
|
|
|
|
35
|
|
|
public function getId(){
|
36
|
|
|
$this->getProperty('id');
|
37
|
|
|
}
|
38
|
|
|
|
39
|
|
|
public function setFlex($flex){
|
40
|
|
|
return $this->setProperty('flex',$flex);
|
41
|
|
|
}
|
42
|
|
|
|
43
|
|
|
public function setDisabled($disabled){
|
44
|
|
|
return $this->setProperty('disabled',(bool)$disabled);
|
45
|
|
|
}
|
46
|
|
|
|
47
|
|
|
/**
|
48
|
|
|
* @param string $dock top|bottom|left|right'
|
49
|
|
|
* @return $this
|
50
|
|
|
*/
|
51
|
|
|
public function setDock($dock){
|
52
|
|
|
return $this->setProperty('dock',$dock);
|
53
|
|
|
}
|
54
|
|
|
|
55
|
|
|
public function setRegion($region){
|
56
|
|
|
return $this->setProperty('region',$region);
|
57
|
|
|
}
|
58
|
|
|
|
59
|
|
|
public function setWidth($width){
|
60
|
|
|
return $this->setProperty('width',$width);
|
61
|
|
|
}
|
62
|
|
|
|
63
|
|
|
public function setHeight($height){
|
64
|
|
|
return $this->setProperty('height',$height);
|
65
|
|
|
}
|
66
|
|
|
|
67
|
|
|
/**
|
68
|
|
|
* Specify as true to have the Component inject framing elements within the Component at render time
|
69
|
|
|
* to provide a graphical rounded frame around the Component content.
|
70
|
|
|
* @param $frame
|
71
|
|
|
* @return $this
|
72
|
|
|
*/
|
73
|
|
|
public function setFrame($frame){
|
74
|
|
|
return $this->setProperty('frame',(bool)$frame);
|
75
|
|
|
}
|
76
|
|
|
|
77
|
|
|
public function findById($id){
|
78
|
|
|
return $this->search($this,'\Ext\Base','id',$id,true);
|
79
|
|
|
}
|
80
|
|
|
|
81
|
|
|
public function findByClass($class,$findFirst=true){
|
82
|
|
|
return $this->search($this,$class,null,null,$findFirst);
|
83
|
|
|
}
|
84
|
|
|
|
85
|
|
|
public function setHidden($hidden){
|
86
|
|
|
return $this->setProperty('hidden',(bool)$hidden);
|
87
|
|
|
}
|
88
|
|
|
|
89
|
|
|
public function getHidden(){
|
90
|
|
|
return $this->getProperty('hidden');
|
91
|
|
|
}
|
92
|
|
|
|
93
|
|
|
|
94
|
|
|
|
95
|
|
|
} |