public function Log::onNotConfirmedEntitiesFound in Acquia Content Hub 8.2
Logs a brief information about "stale" entities found.
Parameters
\Drupal\acquia_contenthub_publisher\Event\NotConfirmedEntitiesFoundEvent $event: Event.
File
- modules/
acquia_contenthub_publisher/ src/ EventSubscriber/ NotConfirmedEntitiesFound/ Log.php, line 49
Class
- Log
- Log for not yet confirmed entities found.
Namespace
Drupal\acquia_contenthub_publisher\EventSubscriber\NotConfirmedEntitiesFoundCode
public function onNotConfirmedEntitiesFound(NotConfirmedEntitiesFoundEvent $event) {
$stale_entities_breakdown = [];
array_map(function ($item) use (&$stale_entities_breakdown) {
$stale_entities_breakdown[$item->entity_type][] = $item->entity_id;
}, $event
->getItems());
array_walk($stale_entities_breakdown, function (&$value, $key) {
$value = $key . ' [' . implode(', ', $value) . ']';
});
$this->logger
->warning('"Stale" entities found (type [ids]): %entities_breakdown.', [
'%entities_breakdown' => implode('; ', $stale_entities_breakdown),
]);
}