<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Util\ConvertUtil; class Html extends AbstractField { protected $html = ''; protected $plain = false; protected $isLayoutField = true; public function html($lSp6_) { $this->html = $lSp6_; return $this; } public function htmlContent($lSp6_) { $this->html = '<div class="ub-html">' . $lSp6_ . '</div>'; return $this; } public function plain() { $this->plain = true; return $this; } public function render() { goto W3aq7; kXlqM: if ($this->plain) { return $this->html; } goto S63Tu; DiGDK: $LfcEJ = $this->label ? $this->label . ':' : ''; goto aE8g4; W3aq7: if ($this->html instanceof \Closure) { $this->html = ConvertUtil::render($this->html->call($this->variables(), $this->context)); } goto kXlqM; S63Tu: $H6Nix = $this->rules(); goto qTzqT; qTzqT: $RTW1z = in_array('required', $H6Nix) ? '<span class="ub-text-danger ub-text-bold">*</span>' : ''; goto DiGDK; aE8g4: return "<div class=\"line\">\n    <div class=\"label\">\n        {$RTW1z}\n        {$LfcEJ}\n    </div>\n    <div class=\"field\">\n        {$this->html}\n    </div>\n</div>"; goto tdjJR; tdjJR: } }