Files
provider_local_people/lib/Module.php
T
Sebastian 6c33611916
PHP Unit Tests / test (pull_request) Successful in 57s
PHP Integration Tests / Integration Tests (pull_request) Successful in 1m14s
fix: correct module handle to match folder name and sibling convention
Handle and permission key were 'people_provider_local' (word order
transposed), inconsistent with the folder name and every sibling
provider_local_* module. This broke module:install/module:enable when
invoked with the folder name, as done in CI and by every other module.

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-07-23 22:50:16 -04:00

72 lines
1.7 KiB
PHP

<?php
namespace KTXM\ProviderLocalPeople;
use KTXC\Resource\ProviderManager;
use KTXF\Module\ModuleBrowserInterface;
use KTXF\Module\ModuleInstanceAbstract;
use KTXF\Resource\Provider\ProviderInterface;
use KTXM\ProviderLocalPeople\Providers\Provider;
/**
* People Provider Local Module
*/
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
{
public function __construct(
private readonly ProviderManager $providerManager,
) {}
public function handle(): string
{
return 'provider_local_people';
}
public function label(): string
{
return 'People Provider Local';
}
public function author(): string
{
return 'Ktrix';
}
public function description(): string
{
return 'People provider module for Ktrix - provides local people storage';
}
public function version(): string
{
return '0.0.1';
}
public function permissions(): array
{
return [
'provider_local_people' => [
'label' => 'Access People Provider Local',
'description' => 'View and access the local people provider module',
'group' => 'People Providers'
],
];
}
public function boot(): void
{
$this->providerManager->register(ProviderInterface::TYPE_PEOPLE, 'default', Provider::class);
}
public function registerBI(): array {
return [
'handle' => $this->handle(),
'namespace' => 'ProviderLocalPeople',
'version' => $this->version(),
'label' => $this->label(),
'author' => $this->author(),
'description' => $this->description()
];
}
}