<?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($DTnPC) { goto Ac2LA; Hh8Y9: $this->addable(true); goto CD3lQ; CD3lQ: return $this; goto PlyIp; Ac2LA: $this->hookRendering(function (AbstractField $VWt5t, $nsWl0, $R80S9) use($DTnPC) { return AutoRenderedFieldValue::make($DTnPC); }); goto Hh8Y9; PlyIp: } public function asLink($L2MVr = null, $mV59l = true) { $this->hookRendering(function (AbstractField $VWt5t, $nsWl0, $R80S9) use($L2MVr, $mV59l) { if (null !== $L2MVr) { goto YXcy5; mxpE3: $GRkFB = ModelUtil::traverse($nsWl0, $VWt5t->column()); goto W_lE4; YXcy5: $ORxDa = $L2MVr; goto e_grq; e_grq: if (preg_match_all('/\\{(.+?)\\}/', $ORxDa, $FH50y)) { foreach ($FH50y[1] as $VJ5vg => $GBNIv) { $VFelt = ModelUtil::traverse($nsWl0, $GBNIv); $ORxDa = str_replace($FH50y[0][$VJ5vg], $VFelt, $ORxDa); } } goto mxpE3; W_lE4: } else { $ORxDa = ModelUtil::traverse($nsWl0, $VWt5t->column()); $GRkFB = $ORxDa; } if (!empty($GRkFB)) { $STW4e = array('<a href="', $ORxDa, '" target="_blank" ref="noreferrer noopener" ', $mV59l ? 'target="_blank"' : '', '>', $mV59l ? '<i class="iconfont icon-link"></i> ' : '', htmlspecialchars($GRkFB), '</a>'); } else { $STW4e = array(); } return AutoRenderedFieldValue::make(join('', $STW4e)); }); return $this; } }