示例#1
0
/**
* builds htmlbox from object
* object must be htmlobject
* @access public
* @param $html object
* @return string
*/
function htmlobject_box_from_object($html, $css = '', $usetitle = true)
{
    $box = new htmlobject_box();
    $box->id = 'htmlobject_box_' . $html->name;
    $box->css = 'htmlobject_box' . $css;
    $box->label = $html->title;
    $box->content = $html;
    if ($usetitle === false) {
        $html->title = '';
    }
    return $box->get_string();
}
示例#2
0
 function get_template_array()
 {
     $this->init();
     $ar = array();
     foreach ($this->data as $key => $data) {
         $box = new htmlobject_box();
         $box->label = $this->get_label($data);
         $box->content = $this->get_htmlobject_object($data);
         $box->css = 'htmlobject_box';
         $ar = array_merge($ar, array($key => $box->get_string()));
     }
     return $ar;
 }