<?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($oRPSk) { parent::__construct(IdUtil::generate('LayoutGrid')); $this->layoutClosure = $oRPSk; } public function postSetup() { goto dsl3h; I6ox_: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto Ei0pS; dsl3h: $this->context->html($this->column() . '_end')->html('<div class="row">')->plain(); goto Hxtwr; Hxtwr: call_user_func($this->layoutClosure, $this); goto I6ox_; Ei0pS: } public function layoutColumn($Helyl, $oRPSk) { goto IBTq0; eSty1: call_user_func($oRPSk, $this->context); goto maQg7; TkWDI: $this->context->html($this->column() . '_end')->html('<div class="col-md-' . $Helyl[0] . ' col-' . $Helyl[1] . '">')->plain(); goto eSty1; maQg7: $this->context->html($this->column() . '_end')->html('</div>')->plain(); goto l9o_o; IBTq0: if (!is_array($Helyl)) { $Helyl = array($Helyl, 12); } goto TkWDI; l9o_o: } public function render() { return ''; } }