Nextcloud app / Custom menu - This application customs the top menu of Nextcloud - Chat room: https://matrix.to/#/!TFPucDATKODpHNVAtu:neutralnetwork.org?via=neutralnetwork.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
1.0 KiB

<?php
namespace OCA\SideMenu\Controller;
use OCP\AppFramework\Controller;
use OCP\IRequest;
use OCP\INavigationManager;
use OCP\AppFramework\Http\DataDownloadResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Http\JSONResponse;
class ApiController extends Controller
{
/**
* @var INavigationManager
*/
protected $navigationManager;
/**
* @param string $appName
* @param IRequest $request
* @param INavigationManager $navigationManager
*/
public function __construct($appName, IRequest $request, INavigationManager $navigationManager)
{
parent::__construct($appName, $request);
$this->navigationManager = $navigationManager;
}
/**
* @NoAdminRequired
* @NoCSRFRequired
*
* @return JSONResponse
*/
public function apps(): JSONResponse
{
$apps = $this->navigationManager->getAll();
$data = [
'apps' => $apps,
];
return new JSONResponse($apps);
}
}