<?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($FR15k, $qOrzw) { switch ($FR15k) { case FieldRenderMode::GRID: case FieldRenderMode::DETAIL: $gXIP1 = array_map(function ($jIWZA) { return '<span class="ub-tag sm">' . htmlspecialchars($jIWZA) . '</span>'; }, MemberUtil::listViewName($qOrzw['memberUserIds'])); return AutoRenderedFieldValue::make(join(' ', $gXIP1)); case FieldRenderMode::FORM: goto bzJRo; FTNav: return AutoRenderedFieldValue::makeView('module::Member.View.field.memberUsers', array('memberUserIds' => $Pg2_1, 'memberUsers' => $qwTRL, 'param' => $qOrzw)); goto BYA1j; V1b10: $qwTRL = array_map(function ($jIWZA) { return array('value' => intval($jIWZA['id']), 'name' => MemberUtil::viewName($jIWZA), 'avatar' => AssetsUtil::fixOrDefault($jIWZA['avatar'], 'asset/image/avatar.svg')); }, $qwTRL); goto FTNav; JMsLP: $Pg2_1 = ArrayUtil::flatItemsByKey($qwTRL, 'id'); goto V1b10; bzJRo: $qwTRL = MemberUtil::listUsers($qOrzw['memberUserIds']); goto JMsLP; BYA1j: } } }