license_manager implements license_manager_interface
License Manager.
Domain Service responsible for handling License state and UI presentation. Delegates low-level API calls to infrastructure\service\license_service.
Table of Contents
Interfaces
- license_manager_interface
- Contract for License Management.
Properties
- $service : license_service
Methods
- __construct() : mixed
- Constructor.
- activate() : array<string, mixed>
- Activate the license key stored in config.
- check_status() : array<string, mixed>
- Check status against the API.
- check_theme_update() : array<string|int, mixed>
- check_update() : array<string, mixed>
- Check for plugin updates available for the licensed install.
- deactivate() : array<string, mixed>
- Deactivate the current license.
- get_code_version() : bool
- get_info() : array<string, mixed>
- Get cached license information details.
- render_info() : string
- Render the HTML with license information.
Properties
$service read-only
protected
license_service
$service
Methods
__construct()
Constructor.
public
__construct(license_service $service) : mixed
Parameters
- $service : license_service
activate()
Activate the license key stored in config.
public
activate() : array<string, mixed>
Tags
Return values
array<string, mixed>check_status()
Check status against the API.
public
check_status([bool $force = false ]) : array<string, mixed>
Parameters
- $force : bool = false
Tags
Return values
array<string, mixed>check_theme_update()
public
check_theme_update() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>check_update()
Check for plugin updates available for the licensed install.
public
check_update() : array<string, mixed>
Tags
Return values
array<string, mixed>deactivate()
Deactivate the current license.
public
deactivate() : array<string, mixed>
Tags
Return values
array<string, mixed>get_code_version()
public
get_code_version() : bool
Tags
Return values
boolget_info()
Get cached license information details.
public
get_info() : array<string, mixed>
Tags
Return values
array<string, mixed>render_info()
Render the HTML with license information.
public
render_info() : string
Keeps formatting responsibility within the manager class, reducing the code in lib.php to the minimum required by Moodle.