Hello!
I want to use the post_shared and post_unshare Hooks. Can you give an example what the usage of the hooks looks like?
My code :
class Share
{
private $logger;
public function __construct(*which service goes here?*, ILogger $logger)
{
$this->logger = $logger;
}
public function register()
{
$callbackShared = function ($share) {
$this->logger->info('this is a post share');
};
$this->*which service goes here?*->listen('OCP\Share', 'post_shared', $callbackShared);
}
}
Can i use the Automatic Dependency Assembly here? If yes, which predefinded service is the right one?
Is ‘OCP\Share’ even the correct scope?
Thanks and regards
Fabian