protected function _disable(PluginPackage $plugin)
    {
        $requiredBy = Plugin::checkReverseDependency($plugin->name);
        if (!empty($requiredBy)) {
            $names = [];
            foreach ($requiredBy as $p) {
                $names[] = $p->name();
            }

            $this->err(__d('installer', 'Plugin "{0}" cannot be disabled as it is required by: {1}', $plugin->humanName, implode(', ', $names)));

            return false;
        }

        if (!$this->params['no-callbacks']) {
            $trigger = $this->_triggerBeforeEvents($plugin);
            if (!$trigger) {
                return false;
            }
        }

        return $this->_finish($plugin);
    }