AppManager¶
-
class
OC\App\
AppManager
¶ Source: lib/private/App/AppManager.php#54 Implements: OCP\App\IAppManager
Properties¶
-
protected static property
OC\App\AppManager::$
protectedAppTypes
¶ - Apps with these types can not be enabled for certain groups only
Source: lib/private/App/AppManager.php#60 Type: string[]
Methods¶
-
public
OC\App\AppManager::
__construct
($userSession, $config, $appConfig, $groupManager, $memCacheFactory, $dispatcher, $logger)¶ Source: lib/private/App/AppManager.php#107
-
public
OC\App\AppManager::
getInstalledApps
()¶ - List all installed apps
Source: lib/private/App/AppManager.php#148 Returns: string[]
-
public
OC\App\AppManager::
getEnabledAppsForUser
($user)¶ - List all apps enabled for a user
Source: Parameters: - $user (
OCP\IUser
)
Returns: string[]
- $user (
-
public
OC\App\AppManager::
getEnabledAppsForGroup
($group)¶ Source: Parameters: - $group (
OCP\IGroup
)
Returns: array
- $group (
-
public
OC\App\AppManager::
getAutoDisabledApps
()¶ Source: lib/private/App/AppManager.php#181 Returns: array
-
public
OC\App\AppManager::
getAppRestriction
($appId)¶ Source: Parameters: - $appId (string)
Returns: array
-
public
OC\App\AppManager::
isEnabledForUser
($appId, $user=null)¶ - Check if an app is enabled for user
Source: Parameters: - $appId (string)
- $user (
OCP\IUser
) (optional) if not defined, the currently logged in user will be used
Returns: bool
-
public
OC\App\AppManager::
isInstalled
($appId)¶ - Check if an app is enabled in the instanceNotice: This actually checks if the app is enabled and not only if it is installed.
Source: Parameters: - $appId (string)
Returns: bool
-
public
OC\App\AppManager::
ignoreNextcloudRequirementForApp
($appId)¶ Source: lib/private/App/AppManager.php#299
-
public
OC\App\AppManager::
enableApp
($appId, $forceEnable=false)¶ - Enable an app for every user
Source: Parameters: - $appId (string)
- $forceEnable (bool)
Throws:
-
public
OC\App\AppManager::
hasProtectedAppType
($types)¶ - Whether a list of types contains a protected app type
Source: Parameters: - $types (string[])
Returns: bool
-
public
OC\App\AppManager::
enableAppForGroups
($appId, $groups, $forceEnable=false)¶ - Enable an app only for specific groups
Source: Parameters: - $appId (string)
- $groups (
OCP\IGroup[]
) - $forceEnable (bool)
Throws: \InvalidArgumentException
if app can’t be enabled for groupsThrows: Throws: \InvalidArgumentException
if app can’t be enabled for groupsThrows:
-
public
OC\App\AppManager::
disableApp
($appId, $automaticDisabled=false)¶ - Disable an app for every user
Source: Parameters: - $appId (string)
- $automaticDisabled (bool)
Throws: \Exception
if app can’t be disabled
-
public
OC\App\AppManager::
getAppPath
($appId)¶ - Get the directory for the given app.
Source: Parameters: - $appId (string)
Returns: string
Throws: \OCP\App\AppPathNotFoundException
if app folder can’t be found
-
public
OC\App\AppManager::
getAppWebPath
($appId)¶ - Get the web path for the given app.
Source: Parameters: - $appId (string)
Returns: string
Throws: \OCP\App\AppPathNotFoundException
if app path can’t be found
-
public
OC\App\AppManager::
clearAppsCache
()¶ - Clear the cached list of apps when enabling/disabling an app
Source: lib/private/App/AppManager.php#446
-
public
OC\App\AppManager::
getAppsNeedingUpgrade
($version)¶ - Returns a list of apps that need upgrade
Source: Parameters: - $version (string) Nextcloud version as array of version components
Returns: array list of app info from apps that need an upgrade
-
public
OC\App\AppManager::
getAppInfo
($appId, $path=false, $lang=null)¶ - Returns the app information from “appinfo/info.xml”.
Source: Parameters: - $appId (string) app id
- $path (bool)
- $lang (null)
Returns: array | null app info
-
public
OC\App\AppManager::
getAppVersion
($appId, $useCache=true)¶ Source: lib/private/App/AppManager.php#516
-
public
OC\App\AppManager::
getIncompatibleApps
($version)¶ - Returns a list of apps incompatible with the given version
Source: Parameters: - $version (string) Nextcloud version as array of version components
Returns: array list of app info from incompatible apps
-
public
OC\App\AppManager::
isShipped
($appId)¶ Source: lib/private/App/AppManager.php#551
-
public
OC\App\AppManager::
getAlwaysEnabledApps
()¶ Source: lib/private/App/AppManager.php#580