activity_basics.api.php in Open Social 8.4
Same filename and directory in other branches
- 8.9 modules/custom/activity_basics/activity_basics.api.php
- 8.5 modules/custom/activity_basics/activity_basics.api.php
- 8.6 modules/custom/activity_basics/activity_basics.api.php
- 8.7 modules/custom/activity_basics/activity_basics.api.php
- 8.8 modules/custom/activity_basics/activity_basics.api.php
- 10.3.x modules/custom/activity_basics/activity_basics.api.php
- 10.0.x modules/custom/activity_basics/activity_basics.api.php
- 10.1.x modules/custom/activity_basics/activity_basics.api.php
- 10.2.x modules/custom/activity_basics/activity_basics.api.php
Hooks provided by the Activity module.
File
modules/custom/activity_basics/activity_basics.api.phpView source
<?php
/**
* @file
* Hooks provided by the Activity module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Provide a method to alter the recipients used as Organizers.
*
* @param array $recipients
* The recipients receiving a notification.
* @param \Drupal\node\Entity\Node $event
* The Event that was joined.
*
* @ingroup activity_basics_api
*/
function hook_activity_recipient_organizer_alter(array &$recipients, \Drupal\node\Entity\Node $event) {
$organizers = $event
->getOwnerId();
// Add the creator of the Event as a recipient.
$recipients[] = [
'target_type' => 'user',
'target_id' => $organizers
->getOwnerId(),
];
}
/**
* @} End of "addtogroup hooks".
*/
Functions
Name | Description |
---|---|
hook_activity_recipient_organizer_alter | Provide a method to alter the recipients used as Organizers. |