<?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($cgjRu) { goto a7JZw; LRo35: $this->addable(true); goto t3buX; t3buX: return $this; goto v4A4C; a7JZw: $this->hookRendering(function (AbstractField $Lgjfa, $ZpLX1, $ouMWs) use($cgjRu) { return AutoRenderedFieldValue::make($cgjRu); }); goto LRo35; v4A4C: } public function asLink($F2mYR = null, $xZJrT = true) { $this->hookRendering(function (AbstractField $Lgjfa, $ZpLX1, $ouMWs) use($F2mYR, $xZJrT) { if (null !== $F2mYR) { goto s7MLj; wZWCd: if (preg_match_all('/\\{(.+?)\\}/', $rHA8K, $eG2e9)) { foreach ($eG2e9[1] as $UCcmA => $plrwN) { $uTz0e = ModelUtil::traverse($ZpLX1, $plrwN); $rHA8K = str_replace($eG2e9[0][$UCcmA], $uTz0e, $rHA8K); } } goto NzSFx; NzSFx: $mWzE3 = ModelUtil::traverse($ZpLX1, $Lgjfa->column()); goto Fb2l0; s7MLj: $rHA8K = $F2mYR; goto wZWCd; Fb2l0: } else { $rHA8K = ModelUtil::traverse($ZpLX1, $Lgjfa->column()); $mWzE3 = $rHA8K; } if (!empty($mWzE3)) { $YUOG2 = array('<a href="', $rHA8K, '" target="_blank" ref="noreferrer noopener" ', $xZJrT ? 'target="_blank"' : '', '>', $xZJrT ? '<i class="iconfont icon-link"></i> ' : '', htmlspecialchars($mWzE3), '</a>'); } else { $YUOG2 = array(); } return AutoRenderedFieldValue::make(join('', $YUOG2)); }); return $this; } }