<?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($ofcu0) { parent::__construct(IdUtil::generate('LayoutGrid')); $this->layoutClosure = $ofcu0; } public function postSetup() { goto hdGmB; CK8FX: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto dFNkV; hdGmB: $this->context->html($this->column() . '_end')->html('<div class="row">')->plain(); goto Q2Mw2; Q2Mw2: call_user_func($this->layoutClosure, $this); goto CK8FX; dFNkV: } public function layoutColumn($rnKjB, $ofcu0) { goto liirm; dw0KI: $this->context->html($this->column() . '_end')->html('<div class="col-md-' . $rnKjB[0] . ' col-' . $rnKjB[1] . '">')->plain(); goto sk8vY; grs1r: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto DkgCq; liirm: if (!is_array($rnKjB)) { $rnKjB = array($rnKjB, 12); } goto dw0KI; sk8vY: call_user_func($ofcu0, $this->context); goto grs1r; DkgCq: } public function render() { return ''; } }