mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-20 23:42:14 +00:00
Active calls dashboard widget (#7411)
* Add context filter * Add dashboard widget * Add config for widget * Add domain filter to service * Fix websocket_service to get the class name * Add new method get_service_name
This commit is contained in:
@@ -434,7 +434,13 @@ class subscriber {
|
||||
return $this->authenticated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows overriding the token authentication
|
||||
* @param bool $authenticated
|
||||
* @return self
|
||||
*/
|
||||
public function set_authenticated(bool $authenticated): self {
|
||||
$this->authenticated = $authenticated;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -452,6 +458,14 @@ class subscriber {
|
||||
return $this->service;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias of service_name without the parameters
|
||||
* @return string
|
||||
*/
|
||||
public function get_service_name(): string {
|
||||
return $this->service_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set the service_name
|
||||
* @param string|null $service_name
|
||||
@@ -495,6 +509,11 @@ class subscriber {
|
||||
return isset($this->services[$service_name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to a service by ensuring this subscriber has the appropriate permissions
|
||||
* @param string $service_name
|
||||
* @return self
|
||||
*/
|
||||
public function subscribe(string $service_name): self {
|
||||
$this->services[$service_name] = true;
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user