protected function ModerationStateTransitionStorage::mapFromStorageRecords in Workbench Moderation 8
Same name and namespace in other branches
- 8.2 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 61
Class
- ModerationStateTransitionStorage
- Define class for moderation state transitions.
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;
}