psf
divcontainer.php
1 <?php
2 
3 // Part of php simple framework (psf)
4 
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 
15 // Copyright (c) Petr Bena <petr@bena.rocks> 2015 - 2018
16 
17 if (!defined("PSF_ENTRY_POINT"))
18  die("Not a valid psf entry point");
19 
20 require_once (dirname(__FILE__) . "/container.php");
21 
24 {
25  function __construct($_parent = NULL)
26  {
27  parent::__construct($_parent);
28  }
29 
30  public function ToHtml()
31  {
32  $_b = "<div";
33  if ($this->Style !== NULL)
34  $_b .= " style=\"" . $this->Style->ToCss() . "\"";
35  if ($this->ClassName !== NULL)
36  $_b .= " class=\"" . $this->ClassName . "\"";
37  $_b .= ">\n";
38  $_b .= parent::ToHtml();
39  $_b .= "</div>";
40  return $_b;
41  }
42 }
43 
Represents a simple div container that can contain html elements.
Represent a single Html container, usually used by htmlpage or htmltable or any other element that is...
Definition: container.php:26