public function canUninstall($module_id)
    {
        if ($this->module->isActiveTheme($module_id)) {
            $error = $this->translation->text('Modules with "theme" type and active status cannot be disabled/uninstalled');
            throw new UnexpectedValueException($error);
        }

        if ($this->module->isLocked($module_id)) {
            throw new UnexpectedValueException($this->translation->text('Module is locked in code'));
        }

        return $this->checkDependentModules($module_id, $this->module->getList());
    }
public function canUninstall($module_id)
    {
        if ($this->module->isActiveTheme($module_id)) {
            $error = $this->translation->text('Modules with "theme" type and active status cannot be disabled/uninstalled');
            throw new UnexpectedValueException($error);
        }

        if ($this->module->isLocked($module_id)) {
            throw new UnexpectedValueException($this->translation->text('Module is locked in code'));
        }

        return $this->checkDependentModules($module_id, $this->module->getList());
    }
public function canUninstall ( $ module_id ) { if ( $ this -> module -> isActiveTheme ( $ module_id ) ) { $ error = $ this -> translation -> text ( 'Modules with "theme" type and active status cannot be disabled/uninstalled' ) ; throw new UnexpectedValueException ( $ error ) ; } if ( $ this -> module -> isLocked ( $ module_id ) ) { throw new UnexpectedValueException ( $ this -> translation -> text ( 'Module is locked in code' ) ) ; } return $ this -> checkDependentModules ( $ module_id , $ this -> module -> getList ( ) ) ; }
Whether a given module can be un-installed
@param string $module_id
@return bool
@throws UnexpectedValueException
Whether a given module can be un - installed