Files
ignacionelson 6e47d76ba6 ProjectSend 2.0.0
Client file sharing, rebuilt from the ground up: a private area per
client, resumable uploads, folders, groups and categories, sharing with
expiry dates and download limits, comments, file versions, an activity
log, a REST API, and sixteen languages.

This repository begins here. ProjectSend 2 was developed privately, and
that development history is not published — the previous generation
remains available, with its own history, at projectsend/legacy.

Free software under the GNU General Public License v2, or (at your
option) any later version.
2026-08-14 01:38:12 -03:00

44 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Platform\Theming;
use Closure;
/**
* One selectable theme: a key used in Setting values and Inertia/view
* resolution paths, a human label for the picker, a short description
* (shown under the label in the picker so a client can tell what a theme
* is actually for — v1 had this and it was dropped in the rewrite until
* 2026-08-05), and the capability (if any) gating it — null means free,
* available in every edition.
*
* $requires is a Capability enum's string value, not the enum itself, so
* that the private cloud-modules package's registration code (see
* ThemesServiceProvider) never needs a hard dependency on the host app's
* App\Modules\Platform\Capabilities\Capability class — that class (and
* PublicThemeRegistry/EmailThemeRegistry themselves) doesn't exist in the
* package's own isolated Testbench suite, only inside the real host app.
* ThemeRegistry converts it back to a real Capability internally.
*
* $context is only meaningful for email themes: extra data resolved
* fresh at send time (see ThemedMailChannel) and merged into the
* header/footer view context — e.g. the Branded premium theme uses it
* to pull the Branding module's current logo URL without core needing
* to know that module exists.
*/
final class ThemeDefinition
{
/**
* @param (Closure(): array<string, mixed>)|null $context
*/
public function __construct(
public readonly string $key,
public readonly string $label,
public readonly string $description,
public readonly ?string $requires = null,
public readonly ?Closure $context = null,
) {}
}