<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Dao\ModelUtil; class Display extends AbstractField { protected $addable = false; protected $editable = false; public function content($vVYCS) { goto EDW9W; EDW9W: $this->hookRendering(function (AbstractField $rZfgs, $Esk0p, $EqYVi) use($vVYCS) { return AutoRenderedFieldValue::make($vVYCS); }); goto AffI9; zhmx2: return $this; goto UQjS8; AffI9: $this->addable(true); goto zhmx2; UQjS8: } public function asLink($atBQE = null, $sWvRI = true) { $this->hookRendering(function (AbstractField $rZfgs, $Esk0p, $EqYVi) use($atBQE, $sWvRI) { if (null !== $atBQE) { goto Etwya; xYQ1z: if (preg_match_all('/\\{(.+?)\\}/', $GC8LM, $H_mB1)) { foreach ($H_mB1[1] as $kM8qX => $B34tD) { $Xz28r = ModelUtil::traverse($Esk0p, $B34tD); $GC8LM = str_replace($H_mB1[0][$kM8qX], $Xz28r, $GC8LM); } } goto pLXgY; Etwya: $GC8LM = $atBQE; goto xYQ1z; pLXgY: $wmOGR = ModelUtil::traverse($Esk0p, $rZfgs->column()); goto TtVHE; TtVHE: } else { $GC8LM = ModelUtil::traverse($Esk0p, $rZfgs->column()); $wmOGR = $GC8LM; } if (!empty($wmOGR)) { $pbwAU = array('<a href="', $GC8LM, '" target="_blank" ref="noreferrer noopener" ', $sWvRI ? 'target="_blank"' : '', '>', $sWvRI ? '<i class="iconfont icon-link"></i> ' : '', htmlspecialchars($wmOGR), '</a>'); } else { $pbwAU = array(); } return AutoRenderedFieldValue::make(join('', $pbwAU)); }); return $this; } }