<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Field; use ModStart\Core\Assets\AssetsUtil; use ModStart\Core\Util\ArrayUtil; use ModStart\Field\AutoRenderedFieldValue; use ModStart\Field\Type\FieldRenderMode; use Module\Member\Util\MemberUtil; class AutoRenderedMemberUsersField { public static function make($U8wfb, $uxJUJ) { switch ($U8wfb) { case FieldRenderMode::GRID: case FieldRenderMode::DETAIL: $ra7dy = array_map(function ($FSL7c) { return '<span class="ub-tag sm">' . htmlspecialchars($FSL7c) . '</span>'; }, MemberUtil::listViewName($uxJUJ['memberUserIds'])); return AutoRenderedFieldValue::make(join(' ', $ra7dy)); case FieldRenderMode::FORM: goto lbR5m; X8DAy: return AutoRenderedFieldValue::makeView('module::Member.View.field.memberUsers', array('memberUserIds' => $nWsy8, 'memberUsers' => $prI60, 'param' => $uxJUJ)); goto Um4b3; AlcZ0: $nWsy8 = ArrayUtil::flatItemsByKey($prI60, 'id'); goto MtBpX; MtBpX: $prI60 = array_map(function ($FSL7c) { return array('value' => intval($FSL7c['id']), 'name' => MemberUtil::viewName($FSL7c), 'avatar' => AssetsUtil::fixOrDefault($FSL7c['avatar'], 'asset/image/avatar.svg')); }, $prI60); goto X8DAy; lbR5m: $prI60 = MemberUtil::listUsers($uxJUJ['memberUserIds']); goto AlcZ0; Um4b3: } } }