审查视图

application/admin/command/Crud/stubs/mixins/checkbox.stub 319 字节
郭盛 authored
1 2 3 4 5 6 7 8

    public function {%methodName%}($value, $data)
    {
        $value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : '');
        $valueArr = explode(',', $value);
        $list = $this->{%listMethodName%}();
        return implode(',', array_intersect_key($list, array_flip($valueArr)));
    }