<?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($Afv_G) { goto MMZem; MMZem: $this->hookRendering(function (AbstractField $acdQI, $Xvngd, $K_IJ6) use($Afv_G) { return AutoRenderedFieldValue::make($Afv_G); }); goto P_wrS; MNgM9: return $this; goto cs5Ta; P_wrS: $this->addable(true); goto MNgM9; cs5Ta: } public function asLink($pxzwi = null, $uEic6 = true) { $this->hookRendering(function (AbstractField $acdQI, $Xvngd, $K_IJ6) use($pxzwi, $uEic6) { if (null !== $pxzwi) { goto u4EPh; jrbHO: if (preg_match_all('/\\{(.+?)\\}/', $GqJI0, $WpF0C)) { foreach ($WpF0C[1] as $MqJHJ => $RTHJ6) { $F6Fus = ModelUtil::traverse($Xvngd, $RTHJ6); $GqJI0 = str_replace($WpF0C[0][$MqJHJ], $F6Fus, $GqJI0); } } goto hKbO3; u4EPh: $GqJI0 = $pxzwi; goto jrbHO; hKbO3: $VaX_a = ModelUtil::traverse($Xvngd, $acdQI->column()); goto sYDT_; sYDT_: } else { $GqJI0 = ModelUtil::traverse($Xvngd, $acdQI->column()); $VaX_a = $GqJI0; } if (!empty($VaX_a)) { $A1nut = array('<a href="', $GqJI0, '" target="_blank" ref="noreferrer noopener" ', $uEic6 ? 'target="_blank"' : '', '>', $uEic6 ? '<i class="iconfont icon-link"></i> ' : '', htmlspecialchars($VaX_a), '</a>'); } else { $A1nut = array(); } return AutoRenderedFieldValue::make(join('', $A1nut)); }); return $this; } }