<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Layout; use ModStart\Core\Util\IdUtil; use ModStart\Field\AbstractField; class LayoutPanel extends AbstractField { protected $isLayoutField = true; private $layoutClosure = null; private $panelTitle; public function __construct($WtBPF, $rxS2C = array()) { goto GnslF; N9NUT: $this->panelTitle = $WtBPF; goto NfQ1I; NfQ1I: $this->layoutClosure = $rxS2C[0]; goto WK8tu; GnslF: parent::__construct(IdUtil::generate('LayoutPanel')); goto N9NUT; WK8tu: } public function postSetup() { goto qfISQ; qfISQ: $this->context->html($this->column() . '_start')->html('<div class="ub-panel"><div class="head"><div class="title">' . $this->panelTitle . '</div></div><div class="body">')->plain(); goto sBayy; sBayy: call_user_func($this->layoutClosure, $this->context()); goto yU5CQ; yU5CQ: $this->context->html($this->column() . '_end')->html('</div></div>')->plain(); goto nxytB; nxytB: } public function render() { return ''; } }