Attach to delete event (Calendar)

Discuss about Group-Office development here

Moderator: Developers

star0815
Posts: 6
Joined: Thu Jun 07, 2018 9:19 am

Attach to delete event (Calendar)

Postby star0815 » Tue Aug 14, 2018 4:01 pm

Hi,

I have some issues when attaching to the "delete" event in Calendar module. Attaching to "store" or "submit" events works fine.

Code: Select all

public static function initListeners() 
{		
	$c = new \GO\Calendar\Controller\EventController();
        $c->addListener('submit', 'GO\Myhooks\MyhooksModule', 'submit');
        $c->addListener('delete', 'GO\Myhooks\MyhooksModule', 'delete');
	parent::initListeners();
}

Code: Select all

public static function delete()
{
        \GO::debug("MYHOOKS delete...");
}
Debug output doesn't show any custom listener fireing for "delete":
[aa] Controller route r=calendar/event/store
[aa] Firing listener for class GO-Calendar-Controller-EventController event store: GO\Myhooks\MyhooksModule::store
[aa] Script running at [shutdown] for 0.026524066925049ms
[aa] --------------------
[aa] Controller route r=calendar/event/delete
[aa] Script running at [shutdown] for 0.032601118087769ms
[aa] --------------------
Is it even possible to attach a listener?

Best regards,
Rapha

Who is online

Users browsing this forum: No registered users and 1 guest

cron