<?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($UmXKN) { parent::__construct(IdUtil::generate('LayoutGrid')); $this->layoutClosure = $UmXKN; } public function postSetup() { goto PBV_o; QQiuS: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto YALiK; JGf0t: call_user_func($this->layoutClosure, $this); goto QQiuS; PBV_o: $this->context->html($this->column() . '_end')->html('<div class="row">')->plain(); goto JGf0t; YALiK: } public function layoutColumn($sz_e1, $UmXKN) { goto JMIZi; gEyNu: call_user_func($UmXKN, $this->context); goto ggysy; ggysy: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto CYYRH; JMIZi: if (!is_array($sz_e1)) { $sz_e1 = array($sz_e1, 12); } goto KQTG0; KQTG0: $this->context->html($this->column() . '_end')->html('<div class="col-md-' . $sz_e1[0] . ' col-' . $sz_e1[1] . '">')->plain(); goto gEyNu; CYYRH: } public function render() { return ''; } }