public function PushIntent::extendedEntityExportLogMessage in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 8 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
2 calls to PushIntent::extendedEntityExportLogMessage()
- PushIntent::afterPush in src/
PushIntent.php - PushIntent::execute in src/
PushIntent.php - Push the given entity.
File
- src/
PushIntent.php, line 477
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,
]);
}
}