1: | <?php
|
2: | |
3: | |
4: | |
5: | |
6: |
|
7: |
|
8: |
|
9: | class GridContent extends Control{
|
10: | public $type = "content";
|
11: | public $strFormat = "";
|
12: | public $row = array();
|
13: | public $result = array();
|
14: |
|
15: | public function oncreate($element){
|
16: | unset($element->attr['id']);
|
17: | unset($element->attr['dtable']);
|
18: | unset($element->attr['parentobj']);
|
19: | unset($element->attr['path']);
|
20: | unset($element->attr['runat']);
|
21: | unset($element->attr['pathres']);
|
22: | unset($element->attr['phpclass']);
|
23: | unset($element->attr['dfield']);
|
24: | $this->strFormat = $element->outertext;
|
25: |
|
26: | $this->unsetRenderTag();
|
27: | }
|
28: |
|
29: | public function getField($column){
|
30: | return $this->row[$column];
|
31: | }
|
32: | public function onrender() {
|
33: | $strOut = "";
|
34: | foreach($this->result as $key1=>$keyar){
|
35: | foreach($keyar as $index=>$this->row){
|
36: | $tmpf = new TempFile($this->strFormat,true);
|
37: | $tmpf->run();
|
38: | $strOut .= $tmpf->data;
|
39: | }
|
40: |
|
41: | }
|
42: | $this->setInnerHTML($strOut);
|
43: |
|
44: | }
|
45: |
|
46: | } |