Nextcloud PHP API (stable19)

IAppManager

Interface IAppManager

Tags
since
8.0.0

Table of Contents

clearAppsCache()  : mixed
Clear the cached list of apps when enabling/disabling an app
disableApp()  : mixed
Disable an app for every user
enableApp()  : void
Enable an app for every user
enableAppForGroups()  : void
Enable an app only for specific groups
getAlwaysEnabledApps()  : string[]
getAppInfo()  : mixed
Returns the app information from "appinfo/info.xml".
getAppPath()  : string
Get the directory for the given app.
getAppRestriction()  : string[]
getAppVersion()  : string
Returns the app information from "appinfo/info.xml".
getAppWebPath()  : string
Get the web path for the given app.
getAutoDisabledApps()  : array
getEnabledAppsForGroup()  : string[]
getEnabledAppsForUser()  : string[]
List all apps enabled for a user
getInstalledApps()  : string[]
List all installed apps
hasProtectedAppType()  : bool
Whether a list of types contains a protected app type
isEnabledForUser()  : bool
Check if an app is enabled for user
isInstalled()  : bool
Check if an app is enabled in the instance
isShipped()  : bool

Methods

clearAppsCache()

Clear the cached list of apps when enabling/disabling an app

public clearAppsCache() : mixed
Tags
since
8.1.0
Return values
mixed

disableApp()

Disable an app for every user

public disableApp(string $appId[, bool $automaticDisabled = false ]) : mixed
Parameters
$appId : string
$automaticDisabled : bool = false
Tags
since
8.0.0
Return values
mixed

enableApp()

Enable an app for every user

public enableApp(string $appId[, bool $forceEnable = false ]) : void
Parameters
$appId : string
$forceEnable : bool = false
Tags
throws
AppPathNotFoundException
since
8.0.0

enableAppForGroups()

Enable an app only for specific groups

public enableAppForGroups(string $appId, \OCP\IGroup[] $groups[, bool $forceEnable = false ]) : void
Parameters
$appId : string
$groups : \OCP\IGroup[]
$forceEnable : bool = false
Tags
throws
Exception
since
8.0.0

getAlwaysEnabledApps()

public getAlwaysEnabledApps() : string[]
Tags
since
9.0.0
Return values
string[]

getAppInfo()

Returns the app information from "appinfo/info.xml".

public getAppInfo(string $appId[, bool $path = false ][, mixed $lang = null ]) : mixed
Parameters
$appId : string
$path : bool = false
$lang : mixed = null
Tags
since
14.0.0
Return values
mixed

getAppPath()

Get the directory for the given app.

public getAppPath(string $appId) : string
Parameters
$appId : string
Tags
since
11.0.0
throws
AppPathNotFoundException
Return values
string

getAppRestriction()

public getAppRestriction(string $appId) : string[]
Parameters
$appId : string
Tags
since
17.0.0
Return values
string[]

getAppVersion()

Returns the app information from "appinfo/info.xml".

public getAppVersion(string $appId[, bool $useCache = true ]) : string
Parameters
$appId : string
$useCache : bool = true
Tags
since
14.0.0
Return values
string

getAppWebPath()

Get the web path for the given app.

public getAppWebPath(string $appId) : string
Parameters
$appId : string
Tags
since
18.0.0
throws
AppPathNotFoundException
Return values
string

getAutoDisabledApps()

public getAutoDisabledApps() : array
Tags
since
17.0.0
Return values
array

getEnabledAppsForGroup()

public getEnabledAppsForGroup(IGroup $group) : string[]
Parameters
$group : IGroup
Tags
since
17.0.0
Return values
string[]

getEnabledAppsForUser()

List all apps enabled for a user

public getEnabledAppsForUser(IUser $user) : string[]
Parameters
$user : IUser
Tags
since
8.1.0
Return values
string[]

getInstalledApps()

List all installed apps

public getInstalledApps() : string[]
Tags
since
8.1.0
Return values
string[]

hasProtectedAppType()

Whether a list of types contains a protected app type

public hasProtectedAppType(string[] $types) : bool
Parameters
$types : string[]
Tags
since
12.0.0
Return values
bool

isEnabledForUser()

Check if an app is enabled for user

public isEnabledForUser(string $appId[, IUser $user = null ]) : bool
Parameters
$appId : string
$user : IUser = null

(optional) if not defined, the currently loggedin user will be used

Tags
since
8.0.0
Return values
bool

isInstalled()

Check if an app is enabled in the instance

public isInstalled(string $appId) : bool

Notice: This actually checks if the app is enabled and not only if it is installed.

Parameters
$appId : string
Tags
since
8.0.0
Return values
bool

isShipped()

public isShipped(string $appId) : bool
Parameters
$appId : string
Tags
since
9.0.0
Return values
bool

Search results