You are here

public function CloudBlockManager::isBlockEnabled in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 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_cloud

Code

public function isBlockEnabled(CloudBlock $block) {
  $localBlocks = $this
    ->loadInstalledBlocks();
  return in_array($block
    ->getName(), array_keys($localBlocks));
}