<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Layout; use ModStart\Core\Util\IdUtil; use ModStart\Field\AbstractField; class LayoutGrid extends AbstractField { protected $isLayoutField = true; private $layoutClosure = null; public function __construct($smpQd) { parent::__construct(IdUtil::generate('LayoutGrid')); $this->layoutClosure = $smpQd; } public function postSetup() { goto LUfET; fp5Ym: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto lmNvo; LUfET: $this->context->html($this->column() . '_end')->html('<div class="row">')->plain(); goto Jv1eQ; Jv1eQ: call_user_func($this->layoutClosure, $this); goto fp5Ym; lmNvo: } public function layoutColumn($Fd5KA, $smpQd) { goto PK7v6; hbarM: $this->context->html($this->column() . '_end')->html('<div class="col-md-' . $Fd5KA[0] . ' col-' . $Fd5KA[1] . '">')->plain(); goto rm_Ys; qklbn: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto KrVbu; PK7v6: if (!is_array($Fd5KA)) { $Fd5KA = array($Fd5KA, 12); } goto hbarM; rm_Ys: call_user_func($smpQd, $this->context); goto qklbn; KrVbu: } public function render() { return ''; } }