<?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($UmXKN) { parent::__construct(IdUtil::generate('LayoutTable')); $this->layoutClosure = $UmXKN; } public function postSetup() { goto pKNCR; pKNCR: $this->context->html($this->column() . '_end')->html('<table class="ub-table border ub-content-bg">')->plain(); goto NnN9d; BwGlK: $this->context->html($this->column() . '_end')->html('</table>')->plain(); goto kowSp; NnN9d: call_user_func($this->layoutClosure, $this); goto BwGlK; kowSp: } public function layoutRow($UmXKN) { goto Bj91_; Bj91_: $this->context->html($this->column() . '_end')->html('<tr>')->plain(); goto kyaH6; qK3aG: $this->context->html($this->column() . '_end')->html('</tr>')->plain(); goto Xpyyl; kyaH6: call_user_func($UmXKN, $this); goto qK3aG; Xpyyl: } public function layoutCol($UmXKN) { goto brQXu; aXesC: $this->context->html($this->column() . '_end')->html('</td>')->plain(); goto k5olx; brQXu: $this->context->html($this->column() . '_end')->html('<td>')->plain(); goto hxlUg; hxlUg: call_user_func($UmXKN, $this->context); goto aXesC; k5olx: } public function render() { return ''; } }