Hello, I’m want to overwrite a function in the modulefactory (getAssignableModules()) and followed the developer doc’s extending Xibo.
custom\settings-custom.php
$MyCustomMiddlewareName = new \Xibo\Custom\Middleware();
$MyMiddleware = $MyCustomMiddlewareName ;
custom\MyMiddleware .php
use Psr\Http\Server\MiddlewareInterface as Middleware; <-???
class MyMiddleware implements Middleware
{
…
}
Then I would need to implement the function process(). The ‘xibo extend’ documentation is not clear about this.
Do you have an complete example code for extending xibo in stead of a code snippet?
I want to restrict the number of modules for a standard user. The user only needs text and image. For this particilar issue I can find another solution, but …
I also like to work with extended functionionality. I tried the example in de developers doc " * [Custom Display Profiles]" (Create Custom Display Profiles | Xibo Digital Signage). But I cannot get it to work. The code is not complete and I keep running into errors like: the function process() must be implemented.
A complete, working example with settings-custom.php and yourCustomMiddlewareClassName.php would be very helpfull.
We’re always happy to take feedback if you have the time! We really want our developer tools to be as simple as they can be, so that starts with the docs.
If you watch out for when v4 is released (4th September) you should see the docs get updated at that time.