<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Layout; use ModStart\Core\Util\IdUtil; use ModStart\Field\AbstractField; class LayoutTable extends AbstractField { protected $isLayoutField = true; private $layoutClosure = null; public function __construct($smpQd) { parent::__construct(IdUtil::generate('LayoutTable')); $this->layoutClosure = $smpQd; } public function postSetup() { goto W5lEq; AzYou: $this->context->html($this->column() . '_end')->html('</table>')->plain(); goto bAa0i; Sx0la: call_user_func($this->layoutClosure, $this); goto AzYou; W5lEq: $this->context->html($this->column() . '_end')->html('<table class="ub-table border ub-content-bg">')->plain(); goto Sx0la; bAa0i: } public function layoutRow($smpQd) { goto RBmAN; JgAg8: $this->context->html($this->column() . '_end')->html('</tr>')->plain(); goto IS9Rq; OPQFr: call_user_func($smpQd, $this); goto JgAg8; RBmAN: $this->context->html($this->column() . '_end')->html('<tr>')->plain(); goto OPQFr; IS9Rq: } public function layoutCol($smpQd) { goto slolI; slolI: $this->context->html($this->column() . '_end')->html('<td>')->plain(); goto G7oGu; G7oGu: call_user_func($smpQd, $this->context); goto sg8GA; sg8GA: $this->context->html($this->column() . '_end')->html('</td>')->plain(); goto ZuxQr; ZuxQr: } public function render() { return ''; } }