App

class OCP\App
This class provides functions to manage apps in ownCloud
Source:lib/public/App.php#45

Methods

public static OCP\App::registerPersonal($app, $page)
Register a Configuration Screen that should appear in the personal settings section.
Source:

lib/public/App.php#56

Parameters:
  • $app (string) appid
  • $page (string) page to be included
Returns:

void

Since:

4.0.0

Deprecated:

14.0.0 Use settings section in appinfo.xml to register personal admin sections

public static OCP\App::registerAdmin($app, $page)
Register a Configuration Screen that should appear in the Admin section.
Source:

lib/public/App.php#68

Parameters:
  • $app (string) string appid
  • $page (string) string page to be included
Returns:

void

Since:

4.0.0

Deprecated:

14.0.0 Use settings section in appinfo.xml to register admin sections

public static OCP\App::getAppInfo($app, $path=false)
Read app metadata from the info.xml file
Source:

lib/public/App.php#80

Parameters:
  • $app (string) id of the app or the path of the info.xml file
  • $path (bool) (optional)
Returns:

array | null

Deprecated:

14.0.0 ise \OC::$server->getAppManager()->getAppInfo($appId)

Since:

4.0.0

public static OCP\App::isEnabled($app)
checks whether or not an app is enabled
Source:

lib/public/App.php#93

Parameters:
  • $app (string)
Returns:

bool This function checks whether or not an app is enabled.

Since:

4.0.0

Deprecated:

13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId)

public static OCP\App::getAppVersion($app)
Get the last version of the app from appinfo/info.xml
Source:

lib/public/App.php#104

Parameters:
  • $app (string)
Returns:

string

Since:

4.0.0

Deprecated:

14.0.0 use \OC::$server->getAppManager()->getAppVersion($appId)