Methods

isEnabledForUser()

isEnabledForUser(string  $appId, \OCP\IUser  $user = null) : boolean

Check if an app is enabled for user

Parameters

string $appId
\OCP\IUser $user

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

Returns

boolean

isInstalled()

isInstalled(string  $appId) : boolean

Check if an app is installed in the instance

Parameters

string $appId

Returns

boolean

enableApp()

enableApp(string  $appId) 

Enable an app for every user

Parameters

string $appId

enableAppForGroups()

enableAppForGroups(string  $appId, array<mixed,\OCP\IGroup>  $groups) 

Enable an app only for specific groups

Parameters

string $appId
array<mixed,\OCP\IGroup> $groups

disableApp()

disableApp(string  $appId) 

Disable an app for every user

Parameters

string $appId

getEnabledAppsForUser()

getEnabledAppsForUser(\OCP\IUser  $user) : array<mixed,string>

List all apps enabled for a user

Parameters

\OCP\IUser $user

Returns

array<mixed,string>

getInstalledApps()

getInstalledApps() : array<mixed,string>

List all installed apps

Returns

array<mixed,string>

clearAppsCache()

clearAppsCache() 

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

isShipped()

isShipped(string  $appId) : boolean

Parameters

string $appId

Returns

boolean

getAlwaysEnabledApps()

getAlwaysEnabledApps() : array<mixed,string>

Returns

array<mixed,string>

installApp()

installApp(string  $package, boolean  $skipMigrations = false) : mixed

Parameters

string $package
boolean $skipMigrations

whether to skip migrations, which would only install the code

Returns

mixed

updateApp()

updateApp(string  $package) : mixed

Parameters

string $package

Returns

mixed

getAppInfo()

getAppInfo(string  $appId) : array

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

Parameters

string $appId

app id

Returns

array —

app info

getAllApps()

getAllApps() : array<mixed,string>

Returns the list of all apps, enabled and disabled

Returns

array<mixed,string>

readAppPackage()

readAppPackage(string  $path) : array<mixed,string>

Read and validate info.xml from a local app package Returns the app information from "appinfo/info.xml".

Parameters

string $path

package location

Returns

array<mixed,string> —

app info