diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-09-09 12:20:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-09 12:20:27 +0200 |
commit | b3f663b8aa0f458c3d89a94bb88716bfd7c0e892 (patch) | |
tree | 393f2f347fd206d4e299cae186f77cfc67960122 /lib/private/App | |
parent | 20e8ee171d1a2fb63e8c5413b4bad2e880ea2c12 (diff) | |
parent | 2d56664e3587214254c1fd35370b6854c0ad878b (diff) | |
download | nextcloud-server-b3f663b8aa0f458c3d89a94bb88716bfd7c0e892.tar.gz nextcloud-server-b3f663b8aa0f458c3d89a94bb88716bfd7c0e892.zip |
Merge pull request #16859 from PhrozenByte/patch-1
Add IAppManager::getAppWebPath()
Diffstat (limited to 'lib/private/App')
-rw-r--r-- | lib/private/App/AppManager.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 322731d677c..19242245600 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -13,6 +13,7 @@ * @author Robin Appelman <robin@icewind.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Vincent Petry <pvince81@owncloud.com> + * @author Daniel Rudolf <nextcloud.com@daniel-rudolf.de> * * @license AGPL-3.0 * @@ -404,6 +405,21 @@ class AppManager implements IAppManager { } /** + * Get the web path for the given app. + * + * @param string $appId + * @return string + * @throws AppPathNotFoundException if app path can't be found + */ + public function getAppWebPath(string $appId): string { + $appWebPath = \OC_App::getAppWebPath($appId); + if($appWebPath === false) { + throw new AppPathNotFoundException('Could not find web path for ' . $appId); + } + return $appWebPath; + } + + /** * Clear the cached list of apps when enabling/disabling an app */ public function clearAppsCache() { |