Example #1
0
 public final function uninstall($scope = null)
 {
     if ($this->isCore()) {
         throw new \Exception('Cannot uninstall core modules');
     }
     $this->_uninstall();
     $this->delete();
     $scope = $scope === null ? framework\Context::getScope()->getID() : $scope;
     framework\Settings::deleteModuleSettings($this->getName(), $scope);
     framework\Context::deleteModulePermissions($this->getName(), $scope);
     framework\Context::clearRoutingCache();
     framework\Context::clearPermissionsCache();
 }