Announcement

Collapse
No announcement yet.

How to customize Espo\Services\Stream::getSubscriberList class method?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to customize Espo\Services\Stream::getSubscriberList class method?

    It is necessary to add other related users to existing subscribers. The existing class Espo\Tools\Notification\NoteHookProcessor directly initializes the Espo\Services\Stream object, which makes it impossible to override the getSubscriberList method in Espo\Custom\Services\Stream

  • #2
    Use binding https://docs.espocrm.com/development/di/#binding to bind a custom stream service class (extended from the existing).


    PHP Code:
    $binder
        
    ->for(\Espo\Tools\Notification\NoteHookProcessor::class)
        ->
    bindImplementation(\Espo\Services\Stream::class, \Espo\Custom\Services\MyExtendedStream::class); 

    Comment

    Working...
    X