IAppManager

interface OCP\App\IAppManager
Interface IAppManager
Implemented by:OC\App\AppManager
Source:lib/public/App/IAppManager.php#42

Methods

public OCP\App\IAppManager::getAppInfo($appId, $path=false, $lang=null)
Returns the app information from “appinfo/info.xml”.
Source:

lib/public/App/IAppManager.php#51

Parameters:
  • $appId (string)
Returns:

mixed

Since:

14.0.0

public OCP\App\IAppManager::getAppVersion($appId, $useCache=true)
Returns the app information from “appinfo/info.xml”.
Source:

lib/public/App/IAppManager.php#61

Parameters:
  • $appId (string)
  • $useCache (bool)
Returns:

string

Since:

14.0.0

public OCP\App\IAppManager::isEnabledForUser($appId, $user=null)
Check if an app is enabled for user
Source:

lib/public/App/IAppManager.php#71

Parameters:
  • $appId (string)
  • $user (OCP\IUser) (optional) if not defined, the currently loggedin user will be used
Returns:

bool

Since:

8.0.0

public OCP\App\IAppManager::isInstalled($appId)
Check if an app is enabled in the instance
Notice: This actually checks if the app is enabled and not only if it is installed.
Source:

lib/public/App/IAppManager.php#82

Parameters:
  • $appId (string)
Returns:

bool

Since:

8.0.0

public OCP\App\IAppManager::enableApp($appId, $forceEnable=false)
Enable an app for every user
Source:

lib/public/App/IAppManager.php#92

Parameters:
  • $appId (string)
  • $forceEnable (bool)
Throws:

\OCP\App\AppPathNotFoundException

Since:

8.0.0

public OCP\App\IAppManager::hasProtectedAppType($types)
Whether a list of types contains a protected app type
Source:

lib/public/App/IAppManager.php#101

Parameters:
  • $types (string[])
Returns:

bool

Since:

12.0.0

public OCP\App\IAppManager::enableAppForGroups($appId, $groups, $forceEnable=false)
Enable an app only for specific groups
Source:

lib/public/App/IAppManager.php#112

Parameters:
  • $appId (string)
  • $groups (OCP\IGroup[])
  • $forceEnable (bool)
Throws:

\Exception

Since:

8.0.0

public OCP\App\IAppManager::disableApp($appId, $automaticDisabled=false)
Disable an app for every user
Source:

lib/public/App/IAppManager.php#121

Parameters:
  • $appId (string)
  • $automaticDisabled (bool)
Since:

8.0.0

public OCP\App\IAppManager::getAppPath($appId)
Get the directory for the given app.
Source:

lib/public/App/IAppManager.php#131

Parameters:
  • $appId (string)
Returns:

string

Since:

11.0.0

Throws:

\OCP\App\AppPathNotFoundException

public OCP\App\IAppManager::getAppWebPath($appId)
Get the web path for the given app.
Source:

lib/public/App/IAppManager.php#141

Parameters:
  • $appId (string)
Returns:

string

Since:

18.0.0

Throws:

\OCP\App\AppPathNotFoundException

public OCP\App\IAppManager::getEnabledAppsForUser($user)
List all apps enabled for a user
Source:

lib/public/App/IAppManager.php#150

Parameters:
Returns:

string[]

Since:

8.1.0

public OCP\App\IAppManager::getInstalledApps()
List all installed apps
Source:lib/public/App/IAppManager.php#158
Returns:string[]
Since:8.1.0
public OCP\App\IAppManager::clearAppsCache()
Clear the cached list of apps when enabling/disabling an app
Source:lib/public/App/IAppManager.php#164
Since:8.1.0
public OCP\App\IAppManager::isShipped($appId)
Source:

lib/public/App/IAppManager.php#171

Parameters:
  • $appId (string)
Returns:

bool

Since:

9.0.0

public OCP\App\IAppManager::getAlwaysEnabledApps()
Source:lib/public/App/IAppManager.php#177
Returns:string[]
Since:9.0.0
public OCP\App\IAppManager::getEnabledAppsForGroup($group)
Source:

lib/public/App/IAppManager.php#184

Parameters:
Returns:

string[]

Since:

17.0.0

public OCP\App\IAppManager::getAutoDisabledApps()
Source:lib/public/App/IAppManager.php#190
Returns:array
Since:17.0.0
public OCP\App\IAppManager::getAppRestriction($appId)
Source:

lib/public/App/IAppManager.php#197

Parameters:
  • $appId (string)
Returns:

string[]

Since:

17.0.0