Initial commit

This commit is contained in:
root
2025-12-21 09:57:51 -05:00
committed by Sebastian Krupinski
commit c0fa9cadfb
10 changed files with 2778 additions and 0 deletions

71
lib/Module.php Normal file
View File

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