安装插件后的基础文件
This commit is contained in:
17
app/admin/controller/developer/stubs/change/set.stub
Normal file
17
app/admin/controller/developer/stubs/change/set.stub
Normal file
@@ -0,0 +1,17 @@
|
||||
public function set{%field%}Attr($value)
|
||||
{
|
||||
if (!empty($value) && is_array($value)) {
|
||||
$value = implode(',',$value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function get{%field%}Attr($value)
|
||||
{
|
||||
if (!empty($value) && is_string($value)) {
|
||||
$value = explode(',',$value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
Reference in New Issue
Block a user