<?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($BWI89) { goto bSsRS; fh2u_: return $this; goto U1Zhu; fIYLL: $this->addable(true); goto fh2u_; bSsRS: $this->hookRendering(function (AbstractField $E8QRJ, $OV1o4, $xlsSz) use($BWI89) { return AutoRenderedFieldValue::make($BWI89); }); goto fIYLL; U1Zhu: } public function asLink($qkTRA = null, $DugnH = true) { $this->hookRendering(function (AbstractField $E8QRJ, $OV1o4, $xlsSz) use($qkTRA, $DugnH) { if (null !== $qkTRA) { goto c0bZj; C6umW: if (preg_match_all('/\\{(.+?)\\}/', $vjR7T, $S8gta)) { foreach ($S8gta[1] as $tMyPy => $pztz4) { $Q0rz2 = ModelUtil::traverse($OV1o4, $pztz4); $vjR7T = str_replace($S8gta[0][$tMyPy], $Q0rz2, $vjR7T); } } goto RkIb1; RkIb1: $VvAt0 = ModelUtil::traverse($OV1o4, $E8QRJ->column()); goto KvsRR; c0bZj: $vjR7T = $qkTRA; goto C6umW; KvsRR: } else { $vjR7T = ModelUtil::traverse($OV1o4, $E8QRJ->column()); $VvAt0 = $vjR7T; } if (!empty($VvAt0)) { $Q1WHV = array('<a href="', $vjR7T, '" target="_blank" ref="noreferrer noopener" ', $DugnH ? 'target="_blank"' : '', '>', $DugnH ? '<i class="iconfont icon-link"></i> ' : '', htmlspecialchars($VvAt0), '</a>'); } else { $Q1WHV = array(); } return AutoRenderedFieldValue::make(join('', $Q1WHV)); }); return $this; } }