AddonModel::_stopAddons PHP Method

_stopAddons() private method

停止插件
private _stopAddons ( string $field, string $value ) : boolean
$field string 查询插件的Key值
$value string 查询插件的Value值
return boolean 插件是否停止
    private function _stopAddons($field, $value)
    {
        // 将数据库中标示该插件停止
        $map[$field] = $value;
        if ($filed != 'name') {
            $addon = $this->where($map)->find();
            $name = $addon['name'];
        } else {
            $name = $value;
        }
        $save['status'] = '0';
        $result = $this->where($map)->save($save);
        if ($result) {
            $addonCacheList = $this->resetAddonCache();
            S('system_addons_list', $addonCacheList);
        }
        return $result ? true : false;
    }