pics/templates/SubTemplate.php

40 lines
846 B
PHP
Raw Permalink Normal View History

<?php
/*****************************************************************************
* SubTemplate.php
* Defines the key template SubTemplate.
*
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
*****************************************************************************/
abstract class SubTemplate extends Template
{
protected $_class = 'content-box container';
protected $_id;
protected $_title;
public function __construct($title = '')
{
$this->_title = $title;
}
public function html_main()
{
echo '
<div class="', $this->_class, '"', isset($this->_id) ? ' id="' . $this->_id . '"' : '', '>',
$this->html_content(), '
</div>';
}
abstract protected function html_content();
public function setClassName($className)
{
$this->_class = $className;
}
public function setDOMId($id)
{
$this->_id = $id;
}
}