Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
div.php
1<?php
3
7class Div extends Base
8{
9 private $content;
10
11
16 public function buildDivStart()
17 {
18 $str = '<div';
19
20 $str .= $this->getRenderedIdAttribute();
21 $str .= $this->getRenderedClassAttributes();
22 $str .= $this->getRenderedDataAttributes();
23 $str .= $this->getRenderedInlineStyle();
24
25 $str .= '>';
26 return $str;
27 }
28
32 public function start()
33 {
34 $html = new DivPartHtml($this->buildDivStart());
35 $html->setDiv($this);
36 $html->setPrefix($this->getPrefix());
37 $html->addAssets($this->getAssets());
38 if ($this->getKey())
39 {
40 $html->setKey($this->getKey() . '_start');
41 }
42
43 return $html;
44 }
45
49 public function end()
50 {
51 $html = new DivPartHtml('</div>');
52 $html->setDiv($this);
53 $html->setPostfix($this->getPostfix());
54 if ($this->getKey())
55 {
56 $html->setKey($this->getKey() . '_end');
57 }
58 return $html;
59 }
60
61
65 public function printContent()
66 {
67 echo $this->getContent();
68 }
69
73 public function getContent()
74 {
75 return $this->content;
76 }
77
82 public function setContent($content)
83 {
84 $this->content = $content;
85 }
86}