<?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($H7deD) { parent::__construct(IdUtil::generate('LayoutGrid')); $this->layoutClosure = $H7deD; } public function postSetup() { goto xp3Kt; LIzqj: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto GN3M8; xp3Kt: $this->context->html($this->column() . '_end')->html('<div class="row">')->plain(); goto UPbNJ; UPbNJ: call_user_func($this->layoutClosure, $this); goto LIzqj; GN3M8: } public function layoutColumn($oHgbH, $H7deD) { goto ilGxr; ilGxr: if (!is_array($oHgbH)) { $oHgbH = array($oHgbH, 12); } goto lNVaQ; lNVaQ: $this->context->html($this->column() . '_end')->html('<div class="col-md-' . $oHgbH[0] . ' col-' . $oHgbH[1] . '">')->plain(); goto gUy9i; jyZWH: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto tfOp_; gUy9i: call_user_func($H7deD, $this->context); goto jyZWH; tfOp_: } public function render() { return ''; } }