00001 <?php
00002
00009 class TKVBox extends TKContainer {
00014 public function __construct() {
00015 parent::__construct();
00016 }
00017
00019 protected function renderContainer($class, $style, $events, $id) {
00020 $collect = "<div $id$class[0]$style[0]$events>";
00021 foreach($this->getChildrenBySlot('main') as $id => $c) {
00022 $html = is_object($c) ? $c->render() : $c;
00023 $params = $this->getChildParams('main', $id);
00024 if(isset($params['style'])) {
00025 $params['style']['clear'] = 'both';
00026 $ts = Toolkit::styleToString($params['style']);
00027 }
00028 else
00029 $ts = " style=\"clear:both\"";
00030 $tc = isset($params['class']) ?
00031 Toolkit::classToString($params['class']) : "";
00032
00033 $collect .= "<div$tc$ts>$html</div>\n";
00034 }
00035 $collect .= "</div>\n";
00036 return $collect;
00037 }
00038
00040 public static function convertFromXML($attrs, $contents, $node) {
00041 $obj = new TKVBox();
00042 $children = $node['children'];
00043 self::convertStdAttributes($obj, $attrs);
00044 self::convertStdEvents($obj, $node);
00045 self::convertStdChildren($obj, $node['children']);
00046 return $obj;
00047 }
00048 }
00049
00050 ?>