<?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($oRPSk) { parent::__construct(IdUtil::generate('LayoutTable')); $this->layoutClosure = $oRPSk; } public function postSetup() { goto PUyDL; PUyDL: $this->context->html($this->column() . '_end')->html('<table class="ub-table border ub-content-bg">')->plain(); goto DRS0V; DRS0V: call_user_func($this->layoutClosure, $this); goto MZJ9N; MZJ9N: $this->context->html($this->column() . '_end')->html('</table>')->plain(); goto NHZHS; NHZHS: } public function layoutRow($oRPSk) { goto G2x7I; Djgfi: $this->context->html($this->column() . '_end')->html('</tr>')->plain(); goto tUlhH; EhQFk: call_user_func($oRPSk, $this); goto Djgfi; G2x7I: $this->context->html($this->column() . '_end')->html('<tr>')->plain(); goto EhQFk; tUlhH: } public function layoutCol($oRPSk) { goto Cnamf; kyP0f: $this->context->html($this->column() . '_end')->html('</td>')->plain(); goto AMWuJ; Cnamf: $this->context->html($this->column() . '_end')->html('<td>')->plain(); goto nUWxJ; nUWxJ: call_user_func($oRPSk, $this->context); goto kyP0f; AMWuJ: } public function render() { return ''; } }