Initial commit: Minimal Profile app for Nextcloud 33

This commit is contained in:
2026-04-16 14:01:13 +02:00
commit 339a2969aa
7 changed files with 231 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace OCA\MinimalProfile\AppInfo;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
class Application extends App implements IBootstrap {
public const APP_ID = 'minimalprofile';
public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
}
public function register(IRegistrationContext $context): void {
}
public function boot(IBootContext $context): void {
}
}

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace OCA\MinimalProfile\Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IConfig;
use OCP\IRequest;
class ApiController extends Controller {
public function __construct(
string $appName,
IRequest $request,
private IConfig $config,
) {
parent::__construct($appName, $request);
}
public function getHiddenFields(): JSONResponse {
$value = $this->config->getAppValue('minimalprofile', 'hidden_fields', '');
$hiddenFields = $value !== '' ? json_decode($value, true) ?? [] : [];
return new JSONResponse([
'hiddenFields' => $hiddenFields,
]);
}
}