I'm struggling with some weird error once I go to my custom entity via de browser: ERROR: Slim Application Error Type: Error Code: 0 Message: Typed property Espo\Core\Controllers\RecordBase::$searchParamsFet cher must not be accessed before initialization.
I have created a custom controller via the entity manager and added the following code:
The code of my service is:
If i comment the __contruct it's all working. What is going wrong here?
I have created a custom controller via the entity manager and added the following code:
Code:
<?php namespace Espo\Custom\Controllers; use Espo\Custom\Services\EmptyService; class CallbackEntity extends \Espo\Core\Templates\Controllers\Base { public function __construct(private EmptyService $emptyService) { } }
Code:
<?php namespace Espo\Custom\Services; class EmptyService { public function getEmptyValue(): string { return "empty value"; } }
Comment