Encapsulation for Hubleto app.
\Hubleto\Framework\App
| Parent class | \Hubleto\Framework\Core |
| Implements | \Hubleto\Framework\Interfaces\AppInterface |
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
DEFAULT_INSTALLATION_CONFIG |
public | ['sidebarOrder' => 500] | |
APP_TYPE_COMMUNITY |
public | 'community' | |
APP_TYPE_PREMIUM |
public | 'premium' | |
APP_TYPE_EXTERNAL |
public | 'external' |
Properties
Basic identification of the app. More details at https://developer.hubleto.eu/docs/apps/manifest
If set to false, app is not accessible.
Apps get enabled in AppManager.
If set to false, app cannot be disabled.
Some core apps (e.g., Desktop) have this set to false.
If set to true, permission checking is not performed for this app.`
Path to source code of this app. Usefull when accessing app's resources.
TWIG namespace of this app.
App's PHP namespace.
App's full classname.
App's short name, extracted from the namespace.
If set to true, app is activated in the UI. Only enabled app can be activated.
Only one app can be activated at a time.
Path to TWIG view for rendering the apps's sidebar.
List of app's search switches used in global Hubleto fulltext search.
Methods
ƒ __construct
Default app's constructor.
public __construct(): mixed
ƒ validateManifest
[Description for validateManifest]
public validateManifest(): mixed
ƒ init
[Description for init]
public init(): void
ƒ onBeforeRender
[Description for onBeforeRender]
public onBeforeRender(): void
ƒ hook
[Description for hook]
public hook(string $hook): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$hook |
string |
ƒ getRootUrlSlug
[Description for getRootUrlSlug]
public getRootUrlSlug(): string
ƒ getSidebarBadgeNumber
[Description for getSidebarBadgeNumber]
public getSidebarBadgeNumber(): int
ƒ installTables
[Description for installTables]
public installTables(int $round): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$round |
int |
ƒ getAvailableControllerClasses
[Description for getAvailableControllerClasses]
public getAvailableControllerClasses(): array
ƒ getAvailableModelClasses
[Description for getAvailableModelClasses]
public getAvailableModelClasses(): array
ƒ installDefaultPermissions
[Description for installDefaultPermissions]
public installDefaultPermissions(): void
ƒ assignPermissionsToRoles
[Description for assignPermissionsToRoles]
public assignPermissionsToRoles(): void
ƒ generateDemoData
[Description for generateDemoData]
public generateDemoData(): void
ƒ renderSecondSidebar
[Description for renderSecondSidebar]
public renderSecondSidebar(): string
ƒ search
[Description for search]
public search(array $expressions): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$expressions |
array |
ƒ addSetting
[Description for addSetting]
public addSetting(\Hubleto\Framework\Interfaces\AppInterface $app, array $setting): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$app |
\Hubleto\Framework\Interfaces\AppInterface | |
$setting |
array |
ƒ getSettings
[Description for getSettings]
public getSettings(): array
ƒ getFullConfigPath
[Description for getFullConfigPath]
public getFullConfigPath(string $path): string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string |
ƒ saveConfig
[Description for saveConfig]
public saveConfig(string $path, string $value = ''): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$value |
string |
ƒ saveConfigForUser
[Description for saveConfigForUser]
public saveConfigForUser(string $path, string $value = ''): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$value |
string |
ƒ configAsString
[Description for configAsString]
public configAsString(string $path, string $defaultValue = ''): string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$defaultValue |
string |
ƒ configAsInteger
[Description for configAsInteger]
public configAsInteger(string $path, int $defaultValue): int
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$defaultValue |
int |
ƒ configAsFloat
[Description for configAsFloat]
public configAsFloat(string $path, float $defaultValue): float
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$defaultValue |
float |
ƒ configAsBool
[Description for configAsBool]
public configAsBool(string $path, bool $defaultValue = false): bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$defaultValue |
bool |
ƒ configAsArray
[Description for configAsArray]
public configAsArray(string $path, array $defaultValue = []): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$defaultValue |
array |
ƒ setConfigAsString
[Description for setConfigAsString]
public setConfigAsString(string $path, string $value = ''): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$value |
string |
ƒ setConfigAsInteger
[Description for setConfigAsInteger]
public setConfigAsInteger(string $path, int $value): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$value |
int |
ƒ setConfigAsFloat
[Description for setConfigAsFloat]
public setConfigAsFloat(string $path, float $value): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$value |
float |
ƒ setConfigAsBool
[Description for setConfigAsBool]
public setConfigAsBool(string $path, bool $value = false): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$value |
bool |
ƒ setConfigAsArray
[Description for setConfigAsArray]
public setConfigAsArray(string $path, array $value = []): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$path |
string | |
$value |
array |
ƒ dangerouslyInjectDesktopHtmlContent
[Description for dangerouslyInjectDesktopHtmlContent]
public dangerouslyInjectDesktopHtmlContent(string $where): string
Parameters
| Parameter | Type | Description |
|---|---|---|
$where |
string |
ƒ addSearchSwitch
[Description for addSearchSwitch]
public addSearchSwitch(string $switch, string $name): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$switch |
string | |
$name |
string |
ƒ canHandleSearchSwith
[Description for canHandleSearchSwith]
public canHandleSearchSwith(string $switch): bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$switch |
string |
ƒ collectExtendibles
[Description for collectExtendibles]
public collectExtendibles(string $extendibleName): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$extendibleName |
string |
Inherited methods
ƒ __construct
public __construct(): mixed
ƒ setDebugLevel
[Description for setDebugLevel]
public setDebugLevel(int $level): void
Parameters
| Parameter | Type | Description |
|---|---|---|
$level |
int |
ƒ getDebugLevel
[Description for getDebugLevel]
public getDebugLevel(): int
ƒ getServiceStatic
Shortcut for the dependency injection.
public static getServiceStatic(string $service): mixed
- This method is static.
Parameters
| Parameter | Type | Description |
|---|---|---|
$service |
string |
ƒ getService
[Description for getService]
public getService(string $service): mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$service |
string |
ƒ env
Shortcut for the env service.
public env(): \Hubleto\Framework\Env
ƒ authProvider
Shortcut for the authentication service.
public authProvider(): \Hubleto\Framework\Interfaces\AuthInterface
ƒ db
Shortcut for the database service.
public db(): \Hubleto\Framework\Db
ƒ appManager
Shortcut for the app manager service.
public appManager(): \Hubleto\Framework\Interfaces\AppManagerInterface
ƒ router
Shortcut for the router service.
public router(): \Hubleto\Framework\Router
ƒ hookManager
Shortcut for the hook manager service.
public hookManager(): \Hubleto\Framework\HookManager
ƒ sessionManager
Shortcut for the session manager service.
public sessionManager(): \Hubleto\Framework\SessionManager
ƒ permissionsManager
Shortcut for the permissions manager service.
public permissionsManager(): \Hubleto\Framework\PermissionsManager
ƒ cronManager
Shortcut for the cron manager service.
public cronManager(): \Hubleto\Framework\CronManager
ƒ emailProvider
Shortcut for the email provider service.
public emailProvider(): \Hubleto\Framework\EmailProvider
ƒ config
Shortcut for the config service.
public config(): \Hubleto\Framework\Interfaces\ConfigManagerInterface
ƒ terminal
Shortcut for the terminal service.
public terminal(): \Hubleto\Framework\Interfaces\TerminalInterface
ƒ logger
Shortcut for the logger service.
public logger(): \Hubleto\Framework\Interfaces\LoggerInterface
ƒ locale
Shortcut for the locale service.
public locale(): \Hubleto\Framework\Interfaces\LocaleInterface
ƒ renderer
Shortcut for the renderer service.
public renderer(): \Hubleto\Framework\Interfaces\RendererInterface
ƒ translator
Shortcut for the translator service.
public translator(): \Hubleto\Framework\Interfaces\TranslatorInterface
ƒ getModel
[Description for getModel]
public getModel(string $model): \Hubleto\Framework\Interfaces\ModelInterface
Parameters
| Parameter | Type | Description |
|---|---|---|
$model |
string |
ƒ getController
[Description for getController]
public getController(string $controller): \Hubleto\Framework\Controller
Parameters
| Parameter | Type | Description |
|---|---|---|
$controller |
string |
ƒ translate
public translate(string $string, array<string,string> $vars = [], string $contextInner = ''): string
Parameters
| Parameter | Type | Description |
|---|---|---|
$string |
string | |
$vars |
array<string,string> | |
$contextInner |
string |
