- Issue created by @Grimreaper
https://git.drupalcode.org/project/layout_builder_restrictions_by_role/-...
private function getBlockTypeByUuid() {
if ($this->moduleHandler->moduleExists('block_content')) {
// Pre-load all reusable blocks by UUID to retrieve block type.
$query = $this->database->select('block_content', 'b')
->fields('b', ['uuid', 'type']);
$results = $query->execute();
return $results->fetchAllKeyed(0, 1);
}
return [];
}
The comments says that it is filtering on reusable blocks while it it currently not the case.
This should improve performance also in correlation with #3322896: Cache getBlockTypeByUuid → .
Add a merge on the block_content_field_data table to avoid the entity query.
Agree on solution
Implements agreed solution
Active
1.0
Code