You are here

protected function UserEntityNormalizer::getContentSyncMetadata in Content Synchronization 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Normalizer/UserEntityNormalizer.php \Drupal\content_sync\Normalizer\UserEntityNormalizer::getContentSyncMetadata()

Parameters

$object:

array $context:

Return value

array

Overrides ContentEntityNormalizer::getContentSyncMetadata

File

src/Normalizer/UserEntityNormalizer.php, line 62

Class

UserEntityNormalizer
User entity normalizer class.

Namespace

Drupal\content_sync\Normalizer

Code

protected function getContentSyncMetadata($object, $context = []) {

  /** @var \Drupal\user\Entity\User $object */
  $metadata = parent::getContentSyncMetadata($object, $context);
  if ($object
    ->isAnonymous()) {
    $metadata['is_anonymous'] = TRUE;
  }
  return $metadata;
}