mirror of https://gitee.com/karson/fastadmin.git
12 lines
390 B
Plaintext
12 lines
390 B
Plaintext
|
|
public function {%methodName%}($value, $data)
|
|
{
|
|
if (isset($data['{%field%}')) {
|
|
$value = $value ? $value : $data['{%field%}'];
|
|
$valueArr = explode(',', $value);
|
|
$list = $this->{%listMethodName%}();
|
|
return implode(',', array_intersect_key($list, array_flip($valueArr)));
|
|
} else {
|
|
return '';
|
|
}
|
|
} |