Overrides \Drupal\Core\Entity\DatabaseStorageController::attachLoad().
Overrides DatabaseStorageControllerNG::attachLoad
protected function attachLoad(&$blocks, $load_revision = FALSE) {
// Create an array of block types for passing as a load argument.
// Note that blocks at this point are still \StdClass objects returned from
// the database.
foreach ($blocks as $id => $entity) {
$types[$entity->type] = $entity->type;
}
// Besides the list of blocks, pass one additional argument to
// hook_custom_block_load(), containing a list of block types that were
// loaded.
$this->hookLoadArguments = array(
$types,
);
parent::attachLoad($blocks, $load_revision);
}