public function AddressFormatSubscriber::onGetDefinition in Open Social 8
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 8.2 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 8.3 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 8.4 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 8.5 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 8.6 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 8.7 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 8.8 modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 10.3.x modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 10.0.x modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 10.1.x modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
- 10.2.x modules/social_features/social_group/src/EventSubscriber/AddressFormatSubscriber.php \Drupal\social_group\EventSubscriber\AddressFormatSubscriber::onGetDefinition()
The onGetDefinition function.
File
- modules/
social_features/ social_group/ src/ EventSubscriber/ AddressFormatSubscriber.php, line 29
Class
- AddressFormatSubscriber
- Class AddressFormatSubscriber.
Namespace
Drupal\social_group\EventSubscriberCode
public function onGetDefinition($event) {
$definition = $event
->getDefinition();
// This makes all address fields optional for all entity types on site.
// We can't set empty array because of check in AddressFormat.php, line 128.
$definition['required_fields'] = [
'givenName',
];
$event
->setDefinition($definition);
}