- Added `selfserve_lane` class to handle self-serve lane operations. - Implemented commands (START, STOP, RESET) and states (IDLE, IN_WASH, FAULT, etc.) for lane lifecycle. - Introduced traits for managing lane status, mode, state, caching, and port control. - Added enums for cohesive type definitions (`selfserve_lane_command`, `selfserve_lane_status`, `selfserve_lane_state`, etc.). - Configured `/modules/self-serve/lane/status` route to expose lane state and status via API. - Linked self-serve configuration via `selfserve_c` and `selfserve_enabled_c` for module toggling. - Integrated lane caching logic with Redis for performance improvements. - Updated `index.php` to include the self-serve module.
29 lines
512 B
PHP
29 lines
512 B
PHP
<?php
|
|
|
|
namespace modules\selfserve\config;
|
|
|
|
use Exception;
|
|
use traits\module_config_variable;
|
|
|
|
class selfserve_enabled_c
|
|
{
|
|
use module_config_variable;
|
|
|
|
/**
|
|
* @throws Exception
|
|
*/
|
|
public function __construct()
|
|
{
|
|
self::setupConfigVariable(
|
|
'selfserve',
|
|
'enabled',
|
|
'bool',
|
|
true,
|
|
null,
|
|
'Whether the selfserve module is enabled or not',
|
|
'1',
|
|
false,
|
|
'false'
|
|
);
|
|
}
|
|
} |