Controller\Admin\Setting::saveCustomMailContent PHP Method

saveCustomMailContent() public method

public saveCustomMailContent ( ) : array
return array
    public function saveCustomMailContent()
    {
        $type = $_POST['custom_type'];
        // 获得修改类型
        if (strpos($type, 'custom_mail_') !== false) {
            $content = $_POST['content'];
            // 取得修改的内容
            if (!$content) {
                throw new Error('Parameter error', 405);
            }
            Option::set('$type', $content);
            return array('error' => 0, 'message' => '保存完毕');
        } else {
            throw new Error('Parameter error', 405);
        }
    }