public function PushIntent::extendedEntityExportLogMessage in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/PushIntent.php \Drupal\cms_content_sync\PushIntent::extendedEntityExportLogMessage()
- 2.0.x src/PushIntent.php \Drupal\cms_content_sync\PushIntent::extendedEntityExportLogMessage()
Handle Extended Entity Export logging.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The exported entity
1 call to PushIntent::extendedEntityExportLogMessage()
- PushIntent::execute in src/
PushIntent.php - Push the given entity.
File
- src/
PushIntent.php, line 467
Class
- PushIntent
- Class PushIntent.
Namespace
Drupal\cms_content_syncCode
public function extendedEntityExportLogMessage(EntityInterface $entity) {
$settings = ContentSyncSettings::getInstance();
if ($settings
->getExtendedEntityExportLogging()) {
$serializer = \Drupal::service('serializer');
$data = $serializer
->serialize($entity, 'json', [
'plugin_id' => 'entity',
]);
\Drupal::logger('cms_content_sync_entity_export_log')
->debug('%entity_type - %uuid <br>Data: <br><pre><code>%data</code></pre>', [
'%entity_type' => $entity
->getEntityTypeId(),
'%uuid' => $entity
->uuid(),
'%data' => $data,
]);
}
}