perfect! fixed!
thanks again!
Typed property $searchParamsFetcher must not be accessed before initialization
Collapse
X
-
This is more PHP language question. You don't call parent constructor. I would not recommend extend the constructor.
I recommend using an Action class instead: https://docs.espocrm.com/development/api-action/#actionLeave a comment:
-
Typed property $searchParamsFetcher must not be accessed before initialization
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:
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"; } }
Tags: None
Leave a comment: