protected function ModerationStateTransitionStorage::mapFromStorageRecords in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 src/ModerationStateTransitionStorage.php \Drupal\workbench_moderation\ModerationStateTransitionStorage::mapFromStorageRecords()
Maps from storage records to entity objects.
Parameters
array $records: Associative array of query results, keyed on the entity ID.
Return value
\Drupal\Core\Entity\EntityInterface[] An array of entity objects implementing the EntityInterface.
Overrides EntityStorageBase::mapFromStorageRecords
File
- src/
ModerationStateTransitionStorage.php, line 57
Class
Namespace
Drupal\workbench_moderationCode
protected function mapFromStorageRecords(array $records) {
$entities = parent::mapFromStorageRecords($records);
$prefix = $this->entityTypeManager
->getDefinition('moderation_state')
->getConfigPrefix();
/* @var \Drupal\workbench_moderation\ModerationStateTransitionInterface $entity */
foreach ($entities as &$entity) {
$entity
->setModerationStateConfigPrefix($prefix);
}
reset($entities);
return $entities;
}