class SocialEventEnrollService in Open Social 8.7
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
- 8.5 modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
- 8.6 modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
- 8.8 modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
- 10.3.x modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
- 10.0.x modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
- 10.1.x modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
- 10.2.x modules/social_features/social_event/src/Service/SocialEventEnrollService.php \Drupal\social_event\Service\SocialEventEnrollService
Class SocialEventEnrollService.
@package Drupal\social_event\Service
Hierarchy
- class \Drupal\social_event\Service\SocialEventEnrollService implements SocialEventEnrollServiceInterface
Expanded class hierarchy of SocialEventEnrollService
1 string reference to 'SocialEventEnrollService'
- social_event.services.yml in modules/
social_features/ social_event/ social_event.services.yml - modules/social_features/social_event/social_event.services.yml
1 service uses SocialEventEnrollService
- social_event.enroll in modules/
social_features/ social_event/ social_event.services.yml - Drupal\social_event\Service\SocialEventEnrollService
File
- modules/
social_features/ social_event/ src/ Service/ SocialEventEnrollService.php, line 12
Namespace
Drupal\social_event\ServiceView source
class SocialEventEnrollService implements SocialEventEnrollServiceInterface {
/**
* {@inheritdoc}
*/
public function isEnabled(NodeInterface $node) {
if ($node
->bundle() === 'event' && $node
->hasField('field_event_enroll')) {
$was_not_changed = $node->field_event_enroll
->isEmpty();
$is_enabled = $node->field_event_enroll->value;
return $was_not_changed || $is_enabled;
}
return FALSE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SocialEventEnrollService:: |
public | function |
Check if enrollment is allowed for given event. Overrides SocialEventEnrollServiceInterface:: |