How to Override Event observer in local Plugin ??

How to Override Event observer in local Plugin ??

by Berret Hinn -
Number of replies: 0

      Hi Everyone In moodle I want the  user_deleted  event to listen to my Custom  function that is going to be implemented in my  local/service plugin.  I saw the Event 2 API as well as Migration Documentation. but i can't understand where the coding has to be implemented exactly .Below I attached the compressed files of my  custom plugin please guide me what are all the mistakes I have made in that and tell me where I have to change the code I did this by seeing few links 

https://moodle.org/mod/forum/discuss.php?d=278058#p1271003

https://moodle.org/mod/forum/discuss.php?d=276309

  and at the same time where I have to trigger the event in service plugin  (in which php file ) or otherwise in moodle\lib\moodlelib.php   --> $event = \core\event\user_deleted::create   to be replaced as  $event = \service\event\user_deleted::create 

Average of ratings: -