protected function DefaultUserReferenceHandler::serializeReference in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Plugin/cms_content_sync/field_handler/DefaultUserReferenceHandler.php \Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler\DefaultUserReferenceHandler::serializeReference()
- 2.0.x src/Plugin/cms_content_sync/field_handler/DefaultUserReferenceHandler.php \Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler\DefaultUserReferenceHandler::serializeReference()
Parameters
$value:
Return value
array
Throws
\Drupal\Core\Entity\EntityStorageException
\Drupal\cms_content_sync\Exception\SyncException
\GuzzleHttp\Exception\GuzzleException
Overrides EntityReferenceHandlerBase::serializeReference
File
- src/
Plugin/ cms_content_sync/ field_handler/ DefaultUserReferenceHandler.php, line 97
Class
- DefaultUserReferenceHandler
- Providing a minimalistic implementation for any field type.
Namespace
Drupal\cms_content_sync\Plugin\cms_content_sync\field_handlerCode
protected function serializeReference(PushIntent $intent, EntityInterface $reference, $value) {
return [
self::IDENTIFICATION_EMAIL => $reference
->get('mail')->value,
self::IDENTIFICATION_NAME => $reference
->get('name')->value,
];
}