<?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($ohNZt) { goto Cubgk; GuVYV: $this->addable(true); goto I_w86; Cubgk: $this->hookRendering(function (AbstractField $pu1ro, $V563N, $aDVv6) use($ohNZt) { return AutoRenderedFieldValue::make($ohNZt); }); goto GuVYV; I_w86: return $this; goto JcR8O; JcR8O: } public function asLink($gm5aX = null, $a3ZFl = true) { $this->hookRendering(function (AbstractField $pu1ro, $V563N, $aDVv6) use($gm5aX, $a3ZFl) { if (null !== $gm5aX) { goto Kg0Kq; Kg0Kq: $lubMQ = $gm5aX; goto IERHF; tSRSq: $SW8jm = ModelUtil::traverse($V563N, $pu1ro->column()); goto nbA8I; IERHF: if (preg_match_all('/\\{(.+?)\\}/', $lubMQ, $wsKBJ)) { foreach ($wsKBJ[1] as $JhHfm => $F_a6B) { $JiRHR = ModelUtil::traverse($V563N, $F_a6B); $lubMQ = str_replace($wsKBJ[0][$JhHfm], $JiRHR, $lubMQ); } } goto tSRSq; nbA8I: } else { $lubMQ = ModelUtil::traverse($V563N, $pu1ro->column()); $SW8jm = $lubMQ; } if (!empty($SW8jm)) { $oAyDf = array('<a href="', $lubMQ, '" target="_blank" ref="noreferrer noopener" ', $a3ZFl ? 'target="_blank"' : '', '>', $a3ZFl ? '<i class="iconfont icon-link"></i> ' : '', htmlspecialchars($SW8jm), '</a>'); } else { $oAyDf = array(); } return AutoRenderedFieldValue::make(join('', $oAyDf)); }); return $this; } }