public function CloudBlockManager::isBlockEnabled in Gutenberg 8.2
Same name and namespace in other branches
- 8 modules/gutenberg_cloud/src/CloudBlockManager.php \Drupal\gutenberg_cloud\CloudBlockManager::isBlockEnabled()
Check if the block is enabled locally.
Parameters
\Drupal\gutenberg_cloud\CloudBlock $block: CloudBlock instance.
Return value
bool True if block has been enabled.
File
- modules/
gutenberg_cloud/ src/ CloudBlockManager.php, line 160
Class
- CloudBlockManager
- Class CloudBlockManager.
Namespace
Drupal\gutenberg_cloudCode
public function isBlockEnabled(CloudBlock $block) {
$localBlocks = $this
->loadInstalledBlocks();
return in_array($block
->getName(), array_keys($localBlocks));
}