forked from Public/pics
DummyBox: fix SubTemplate inheritance
This commit is contained in:
parent
5bb8c020bd
commit
b1378a3b59
@ -8,28 +8,26 @@
|
|||||||
|
|
||||||
class DummyBox extends SubTemplate
|
class DummyBox extends SubTemplate
|
||||||
{
|
{
|
||||||
protected $_class;
|
|
||||||
protected $_content;
|
protected $_content;
|
||||||
protected $_title;
|
|
||||||
|
|
||||||
public function __construct($title = '', $content = '', $class = '')
|
public function __construct($title = '', $content = '', $class = null)
|
||||||
{
|
{
|
||||||
$this->_title = $title;
|
parent::__construct($title);
|
||||||
$this->_content = $content;
|
$this->_content = $content;
|
||||||
$this->_class = $class;
|
|
||||||
|
if (isset($class))
|
||||||
|
$this->_class .= $class;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function html_content()
|
protected function html_content()
|
||||||
{
|
{
|
||||||
echo '
|
if ($this->_title)
|
||||||
<div class="boxed_content', $this->_class ? ' ' . $this->_class : '', '">', $this->_title ? '
|
echo '
|
||||||
<h2>' . $this->_title . '</h2>' : '', '
|
<h2>', $this->_title, '</h2>';
|
||||||
', $this->_content;
|
|
||||||
|
echo $this->_content;
|
||||||
|
|
||||||
foreach ($this->_subtemplates as $template)
|
foreach ($this->_subtemplates as $template)
|
||||||
$template->html_main();
|
$template->html_main();
|
||||||
|
|
||||||
echo '
|
|
||||||
</div>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user