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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • v_pavlenko
    Junior Member
    • Jun 2022
    • 7

    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
  • yuri
    Member
    • Mar 2014
    • 8440

    #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); 
    
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...