class MentionsDelete in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 8.2 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 8.3 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 8.4 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 8.5 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 8.6 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 8.7 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 8.8 modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 10.3.x modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 10.0.x modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 10.1.x modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
- 10.2.x modules/custom/mentions/src/EventSubscriber/MentionsDelete.php \Drupal\mentions\EventSubscriber\MentionsDelete
MentionsDelete handles event 'mentions.delete'.
Hierarchy
- class \Drupal\mentions\EventSubscriber\MentionsDelete implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
Expanded class hierarchy of MentionsDelete
File
- modules/
custom/ mentions/ src/ EventSubscriber/ MentionsDelete.php, line 10
Namespace
Drupal\mentions\EventSubscriberView source
class MentionsDelete implements EventSubscriberInterface {
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
$events = [];
$events['mentions.delete'][] = [
'onMentionsDelete',
0,
];
return $events;
}
/**
* Event handler.
*/
public function onMentionsDelete($event) {
$config = \Drupal::config('mentions.mentions');
$config_mentions_events = $config
->get('mentions_events');
$action_id = $config_mentions_events['delete'];
if (empty($action_id)) {
return;
}
$entity_storage = \Drupal::entityManager()
->getStorage('action');
$action = $entity_storage
->load($action_id);
$action_plugin = $action
->getPlugin();
if (!empty($action_id)) {
$action_plugin
->execute(FALSE);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MentionsDelete:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | |
MentionsDelete:: |
public | function | Event handler. |